]> git.droids-corp.org - aversive.git/commitdiff
timer: fix function definitions for uC having several output compare
authorGregor Riepl <onitake@gmail.com>
Tue, 16 Dec 2014 12:05:52 +0000 (13:05 +0100)
committerOlivier Matz <zer0@droids-corp.org>
Sun, 25 Jan 2015 21:23:05 +0000 (22:23 +0100)
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 <onitake@gmail.com>
13 files changed:
modules/hardware/timer/timer0_register_OC_at_tics.c
modules/hardware/timer/timer0_register_OC_in_us.c
modules/hardware/timer/timer1_register_OC_at_tics.c
modules/hardware/timer/timer1_register_OC_in_us.c
modules/hardware/timer/timer2_register_OC_at_tics.c
modules/hardware/timer/timer2_register_OC_in_us.c
modules/hardware/timer/timer3_register_OC_at_tics.c
modules/hardware/timer/timer3_register_OC_in_us.c
modules/hardware/timer/timer4_register_OC_at_tics.c
modules/hardware/timer/timer4_register_OC_in_us.c
modules/hardware/timer/timer5_register_OC_at_tics.c
modules/hardware/timer/timer5_register_OC_in_us.c
modules/hardware/timer/timer_intr.c

index 624b68978e46d54c088debc62d0177a7cd767be4..c36460bed9abd6267cc724f4a0e55a0bfc359f72 100644 (file)
@@ -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
 
index c59a570ff6742f2241f5d8baf2ba62d073d00f22..3bccd8e8fcd31c23761716caf81245765285f3bc 100644 (file)
 #include <timer_config.h>
 
 
-#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
 
index 1f3d64b19576529278cf98768ae970f96b27f783..d7299a85bb45f0b66d1fc9f6add72b5c2598fe85 100644 (file)
 
 
 #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
 
index 463c5b0dd2d693ecd34098bbb25b59c9e207343f..e1b80689f9fdaa1705059ebf02921b335a3c65e9 100644 (file)
 #include <timer_config.h>
 
 
-#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
 
index 4e5bf4aadeca85a8da816cd42a0955de265c7165..d51c49c25f975fe1d78bde3df1062ae89d8e31b4 100644 (file)
@@ -30,7 +30,7 @@
 #include <timer_config.h>
 
 
-#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
 
index e8bead61686362e15b4337fbe7e32bc861dd12d8..bbc884369b7f5755b5f11ba159e81e063d220ecd 100644 (file)
@@ -30,7 +30,7 @@
 #include <timer_config.h>
 
 
-#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
 
index ded5523ac4bb19af4099eab1ba4e8888346618f3..e39935d5eae8814d9a593b25d1dc0a468782f1e2 100644 (file)
 
 
 #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
 
index a864995415c72fc942431bfb1548edb59c53f3be..650124e8f3b30a135a0f426f8af96fcdc72aad71 100644 (file)
 #include <timer_config.h>
 
 
-#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
 
index 289be8ab4434d6388aa638aa50a22913a91f149e..2a0a8c8ee8434e930ab2f419be3f06d314348a59 100644 (file)
 
 
 #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
 
index cc90dd8edc27c7cb13dc32dc61698ba6356bb9a5..53463e7fba14783d7412d230a5fb876dee7fe1cf 100644 (file)
 #include <timer_config.h>
 
 
-#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
 
index 818e6145ccc33d168db1cec150509db52e2f6265..bd790611907069d731b71db9a319b6ee94979ca8 100644 (file)
 
 
 #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
 
index b2db2e8b21dfc5ebd2beac39fca6aff8a2cfe5e8..8c6c60cbdf79c6d16af8501ef8819c7d1c5693f4 100644 (file)
 #include <timer_config.h>
 
 
-#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
 
index fd172bae32290b780a4d5294146930f7e98b5828..1e48f9c067e8ea96ba9edb1ad2bb52555e1c8534 100644 (file)
@@ -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