mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 05:53:49 +01:00
cpu/nrf5x_common: reset all available CC channels
Except the last channel used for capture Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
This commit is contained in:
parent
117c577bf6
commit
a73ddbd045
@ -82,9 +82,9 @@ int timer_init(tim_t tim, uint32_t freq, timer_cb_t cb, void *arg)
|
||||
}
|
||||
|
||||
/* reset compare state */
|
||||
dev(tim)->EVENTS_COMPARE[0] = 0;
|
||||
dev(tim)->EVENTS_COMPARE[1] = 0;
|
||||
dev(tim)->EVENTS_COMPARE[2] = 0;
|
||||
for (unsigned i = 0; i < timer_config[tim].channels; i++) {
|
||||
dev(tim)->EVENTS_COMPARE[i] = 0;
|
||||
}
|
||||
|
||||
/* enable interrupts */
|
||||
NVIC_EnableIRQ(timer_config[tim].irqn);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user