From: Gregor Riepl Date: Tue, 16 Dec 2014 12:16:50 +0000 (+0100) Subject: multiservo: update interrupt vector names X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=bc93cf808167110b67848556e6b4065836ff8a9c;p=aversive.git multiservo: update interrupt vector names Fix multiservo_archs.h that defines output compare interrupt vector names for atmega128 and atmega32. Signed-off-by: Gregor Riepl --- diff --git a/modules/devices/servo/multiservo/multiservo_archs.h b/modules/devices/servo/multiservo/multiservo_archs.h index c7900bb..5e13fc7 100644 --- a/modules/devices/servo/multiservo/multiservo_archs.h +++ b/modules/devices/servo/multiservo/multiservo_archs.h @@ -30,7 +30,12 @@ #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 @@ -38,7 +43,12 @@ #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 @@ -48,7 +58,12 @@ #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 @@ -56,7 +71,12 @@ #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 @@ -76,7 +96,12 @@ #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 @@ -84,7 +109,12 @@ #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 @@ -94,7 +124,12 @@ #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 @@ -108,7 +143,12 @@ #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 @@ -118,7 +158,12 @@ #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