aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/wiring_digital.c
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2009-03-25 10:50:00 +0000
committerDavid A. Mellis <d.mellis@arduino.cc>2009-03-25 10:50:00 +0000
commita42326aba2fd9696a4b2e1239a5a222014056ff5 (patch)
tree69288e62749704d81d7ab11079e5868022bdc174 /cores/arduino/wiring_digital.c
parentb89ee8da481d7b9c360b689f367b7a234ec7cb11 (diff)
Adding support for the Arduino Mega (ATmega1280) to the core and bootloader.
Diffstat (limited to 'cores/arduino/wiring_digital.c')
-rwxr-xr-xcores/arduino/wiring_digital.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/cores/arduino/wiring_digital.c b/cores/arduino/wiring_digital.c
index 3044e18..1cdbf6c 100755
--- a/cores/arduino/wiring_digital.c
+++ b/cores/arduino/wiring_digital.c
@@ -61,6 +61,18 @@ static inline void turnOffPWM(uint8_t timer)
if (timer == TIMER2A) cbi(TCCR2A, COM2A1);
if (timer == TIMER2B) cbi(TCCR2A, COM2B1);
#endif
+
+#if defined(__AVR_ATmega1280__)
+ if (timer == TIMER3A) cbi(TCCR3A, COM3A1);
+ if (timer == TIMER3B) cbi(TCCR3A, COM3B1);
+ if (timer == TIMER3C) cbi(TCCR3A, COM3C1);
+ if (timer == TIMER4A) cbi(TCCR4A, COM4A1);
+ if (timer == TIMER4B) cbi(TCCR4A, COM4B1);
+ if (timer == TIMER4C) cbi(TCCR4A, COM4C1);
+ if (timer == TIMER5A) cbi(TCCR5A, COM5A1);
+ if (timer == TIMER5B) cbi(TCCR5A, COM5B1);
+ if (timer == TIMER5C) cbi(TCCR5A, COM5C1);
+#endif
}
void digitalWrite(uint8_t pin, uint8_t val)