git.droids-corp.org
/
aversive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
multiservo: update interrupt vector names
[aversive.git]
/
modules
/
devices
/
servo
/
multiservo
/
multiservo_archs.h
diff --git
a/modules/devices/servo/multiservo/multiservo_archs.h
b/modules/devices/servo/multiservo/multiservo_archs.h
index
c7900bb
..
5e13fc7
100644
(file)
--- 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
#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_TIMSK TIMSK
#define MULTISERVO_OCIE OCIE0
#define MULTISERVO_TCCRnA TCCR0
@@
-38,7
+43,12
@@
#define MULTISERVO_OCR OCR0
#elif MULTISERVO_TIMER == 1
#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_TIMSK TIMSK
#define MULTISERVO_OCIE OCIE1A
#define MULTISERVO_TCCRnA TCCR1A
@@
-48,7
+58,12
@@
#define MULTISERVO_OCR OCR1A
#elif MULTISERVO_TIMER == 2
#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_TIMSK TIMSK
#define MULTISERVO_OCIE OCIE2
#define MULTISERVO_TCCRnA TCCR2
@@
-56,7
+71,12
@@
#define MULTISERVO_OCR OCR2
#elif MULTISERVO_TIMER == 3
#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
#define MULTISERVO_TIMSK ETIMSK
#define MULTISERVO_OCIE OCIE3A
#define MULTISERVO_TCCRnA TCCR3A
@@
-76,7
+96,12
@@
#elif defined (__AVR_ATmega32__)
#if MULTISERVO_TIMER == 0
#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_TIMSK TIMSK
#define MULTISERVO_OCIE OCIE0
#define MULTISERVO_TCCRnA TCCR0
@@
-84,7
+109,12
@@
#define MULTISERVO_OCR OCR0
#elif MULTISERVO_TIMER == 1
#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_TIMSK TIMSK
#define MULTISERVO_OCIE OCIE1A
#define MULTISERVO_TCCRnA TCCR1A
@@
-94,7
+124,12
@@
#define MULTISERVO_OCR OCR1A
#elif MULTISERVO_TIMER == 2
#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_TIMSK TIMSK
#define MULTISERVO_OCIE OCIE2
#define MULTISERVO_TCCRnA TCCR2
@@
-108,7
+143,12
@@
#elif defined (__AVR_ATtiny2313__)
#if MULTISERVO_TIMER == 0
#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_TIMSK TIMSK
#define MULTISERVO_OCIE OCIE0
#define MULTISERVO_TCCRnA TCCR0A
@@
-118,7
+158,12
@@
#define MULTISERVO_OCR OCR0
#elif MULTISERVO_TIMER == 1
#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_TIMSK TIMSK
#define MULTISERVO_OCIE OCIE1A
#define MULTISERVO_TCCRnA TCCR1A