diff options
Diffstat (limited to 'src/atsamd/timer.c')
-rw-r--r-- | src/atsamd/timer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/atsamd/timer.c b/src/atsamd/timer.c index a49192b9..dc728055 100644 --- a/src/atsamd/timer.c +++ b/src/atsamd/timer.c @@ -4,6 +4,7 @@ // // This file may be distributed under the terms of the GNU GPLv3 license. +#include "board/armcm_boot.h" // armcm_enable_irq #include "board/irq.h" // irq_disable #include "board/misc.h" // timer_read_time #include "board/timer_irq.h" // timer_dispatch_many @@ -33,7 +34,7 @@ timer_kick(void) } // IRQ handler -void __visible __aligned(16) // aligning helps stabilize perf benchmarks +void __aligned(16) // aligning helps stabilize perf benchmarks TC4_Handler(void) { irq_disable(); @@ -54,8 +55,7 @@ timer_init(void) irqstatus_t flag = irq_save(); tc->CTRLA.reg = 0; tc->CTRLA.reg = TC_CTRLA_MODE_COUNT32; - NVIC_SetPriority(TC4_IRQn, 2); - NVIC_EnableIRQ(TC4_IRQn); + armcm_enable_irq(TC4_Handler, TC4_IRQn, 2); tc->INTENSET.reg = TC_INTENSET_MC0; tc->COUNT.reg = 0; timer_kick(); |