From de4710abc813016d8a2bddcc2fb1a19be43c01de Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 1 Nov 2008 22:06:13 +0000 Subject: Switching tests for __AVR_ATmega168__ to tests for __AVR_ATmega8__ so that less changes are needed to support other processors. --- cores/arduino/wiring_digital.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cores/arduino/wiring_digital.c') 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 } -- cgit v1.2.3-18-g5258