aboutsummaryrefslogtreecommitdiff
path: root/libraries/Servo/Servo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/Servo/Servo.cpp')
-rwxr-xr-xlibraries/Servo/Servo.cpp6
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()