Lines Matching refs:timer

105 	TIM_TypeDef *timer;  member
119 TIM_TypeDef *timer = config->timer; in counter_stm32_start() local
122 LL_TIM_EnableCounter(timer); in counter_stm32_start()
130 TIM_TypeDef *timer = config->timer; in counter_stm32_stop() local
133 LL_TIM_DisableCounter(timer); in counter_stm32_stop()
142 return LL_TIM_GetAutoReload(config->timer); in counter_stm32_get_top_value()
149 return LL_TIM_GetCounter(config->timer); in counter_stm32_read()
201 TIM_TypeDef *timer = config->timer; in counter_stm32_set_cc() local
209 __ASSERT(!check_it_enabled[id](timer), in counter_stm32_set_cc()
217 prev_val = get_timer_compare[id](timer); in counter_stm32_set_cc()
218 set_timer_compare[id](timer, now); in counter_stm32_set_cc()
219 clear_it_flag[id](timer); in counter_stm32_set_cc()
240 set_timer_compare[id](timer, val); in counter_stm32_set_cc()
260 enable_it[id](timer); in counter_stm32_set_cc()
290 disable_it[chan](config->timer); in counter_stm32_cancel_alarm()
300 TIM_TypeDef *timer = config->timer; in counter_stm32_set_top_value() local
313 LL_TIM_DisableIT_UPDATE(timer); in counter_stm32_set_top_value()
314 LL_TIM_SetAutoReload(timer, cfg->ticks); in counter_stm32_set_top_value()
315 LL_TIM_ClearFlag_UPDATE(timer); in counter_stm32_set_top_value()
321 LL_TIM_SetCounter(timer, 0); in counter_stm32_set_top_value()
325 LL_TIM_SetCounter(timer, 0); in counter_stm32_set_top_value()
330 LL_TIM_EnableIT_UPDATE(timer); in counter_stm32_set_top_value()
343 pending |= LL_TIM_IsActiveFlag_CC4(cfg->timer); in counter_stm32_get_pending_int()
346 pending |= LL_TIM_IsActiveFlag_CC3(cfg->timer); in counter_stm32_get_pending_int()
349 pending |= LL_TIM_IsActiveFlag_CC2(cfg->timer); in counter_stm32_get_pending_int()
352 pending |= LL_TIM_IsActiveFlag_CC1(cfg->timer); in counter_stm32_get_pending_int()
467 TIM_TypeDef *timer = cfg->timer; in counter_stm32_init_timer() local
505 if (LL_TIM_Init(timer, &init) != SUCCESS) { in counter_stm32_init_timer()
554 TIM_TypeDef *timer = config->timer; in counter_stm32_alarm_irq_handle() local
560 disable_it[id](timer); in counter_stm32_alarm_irq_handle()
567 uint32_t cc_val = get_timer_compare[id](timer); in counter_stm32_alarm_irq_handle()
589 bool hw_irq = LL_TIM_IsActiveFlag_CC##cc(timer) && \
590 LL_TIM_IsEnabledIT_CC##cc(timer); \
593 LL_TIM_ClearFlag_CC##cc(timer); \
603 TIM_TypeDef *timer = config->timer; in counter_stm32_irq_handler() local
608 TIM_IRQ_HANDLE_CC(timer, 4); in counter_stm32_irq_handler()
611 TIM_IRQ_HANDLE_CC(timer, 3); in counter_stm32_irq_handler()
614 TIM_IRQ_HANDLE_CC(timer, 2); in counter_stm32_irq_handler()
617 TIM_IRQ_HANDLE_CC(timer, 1); in counter_stm32_irq_handler()
621 if (LL_TIM_IsActiveFlag_UPDATE(timer) && LL_TIM_IsEnabledIT_UPDATE(timer)) { in counter_stm32_irq_handler()
622 LL_TIM_ClearFlag_UPDATE(timer); in counter_stm32_irq_handler()
660 .timer = TIM(idx), \