From 2b3d3d6c2c476752a438967b00ecf26f2b70c895 Mon Sep 17 00:00:00 2001 From: Gregor Riepl Date: Tue, 16 Dec 2014 13:05:52 +0100 Subject: [PATCH] timer: fix function definitions for uC having several output compare Add proper calls to DEFINE_REGISTER_OC_INTR_AT_TICS() for timers that have more than one. Also fix odd _vect_id interrupt vector definitions. Signed-off-by: Gregor Riepl --- modules/hardware/timer/timer0_register_OC_at_tics.c | 4 ++-- modules/hardware/timer/timer0_register_OC_in_us.c | 6 +++--- modules/hardware/timer/timer1_register_OC_at_tics.c | 6 +++--- modules/hardware/timer/timer1_register_OC_in_us.c | 6 +++--- modules/hardware/timer/timer2_register_OC_at_tics.c | 2 +- modules/hardware/timer/timer2_register_OC_in_us.c | 2 +- modules/hardware/timer/timer3_register_OC_at_tics.c | 6 +++--- modules/hardware/timer/timer3_register_OC_in_us.c | 6 +++--- modules/hardware/timer/timer4_register_OC_at_tics.c | 6 +++--- modules/hardware/timer/timer4_register_OC_in_us.c | 6 +++--- modules/hardware/timer/timer5_register_OC_at_tics.c | 6 +++--- modules/hardware/timer/timer5_register_OC_in_us.c | 6 +++--- modules/hardware/timer/timer_intr.c | 8 ++++---- 13 files changed, 35 insertions(+), 35 deletions(-) diff --git a/modules/hardware/timer/timer0_register_OC_at_tics.c b/modules/hardware/timer/timer0_register_OC_at_tics.c index 624b689..c36460b 100644 --- a/modules/hardware/timer/timer0_register_OC_at_tics.c +++ b/modules/hardware/timer/timer0_register_OC_at_tics.c @@ -35,10 +35,10 @@ DEFINE_REGISTER_OC_INTR_AT_TICS(0, TIMER0_COMP_vect) #endif #if defined TIMER0A_ENABLED && defined TIMER0_COMPA_vect -DEFINE_REGISTER_OC_INTR_AT_TICS(0, TIMER0_COMPA_vect) +DEFINE_REGISTER_OC_INTR_AT_TICS(0A, TIMER0_COMPA_vect) #endif #if defined TIMER0B_ENABLED && defined TIMER0_COMPB_vect -DEFINE_REGISTER_OC_INTR_AT_TICS(0, TIMER0_COMPB_vect) +DEFINE_REGISTER_OC_INTR_AT_TICS(0B, TIMER0_COMPB_vect) #endif diff --git a/modules/hardware/timer/timer0_register_OC_in_us.c b/modules/hardware/timer/timer0_register_OC_in_us.c index c59a570..3bccd8e 100644 --- a/modules/hardware/timer/timer0_register_OC_in_us.c +++ b/modules/hardware/timer/timer0_register_OC_in_us.c @@ -30,15 +30,15 @@ #include -#if defined TIMER0_ENABLED && defined TIMER0_COMP_vect_id +#if defined TIMER0_ENABLED && defined TIMER0_COMP_vect DEFINE_REGISTER_OC_INTR_IN_US(0,0,TIMER0_COMP_vect) #endif -#if defined TIMER0A_ENABLED && defined TIMER0_COMP_vect_idA +#if defined TIMER0A_ENABLED && defined TIMER0_COMPA_vect DEFINE_REGISTER_OC_INTR_IN_US(0,0A,TIMER0_COMPA_vect) #endif -#if defined TIMER0B_ENABLED && defined TIMER0_COMP_vect_idB +#if defined TIMER0B_ENABLED && defined TIMER0_COMPB_vect DEFINE_REGISTER_OC_INTR_IN_US(0,0B,TIMER0_COMPB_vect) #endif diff --git a/modules/hardware/timer/timer1_register_OC_at_tics.c b/modules/hardware/timer/timer1_register_OC_at_tics.c index 1f3d64b..d7299a8 100644 --- a/modules/hardware/timer/timer1_register_OC_at_tics.c +++ b/modules/hardware/timer/timer1_register_OC_at_tics.c @@ -31,14 +31,14 @@ #if defined TIMER1A_ENABLED && defined TIMER1_COMPA_vect -DEFINE_REGISTER_OC_INTR_AT_TICS(1, TIMER1_COMPA_vect) +DEFINE_REGISTER_OC_INTR_AT_TICS(1A, TIMER1_COMPA_vect) #endif #if defined TIMER1B_ENABLED && defined TIMER1_COMPB_vect -DEFINE_REGISTER_OC_INTR_AT_TICS(1, TIMER1_COMPB_vect) +DEFINE_REGISTER_OC_INTR_AT_TICS(1B, TIMER1_COMPB_vect) #endif #if defined TIMER1C_ENABLED && defined TIMER1_COMPC_vect -DEFINE_REGISTER_OC_INTR_AT_TICS(1, TIMER1_COMPC_vect) +DEFINE_REGISTER_OC_INTR_AT_TICS(1C, TIMER1_COMPC_vect) #endif diff --git a/modules/hardware/timer/timer1_register_OC_in_us.c b/modules/hardware/timer/timer1_register_OC_in_us.c index 463c5b0..e1b8068 100644 --- a/modules/hardware/timer/timer1_register_OC_in_us.c +++ b/modules/hardware/timer/timer1_register_OC_in_us.c @@ -30,15 +30,15 @@ #include -#if defined TIMER1A_ENABLED && defined TIMER1_COMP_vect_idA +#if defined TIMER1A_ENABLED && defined TIMER1_COMPA_vect DEFINE_REGISTER_OC_INTR_IN_US(1,1A,TIMER1_COMPA_vect) #endif -#if defined TIMER1B_ENABLED && defined TIMER1_COMP_vect_idB +#if defined TIMER1B_ENABLED && defined TIMER1_COMPB_vect DEFINE_REGISTER_OC_INTR_IN_US(1,1B,TIMER1_COMPB_vect) #endif -#if defined TIMER1C_ENABLED && defined TIMER1_COMP_vect_idC +#if defined TIMER1C_ENABLED && defined TIMER1_COMPC_vect DEFINE_REGISTER_OC_INTR_IN_US(1,1C,TIMER1_COMPC_vect) #endif diff --git a/modules/hardware/timer/timer2_register_OC_at_tics.c b/modules/hardware/timer/timer2_register_OC_at_tics.c index 4e5bf4a..d51c49c 100644 --- a/modules/hardware/timer/timer2_register_OC_at_tics.c +++ b/modules/hardware/timer/timer2_register_OC_at_tics.c @@ -30,7 +30,7 @@ #include -#if defined TIMER2_ENABLED && defined TIMER2_COMP_vect_id +#if defined TIMER2_ENABLED && defined TIMER2_COMP_vect DEFINE_REGISTER_OC_INTR_AT_TICS(2, TIMER2_COMP_vect) #endif diff --git a/modules/hardware/timer/timer2_register_OC_in_us.c b/modules/hardware/timer/timer2_register_OC_in_us.c index e8bead6..bbc8843 100644 --- a/modules/hardware/timer/timer2_register_OC_in_us.c +++ b/modules/hardware/timer/timer2_register_OC_in_us.c @@ -30,7 +30,7 @@ #include -#if defined TIMER2_ENABLED && defined TIMER2_COMP_vect_id +#if defined TIMER2_ENABLED && defined TIMER2_COMP_vect DEFINE_REGISTER_OC_INTR_IN_US(2,2,TIMER2_COMP_vect) #endif diff --git a/modules/hardware/timer/timer3_register_OC_at_tics.c b/modules/hardware/timer/timer3_register_OC_at_tics.c index ded5523..e39935d 100644 --- a/modules/hardware/timer/timer3_register_OC_at_tics.c +++ b/modules/hardware/timer/timer3_register_OC_at_tics.c @@ -31,14 +31,14 @@ #if defined TIMER3A_ENABLED && defined TIMER3_COMPA_vect -DEFINE_REGISTER_OC_INTR_AT_TICS(3, TIMER3_COMPA_vect) +DEFINE_REGISTER_OC_INTR_AT_TICS(3A, TIMER3_COMPA_vect) #endif #if defined TIMER3B_ENABLED && defined TIMER3_COMPB_vect -DEFINE_REGISTER_OC_INTR_AT_TICS(3, TIMER3_COMPB_vect) +DEFINE_REGISTER_OC_INTR_AT_TICS(3B, TIMER3_COMPB_vect) #endif #if defined TIMER3C_ENABLED && defined TIMER3_COMPC_vect -DEFINE_REGISTER_OC_INTR_AT_TICS(3, TIMER3_COMPC_vect) +DEFINE_REGISTER_OC_INTR_AT_TICS(3C, TIMER3_COMPC_vect) #endif diff --git a/modules/hardware/timer/timer3_register_OC_in_us.c b/modules/hardware/timer/timer3_register_OC_in_us.c index a864995..650124e 100644 --- a/modules/hardware/timer/timer3_register_OC_in_us.c +++ b/modules/hardware/timer/timer3_register_OC_in_us.c @@ -30,15 +30,15 @@ #include -#if defined TIMER3A_ENABLED && defined TIMER3_COMP_vect_idA +#if defined TIMER3A_ENABLED && defined TIMER3_COMPA_vect DEFINE_REGISTER_OC_INTR_IN_US(3,3A,TIMER3_COMPA_vect) #endif -#if defined TIMER3B_ENABLED && defined TIMER3_COMP_vect_idB +#if defined TIMER3B_ENABLED && defined TIMER3_COMPB_vect DEFINE_REGISTER_OC_INTR_IN_US(3,3B,TIMER3_COMPB_vect) #endif -#if defined TIMER3C_ENABLED && defined TIMER3_COMP_vect_idC +#if defined TIMER3C_ENABLED && defined TIMER3_COMPC_vect DEFINE_REGISTER_OC_INTR_IN_US(3,3C,TIMER3_COMPC_vect) #endif diff --git a/modules/hardware/timer/timer4_register_OC_at_tics.c b/modules/hardware/timer/timer4_register_OC_at_tics.c index 289be8a..2a0a8c8 100644 --- a/modules/hardware/timer/timer4_register_OC_at_tics.c +++ b/modules/hardware/timer/timer4_register_OC_at_tics.c @@ -31,14 +31,14 @@ #if defined TIMER4A_ENABLED && defined TIMER4_COMPA_vect -DEFINE_REGISTER_OC_INTR_AT_TICS(4, TIMER4_COMPA_vect) +DEFINE_REGISTER_OC_INTR_AT_TICS(4A, TIMER4_COMPA_vect) #endif #if defined TIMER4B_ENABLED && defined TIMER4_COMPB_vect -DEFINE_REGISTER_OC_INTR_AT_TICS(4, TIMER4_COMPB_vect) +DEFINE_REGISTER_OC_INTR_AT_TICS(4B, TIMER4_COMPB_vect) #endif #if defined TIMER4C_ENABLED && defined TIMER4_COMPC_vect -DEFINE_REGISTER_OC_INTR_AT_TICS(4, TIMER4_COMPC_vect) +DEFINE_REGISTER_OC_INTR_AT_TICS(4C, TIMER4_COMPC_vect) #endif diff --git a/modules/hardware/timer/timer4_register_OC_in_us.c b/modules/hardware/timer/timer4_register_OC_in_us.c index cc90dd8..53463e7 100644 --- a/modules/hardware/timer/timer4_register_OC_in_us.c +++ b/modules/hardware/timer/timer4_register_OC_in_us.c @@ -30,15 +30,15 @@ #include -#if defined TIMER4A_ENABLED && defined TIMER4_COMP_vect_idA +#if defined TIMER4A_ENABLED && defined TIMER4_COMPA_vect DEFINE_REGISTER_OC_INTR_IN_US(4,4A,TIMER4_COMPA_vect) #endif -#if defined TIMER4B_ENABLED && defined TIMER4_COMP_vect_idB +#if defined TIMER4B_ENABLED && defined TIMER4_COMPB_vect DEFINE_REGISTER_OC_INTR_IN_US(4,4B,TIMER4_COMPB_vect) #endif -#if defined TIMER4C_ENABLED && defined TIMER4_COMP_vect_idC +#if defined TIMER4C_ENABLED && defined TIMER4_COMPC_vect DEFINE_REGISTER_OC_INTR_IN_US(4,4C,TIMER4_COMPC_vect) #endif diff --git a/modules/hardware/timer/timer5_register_OC_at_tics.c b/modules/hardware/timer/timer5_register_OC_at_tics.c index 818e614..bd79061 100644 --- a/modules/hardware/timer/timer5_register_OC_at_tics.c +++ b/modules/hardware/timer/timer5_register_OC_at_tics.c @@ -31,14 +31,14 @@ #if defined TIMER5A_ENABLED && defined TIMER5_COMPA_vect -DEFINE_REGISTER_OC_INTR_AT_TICS(5, TIMER5_COMPA_vect) +DEFINE_REGISTER_OC_INTR_AT_TICS(5A, TIMER5_COMPA_vect) #endif #if defined TIMER5B_ENABLED && defined TIMER5_COMPB_vect -DEFINE_REGISTER_OC_INTR_AT_TICS(5, TIMER5_COMPB_vect) +DEFINE_REGISTER_OC_INTR_AT_TICS(5B, TIMER5_COMPB_vect) #endif #if defined TIMER5C_ENABLED && defined TIMER5_COMPC_vect -DEFINE_REGISTER_OC_INTR_AT_TICS(5, TIMER5_COMPC_vect) +DEFINE_REGISTER_OC_INTR_AT_TICS(5C, TIMER5_COMPC_vect) #endif diff --git a/modules/hardware/timer/timer5_register_OC_in_us.c b/modules/hardware/timer/timer5_register_OC_in_us.c index b2db2e8..8c6c60c 100644 --- a/modules/hardware/timer/timer5_register_OC_in_us.c +++ b/modules/hardware/timer/timer5_register_OC_in_us.c @@ -30,15 +30,15 @@ #include -#if defined TIMER5A_ENABLED && defined TIMER5_COMP_vect_idA +#if defined TIMER5A_ENABLED && defined TIMER5_COMPA_vect DEFINE_REGISTER_OC_INTR_IN_US(5,5A,TIMER5_COMPA_vect) #endif -#if defined TIMER5B_ENABLED && defined TIMER5_COMP_vect_idB +#if defined TIMER5B_ENABLED && defined TIMER5_COMPB_vect DEFINE_REGISTER_OC_INTR_IN_US(5,5B,TIMER5_COMPB_vect) #endif -#if defined TIMER5C_ENABLED && defined TIMER5_COMP_vect_idC +#if defined TIMER5C_ENABLED && defined TIMER5_COMPC_vect DEFINE_REGISTER_OC_INTR_IN_US(5,5C,TIMER5_COMPC_vect) #endif diff --git a/modules/hardware/timer/timer_intr.c b/modules/hardware/timer/timer_intr.c index fd172ba..1e48f9c 100644 --- a/modules/hardware/timer/timer_intr.c +++ b/modules/hardware/timer/timer_intr.c @@ -38,8 +38,8 @@ volatile timer_callback_t timer_callback_table[_VECTORS_SIZE/4]; DEFINE_OV_INTR(TIMER0_OVF_vect) #endif -#if defined TIMER0_ENABLED && defined TIMER0_COMP_vect_id -DEFINE_OC_INTR(TIMER0_COMP_vect_id) +#if defined TIMER0_ENABLED && defined TIMER0_COMP_vect +DEFINE_OC_INTR(TIMER0_COMP_vect) #endif #if defined TIMER0_ENABLED && defined TIMER0_COMPA_vect @@ -74,8 +74,8 @@ DEFINE_OC_INTR(TIMER1_COMPC_vect) DEFINE_OV_INTR(TIMER2_OVF_vect) #endif -#if defined TIMER2_ENABLED && defined TIMER2_COMP_vect_id -DEFINE_OC_INTR(TIMER2_COMP_vect_id) +#if defined TIMER2_ENABLED && defined TIMER2_COMP_vect +DEFINE_OC_INTR(TIMER2_COMP_vect) #endif #if defined TIMER2_ENABLED && defined TIMER2_COMPA_vect -- 2.39.5