AVR: Minor adapt to a differnt TIMER IRQ notions for Atmega2560

This commit is contained in:
Dimitry Kloper 2015-12-29 19:08:13 +02:00
parent 556954141e
commit 3746305f12

View File

@ -172,11 +172,17 @@ void up_timer_initialize(void)
/* Attach the timer interrupt vector */
#if defined(ATMEGA_IRQ_T1COMPA)
(void)irq_attach(ATMEGA_IRQ_T1COMPA, (xcpt_t)up_timerisr);
#elif defined(ATMEGA_IRQ_TIM1_COMPA)
(void)irq_attach(ATMEGA_IRQ_TIM1_COMPA, (xcpt_t)up_timerisr);
#else
# error "Unable to find IRQ for timer"
#endif
/* Enable the interrupt on compare match A */
#ifdef CONFIG_ARCH_CHIP_ATMEGA1284P
#if defined(TIMSK1)
TIMSK1 |= (1 << OCIE1A);
#else
TIMSK |= (1 << OCIE1A);