1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-31 01:11:21 +01:00

cpu/stm32: timer: implement TIM_FLAG_SET_STOPPED

This commit is contained in:
Benjamin Valentin 2022-03-01 14:10:15 +01:00
parent 4540e490e3
commit d6b5bf33b2

View File

@ -149,6 +149,10 @@ int timer_set_periodic(tim_t tim, int channel, unsigned int value, uint8_t flags
clear_oneshot(tim, channel);
if (flags & TIM_FLAG_SET_STOPPED) {
timer_stop(tim);
}
if (flags & TIM_FLAG_RESET_ON_SET) {
/* setting COUNT gives us an interrupt on all channels */
unsigned state = irq_disable();