diff options
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/Firmata/Firmata.h | 2 | ||||
-rwxr-xr-x | libraries/Servo/Servo.cpp | 6 | ||||
-rw-r--r-- | libraries/Wire/utility/twi.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/libraries/Firmata/Firmata.h b/libraries/Firmata/Firmata.h index a0a6513..a926462 100644 --- a/libraries/Firmata/Firmata.h +++ b/libraries/Firmata/Firmata.h @@ -141,7 +141,7 @@ extern FirmataClass Firmata; #define setFirmwareVersion(x, y) setFirmwareNameAndVersion(__FILE__, x, y) // total number of pins currently supported -#if defined(__AVR_ATmega168__) // Arduino NG and Diecimila +#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) // Arduino NG and Diecimila #define TOTAL_ANALOG_PINS 8 #define TOTAL_DIGITAL_PINS 22 // 14 digital + 8 analog #define TOTAL_PORTS 3 // total number of ports for the board 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() diff --git a/libraries/Wire/utility/twi.c b/libraries/Wire/utility/twi.c index 3e5489f..82a25c0 100644 --- a/libraries/Wire/utility/twi.c +++ b/libraries/Wire/utility/twi.c @@ -64,7 +64,7 @@ void twi_init(void) // initialize state twi_state = TWI_READY; - #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega8__) + #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega328P__) // activate internal pull-ups for twi // as per note from atmega8 manual pg167 sbi(PORTC, 4); @@ -329,7 +329,7 @@ void twi_releaseBus(void) twi_state = TWI_READY; } -SIGNAL(SIG_2WIRE_SERIAL) +SIGNAL(TWI_vect) { switch(TW_STATUS){ // All Master |