1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/rpx0xx: timer: implement TIM_FLAG_SET_STOPPED

This commit is contained in:
Benjamin Valentin 2022-03-01 13:50:48 +01:00
parent 79698d674b
commit 6540065c7e

View File

@ -183,6 +183,9 @@ int timer_set_periodic(tim_t dev, int channel, unsigned int value, uint8_t flags
if (channel < 0 || channel >= timer_config[dev].ch_numof) {
return -EINVAL;
}
if (flags & TIM_FLAG_SET_STOPPED) {
timer_stop(dev);
}
if (flags & TIM_FLAG_RESET_ON_SET) {
_timer_reset(dev);
}