aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/wiring_analog.c
diff options
context:
space:
mode:
authorZach Eveland <zeveland@blacklabel-development.com>2011-12-18 14:18:38 -0500
committerZach Eveland <zeveland@blacklabel-development.com>2011-12-18 14:18:38 -0500
commit177641003c53844ad73584553a9d44f2da4648e2 (patch)
tree49cd8fcc2f9957a2d69db21891252de3a707d680 /cores/arduino/wiring_analog.c
parent9bd7761e3a77e939b54dc05241a57c64f1c55b74 (diff)
fixed digitalWrite on timer 4 pins (D6 and D13)
Diffstat (limited to 'cores/arduino/wiring_analog.c')
-rw-r--r--cores/arduino/wiring_analog.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/cores/arduino/wiring_analog.c b/cores/arduino/wiring_analog.c
index db6cb7e..8a6fef3 100644
--- a/cores/arduino/wiring_analog.c
+++ b/cores/arduino/wiring_analog.c
@@ -207,11 +207,7 @@ void analogWrite(uint8_t pin, int val)
#if defined(TCCR4A)
case TIMER4A:
//connect pwm to pin on timer 4, channel A
- #if defined(PWM4A) /* ATMEGA32U4 and related */
- sbi(TCCR4A, PWM4A);
- #elif defined(COM4A1) /* ATMEGA1280/2560 and related */
sbi(TCCR4A, COM4A1);
- #endif
OCR4A = val; // set pwm duty
break;
#endif
@@ -235,9 +231,7 @@ void analogWrite(uint8_t pin, int val)
#if defined(TCCR4C)
case TIMER4D:
// connect pwm to pin on timer 4, channel D
- #if defined(PWM4D) /* ATMEGA32U4 and related */
- sbi(TCCR4C, PWM4D);
- #endif
+ sbi(TCCR4C, COM4D1);
OCR4D = val; // set pwm duty
break;
#endif