diff options
author | Marti Bolivar <mbolivar@mit.edu> | 2010-12-08 23:39:37 -0500 |
---|---|---|
committer | Marti Bolivar <mbolivar@mit.edu> | 2010-12-08 23:39:37 -0500 |
commit | b67d281d85bd59a9738a9a43c4db1027f81d9208 (patch) | |
tree | 1940b4743a945160d21eb37c8578fa46e9118d4e /wirish/pwm.c | |
parent | b34f826ae1470aaa791bd8ed8dd66ccd4d96d82c (diff) | |
download | librambutan-b67d281d85bd59a9738a9a43c4db1027f81d9208.tar.gz librambutan-b67d281d85bd59a9738a9a43c4db1027f81d9208.zip |
Servo library tested and debugged.
Some additional HardwareTimer methods introduced to make this
convenient; ancillary libmaple/timers.h changes resulted.
Diffstat (limited to 'wirish/pwm.c')
-rw-r--r-- | wirish/pwm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wirish/pwm.c b/wirish/pwm.c index 0bf27aa..25a7415 100644 --- a/wirish/pwm.c +++ b/wirish/pwm.c @@ -38,9 +38,9 @@ void pwmWrite(uint8 pin, uint16 duty_cycle) { return; } - ccr = (TimerCCR)(PIN_MAP[pin].timer_channel); + ccr = PIN_MAP[pin].timer_ccr; - if (ccr == (TimerCCR)TIMER_INVALID) { + if (ccr == 0) { return; } |