diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2011-12-18 14:18:38 -0500 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2011-12-18 14:18:38 -0500 |
commit | 177641003c53844ad73584553a9d44f2da4648e2 (patch) | |
tree | 49cd8fcc2f9957a2d69db21891252de3a707d680 /cores/arduino/wiring_digital.c | |
parent | 9bd7761e3a77e939b54dc05241a57c64f1c55b74 (diff) |
fixed digitalWrite on timer 4 pins (D6 and D13)
Diffstat (limited to 'cores/arduino/wiring_digital.c')
-rw-r--r-- | cores/arduino/wiring_digital.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/cores/arduino/wiring_digital.c b/cores/arduino/wiring_digital.c index 112defc..75f850e 100644 --- a/cores/arduino/wiring_digital.c +++ b/cores/arduino/wiring_digital.c @@ -105,29 +105,17 @@ static void turnOffPWM(uint8_t timer) case TIMER3C: cbi(TCCR3A, COM3C1); break; #endif - #if defined(TCCR4A) - case TIMER4A: - #if defined(PWM4A) - cbi(TCCR4A, PWM4A); - #elif defined(COM4A1) - cbi(TCCR4A, COM4A1); - #endif - break; - #endif - + #if defined(TCCR4A) && defined(COM4A1) + case TIMER4A: cbi(TCCR4A, COM4A1); break; + #endif #if defined(TCCR4A) && defined(COM4B1) case TIMER4B: cbi(TCCR4A, COM4B1); break; #endif #if defined(TCCR4A) && defined(COM4C1) case TIMER4C: cbi(TCCR4A, COM4C1); break; - #endif - - #if defined(TCCR4C) - case TIMER4D: - #if defined(PWM4D) - cbi(TCCR4C, PWM4D); - #endif - break; + #endif + #if defined(TCCR4C) && defined(COM4D1) + case TIMER4D: cbi(TCCR4C, COM4D1); break; #endif #if defined(TCCR5A) |