__LL_TIM_CALC_PULSE macro
HELPER macro calculating the auto-reload value to achieve the required pulse duration (when the timer operates in one pulse mode).
Syntax
#define __LL_TIM_CALC_PULSE(__TIMCLK__, __PSC__, __DELAY__, __PULSE__) \
((uint32_t)(__LL_TIM_CALC_DELAY((__TIMCLK__), (__PSC__), (__PULSE__)) \
+ __LL_TIM_CALC_DELAY((__TIMCLK__), (__PSC__), (__DELAY__))))
Arguments
__TIMCLK__
timer input clock frequency (in Hz)
__DELAY__
timer output compare active/inactive delay (in us)
__PULSE__
pulse duration (in us)
Return value
Auto-reload value (between Min_Data=0 and Max_Data=65535)
Notes
ex:
__LL_TIM_CALC_PULSE
(1000000, LL_TIM_GetPrescaler (), 10, 20);
Examples
__LL_TIM_CALC_PULSE is referenced by 1 libraries and example projects: