mirror of
git://soft.sys114.com/klipper
synced 2026-02-11 08:50:25 +09:00
samd21: Minor simplification to timer init code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -47,8 +47,8 @@ timer_init(void)
|
|||||||
tc->CTRLA.reg = TC_CTRLA_MODE_COUNT32;
|
tc->CTRLA.reg = TC_CTRLA_MODE_COUNT32;
|
||||||
NVIC_SetPriority(TC4_IRQn, 2);
|
NVIC_SetPriority(TC4_IRQn, 2);
|
||||||
NVIC_EnableIRQ(TC4_IRQn);
|
NVIC_EnableIRQ(TC4_IRQn);
|
||||||
TC4->COUNT32.INTENSET.reg = TC_INTENSET_MC0;
|
tc->INTENSET.reg = TC_INTENSET_MC0;
|
||||||
TC4->COUNT32.COUNT.reg = 0;
|
tc->COUNT.reg = 0;
|
||||||
timer_kick();
|
timer_kick();
|
||||||
tc->CTRLA.reg = TC_CTRLA_MODE_COUNT32 | TC_CTRLA_ENABLE;
|
tc->CTRLA.reg = TC_CTRLA_MODE_COUNT32 | TC_CTRLA_ENABLE;
|
||||||
irq_restore(flag);
|
irq_restore(flag);
|
||||||
|
|||||||
Reference in New Issue
Block a user