From 65b1e9225c3b3f2e29d35947586a7e30a9094faa Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 8 Nov 2008 21:31:55 +0000 Subject: [PATCH] Switching to new signal (interrupt handler) names for compatibility with the ATmega328. --- hardware/cores/arduino/WInterrupts.c | 4 ++-- hardware/cores/arduino/wiring.c | 2 +- hardware/cores/arduino/wiring_serial.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hardware/cores/arduino/WInterrupts.c b/hardware/cores/arduino/WInterrupts.c index bcee7b719..8b9003fb6 100755 --- a/hardware/cores/arduino/WInterrupts.c +++ b/hardware/cores/arduino/WInterrupts.c @@ -78,12 +78,12 @@ void attachInterruptTwi(void (*userFunc)(void) ) { } */ -SIGNAL(SIG_INTERRUPT0) { +SIGNAL(INT0_vect) { if(intFunc[EXTERNAL_INT_0]) intFunc[EXTERNAL_INT_0](); } -SIGNAL(SIG_INTERRUPT1) { +SIGNAL(INT1_vect) { if(intFunc[EXTERNAL_INT_1]) intFunc[EXTERNAL_INT_1](); } diff --git a/hardware/cores/arduino/wiring.c b/hardware/cores/arduino/wiring.c index 19f348c33..157d1d2b6 100755 --- a/hardware/cores/arduino/wiring.c +++ b/hardware/cores/arduino/wiring.c @@ -27,7 +27,7 @@ volatile unsigned long timer0_clock_cycles = 0; volatile unsigned long timer0_millis = 0; -SIGNAL(SIG_OVERFLOW0) +SIGNAL(TIMER0_OVF_vect) { // timer 0 prescale factor is 64 and the timer overflows at 256 timer0_clock_cycles += 64UL * 256UL; diff --git a/hardware/cores/arduino/wiring_serial.c b/hardware/cores/arduino/wiring_serial.c index 2dd242b80..6c576d564 100755 --- a/hardware/cores/arduino/wiring_serial.c +++ b/hardware/cores/arduino/wiring_serial.c @@ -107,7 +107,7 @@ void serialFlush() #if defined(__AVR_ATmega8__) SIGNAL(SIG_UART_RECV) #else -SIGNAL(SIG_USART_RECV) +SIGNAL(USART_RX_vect) #endif { #if defined(__AVR_ATmega8__)