TIMER2 uses TIMER2 interrupt vector!
This commit is contained in:
parent
365db27f92
commit
e45b1c042b
|
@ -43,6 +43,7 @@
|
||||||
can be used to clock the 8 bit timer2.
|
can be used to clock the 8 bit timer2.
|
||||||
*/
|
*/
|
||||||
#if AVR_CONF_USE32KCRYSTAL
|
#if AVR_CONF_USE32KCRYSTAL
|
||||||
|
#define AVR_OUTPUT_COMPARE_INT TIMER2_COMPA_vect
|
||||||
#define OCRSetup() \
|
#define OCRSetup() \
|
||||||
/* Clock from crystal on TOSC0-1 */ \
|
/* Clock from crystal on TOSC0-1 */ \
|
||||||
ASSR = _BV(AS2); \
|
ASSR = _BV(AS2); \
|
||||||
|
@ -75,6 +76,7 @@
|
||||||
*/ \
|
*/ \
|
||||||
TIMSK2 = _BV (OCIE2A);
|
TIMSK2 = _BV (OCIE2A);
|
||||||
#else
|
#else
|
||||||
|
#define AVR_OUTPUT_COMPARE_INT TIMER0_COMPA_vect
|
||||||
#define OCRSetup() \
|
#define OCRSetup() \
|
||||||
/* Select internal clock */ \
|
/* Select internal clock */ \
|
||||||
ASSR = 0x00; \
|
ASSR = 0x00; \
|
||||||
|
@ -108,8 +110,6 @@
|
||||||
TIMSK0 = _BV (OCIE0A);
|
TIMSK0 = _BV (OCIE0A);
|
||||||
#endif /* AVR_CONF_USE32KCRYSTAL */
|
#endif /* AVR_CONF_USE32KCRYSTAL */
|
||||||
|
|
||||||
#define AVR_OUTPUT_COMPARE_INT TIMER0_COMPA_vect
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error "Setup CPU in clock-avr.h"
|
#error "Setup CPU in clock-avr.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue