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:
parent
79698d674b
commit
6540065c7e
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user