20 #ifndef STM32F4xx_LL_LPTIM_H
21 #define STM32F4xx_LL_LPTIM_H
28 #include "stm32f4xx.h"
46 #if defined(USE_FULL_LL_DRIVER)
56 #if defined(USE_FULL_LL_DRIVER)
105 #define LL_LPTIM_ISR_CMPM LPTIM_ISR_CMPM
106 #define LL_LPTIM_ISR_CMPOK LPTIM_ISR_CMPOK
107 #define LL_LPTIM_ISR_ARRM LPTIM_ISR_ARRM
108 #define LL_LPTIM_ISR_EXTTRIG LPTIM_ISR_EXTTRIG
109 #define LL_LPTIM_ISR_ARROK LPTIM_ISR_ARROK
110 #define LL_LPTIM_ISR_UP LPTIM_ISR_UP
111 #define LL_LPTIM_ISR_DOWN LPTIM_ISR_DOWN
120 #define LL_LPTIM_IER_CMPMIE LPTIM_IER_CMPMIE
121 #define LL_LPTIM_IER_CMPOKIE LPTIM_IER_CMPOKIE
122 #define LL_LPTIM_IER_ARRMIE LPTIM_IER_ARRMIE
123 #define LL_LPTIM_IER_EXTTRIGIE LPTIM_IER_EXTTRIGIE
124 #define LL_LPTIM_IER_ARROKIE LPTIM_IER_ARROKIE
125 #define LL_LPTIM_IER_UPIE LPTIM_IER_UPIE
126 #define LL_LPTIM_IER_DOWNIE LPTIM_IER_DOWNIE
134 #define LL_LPTIM_OPERATING_MODE_CONTINUOUS LPTIM_CR_CNTSTRT
135 #define LL_LPTIM_OPERATING_MODE_ONESHOT LPTIM_CR_SNGSTRT
143 #define LL_LPTIM_UPDATE_MODE_IMMEDIATE 0x00000000U
144 #define LL_LPTIM_UPDATE_MODE_ENDOFPERIOD LPTIM_CFGR_PRELOAD
152 #define LL_LPTIM_COUNTER_MODE_INTERNAL 0x00000000U
153 #define LL_LPTIM_COUNTER_MODE_EXTERNAL LPTIM_CFGR_COUNTMODE
161 #define LL_LPTIM_OUTPUT_WAVEFORM_PWM 0x00000000U
162 #define LL_LPTIM_OUTPUT_WAVEFORM_SETONCE LPTIM_CFGR_WAVE
170 #define LL_LPTIM_OUTPUT_POLARITY_REGULAR 0x00000000U
171 #define LL_LPTIM_OUTPUT_POLARITY_INVERSE LPTIM_CFGR_WAVPOL
179 #define LL_LPTIM_PRESCALER_DIV1 0x00000000U
180 #define LL_LPTIM_PRESCALER_DIV2 LPTIM_CFGR_PRESC_0
181 #define LL_LPTIM_PRESCALER_DIV4 LPTIM_CFGR_PRESC_1
182 #define LL_LPTIM_PRESCALER_DIV8 (LPTIM_CFGR_PRESC_1 | LPTIM_CFGR_PRESC_0)
183 #define LL_LPTIM_PRESCALER_DIV16 LPTIM_CFGR_PRESC_2
184 #define LL_LPTIM_PRESCALER_DIV32 (LPTIM_CFGR_PRESC_2 | LPTIM_CFGR_PRESC_0)
185 #define LL_LPTIM_PRESCALER_DIV64 (LPTIM_CFGR_PRESC_2 | LPTIM_CFGR_PRESC_1)
186 #define LL_LPTIM_PRESCALER_DIV128 LPTIM_CFGR_PRESC
194 #define LL_LPTIM_TRIG_SOURCE_GPIO 0x00000000U
195 #define LL_LPTIM_TRIG_SOURCE_RTCALARMA LPTIM_CFGR_TRIGSEL_0
196 #define LL_LPTIM_TRIG_SOURCE_RTCALARMB LPTIM_CFGR_TRIGSEL_1
197 #define LL_LPTIM_TRIG_SOURCE_RTCTAMP1 (LPTIM_CFGR_TRIGSEL_1 | LPTIM_CFGR_TRIGSEL_0)
198 #define LL_LPTIM_TRIG_SOURCE_TIM1_TRGO LPTIM_CFGR_TRIGSEL_2
199 #define LL_LPTIM_TRIG_SOURCE_TIM5_TRGO (LPTIM_CFGR_TRIGSEL_2 | LPTIM_CFGR_TRIGSEL_0)
207 #define LL_LPTIM_TRIG_FILTER_NONE 0x00000000U
208 #define LL_LPTIM_TRIG_FILTER_2 LPTIM_CFGR_TRGFLT_0
209 #define LL_LPTIM_TRIG_FILTER_4 LPTIM_CFGR_TRGFLT_1
210 #define LL_LPTIM_TRIG_FILTER_8 LPTIM_CFGR_TRGFLT
218 #define LL_LPTIM_TRIG_POLARITY_RISING LPTIM_CFGR_TRIGEN_0
219 #define LL_LPTIM_TRIG_POLARITY_FALLING LPTIM_CFGR_TRIGEN_1
220 #define LL_LPTIM_TRIG_POLARITY_RISING_FALLING LPTIM_CFGR_TRIGEN
228 #define LL_LPTIM_CLK_SOURCE_INTERNAL 0x00000000U
229 #define LL_LPTIM_CLK_SOURCE_EXTERNAL LPTIM_CFGR_CKSEL
237 #define LL_LPTIM_CLK_FILTER_NONE 0x00000000U
238 #define LL_LPTIM_CLK_FILTER_2 LPTIM_CFGR_CKFLT_0
239 #define LL_LPTIM_CLK_FILTER_4 LPTIM_CFGR_CKFLT_1
240 #define LL_LPTIM_CLK_FILTER_8 LPTIM_CFGR_CKFLT
248 #define LL_LPTIM_CLK_POLARITY_RISING 0x00000000U
249 #define LL_LPTIM_CLK_POLARITY_FALLING LPTIM_CFGR_CKPOL_0
250 #define LL_LPTIM_CLK_POLARITY_RISING_FALLING LPTIM_CFGR_CKPOL_1
258 #define LL_LPTIM_ENCODER_MODE_RISING 0x00000000U
259 #define LL_LPTIM_ENCODER_MODE_FALLING LPTIM_CFGR_CKPOL_0
260 #define LL_LPTIM_ENCODER_MODE_RISING_FALLING LPTIM_CFGR_CKPOL_1
268 #define LL_LPTIM_INPUT1_SRC_PAD_AF 0x00000000U
269 #define LL_LPTIM_INPUT1_SRC_PAD_PA4 LPTIM_OR_OR_0
270 #define LL_LPTIM_INPUT1_SRC_PAD_PB9 LPTIM_OR_OR_1
271 #define LL_LPTIM_INPUT1_SRC_TIM_DAC LPTIM_OR_OR
296 #define LL_LPTIM_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG((__INSTANCE__)->__REG__, (__VALUE__))
304 #define LL_LPTIM_ReadReg(__INSTANCE__, __REG__) READ_REG((__INSTANCE__)->__REG__)
321 #define LL_LPTIM_ClearFLAG_CMPM LL_LPTIM_ClearFlag_CMPM
322 #define LL_LPTIM_ClearFLAG_CC1 LL_LPTIM_ClearFlag_CC1
323 #define LL_LPTIM_ClearFLAG_CC2 LL_LPTIM_ClearFlag_CC2
324 #define LL_LPTIM_ClearFLAG_CC1O LL_LPTIM_ClearFlag_CC1O
325 #define LL_LPTIM_ClearFLAG_CC2O LL_LPTIM_ClearFlag_CC2O
326 #define LL_LPTIM_ClearFLAG_ARRM LL_LPTIM_ClearFlag_ARRM
331 #if defined(USE_FULL_LL_DRIVER)
359 SET_BIT(LPTIMx->CR, LPTIM_CR_ENABLE);
370 return (((READ_BIT(LPTIMx->CR, LPTIM_CR_ENABLE) == LPTIM_CR_ENABLE) ? 1UL : 0UL));
388 MODIFY_REG(LPTIMx->CR, LPTIM_CR_CNTSTRT | LPTIM_CR_SNGSTRT, OperatingMode);
403 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_PRELOAD, UpdateMode);
416 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_PRELOAD));
434 MODIFY_REG(LPTIMx->ARR, LPTIM_ARR_ARR, AutoReload);
445 return (uint32_t)(READ_BIT(LPTIMx->ARR, LPTIM_ARR_ARR));
461 MODIFY_REG(LPTIMx->CMP, LPTIM_CMP_CMP, CompareValue);
472 return (uint32_t)(READ_BIT(LPTIMx->CMP, LPTIM_CMP_CMP));
487 return (uint32_t)(READ_BIT(LPTIMx->CNT, LPTIM_CNT_CNT));
502 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_COUNTMODE, CounterMode);
515 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_COUNTMODE));
537 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_WAVE | LPTIM_CFGR_WAVPOL, Waveform | Polarity);
551 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_WAVE, Waveform);
564 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_WAVE));
578 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_WAVPOL, Polarity);
591 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_WAVPOL));
616 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_PRESC, Prescaler);
635 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_PRESC));
651 MODIFY_REG(LPTIMx->OR, LPTIM_OR_OR, Src);
676 SET_BIT(LPTIMx->CFGR, LPTIM_CFGR_TIMOUT);
690 CLEAR_BIT(LPTIMx->CFGR, LPTIM_CFGR_TIMOUT);
701 return (((READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TIMOUT) == LPTIM_CFGR_TIMOUT) ? 1UL : 0UL));
713 CLEAR_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRIGEN);
745 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_TRIGSEL | LPTIM_CFGR_TRGFLT | LPTIM_CFGR_TRIGEN, Source | Filter | Polarity);
762 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRIGSEL));
777 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRGFLT));
791 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_TRIGEN));
814 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_CKSEL, ClockSource);
827 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKSEL));
855 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_CKFLT | LPTIM_CFGR_CKPOL, ClockFilter | ClockPolarity);
869 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKPOL));
884 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKFLT));
908 MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_CKPOL, EncoderMode);
922 return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKPOL));
938 SET_BIT(LPTIMx->CFGR, LPTIM_CFGR_ENC);
950 CLEAR_BIT(LPTIMx->CFGR, LPTIM_CFGR_ENC);
961 return (((READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_ENC) == LPTIM_CFGR_ENC) ? 1UL : 0UL));
981 SET_BIT(LPTIMx->ICR, LPTIM_ICR_CMPMCF);
992 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_CMPM) == LPTIM_ISR_CMPM) ? 1UL : 0UL));
1003 SET_BIT(LPTIMx->ICR, LPTIM_ICR_ARRMCF);
1014 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_ARRM) == LPTIM_ISR_ARRM) ? 1UL : 0UL));
1025 SET_BIT(LPTIMx->ICR, LPTIM_ICR_EXTTRIGCF);
1036 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_EXTTRIG) == LPTIM_ISR_EXTTRIG) ? 1UL : 0UL));
1047 SET_BIT(LPTIMx->ICR, LPTIM_ICR_CMPOKCF);
1059 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_CMPOK) == LPTIM_ISR_CMPOK) ? 1UL : 0UL));
1070 SET_BIT(LPTIMx->ICR, LPTIM_ICR_ARROKCF);
1082 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_ARROK) == LPTIM_ISR_ARROK) ? 1UL : 0UL));
1093 SET_BIT(LPTIMx->ICR, LPTIM_ICR_UPCF);
1105 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_UP) == LPTIM_ISR_UP) ? 1UL : 0UL));
1116 SET_BIT(LPTIMx->ICR, LPTIM_ICR_DOWNCF);
1128 return (((READ_BIT(LPTIMx->ISR, LPTIM_ISR_DOWN) == LPTIM_ISR_DOWN) ? 1UL : 0UL));
1147 SET_BIT(LPTIMx->IER, LPTIM_IER_CMPMIE);
1158 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_CMPMIE);
1169 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_CMPMIE) == LPTIM_IER_CMPMIE) ? 1UL : 0UL));
1180 SET_BIT(LPTIMx->IER, LPTIM_IER_ARRMIE);
1191 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_ARRMIE);
1202 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_ARRMIE) == LPTIM_IER_ARRMIE) ? 1UL : 0UL));
1213 SET_BIT(LPTIMx->IER, LPTIM_IER_EXTTRIGIE);
1224 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_EXTTRIGIE);
1235 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_EXTTRIGIE) == LPTIM_IER_EXTTRIGIE) ? 1UL : 0UL));
1246 SET_BIT(LPTIMx->IER, LPTIM_IER_CMPOKIE);
1257 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_CMPOKIE);
1268 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_CMPOKIE) == LPTIM_IER_CMPOKIE) ? 1UL : 0UL));
1279 SET_BIT(LPTIMx->IER, LPTIM_IER_ARROKIE);
1290 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_ARROKIE);
1301 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_ARROKIE) == LPTIM_IER_ARROKIE) ? 1UL : 0UL));
1312 SET_BIT(LPTIMx->IER, LPTIM_IER_UPIE);
1323 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_UPIE);
1334 return (((READ_BIT(LPTIMx->IER, LPTIM_IER_UPIE) == LPTIM_IER_UPIE) ? 1UL : 0UL));
1345 SET_BIT(LPTIMx->IER, LPTIM_IER_DOWNIE);
1356 CLEAR_BIT(LPTIMx->IER, LPTIM_IER_DOWNIE);
1367 return ((READ_BIT(LPTIMx->IER, LPTIM_IER_DOWNIE) == LPTIM_IER_DOWNIE) ? 1UL : 0UL);
__STATIC_INLINE uint32_t LL_LPTIM_GetClockSource(const LPTIM_TypeDef *LPTIMx)
Get actual LPTIM instance clock source. @rmtoll CFGR CKSEL LL_LPTIM_GetClockSource.
__STATIC_INLINE void LL_LPTIM_ConfigClock(LPTIM_TypeDef *LPTIMx, uint32_t ClockFilter, uint32_t ClockPolarity)
Configure the active edge or edges used by the counter when the LPTIM is clocked by an external clock...
__STATIC_INLINE uint32_t LL_LPTIM_GetClockFilter(const LPTIM_TypeDef *LPTIMx)
Get actual clock digital filter @rmtoll CFGR CKFLT LL_LPTIM_GetClockFilter.
__STATIC_INLINE uint32_t LL_LPTIM_GetClockPolarity(const LPTIM_TypeDef *LPTIMx)
Get actual clock polarity @rmtoll CFGR CKPOL LL_LPTIM_GetClockPolarity.
__STATIC_INLINE void LL_LPTIM_SetClockSource(LPTIM_TypeDef *LPTIMx, uint32_t ClockSource)
Set the source of the clock used by the LPTIM instance.
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledEncoderMode(const LPTIM_TypeDef *LPTIMx)
Indicates whether the LPTIM operates in encoder mode. @rmtoll CFGR ENC LL_LPTIM_IsEnabledEncoderMode.
__STATIC_INLINE void LL_LPTIM_DisableEncoderMode(LPTIM_TypeDef *LPTIMx)
Disable the encoder mode.
__STATIC_INLINE void LL_LPTIM_SetEncoderMode(LPTIM_TypeDef *LPTIMx, uint32_t EncoderMode)
Configure the encoder mode.
__STATIC_INLINE uint32_t LL_LPTIM_GetEncoderMode(const LPTIM_TypeDef *LPTIMx)
Get actual encoder mode. @rmtoll CFGR CKPOL LL_LPTIM_GetEncoderMode.
__STATIC_INLINE void LL_LPTIM_EnableEncoderMode(LPTIM_TypeDef *LPTIMx)
Enable the encoder mode.
__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_UP(const LPTIM_TypeDef *LPTIMx)
Informs the application whether the counter direction has changed from down to up (when the LPTIM ins...
__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_ARROK(const LPTIM_TypeDef *LPTIMx)
Informs application whether the APB bus write operation to the LPTIMx_ARR register has been successfu...
__STATIC_INLINE void LL_LPTIM_ClearFlag_ARRM(LPTIM_TypeDef *LPTIMx)
Clear the autoreload match flag (ARRMCF) @rmtoll ICR ARRMCF LL_LPTIM_ClearFlag_ARRM.
__STATIC_INLINE void LL_LPTIM_ClearFlag_DOWN(LPTIM_TypeDef *LPTIMx)
Clear the counter direction change to down interrupt flag (DOWNCF). @rmtoll ICR DOWNCF LL_LPTIM_Clear...
__STATIC_INLINE void LL_LPTIM_ClearFlag_UP(LPTIM_TypeDef *LPTIMx)
Clear the counter direction change to up interrupt flag (UPCF). @rmtoll ICR UPCF LL_LPTIM_ClearFlag_U...
__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_CMPOK(const LPTIM_TypeDef *LPTIMx)
Informs application whether the APB bus write operation to the LPTIMx_CMP register has been successfu...
__STATIC_INLINE void LL_LPTIM_ClearFlag_ARROK(LPTIM_TypeDef *LPTIMx)
Clear the autoreload register update interrupt flag (ARROKCF). @rmtoll ICR ARROKCF LL_LPTIM_ClearFlag...
__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_CMPM(const LPTIM_TypeDef *LPTIMx)
Inform application whether a compare match interrupt has occurred. @rmtoll ISR CMPM LL_LPTIM_IsActive...
__STATIC_INLINE void LL_LPTIM_ClearFlag_CMPOK(LPTIM_TypeDef *LPTIMx)
Clear the compare register update interrupt flag (CMPOKCF). @rmtoll ICR CMPOKCF LL_LPTIM_ClearFlag_CM...
__STATIC_INLINE void LL_LPTIM_ClearFlag_CMPM(LPTIM_TypeDef *LPTIMx)
Clear the compare match flag (CMPMCF) @rmtoll ICR CMPMCF LL_LPTIM_ClearFlag_CMPM.
__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_DOWN(const LPTIM_TypeDef *LPTIMx)
Informs the application whether the counter direction has changed from up to down (when the LPTIM ins...
__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_EXTTRIG(const LPTIM_TypeDef *LPTIMx)
Inform application whether a valid edge on the selected external trigger input has occurred....
__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_ARRM(const LPTIM_TypeDef *LPTIMx)
Inform application whether a autoreload match interrupt has occurred. @rmtoll ISR ARRM LL_LPTIM_IsAct...
__STATIC_INLINE void LL_LPTIM_ClearFlag_EXTTRIG(LPTIM_TypeDef *LPTIMx)
Clear the external trigger valid edge flag(EXTTRIGCF). @rmtoll ICR EXTTRIGCF LL_LPTIM_ClearFlag_EXTTR...
__STATIC_INLINE void LL_LPTIM_EnableIT_EXTTRIG(LPTIM_TypeDef *LPTIMx)
Enable external trigger valid edge interrupt (EXTTRIGIE). @rmtoll IER EXTTRIGIE LL_LPTIM_EnableIT_EXT...
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_DOWN(const LPTIM_TypeDef *LPTIMx)
Indicates whether the direction change to down interrupt (DOWNIE) is enabled. @rmtoll IER DOWNIE LL_L...
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_CMPM(const LPTIM_TypeDef *LPTIMx)
Indicates whether the compare match interrupt (CMPMIE) is enabled. @rmtoll IER CMPMIE LL_LPTIM_IsEnab...
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_ARROK(const LPTIM_TypeDef *LPTIMx)
Indicates whether the autoreload register write completed interrupt (ARROKIE) is enabled....
__STATIC_INLINE void LL_LPTIM_DisableIT_EXTTRIG(LPTIM_TypeDef *LPTIMx)
Disable external trigger valid edge interrupt (EXTTRIGIE). @rmtoll IER EXTTRIGIE LL_LPTIM_DisableIT_E...
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_ARRM(const LPTIM_TypeDef *LPTIMx)
Indicates whether the autoreload match interrupt (ARRMIE) is enabled. @rmtoll IER ARRMIE LL_LPTIM_IsE...
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_CMPOK(const LPTIM_TypeDef *LPTIMx)
Indicates whether the compare register write completed interrupt (CMPOKIE) is enabled....
__STATIC_INLINE void LL_LPTIM_DisableIT_CMPM(LPTIM_TypeDef *LPTIMx)
Disable compare match interrupt (CMPMIE). @rmtoll IER CMPMIE LL_LPTIM_DisableIT_CMPM.
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_UP(const LPTIM_TypeDef *LPTIMx)
Indicates whether the direction change to up interrupt (UPIE) is enabled. @rmtoll IER UPIE LL_LPTIM_I...
__STATIC_INLINE void LL_LPTIM_EnableIT_DOWN(LPTIM_TypeDef *LPTIMx)
Enable direction change to down interrupt (DOWNIE). @rmtoll IER DOWNIE LL_LPTIM_EnableIT_DOWN.
__STATIC_INLINE void LL_LPTIM_EnableIT_UP(LPTIM_TypeDef *LPTIMx)
Enable direction change to up interrupt (UPIE). @rmtoll IER UPIE LL_LPTIM_EnableIT_UP.
__STATIC_INLINE void LL_LPTIM_EnableIT_ARROK(LPTIM_TypeDef *LPTIMx)
Enable autoreload register write completed interrupt (ARROKIE). @rmtoll IER ARROKIE LL_LPTIM_EnableIT...
__STATIC_INLINE void LL_LPTIM_DisableIT_ARRM(LPTIM_TypeDef *LPTIMx)
Disable autoreload match interrupt (ARRMIE). @rmtoll IER ARRMIE LL_LPTIM_DisableIT_ARRM.
__STATIC_INLINE void LL_LPTIM_DisableIT_CMPOK(LPTIM_TypeDef *LPTIMx)
Disable compare register write completed interrupt (CMPOKIE). @rmtoll IER CMPOKIE LL_LPTIM_DisableIT_...
__STATIC_INLINE void LL_LPTIM_DisableIT_ARROK(LPTIM_TypeDef *LPTIMx)
Disable autoreload register write completed interrupt (ARROKIE). @rmtoll IER ARROKIE LL_LPTIM_Disable...
__STATIC_INLINE void LL_LPTIM_EnableIT_CMPM(LPTIM_TypeDef *LPTIMx)
Enable compare match interrupt (CMPMIE). @rmtoll IER CMPMIE LL_LPTIM_EnableIT_CMPM.
__STATIC_INLINE void LL_LPTIM_EnableIT_CMPOK(LPTIM_TypeDef *LPTIMx)
Enable compare register write completed interrupt (CMPOKIE). @rmtoll IER CMPOKIE LL_LPTIM_EnableIT_CM...
__STATIC_INLINE void LL_LPTIM_EnableIT_ARRM(LPTIM_TypeDef *LPTIMx)
Enable autoreload match interrupt (ARRMIE). @rmtoll IER ARRMIE LL_LPTIM_EnableIT_ARRM.
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_EXTTRIG(const LPTIM_TypeDef *LPTIMx)
Indicates external trigger valid edge interrupt (EXTTRIGIE) is enabled. @rmtoll IER EXTTRIGIE LL_LPTI...
__STATIC_INLINE void LL_LPTIM_DisableIT_UP(LPTIM_TypeDef *LPTIMx)
Disable direction change to up interrupt (UPIE). @rmtoll IER UPIE LL_LPTIM_DisableIT_UP.
__STATIC_INLINE void LL_LPTIM_DisableIT_DOWN(LPTIM_TypeDef *LPTIMx)
Disable direction change to down interrupt (DOWNIE). @rmtoll IER DOWNIE LL_LPTIM_DisableIT_DOWN.
ErrorStatus LL_LPTIM_Init(LPTIM_TypeDef *LPTIMx, const LL_LPTIM_InitTypeDef *LPTIM_InitStruct)
Configure the LPTIMx peripheral according to the specified parameters.
void LL_LPTIM_Disable(LPTIM_TypeDef *LPTIMx)
Disable the LPTIM instance @rmtoll CR ENABLE LL_LPTIM_Disable.
void LL_LPTIM_StructInit(LL_LPTIM_InitTypeDef *LPTIM_InitStruct)
Set each fields of the LPTIM_InitStruct structure to its default value.
ErrorStatus LL_LPTIM_DeInit(const LPTIM_TypeDef *LPTIMx)
Set LPTIMx registers to their reset values.
__STATIC_INLINE uint32_t LL_LPTIM_GetCounterMode(const LPTIM_TypeDef *LPTIMx)
Get the counter mode @rmtoll CFGR COUNTMODE LL_LPTIM_GetCounterMode.
__STATIC_INLINE void LL_LPTIM_StartCounter(LPTIM_TypeDef *LPTIMx, uint32_t OperatingMode)
Starts the LPTIM counter in the desired mode.
__STATIC_INLINE void LL_LPTIM_SetAutoReload(LPTIM_TypeDef *LPTIMx, uint32_t AutoReload)
Set the auto reload value.
__STATIC_INLINE uint32_t LL_LPTIM_GetUpdateMode(const LPTIM_TypeDef *LPTIMx)
Get the LPTIM registers update mode @rmtoll CFGR PRELOAD LL_LPTIM_GetUpdateMode.
__STATIC_INLINE void LL_LPTIM_SetCompare(LPTIM_TypeDef *LPTIMx, uint32_t CompareValue)
Set the compare value.
__STATIC_INLINE void LL_LPTIM_SetInput1Src(LPTIM_TypeDef *LPTIMx, uint32_t Src)
Set LPTIM input 1 source (default GPIO). @rmtoll OR OR LL_LPTIM_SetInput1Src.
__STATIC_INLINE void LL_LPTIM_SetCounterMode(LPTIM_TypeDef *LPTIMx, uint32_t CounterMode)
Set the counter mode (selection of the LPTIM counter clock source).
__STATIC_INLINE void LL_LPTIM_ConfigOutput(LPTIM_TypeDef *LPTIMx, uint32_t Waveform, uint32_t Polarity)
Configure the LPTIM instance output (LPTIMx_OUT)
__STATIC_INLINE uint32_t LL_LPTIM_GetCompare(const LPTIM_TypeDef *LPTIMx)
Get actual compare value @rmtoll CMP CMP LL_LPTIM_GetCompare.
__STATIC_INLINE void LL_LPTIM_SetWaveform(LPTIM_TypeDef *LPTIMx, uint32_t Waveform)
Set waveform shape @rmtoll CFGR WAVE LL_LPTIM_SetWaveform.
__STATIC_INLINE void LL_LPTIM_SetPrescaler(LPTIM_TypeDef *LPTIMx, uint32_t Prescaler)
Set actual prescaler division ratio.
__STATIC_INLINE void LL_LPTIM_SetUpdateMode(LPTIM_TypeDef *LPTIMx, uint32_t UpdateMode)
Set the LPTIM registers update mode (enable/disable register preload)
__STATIC_INLINE uint32_t LL_LPTIM_GetWaveform(const LPTIM_TypeDef *LPTIMx)
Get actual waveform shape @rmtoll CFGR WAVE LL_LPTIM_GetWaveform.
__STATIC_INLINE uint32_t LL_LPTIM_GetPrescaler(const LPTIM_TypeDef *LPTIMx)
Get actual prescaler division ratio. @rmtoll CFGR PRESC LL_LPTIM_GetPrescaler.
__STATIC_INLINE uint32_t LL_LPTIM_GetCounter(const LPTIM_TypeDef *LPTIMx)
Get actual counter value.
__STATIC_INLINE void LL_LPTIM_Enable(LPTIM_TypeDef *LPTIMx)
Enable the LPTIM instance.
__STATIC_INLINE uint32_t LL_LPTIM_GetAutoReload(const LPTIM_TypeDef *LPTIMx)
Get actual auto reload value @rmtoll ARR ARR LL_LPTIM_GetAutoReload.
__STATIC_INLINE void LL_LPTIM_SetPolarity(LPTIM_TypeDef *LPTIMx, uint32_t Polarity)
Set output polarity @rmtoll CFGR WAVPOL LL_LPTIM_SetPolarity.
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabled(const LPTIM_TypeDef *LPTIMx)
Indicates whether the LPTIM instance is enabled. @rmtoll CR ENABLE LL_LPTIM_IsEnabled.
__STATIC_INLINE uint32_t LL_LPTIM_GetPolarity(const LPTIM_TypeDef *LPTIMx)
Get actual output polarity @rmtoll CFGR WAVPOL LL_LPTIM_GetPolarity.
__STATIC_INLINE uint32_t LL_LPTIM_GetTriggerPolarity(const LPTIM_TypeDef *LPTIMx)
Get actual external trigger polarity. @rmtoll CFGR TRIGEN LL_LPTIM_GetTriggerPolarity.
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledTimeout(const LPTIM_TypeDef *LPTIMx)
Indicate whether the timeout function is enabled. @rmtoll CFGR TIMOUT LL_LPTIM_IsEnabledTimeout.
__STATIC_INLINE uint32_t LL_LPTIM_GetTriggerSource(const LPTIM_TypeDef *LPTIMx)
Get actual external trigger source. @rmtoll CFGR TRIGSEL LL_LPTIM_GetTriggerSource.
__STATIC_INLINE void LL_LPTIM_EnableTimeout(LPTIM_TypeDef *LPTIMx)
Enable the timeout function.
__STATIC_INLINE void LL_LPTIM_ConfigTrigger(LPTIM_TypeDef *LPTIMx, uint32_t Source, uint32_t Filter, uint32_t Polarity)
Configure the external trigger used as a trigger event for the LPTIM.
__STATIC_INLINE void LL_LPTIM_DisableTimeout(LPTIM_TypeDef *LPTIMx)
Disable the timeout function.
__STATIC_INLINE uint32_t LL_LPTIM_GetTriggerFilter(const LPTIM_TypeDef *LPTIMx)
Get actual external trigger filter. @rmtoll CFGR TRGFLT LL_LPTIM_GetTriggerFilter.
__STATIC_INLINE void LL_LPTIM_TrigSw(LPTIM_TypeDef *LPTIMx)
Start the LPTIM counter.
LPTIM Init structure definition.