projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
For at91sam7 family.
[bertos.git]
/
drv
/
phase.c
diff --git
a/drv/phase.c
b/drv/phase.c
index 04c895d780a6994d9a503aaac58fcf83db4dfadb..e30f46681e2694a562dc537ec21807df9ed9df72 100644
(file)
--- a/
drv/phase.c
+++ b/
drv/phase.c
@@
-78,7
+78,7
@@
DEFINE_ZEROCROSS_ISR()
if (triacs[dev].duty != TRIAC_MAX_DUTY)
TRIAC_OFF(dev);
/* Compute delay from duty */
if (triacs[dev].duty != TRIAC_MAX_DUTY)
TRIAC_OFF(dev);
/* Compute delay from duty */
- timer_setDelay(&triacs[dev].timer,
((period * (TRIAC_MAX_DUTY - triacs[dev].duty) + TRIAC_MAX_DUTY / 2) /
TRIAC_MAX_DUTY));
+ timer_setDelay(&triacs[dev].timer,
DIV_ROUND(period * (TRIAC_MAX_DUTY - triacs[dev].duty),
TRIAC_MAX_DUTY));
/* This check avoids inserting the same timer twice
* in case of an intempestive zerocross or spike */
/* This check avoids inserting the same timer twice
* in case of an intempestive zerocross or spike */