2 * Timer Functions Missing from LibOpenCM3
4 * (c) 2019 Martin Mareš <mj@ucw.cz>
10 #include <libopencm3/stm32/timer.h>
12 static inline bool timer_is_counter_enabled(u32 timer)
14 return TIM_CR1(timer) & TIM_CR1_CEN;
17 static inline void timer_enable_dma_cc1(u32 timer)
19 TIM_DIER(timer) |= TIM_DIER_CC1DE;
22 static inline void timer_disable_dma_cc1(u32 timer)
24 TIM_DIER(timer) &= ~TIM_DIER_CC1DE;