aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/wiring_digital.c
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2008-11-01 22:06:13 +0000
committerDavid A. Mellis <d.mellis@arduino.cc>2008-11-01 22:06:13 +0000
commitde4710abc813016d8a2bddcc2fb1a19be43c01de (patch)
treefa2dc220559eb9d577e2f2354c0ec02660d6ab6b /cores/arduino/wiring_digital.c
parente42b8d7ef811df7f552582c57cda66a275670fe4 (diff)
Switching tests for __AVR_ATmega168__ to tests for __AVR_ATmega8__ so that less changes are needed to support other processors.
Diffstat (limited to 'cores/arduino/wiring_digital.c')
-rwxr-xr-xcores/arduino/wiring_digital.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cores/arduino/wiring_digital.c b/cores/arduino/wiring_digital.c
index f38b2e1..3044e18 100755
--- a/cores/arduino/wiring_digital.c
+++ b/cores/arduino/wiring_digital.c
@@ -53,13 +53,13 @@ static inline void turnOffPWM(uint8_t timer)
if (timer == TIMER1A) cbi(TCCR1A, COM1A1);
if (timer == TIMER1B) cbi(TCCR1A, COM1B1);
-#if defined(__AVR_ATmega168__)
+#if defined(__AVR_ATmega8__)
+ if (timer == TIMER2) cbi(TCCR2, COM21);
+#else
if (timer == TIMER0A) cbi(TCCR0A, COM0A1);
if (timer == TIMER0B) cbi(TCCR0A, COM0B1);
if (timer == TIMER2A) cbi(TCCR2A, COM2A1);
if (timer == TIMER2B) cbi(TCCR2A, COM2B1);
-#else
- if (timer == TIMER2) cbi(TCCR2, COM21);
#endif
}