diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2008-11-08 21:57:48 +0000 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2008-11-08 21:57:48 +0000 |
commit | cf3ce01dad6991d0882a867dea44aa6cabf6db38 (patch) | |
tree | 371bd6250476cf92121755c6573d7e97cfe95e5f /libraries/Servo/Servo.cpp | |
parent | b2e063e13e76c42489b8e5216cd4e409ffd39ecc (diff) |
Updating libraries for atmega328 (adding it to a couple of #if's, etc.).
Diffstat (limited to 'libraries/Servo/Servo.cpp')
-rwxr-xr-x | libraries/Servo/Servo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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() |