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;
* 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);
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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
#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); \
} \
}
-#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; \
}
-#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) \
{ \
\
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; \
} \
\
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; \
#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));
}
-
-
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);