Hal Drivers for L4

Dependents:   BSP OneHopeOnePrayer FINAL_AUDIO_RECORD AudioDemo

Fork of STM32L4xx_HAL_Driver by Senior Design: Sound Monitor

Embed: (wiki syntax)

« Back to documentation index

Encoder_Mode

Functions

__STATIC_INLINE void LL_LPTIM_SetEncoderMode (LPTIM_TypeDef *LPTIMx, uint32_t EncoderMode)
 Configure the encoder mode.
__STATIC_INLINE uint32_t LL_LPTIM_GetEncoderMode (LPTIM_TypeDef *LPTIMx)
 Get actual encoder mode.
__STATIC_INLINE void LL_LPTIM_EnableEncoderMode (LPTIM_TypeDef *LPTIMx)
 Enable the encoder mode.
__STATIC_INLINE void LL_LPTIM_DisableEncoderMode (LPTIM_TypeDef *LPTIMx)
 Disable the encoder mode.
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledEncoderMode (LPTIM_TypeDef *LPTIMx)
 Indicates whether the LPTIM operates in encoder mode.

Function Documentation

__STATIC_INLINE void LL_LPTIM_DisableEncoderMode ( LPTIM_TypeDef *  LPTIMx )

Disable the encoder mode.

Note:
This function must be called when the LPTIM instance is disabled. CFGR ENC LL_LPTIM_DisableEncoderMode
Parameters:
LPTIMxLow-Power Timer instance
Return values:
None

Definition at line 896 of file stm32l4xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_EnableEncoderMode ( LPTIM_TypeDef *  LPTIMx )

Enable the encoder mode.

Note:
This function must be called when the LPTIM instance is disabled.
In this mode the LPTIM instance must be clocked by an internal clock source. Also, the prescaler division ratio must be equal to 1.
LPTIM instance must be configured in continuous mode prior enabling the encoder mode. CFGR ENC LL_LPTIM_EnableEncoderMode
Parameters:
LPTIMxLow-Power Timer instance
Return values:
None

Definition at line 884 of file stm32l4xx_ll_lptim.h.

__STATIC_INLINE uint32_t LL_LPTIM_GetEncoderMode ( LPTIM_TypeDef *  LPTIMx )

Get actual encoder mode.

CFGR CKPOL LL_LPTIM_GetEncoderMode

Parameters:
LPTIMxLow-Power Timer instance
Return values:
Returnedvalue can be one of the following values:

  • LL_LPTIM_ENCODER_MODE_RISING
  • LL_LPTIM_ENCODER_MODE_FALLING
  • LL_LPTIM_ENCODER_MODE_RISING_FALLING

Definition at line 868 of file stm32l4xx_ll_lptim.h.

__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledEncoderMode ( LPTIM_TypeDef *  LPTIMx )

Indicates whether the LPTIM operates in encoder mode.

CFGR ENC LL_LPTIM_IsEnabledEncoderMode

Parameters:
LPTIMxLow-Power Timer instance
Return values:
Stateof bit (1 or 0).

Definition at line 907 of file stm32l4xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_SetEncoderMode ( LPTIM_TypeDef *  LPTIMx,
uint32_t  EncoderMode 
)

Configure the encoder mode.

Note:
This function must be called when the LPTIM instance is disabled. CFGR CKPOL LL_LPTIM_SetEncoderMode
Parameters:
LPTIMxLow-Power Timer instance
EncoderModeThis parameter can be one of the following values:

  • LL_LPTIM_ENCODER_MODE_RISING
  • LL_LPTIM_ENCODER_MODE_FALLING
  • LL_LPTIM_ENCODER_MODE_RISING_FALLING
Return values:
None

Definition at line 854 of file stm32l4xx_ll_lptim.h.