1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-20 21:01:25 +03:00

Updating libraries for atmega328 (adding it to a couple of #if's, etc.).

This commit is contained in:
David A. Mellis
2008-11-08 21:57:48 +00:00
parent 65b1e9225c
commit b2b32eb4f3
3 changed files with 6 additions and 6 deletions

View File

@ -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()