From 6f084a5923494b84d97c8c15e3a9042667f70548 Mon Sep 17 00:00:00 2001 From: Christian Kroll Date: Fri, 23 Mar 2012 01:27:59 +0000 Subject: [PATCH] replaced deprecated SIGNAL() and SIG_* macros to be compatible with avr-libc 1.8.0 and gcc 4.7.0 --- borg_hw/borg_hw_ancient.c | 2 +- borg_hw/borg_hw_andreborg.c | 4 ++-- borg_hw/borg_hw_borg16.c | 4 ++-- borg_hw/borg_hw_borg16_hgmod.c | 2 +- borg_hw/borg_hw_borg_ls.c | 2 +- borg_hw/borg_hw_borg_mh.c | 2 +- borg_hw/borg_hw_borg_mini.c | 2 +- borg_hw/borg_hw_gigaborg.c | 4 ++-- borg_hw/borg_hw_panel_one.c | 2 +- borg_hw/borg_hw_pd1165.c | 2 +- borg_hw/borg_hw_pingpong.c | 2 +- borg_hw/borg_hw_rotor.c | 2 +- can/can.c | 2 +- uart/uart.c | 4 ++-- 14 files changed, 18 insertions(+), 18 deletions(-) diff --git a/borg_hw/borg_hw_ancient.c b/borg_hw/borg_hw_ancient.c index e5a0e10..621cfc1 100644 --- a/borg_hw/borg_hw_ancient.c +++ b/borg_hw/borg_hw_ancient.c @@ -27,7 +27,7 @@ unsigned char pixmap[NUMPLANE][NUM_ROWS][LINEBYTES]; -SIGNAL(SIG_OUTPUT_COMPARE0) +ISR(TIMER0_COMP_vect) { static unsigned char plane = 0; static unsigned char row = 0; diff --git a/borg_hw/borg_hw_andreborg.c b/borg_hw/borg_hw_andreborg.c index a56b67a..1682e48 100644 --- a/borg_hw/borg_hw_andreborg.c +++ b/borg_hw/borg_hw_andreborg.c @@ -37,7 +37,7 @@ #if defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644__) /* more ifdef magic :-( */ #define OCR0 OCR0A -#define SIG_OUTPUT_COMPARE0 SIG_OUTPUT_COMPARE0A +#define TIMER0_COMP_vect TIMER0_COMPA_vect #endif // buffer which holds the currently shown frame @@ -94,7 +94,7 @@ static void rowshow(unsigned char row, unsigned char plane) { // depending on the plane this interrupt gets triggered at 50 kHz, 31.25 kHz or // 12.5 kHz -SIGNAL(SIG_OUTPUT_COMPARE0) { +ISR(TIMER0_COMP_vect) { static unsigned char plane = 0; static unsigned char row = 0; diff --git a/borg_hw/borg_hw_borg16.c b/borg_hw/borg_hw_borg16.c index c34abaf..867e237 100644 --- a/borg_hw/borg_hw_borg16.c +++ b/borg_hw/borg_hw_borg16.c @@ -36,7 +36,7 @@ #if defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644__) /* more ifdef magic :-( */ #define OCR0 OCR0A -#define SIG_OUTPUT_COMPARE0 SIG_OUTPUT_COMPARE0A +#define TIMER0_COMP_vect TIMER0_COMPA_vect #endif // buffer which holds the currently shown frame @@ -128,7 +128,7 @@ static void rowshow(unsigned char row, unsigned char plane) { // depending on the plane this interrupt triggers at 50 kHz, 31.25 kHz or // 12.5 kHz -SIGNAL(SIG_OUTPUT_COMPARE0) { +ISR(TIMER0_COMP_vect) { static unsigned char plane = 0; static unsigned char row = 0; diff --git a/borg_hw/borg_hw_borg16_hgmod.c b/borg_hw/borg_hw_borg16_hgmod.c index a93b7c6..6631bb5 100644 --- a/borg_hw/borg_hw_borg16_hgmod.c +++ b/borg_hw/borg_hw_borg16_hgmod.c @@ -35,7 +35,7 @@ /* more ifdef magic :-( */ #if defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644__) #define OCR0 OCR0A - #define SIG_OUTPUT_COMPARE0 SIG_OUTPUT_COMPARE0A + #define TIMER0_COMP_vect TIMER0_COMPA_vect #endif // buffer which holds the currently shown frame diff --git a/borg_hw/borg_hw_borg_ls.c b/borg_hw/borg_hw_borg_ls.c index 8a1f65a..e16eb64 100644 --- a/borg_hw/borg_hw_borg_ls.c +++ b/borg_hw/borg_hw_borg_ls.c @@ -55,7 +55,7 @@ inline void rowshow(unsigned char row, unsigned char plane) { } -SIGNAL(SIG_OUTPUT_COMPARE0) { +ISR(TIMER0_COMP_vect) { static unsigned char plane = 0; static unsigned char row = 0; diff --git a/borg_hw/borg_hw_borg_mh.c b/borg_hw/borg_hw_borg_mh.c index 306a9f1..262a8ec 100644 --- a/borg_hw/borg_hw_borg_mh.c +++ b/borg_hw/borg_hw_borg_mh.c @@ -59,7 +59,7 @@ inline void rowshow(unsigned char row, unsigned char plane) { // for(n=0;n<250;n++) asm ("nop"); } -SIGNAL( SIG_OUTPUT_COMPARE0) { +ISR(TIMER0_COMP_vect) { static unsigned char plane = 0; unsigned char row = 0; diff --git a/borg_hw/borg_hw_borg_mini.c b/borg_hw/borg_hw_borg_mini.c index ca010c8..06942f2 100644 --- a/borg_hw/borg_hw_borg_mini.c +++ b/borg_hw/borg_hw_borg_mini.c @@ -113,7 +113,7 @@ inline void rowshow(unsigned char row, unsigned char plane){ extern uint8_t schmuh; -ISR(SIG_OVERFLOW0) +ISR(TIMER0_OVF_vect) { static unsigned char plane = 0; static unsigned char row = 0; diff --git a/borg_hw/borg_hw_gigaborg.c b/borg_hw/borg_hw_gigaborg.c index e00348c..57209c3 100644 --- a/borg_hw/borg_hw_gigaborg.c +++ b/borg_hw/borg_hw_gigaborg.c @@ -36,7 +36,7 @@ #if defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644__) /* more ifdef magic :-( */ #define OCR0 OCR0A -#define SIG_OUTPUT_COMPARE0 SIG_OUTPUT_COMPARE0A +#define TIMER0_COMP_vect TIMER0_COMPA_vect #endif @@ -46,7 +46,7 @@ unsigned char pixmap[NUMPLANE][NUM_ROWS][LINEBYTES]; // depending on the plane this interrupt gets triggered at 50 kHz, 31.25 kHz or // 12.5 kHz -SIGNAL( SIG_OUTPUT_COMPARE0) { +ISR(TIMER0_COMP_vect) { // reset watchdog wdt_reset(); diff --git a/borg_hw/borg_hw_panel_one.c b/borg_hw/borg_hw_panel_one.c index b63917d..a70c92a 100644 --- a/borg_hw/borg_hw_panel_one.c +++ b/borg_hw/borg_hw_panel_one.c @@ -146,7 +146,7 @@ inline void checkkeys(uint8_t row){ // depending on the plane this interrupt gets triggered at 50 kHz, 31.25 kHz or // 12.5 kHz -SIGNAL(SIG_OUTPUT_COMPARE0) +ISR(TIMER0_COMP_vect) { static unsigned char plane = 0; static unsigned char row = 0; diff --git a/borg_hw/borg_hw_pd1165.c b/borg_hw/borg_hw_pd1165.c index 01d189b..5df4c82 100644 --- a/borg_hw/borg_hw_pd1165.c +++ b/borg_hw/borg_hw_pd1165.c @@ -142,7 +142,7 @@ inline void rowshow(unsigned char row, unsigned char plane) { // depending on the plane this interrupt gets triggered at 50 kHz, 31.25 kHz or // 12.5 kHz -SIGNAL(SIG_OUTPUT_COMPARE0) { +ISR(TIMER0_COMP_vect) { static unsigned char plane = 0; unsigned char row = 0; diff --git a/borg_hw/borg_hw_pingpong.c b/borg_hw/borg_hw_pingpong.c index ced58e7..23ba623 100644 --- a/borg_hw/borg_hw_pingpong.c +++ b/borg_hw/borg_hw_pingpong.c @@ -67,7 +67,7 @@ static void rowshow(unsigned char row, unsigned char plane) { // depending on the plane this interrupt gets triggered at 50 kHz, 31.25 kHz or // 12.5 kHz -SIGNAL(SIG_OVERFLOW0) { +ISR(TIMER0_OVF0_vect) { static unsigned char plane = 0; static unsigned char row = 0; diff --git a/borg_hw/borg_hw_rotor.c b/borg_hw/borg_hw_rotor.c index 88d8fb1..2ccf851 100644 --- a/borg_hw/borg_hw_rotor.c +++ b/borg_hw/borg_hw_rotor.c @@ -41,7 +41,7 @@ uint32_t akku; unsigned char row = 0; -ISR(SIG_OUTPUT_COMPARE0) +ISR(TIMER0_COMP_vect) { // reset watchdog wdt_reset(); diff --git a/can/can.c b/can/can.c index b538107..3497a6d 100644 --- a/can/can.c +++ b/can/can.c @@ -205,7 +205,7 @@ unsigned char RX_HEAD=0;volatile unsigned char RX_TAIL=0; unsigned char TX_HEAD= 0;volatile unsigned char TX_TAIL=0; static volatile unsigned char TX_INT; -SIGNAL(SIG_INTERRUPT0) { +ISR(INT0_vect) { unsigned char status = mcp_status(); if ( status & 0x01 ) { // Message in RX0 diff --git a/uart/uart.c b/uart/uart.c index 2642caa..c372ba2 100644 --- a/uart/uart.c +++ b/uart/uart.c @@ -28,7 +28,7 @@ volatile static char *volatile rxhead, *volatile rxtail; volatile static char *volatile txhead, *volatile txtail; -SIGNAL(SIG_UART_DATA) { +ISR(USART_UDRE_vect) { #ifdef UART_LEDS PORTC ^= 0x01; #endif @@ -41,7 +41,7 @@ SIGNAL(SIG_UART_DATA) { } } -SIGNAL(SIG_UART_RECV) { +ISR(USART_RXC_vect) { int diff; #ifdef UART_LEDS