multiservo: update interrupt vector names
[aversive.git] / modules / devices / servo / multiservo / multiservo_archs.h
index c7900bb..5e13fc7 100644 (file)
 #if defined (__AVR_ATmega128__) 
 
 #if MULTISERVO_TIMER == 0
-#define MULTISERVO_SIG_OUTPUT_COMPARE SIG_OUTPUT_COMPARE0
+#ifndef TIMER0_COMP_vect
+#if defined(SIG_OUTPUT_COMPARE0)
+#define TIMER0_COMP_vect SIG_OUTPUT_COMPARE0
+#endif
+#endif
+#define MULTISERVO_SIG_OUTPUT_COMPARE TIMER0_COMP_vect
 #define MULTISERVO_TIMSK TIMSK
 #define MULTISERVO_OCIE  OCIE0
 #define MULTISERVO_TCCRnA TCCR0
 #define MULTISERVO_OCR OCR0
 
 #elif MULTISERVO_TIMER == 1
-#define MULTISERVO_SIG_OUTPUT_COMPARE SIG_OUTPUT_COMPARE1A
+#ifndef TIMER1_COMPA_vect
+#if defined(SIG_OUTPUT_COMPARE1A)
+#define TIMER1_COMPA_vect SIG_OUTPUT_COMPARE1A
+#endif
+#endif
+#define MULTISERVO_SIG_OUTPUT_COMPARE TIMER1_COMPA_vect
 #define MULTISERVO_TIMSK TIMSK
 #define MULTISERVO_OCIE  OCIE1A
 #define MULTISERVO_TCCRnA TCCR1A
 #define MULTISERVO_OCR OCR1A
 
 #elif MULTISERVO_TIMER == 2
-#define MULTISERVO_SIG_OUTPUT_COMPARE SIG_OUTPUT_COMPARE2
+#ifndef TIMER2_COMP_vect
+#if defined(SIG_OUTPUT_COMPARE2)
+#define TIMER2_COMP_vect SIG_OUTPUT_COMPARE2
+#endif
+#endif
+#define MULTISERVO_SIG_OUTPUT_COMPARE TIMER2_COMP_vect
 #define MULTISERVO_TIMSK TIMSK
 #define MULTISERVO_OCIE  OCIE2
 #define MULTISERVO_TCCRnA TCCR2
 #define MULTISERVO_OCR OCR2
 
 #elif MULTISERVO_TIMER == 3
-#define MULTISERVO_SIG_OUTPUT_COMPARE SIG_OUTPUT_COMPARE3A
+#ifndef TIMER3_COMPA_vect
+#if defined(SIG_OUTPUT_COMPARE3A)
+#define TIMER3_COMPA_vect SIG_OUTPUT_COMPARE3A
+#endif
+#endif
+#define MULTISERVO_SIG_OUTPUT_COMPARE TIMER3_COMPA_vect
 #define MULTISERVO_TIMSK ETIMSK
 #define MULTISERVO_OCIE  OCIE3A
 #define MULTISERVO_TCCRnA TCCR3A
 #elif defined (__AVR_ATmega32__) 
 
 #if MULTISERVO_TIMER == 0
-#define MULTISERVO_SIG_OUTPUT_COMPARE SIG_OUTPUT_COMPARE0
+#ifndef TIMER0_COMP_vect
+#if defined(SIG_OUTPUT_COMPARE0)
+#define TIMER0_COMP_vect SIG_OUTPUT_COMPARE0
+#endif
+#endif
+#define MULTISERVO_SIG_OUTPUT_COMPARE TIMER0_COMP_vect
 #define MULTISERVO_TIMSK TIMSK
 #define MULTISERVO_OCIE  OCIE0
 #define MULTISERVO_TCCRnA TCCR0
 #define MULTISERVO_OCR OCR0
 
 #elif MULTISERVO_TIMER == 1
-#define MULTISERVO_SIG_OUTPUT_COMPARE SIG_OUTPUT_COMPARE1A
+#ifndef TIMER1_COMPA_vect
+#if defined(SIG_OUTPUT_COMPARE1A)
+#define TIMER1_COMPA_vect SIG_OUTPUT_COMPARE1A
+#endif
+#endif
+#define MULTISERVO_SIG_OUTPUT_COMPARE TIMER1_COMPA_vect
 #define MULTISERVO_TIMSK TIMSK
 #define MULTISERVO_OCIE  OCIE1A
 #define MULTISERVO_TCCRnA TCCR1A
 #define MULTISERVO_OCR OCR1A
 
 #elif MULTISERVO_TIMER == 2
-#define MULTISERVO_SIG_OUTPUT_COMPARE SIG_OUTPUT_COMPARE2
+#ifndef TIMER2_COMP_vect
+#if defined(SIG_OUTPUT_COMPARE2)
+#define TIMER2_COMP_vect SIG_OUTPUT_COMPARE2
+#endif
+#endif
+#define MULTISERVO_SIG_OUTPUT_COMPARE TIMER2_COMP_vect
 #define MULTISERVO_TIMSK TIMSK
 #define MULTISERVO_OCIE  OCIE2
 #define MULTISERVO_TCCRnA TCCR2
 #elif defined (__AVR_ATtiny2313__) 
 
 #if MULTISERVO_TIMER == 0
-#define MULTISERVO_SIG_OUTPUT_COMPARE SIG_OUTPUT_COMPARE0
+#ifndef TIMER0_COMP_vect
+#if defined(SIG_OUTPUT_COMPARE0)
+#define TIMER0_COMP_vect SIG_OUTPUT_COMPARE0
+#endif
+#endif
+#define MULTISERVO_SIG_OUTPUT_COMPARE TIMER0_COMP_vect
 #define MULTISERVO_TIMSK TIMSK
 #define MULTISERVO_OCIE  OCIE0
 #define MULTISERVO_TCCRnA TCCR0A
 #define MULTISERVO_OCR OCR0
 
 #elif MULTISERVO_TIMER == 1
-#define MULTISERVO_SIG_OUTPUT_COMPARE SIG_OUTPUT_COMPARE1A
+#ifndef TIMER1_COMPA_vect
+#if defined(SIG_OUTPUT_COMPARE1A)
+#define TIMER1_COMPA_vect SIG_OUTPUT_COMPARE1A
+#endif
+#endif
+#define MULTISERVO_SIG_OUTPUT_COMPARE TIMER1_COMPA_vect
 #define MULTISERVO_TIMSK TIMSK
 #define MULTISERVO_OCIE  OCIE1A
 #define MULTISERVO_TCCRnA TCCR1A