atsamd: Move irq handler code above irq setup

Only code movement.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2019-08-22 08:52:42 -04:00
parent 4ef53ab095
commit 4990fe814d
3 changed files with 90 additions and 85 deletions

View File

@@ -32,6 +32,16 @@ timer_kick(void)
timer_set(timer_read_time() + 50);
}
// IRQ handler
void __visible __aligned(16) // aligning helps stabilize perf benchmarks
TC4_Handler(void)
{
irq_disable();
uint32_t next = timer_dispatch_many();
timer_set(next);
irq_enable();
}
void
timer_init(void)
{
@@ -53,13 +63,3 @@ timer_init(void)
irq_restore(flag);
}
DECL_INIT(timer_init);
// IRQ handler
void __visible __aligned(16) // aligning helps stabilize perf benchmarks
TC4_Handler(void)
{
irq_disable();
uint32_t next = timer_dispatch_many();
timer_set(next);
irq_enable();
}