aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/pwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'wirish/pwm.c')
-rw-r--r--wirish/pwm.c4
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;
}