]> git.droids-corp.org - aversive.git/commitdiff
fix compilation with new avr-gcc and avr-libc
authorOlivier Matz <zer0@droids-corp.org>
Sun, 29 Sep 2013 14:47:31 +0000 (16:47 +0200)
committerOlivier Matz <zer0@droids-corp.org>
Sun, 29 Sep 2013 14:47:31 +0000 (16:47 +0200)
changes in interupt signal names and unused vars

22 files changed:
modules/comm/i2c/i2c.c
modules/hardware/timer/timer0_register_OC_at_tics.c
modules/hardware/timer/timer0_register_OC_in_us.c
modules/hardware/timer/timer0_register_OV.c
modules/hardware/timer/timer1_register_OC_at_tics.c
modules/hardware/timer/timer1_register_OC_in_us.c
modules/hardware/timer/timer1_register_OV.c
modules/hardware/timer/timer2_register_OC_at_tics.c
modules/hardware/timer/timer2_register_OC_in_us.c
modules/hardware/timer/timer2_register_OV.c
modules/hardware/timer/timer3_register_OC_at_tics.c
modules/hardware/timer/timer3_register_OC_in_us.c
modules/hardware/timer/timer3_register_OV.c
modules/hardware/timer/timer4_register_OC_at_tics.c
modules/hardware/timer/timer4_register_OC_in_us.c
modules/hardware/timer/timer4_register_OV.c
modules/hardware/timer/timer5_register_OC_at_tics.c
modules/hardware/timer/timer5_register_OC_in_us.c
modules/hardware/timer/timer5_register_OV.c
modules/hardware/timer/timer_definitions.h
modules/hardware/timer/timer_intr.c
modules/hardware/timer/timer_intr.h

index 680655a692019a4156682dd448f4116cf0ae5aaa..81dae5cede1d3b7a82728cd2f72081802af8aa08 100644 (file)
@@ -352,6 +352,9 @@ i2c_reset(void)
 int8_t i2c_recv(uint8_t dest_add, uint8_t size, uint8_t ctrl)
 {
 #ifndef CONFIG_MODULE_I2C_MASTER
+       (void)dest_add;
+       (void)size;
+       (void)ctrl;
        return -EINVAL;
 #else
        uint8_t flags;
@@ -535,7 +538,10 @@ void i2c_debug(void)
  * Interrupt routing for I2C. Refer to datasheets for more
  * informations.
  */
-SIGNAL(SIG_2WIRE_SERIAL)
+#if !defined(TWI_vect) && defined(SIG_2WIRE_SERIAL)
+#define TWI_vect SIG_2WIRE_SERIAL
+#endif
+SIGNAL(TWI_vect)
 {
        uint8_t hard_status;
        uint8_t command = (1<<TWINT) | (1<<TWEN) | (1<<TWIE);
index 4387e154c6c729153897f9aee0cfe39cd9fc900d..624b68978e46d54c088debc62d0177a7cd767be4 100644 (file)
 #include <timer_config.h>
 
 
-#if defined TIMER0_ENABLED && defined SIG_OUTPUT_COMPARE0
-DEFINE_REGISTER_OC_INTR_AT_TICS(0)
+#if defined TIMER0_ENABLED && defined TIMER0_COMP_vect
+DEFINE_REGISTER_OC_INTR_AT_TICS(0, TIMER0_COMP_vect)
 #endif
 
-#if defined TIMER0A_ENABLED && defined SIG_OUTPUT_COMPARE0A
-DEFINE_REGISTER_OC_INTR_AT_TICS(0A)
+#if defined TIMER0A_ENABLED && defined TIMER0_COMPA_vect
+DEFINE_REGISTER_OC_INTR_AT_TICS(0, TIMER0_COMPA_vect)
 #endif
 
-#if defined TIMER0B_ENABLED && defined SIG_OUTPUT_COMPARE0B
-DEFINE_REGISTER_OC_INTR_AT_TICS(0B)
+#if defined TIMER0B_ENABLED && defined TIMER0_COMPB_vect
+DEFINE_REGISTER_OC_INTR_AT_TICS(0, TIMER0_COMPB_vect)
 #endif
 
index 8eb0765518f73573296c287e220e58a85451c6c8..c59a570ff6742f2241f5d8baf2ba62d073d00f22 100644 (file)
 #include <timer_config.h>
 
 
-#if defined TIMER0_ENABLED && defined SIG_OUTPUT_COMPARE0
-DEFINE_REGISTER_OC_INTR_IN_US(0,0)
+#if defined TIMER0_ENABLED && defined TIMER0_COMP_vect_id
+DEFINE_REGISTER_OC_INTR_IN_US(0,0,TIMER0_COMP_vect)
 #endif
 
-#if defined TIMER0A_ENABLED && defined SIG_OUTPUT_COMPARE0A
-DEFINE_REGISTER_OC_INTR_IN_US(0,0A)
+#if defined TIMER0A_ENABLED && defined TIMER0_COMP_vect_idA
+DEFINE_REGISTER_OC_INTR_IN_US(0,0A,TIMER0_COMPA_vect)
 #endif
 
-#if defined TIMER0B_ENABLED && defined SIG_OUTPUT_COMPARE0B
-DEFINE_REGISTER_OC_INTR_IN_US(0,0B)
+#if defined TIMER0B_ENABLED && defined TIMER0_COMP_vect_idB
+DEFINE_REGISTER_OC_INTR_IN_US(0,0B,TIMER0_COMPB_vect)
 #endif
 
index 4d24614705043d657e7a2ced2a0f47be67dd468c..7e297de36c8f03276d9deb778323d6bb5e57b75d 100644 (file)
@@ -30,7 +30,7 @@
 #include <timer_config.h>
 
 
-#if defined TIMER0_ENABLED && defined SIG_OVERFLOW0
-DEFINE_REGISTER_OV_INTR(0)
+#if defined TIMER0_ENABLED && defined TIMER0_OVF_vect
+DEFINE_REGISTER_OV_INTR(0, TIMER0_OVF_vect)
 #endif
 
index fa8ab8d34bffb86e6e874dc1ade797bd763c6087..1f3d64b19576529278cf98768ae970f96b27f783 100644 (file)
 #include <timer_config.h>
 
 
-#if defined TIMER1A_ENABLED && defined SIG_OUTPUT_COMPARE1A
-DEFINE_REGISTER_OC_INTR_AT_TICS(1A)
+#if defined TIMER1A_ENABLED && defined TIMER1_COMPA_vect
+DEFINE_REGISTER_OC_INTR_AT_TICS(1, TIMER1_COMPA_vect)
 #endif
 
-#if defined TIMER1B_ENABLED && defined SIG_OUTPUT_COMPARE1B
-DEFINE_REGISTER_OC_INTR_AT_TICS(1B)
+#if defined TIMER1B_ENABLED && defined TIMER1_COMPB_vect
+DEFINE_REGISTER_OC_INTR_AT_TICS(1, TIMER1_COMPB_vect)
 #endif
 
-#if defined TIMER1C_ENABLED && defined SIG_OUTPUT_COMPARE1C
-DEFINE_REGISTER_OC_INTR_AT_TICS(1C)
+#if defined TIMER1C_ENABLED && defined TIMER1_COMPC_vect
+DEFINE_REGISTER_OC_INTR_AT_TICS(1, TIMER1_COMPC_vect)
 #endif
 
index 81af93a1a690e23f211ea1f51b208e81c4830cda..463c5b0dd2d693ecd34098bbb25b59c9e207343f 100644 (file)
 #include <timer_config.h>
 
 
-#if defined TIMER1A_ENABLED && defined SIG_OUTPUT_COMPARE1A
-DEFINE_REGISTER_OC_INTR_IN_US(1,1A)
+#if defined TIMER1A_ENABLED && defined TIMER1_COMP_vect_idA
+DEFINE_REGISTER_OC_INTR_IN_US(1,1A,TIMER1_COMPA_vect)
 #endif
 
-#if defined TIMER1B_ENABLED && defined SIG_OUTPUT_COMPARE1B
-DEFINE_REGISTER_OC_INTR_IN_US(1,1B)
+#if defined TIMER1B_ENABLED && defined TIMER1_COMP_vect_idB
+DEFINE_REGISTER_OC_INTR_IN_US(1,1B,TIMER1_COMPB_vect)
 #endif
 
-#if defined TIMER1C_ENABLED && defined SIG_OUTPUT_COMPARE1C
-DEFINE_REGISTER_OC_INTR_IN_US(1,1C)
+#if defined TIMER1C_ENABLED && defined TIMER1_COMP_vect_idC
+DEFINE_REGISTER_OC_INTR_IN_US(1,1C,TIMER1_COMPC_vect)
 #endif
 
index be2a049e1fe0efef79993442108ad1c91183a592..597c14e055dd610786bdca6d9e2a580ec60b1786 100644 (file)
@@ -30,7 +30,7 @@
 #include <timer_config.h>
 
 
-#if defined TIMER1_ENABLED && defined SIG_OVERFLOW1
-DEFINE_REGISTER_OV_INTR(1)
+#if defined TIMER1_ENABLED && defined TIMER1_OVF_vect
+DEFINE_REGISTER_OV_INTR(1, TIMER1_OVF_vect)
 #endif
 
index 84c5c2b53901c42920498b6c943a9faf2ad5cfe9..4e5bf4aadeca85a8da816cd42a0955de265c7165 100644 (file)
@@ -30,7 +30,7 @@
 #include <timer_config.h>
 
 
-#if defined TIMER2_ENABLED && defined SIG_OUTPUT_COMPARE2
-DEFINE_REGISTER_OC_INTR_AT_TICS(2)
+#if defined TIMER2_ENABLED && defined TIMER2_COMP_vect_id
+DEFINE_REGISTER_OC_INTR_AT_TICS(2, TIMER2_COMP_vect)
 #endif
 
index dbe0f7af84d63444b3d0434a5797bafc976ee797..e8bead61686362e15b4337fbe7e32bc861dd12d8 100644 (file)
@@ -30,7 +30,7 @@
 #include <timer_config.h>
 
 
-#if defined TIMER2_ENABLED && defined SIG_OUTPUT_COMPARE2
-DEFINE_REGISTER_OC_INTR_IN_US(2,2)
+#if defined TIMER2_ENABLED && defined TIMER2_COMP_vect_id
+DEFINE_REGISTER_OC_INTR_IN_US(2,2,TIMER2_COMP_vect)
 #endif
 
index 3485565c7b955d2012ef61abb5937f17c4534016..f205b483850a80fbeb16e72727dc84a2a18cd5ae 100644 (file)
@@ -30,7 +30,7 @@
 #include <timer_config.h>
 
 
-#if defined TIMER2_ENABLED && defined SIG_OVERFLOW2
-DEFINE_REGISTER_OV_INTR(2)
+#if defined TIMER2_ENABLED && defined TIMER2_OVF_vect
+DEFINE_REGISTER_OV_INTR(2, TIMER2_OVF_vect)
 #endif
 
index 1af1df085d70aad02e1a2b189a1cb05dd2451929..ded5523ac4bb19af4099eab1ba4e8888346618f3 100644 (file)
 #include <timer_config.h>
 
 
-#if defined TIMER3A_ENABLED && defined SIG_OUTPUT_COMPARE3A
-DEFINE_REGISTER_OC_INTR_AT_TICS(3A)
+#if defined TIMER3A_ENABLED && defined TIMER3_COMPA_vect
+DEFINE_REGISTER_OC_INTR_AT_TICS(3, TIMER3_COMPA_vect)
 #endif
 
-#if defined TIMER3B_ENABLED && defined SIG_OUTPUT_COMPARE3B
-DEFINE_REGISTER_OC_INTR_AT_TICS(3B)
+#if defined TIMER3B_ENABLED && defined TIMER3_COMPB_vect
+DEFINE_REGISTER_OC_INTR_AT_TICS(3, TIMER3_COMPB_vect)
 #endif
 
-#if defined TIMER3C_ENABLED && defined SIG_OUTPUT_COMPARE3C
-DEFINE_REGISTER_OC_INTR_AT_TICS(3C)
+#if defined TIMER3C_ENABLED && defined TIMER3_COMPC_vect
+DEFINE_REGISTER_OC_INTR_AT_TICS(3, TIMER3_COMPC_vect)
 #endif
 
index 21c4e73f5b1b6c8d50dcf5d72e2366b9b8ccd5fe..a864995415c72fc942431bfb1548edb59c53f3be 100644 (file)
 #include <timer_config.h>
 
 
-#if defined TIMER3A_ENABLED && defined SIG_OUTPUT_COMPARE3A
-DEFINE_REGISTER_OC_INTR_IN_US(3,3A)
+#if defined TIMER3A_ENABLED && defined TIMER3_COMP_vect_idA
+DEFINE_REGISTER_OC_INTR_IN_US(3,3A,TIMER3_COMPA_vect)
 #endif
 
-#if defined TIMER3B_ENABLED && defined SIG_OUTPUT_COMPARE3B
-DEFINE_REGISTER_OC_INTR_IN_US(3,3B)
+#if defined TIMER3B_ENABLED && defined TIMER3_COMP_vect_idB
+DEFINE_REGISTER_OC_INTR_IN_US(3,3B,TIMER3_COMPB_vect)
 #endif
 
-#if defined TIMER3C_ENABLED && defined SIG_OUTPUT_COMPARE3C
-DEFINE_REGISTER_OC_INTR_IN_US(3,3C)
+#if defined TIMER3C_ENABLED && defined TIMER3_COMP_vect_idC
+DEFINE_REGISTER_OC_INTR_IN_US(3,3C,TIMER3_COMPC_vect)
 #endif
 
index 72232c8fe2a5e2cf560752d5cf5a49d29081fad3..acb5e3ea4ba45160cfd76c8ac78b9107f85f44ce 100644 (file)
@@ -30,7 +30,7 @@
 #include <timer_config.h>
 
 
-#if defined TIMER3_ENABLED && defined SIG_OVERFLOW3
-DEFINE_REGISTER_OV_INTR(3)
+#if defined TIMER3_ENABLED && defined TIMER3_OVF_vect
+DEFINE_REGISTER_OV_INTR(3, TIMER3_OVF_vect)
 #endif
 
index 02c3294eebe9277b11ffbda49e6527d62167d9dc..289be8ab4434d6388aa638aa50a22913a91f149e 100644 (file)
 #include <timer_config.h>
 
 
-#if defined TIMER4A_ENABLED && defined SIG_OUTPUT_COMPARE4A
-DEFINE_REGISTER_OC_INTR_AT_TICS(4A)
+#if defined TIMER4A_ENABLED && defined TIMER4_COMPA_vect
+DEFINE_REGISTER_OC_INTR_AT_TICS(4, TIMER4_COMPA_vect)
 #endif
 
-#if defined TIMER4B_ENABLED && defined SIG_OUTPUT_COMPARE4B
-DEFINE_REGISTER_OC_INTR_AT_TICS(4B)
+#if defined TIMER4B_ENABLED && defined TIMER4_COMPB_vect
+DEFINE_REGISTER_OC_INTR_AT_TICS(4, TIMER4_COMPB_vect)
 #endif
 
-#if defined TIMER4C_ENABLED && defined SIG_OUTPUT_COMPARE4C
-DEFINE_REGISTER_OC_INTR_AT_TICS(4C)
+#if defined TIMER4C_ENABLED && defined TIMER4_COMPC_vect
+DEFINE_REGISTER_OC_INTR_AT_TICS(4, TIMER4_COMPC_vect)
 #endif
 
index a52ba68819b621f261b3dd059393a3a896368027..cc90dd8edc27c7cb13dc32dc61698ba6356bb9a5 100644 (file)
 #include <timer_config.h>
 
 
-#if defined TIMER4A_ENABLED && defined SIG_OUTPUT_COMPARE4A
-DEFINE_REGISTER_OC_INTR_IN_US(4,4A)
+#if defined TIMER4A_ENABLED && defined TIMER4_COMP_vect_idA
+DEFINE_REGISTER_OC_INTR_IN_US(4,4A,TIMER4_COMPA_vect)
 #endif
 
-#if defined TIMER4B_ENABLED && defined SIG_OUTPUT_COMPARE4B
-DEFINE_REGISTER_OC_INTR_IN_US(4,4B)
+#if defined TIMER4B_ENABLED && defined TIMER4_COMP_vect_idB
+DEFINE_REGISTER_OC_INTR_IN_US(4,4B,TIMER4_COMPB_vect)
 #endif
 
-#if defined TIMER4C_ENABLED && defined SIG_OUTPUT_COMPARE4C
-DEFINE_REGISTER_OC_INTR_IN_US(4,4C)
+#if defined TIMER4C_ENABLED && defined TIMER4_COMP_vect_idC
+DEFINE_REGISTER_OC_INTR_IN_US(4,4C,TIMER4_COMPC_vect)
 #endif
 
index 7fcb74e8e225307c930a6a8e69b8a176e190cc21..d2d86bcc69c930c5159225f6bac2399dfd7b839e 100644 (file)
@@ -30,7 +30,7 @@
 #include <timer_config.h>
 
 
-#if defined TIMER4_ENABLED && defined SIG_OVERFLOW4
-DEFINE_REGISTER_OV_INTR(4)
+#if defined TIMER4_ENABLED && defined TIMER4_OVF_vect
+DEFINE_REGISTER_OV_INTR(4, TIMER4_OVF_vect)
 #endif
 
index 99eb0097eecc7926d52acde94c709cc0ad5c5e67..818e6145ccc33d168db1cec150509db52e2f6265 100644 (file)
 #include <timer_config.h>
 
 
-#if defined TIMER5A_ENABLED && defined SIG_OUTPUT_COMPARE5A
-DEFINE_REGISTER_OC_INTR_AT_TICS(5A)
+#if defined TIMER5A_ENABLED && defined TIMER5_COMPA_vect
+DEFINE_REGISTER_OC_INTR_AT_TICS(5, TIMER5_COMPA_vect)
 #endif
 
-#if defined TIMER5B_ENABLED && defined SIG_OUTPUT_COMPARE5B
-DEFINE_REGISTER_OC_INTR_AT_TICS(5B)
+#if defined TIMER5B_ENABLED && defined TIMER5_COMPB_vect
+DEFINE_REGISTER_OC_INTR_AT_TICS(5, TIMER5_COMPB_vect)
 #endif
 
-#if defined TIMER5C_ENABLED && defined SIG_OUTPUT_COMPARE5C
-DEFINE_REGISTER_OC_INTR_AT_TICS(5C)
+#if defined TIMER5C_ENABLED && defined TIMER5_COMPC_vect
+DEFINE_REGISTER_OC_INTR_AT_TICS(5, TIMER5_COMPC_vect)
 #endif
 
index a65154ed7ba4427fbc7ed54ea91ff91084d916fb..b2db2e8b21dfc5ebd2beac39fca6aff8a2cfe5e8 100644 (file)
 #include <timer_config.h>
 
 
-#if defined TIMER5A_ENABLED && defined SIG_OUTPUT_COMPARE5A
-DEFINE_REGISTER_OC_INTR_IN_US(5,5A)
+#if defined TIMER5A_ENABLED && defined TIMER5_COMP_vect_idA
+DEFINE_REGISTER_OC_INTR_IN_US(5,5A,TIMER5_COMPA_vect)
 #endif
 
-#if defined TIMER5B_ENABLED && defined SIG_OUTPUT_COMPARE5B
-DEFINE_REGISTER_OC_INTR_IN_US(5,5B)
+#if defined TIMER5B_ENABLED && defined TIMER5_COMP_vect_idB
+DEFINE_REGISTER_OC_INTR_IN_US(5,5B,TIMER5_COMPB_vect)
 #endif
 
-#if defined TIMER5C_ENABLED && defined SIG_OUTPUT_COMPARE5C
-DEFINE_REGISTER_OC_INTR_IN_US(5,5C)
+#if defined TIMER5C_ENABLED && defined TIMER5_COMP_vect_idC
+DEFINE_REGISTER_OC_INTR_IN_US(5,5C,TIMER5_COMPC_vect)
 #endif
 
index b10ab02ef37a08fc8cd64a0265347d6e94224ecc..aae46ffe46139c3a66ff86a1e822b35df7d08475 100644 (file)
@@ -30,7 +30,7 @@
 #include <timer_config.h>
 
 
-#if defined TIMER5_ENABLED && defined SIG_OVERFLOW5
-DEFINE_REGISTER_OV_INTR(5)
+#if defined TIMER5_ENABLED && defined TIMER5_OVF_vect
+DEFINE_REGISTER_OV_INTR(5, TIMER5_OVF_vect)
 #endif
 
index 6bd1c1f7c9732c5fa36f4c59f2b440047ba95870..9beea35a32cf73d65998195a14cfdc59e18c9f9f 100644 (file)
@@ -59,27 +59,27 @@ void timer##x##_set(uint16_t t)                                                              \
 #define DEFINE_OV_INTR(x)                               \
 SIGNAL(x)                                               \
 {                                                       \
-       if(timer_OV_callback_table[x##_NUM])            \
-               timer_OV_callback_table[x##_NUM]();     \
+       if(timer_callback_table[x##_num])            \
+               timer_callback_table[x##_num]();     \
 }
 
 
 #define DEFINE_OC_INTR(x)                               \
 SIGNAL(x)                                               \
 {                                                       \
-       if(timer_OC_callback_table[x##_NUM])            \
-               timer_OC_callback_table[x##_NUM]();     \
+       if(timer_callback_table[x##_num])            \
+               timer_callback_table[x##_num]();     \
 }
 
 
-#define DEFINE_REGISTER_OV_INTR(x)                                  \
+#define DEFINE_REGISTER_OV_INTR(x, vector)                         \
                                                                    \
 void timer##x##_register_OV_intr(void (*func)(void))               \
 {                                                                  \
        uint8_t flags;                                              \
                                                                    \
        IRQ_LOCK(flags);                                            \
-       timer_OV_callback_table[SIG_OVERFLOW##x##_NUM] = func;      \
+       timer_callback_table[vector##_num] = func;                  \
        if (func) {                                                 \
                TOIE##x##_REG |= (1<<TOIE##x);                      \
        }                                                           \
@@ -90,14 +90,14 @@ void timer##x##_register_OV_intr(void (*func)(void))                    \
 }
 
 
-#define DEFINE_REGISTER_OC_INTR_AT_TICS(x)                                     \
+#define DEFINE_REGISTER_OC_INTR_AT_TICS(x, vector)                             \
                                                                                \
 void timer##x##_register_OC_intr_at_tics(void (*func)(void), uint16_t t)       \
 {                                                                              \
        uint8_t flags;                                                          \
                                                                                \
        IRQ_LOCK(flags);                                                        \
-       timer_OC_callback_table[SIG_OUTPUT_COMPARE##x##_NUM] = func;            \
+       timer_callback_table[vector##_num] = func;                      \
        if (func) {                                                             \
                OCIE##x##_REG |= (1<<OCIE##x);                                  \
                OCR##x = t;                                                     \
@@ -109,7 +109,7 @@ void timer##x##_register_OC_intr_at_tics(void (*func)(void), uint16_t t)    \
 }
 
 
-#define DEFINE_REGISTER_OC_INTR_IN_US(x,y)                                     \
+#define DEFINE_REGISTER_OC_INTR_IN_US(x,y,vector)                              \
                                                                                \
 int8_t timer##y##_register_OC_intr_in_us(void (*func)(void), uint16_t t)       \
 {                                                                              \
@@ -118,7 +118,7 @@ int8_t timer##y##_register_OC_intr_in_us(void (*func)(void), uint16_t t)    \
                                                                                \
        IRQ_LOCK(flags);                                                        \
        if (! func) {                                                           \
-               timer_OC_callback_table[SIG_OUTPUT_COMPARE##y##_NUM] = func;    \
+               timer_callback_table[vector##_num] = func;                      \
                OCIE##y##_REG &= (uint8_t)(~(1<<OCIE##y));                      \
                IRQ_UNLOCK(flags);                                              \
                return 0;                                                       \
@@ -131,7 +131,7 @@ int8_t timer##y##_register_OC_intr_in_us(void (*func)(void), uint16_t t)    \
        }                                                                       \
                                                                                \
        OCR##y = TCNT##x + tics;                                                \
-       timer_OC_callback_table[SIG_OUTPUT_COMPARE##y##_NUM] = func;            \
+       timer_callback_table[vector##_num] = func;                              \
        OCIE##y##_REG |= (1<<OCIE##y);                                          \
        IRQ_UNLOCK(flags);                                                      \
        return 0;                                                               \
index 33e6870cba01a17a48c8ac953857d12e5e8981cd..fd172bae32290b780a4d5294146930f7e98b5828 100644 (file)
 
 #include <timer_config.h>
 
-volatile timer_callback_t timer_OV_callback_table[SIG_OVERFLOW_TOTAL_NUM];
-volatile timer_callback_t timer_OC_callback_table[SIG_OUTPUT_COMPARE_TOTAL_NUM];
+volatile timer_callback_t timer_callback_table[_VECTORS_SIZE/4];
 
 /*************************/
 
-#if defined TIMER0_ENABLED && defined SIG_OVERFLOW0
-DEFINE_OV_INTR(SIG_OVERFLOW0)
+#if defined TIMER0_ENABLED && defined TIMER0_OVF_vect
+DEFINE_OV_INTR(TIMER0_OVF_vect)
 #endif
 
-#if defined TIMER0_ENABLED && defined SIG_OUTPUT_COMPARE0
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE0)
+#if defined TIMER0_ENABLED && defined TIMER0_COMP_vect_id
+DEFINE_OC_INTR(TIMER0_COMP_vect_id)
 #endif
 
-#if defined TIMER0_ENABLED && defined SIG_OUTPUT_COMPARE0A
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE0A)
+#if defined TIMER0_ENABLED && defined TIMER0_COMPA_vect
+DEFINE_OC_INTR(TIMER0_COMPA_vect)
 #endif
 
-#if defined TIMER0_ENABLED && defined SIG_OUTPUT_COMPARE0B
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE0B)
+#if defined TIMER0_ENABLED && defined TIMER0_COMPB_vect
+DEFINE_OC_INTR(TIMER0_COMPB_vect)
 #endif
 
 /*************************/
 
-#if defined TIMER1_ENABLED && defined SIG_OVERFLOW1
-DEFINE_OV_INTR(SIG_OVERFLOW1)
+#if defined TIMER1_ENABLED && defined TIMER1_OVF_vect
+DEFINE_OV_INTR(TIMER1_OVF_vect)
 #endif
 
-#if defined TIMER1A_ENABLED && defined SIG_OUTPUT_COMPARE1A
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE1A)
+#if defined TIMER1A_ENABLED && defined TIMER1_COMPA_vect
+DEFINE_OC_INTR(TIMER1_COMPA_vect)
 #endif
 
-#if defined TIMER1B_ENABLED && defined SIG_OUTPUT_COMPARE1B
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE1B)
+#if defined TIMER1B_ENABLED && defined TIMER1_COMPB_vect
+DEFINE_OC_INTR(TIMER1_COMPB_vect)
 #endif
 
-#if defined TIMER1C_ENABLED && defined SIG_OUTPUT_COMPARE1C
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE1C)
+#if defined TIMER1C_ENABLED && defined TIMER1_COMPC_vect
+DEFINE_OC_INTR(TIMER1_COMPC_vect)
 #endif
 
 /*************************/
 
-#if defined TIMER2_ENABLED && defined SIG_OVERFLOW2
-DEFINE_OV_INTR(SIG_OVERFLOW2)
+#if defined TIMER2_ENABLED && defined TIMER2_OVF_vect
+DEFINE_OV_INTR(TIMER2_OVF_vect)
 #endif
 
-#if defined TIMER2_ENABLED && defined SIG_OUTPUT_COMPARE2
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE2)
+#if defined TIMER2_ENABLED && defined TIMER2_COMP_vect_id
+DEFINE_OC_INTR(TIMER2_COMP_vect_id)
 #endif
 
-#if defined TIMER2_ENABLED && defined SIG_OUTPUT_COMPARE2A
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE2A)
+#if defined TIMER2_ENABLED && defined TIMER2_COMPA_vect
+DEFINE_OC_INTR(TIMER2_COMPA_vect)
 #endif
 
-#if defined TIMER2_ENABLED && defined SIG_OUTPUT_COMPARE2B
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE2B)
+#if defined TIMER2_ENABLED && defined TIMER2_COMPB_vect
+DEFINE_OC_INTR(TIMER2_COMPB_vect)
 #endif
 
 /*************************/
 
-#if defined TIMER3_ENABLED && defined SIG_OVERFLOW3
-DEFINE_OV_INTR(SIG_OVERFLOW3)
+#if defined TIMER3_ENABLED && defined TIMER3_OVF_vect
+DEFINE_OV_INTR(TIMER3_OVF_vect)
 #endif
 
-#if defined TIMER3A_ENABLED && defined SIG_OUTPUT_COMPARE3A
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE3A)
+#if defined TIMER3A_ENABLED && defined TIMER3_COMPA_vect
+DEFINE_OC_INTR(TIMER3_COMPA_vect)
 #endif
 
-#if defined TIMER3B_ENABLED && defined SIG_OUTPUT_COMPARE3B
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE3B)
+#if defined TIMER3B_ENABLED && defined TIMER3_COMPB_vect
+DEFINE_OC_INTR(TIMER3_COMPB_vect)
 #endif
 
-#if defined TIMER3C_ENABLED && defined SIG_OUTPUT_COMPARE3C
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE3C)
+#if defined TIMER3C_ENABLED && defined TIMER3_COMPC_vect
+DEFINE_OC_INTR(TIMER3_COMPC_vect)
 #endif
 
 /*************************/
 
-#if defined TIMER4_ENABLED && defined SIG_OVERFLOW4
-DEFINE_OV_INTR(SIG_OVERFLOW4)
+#if defined TIMER4_ENABLED && defined TIMER4_OVF_vect
+DEFINE_OV_INTR(TIMER4_OVF_vect)
 #endif
 
-#if defined TIMER4A_ENABLED && defined SIG_OUTPUT_COMPARE4A
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE4A)
+#if defined TIMER4A_ENABLED && defined TIMER4_COMPA_vect
+DEFINE_OC_INTR(TIMER4_COMPA_vect)
 #endif
 
-#if defined TIMER4B_ENABLED && defined SIG_OUTPUT_COMPARE4B
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE4B)
+#if defined TIMER4B_ENABLED && defined TIMER4_COMPB_vect
+DEFINE_OC_INTR(TIMER4_COMPB_vect)
 #endif
 
-#if defined TIMER4C_ENABLED && defined SIG_OUTPUT_COMPARE4C
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE4C)
+#if defined TIMER4C_ENABLED && defined TIMER4_COMPC_vect
+DEFINE_OC_INTR(TIMER4_COMPC_vect)
 #endif
 
 /*************************/
 
-#if defined TIMER5_ENABLED && defined SIG_OVERFLOW5
-DEFINE_OV_INTR(SIG_OVERFLOW5)
+#if defined TIMER5_ENABLED && defined TIMER5_OVF_vect
+DEFINE_OV_INTR(TIMER5_OVF_vect)
 #endif
 
-#if defined TIMER5A_ENABLED && defined SIG_OUTPUT_COMPARE5A
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE5A)
+#if defined TIMER5A_ENABLED && defined TIMER5_COMPA_vect
+DEFINE_OC_INTR(TIMER5_COMPA_vect)
 #endif
 
-#if defined TIMER5B_ENABLED && defined SIG_OUTPUT_COMPARE5B
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE5B)
+#if defined TIMER5B_ENABLED && defined TIMER5_COMPB_vect
+DEFINE_OC_INTR(TIMER5_COMPB_vect)
 #endif
 
-#if defined TIMER5C_ENABLED && defined SIG_OUTPUT_COMPARE5C
-DEFINE_OC_INTR(SIG_OUTPUT_COMPARE5C)
+#if defined TIMER5C_ENABLED && defined TIMER5_COMPC_vect
+DEFINE_OC_INTR(TIMER5_COMPC_vect)
 #endif
 
 /*************************/
 
 void timer_intr_init(void)
 {
-       memset((void*)timer_OV_callback_table, 0, sizeof(timer_OV_callback_table));
-       memset((void*)timer_OC_callback_table, 0, sizeof(timer_OC_callback_table));
+       memset((void*)timer_callback_table, 0, sizeof(timer_callback_table));
 }
-
-
index e14afb6e42123d877687eb8a86cabfc865c13c7f..f3ff78eef23eeb46e9aa838488ae63f248c5303c 100644 (file)
@@ -23,8 +23,7 @@
 
 typedef void (*timer_callback_t)(void);
 
-extern volatile timer_callback_t timer_OV_callback_table[SIG_OVERFLOW_TOTAL_NUM];
-extern volatile timer_callback_t timer_OC_callback_table[SIG_OUTPUT_COMPARE_TOTAL_NUM];
+extern volatile timer_callback_t timer_callback_table[_VECTORS_SIZE/4];
 
 /* initialisation of callback table */
 void timer_intr_init(void);