diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2008-11-01 22:06:13 +0000 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2008-11-01 22:06:13 +0000 |
commit | de4710abc813016d8a2bddcc2fb1a19be43c01de (patch) | |
tree | fa2dc220559eb9d577e2f2354c0ec02660d6ab6b /cores/arduino/wiring_digital.c | |
parent | e42b8d7ef811df7f552582c57cda66a275670fe4 (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-x | cores/arduino/wiring_digital.c | 6 |
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 } |