From cf3ce01dad6991d0882a867dea44aa6cabf6db38 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 8 Nov 2008 21:57:48 +0000 Subject: Updating libraries for atmega328 (adding it to a couple of #if's, etc.). --- libraries/Servo/Servo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libraries/Servo') diff --git a/libraries/Servo/Servo.cpp b/libraries/Servo/Servo.cpp index ac654c3..8578fef 100755 --- a/libraries/Servo/Servo.cpp +++ b/libraries/Servo/Servo.cpp @@ -40,10 +40,10 @@ void Servo::seizeTimer1() ICR1 = clockCyclesPerMicrosecond()*(20000L/8); // 20000 uS is a bit fast for the refresh, 20ms, but // it keeps us from overflowing ICR1 at 20MHz clocks // That "/8" at the end is the prescaler. -#if defined(__AVR_ATmega168__) - TIMSK1 &= ~(_BV(OCIE1A) | _BV(OCIE1B) | _BV(TOIE1) ); -#else +#if defined(__AVR_ATmega8__) TIMSK &= ~(_BV(TICIE1) | _BV(OCIE1A) | _BV(OCIE1B) | _BV(TOIE1) ); +#else + TIMSK1 &= ~(_BV(OCIE1A) | _BV(OCIE1B) | _BV(TOIE1) ); #endif SREG = oldSREG; // undo cli() -- cgit v1.2.3-18-g5258