STM32L4xx_HAL_Driver  1.14.0
Configuration of comparator modes

Functions

__STATIC_INLINE void LL_COMP_SetPowerMode (COMP_TypeDef *COMPx, uint32_t PowerMode)
 Set comparator instance operating mode to adjust power and speed. CSR PWRMODE LL_COMP_SetPowerMode. More...
 
__STATIC_INLINE uint32_t LL_COMP_GetPowerMode (COMP_TypeDef *COMPx)
 Get comparator instance operating mode to adjust power and speed. CSR PWRMODE LL_COMP_GetPowerMode. More...
 

Detailed Description

Function Documentation

◆ LL_COMP_GetPowerMode()

__STATIC_INLINE uint32_t LL_COMP_GetPowerMode ( COMP_TypeDef *  COMPx)

Get comparator instance operating mode to adjust power and speed. CSR PWRMODE LL_COMP_GetPowerMode.

Parameters
COMPxComparator instance
Return values
Returnedvalue can be one of the following values:
  • LL_COMP_POWERMODE_HIGHSPEED
  • LL_COMP_POWERMODE_MEDIUMSPEED
  • LL_COMP_POWERMODE_ULTRALOWPOWER

Definition at line 406 of file stm32l4xx_ll_comp.h.

407 {
408  return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_PWRMODE));
409 }

◆ LL_COMP_SetPowerMode()

__STATIC_INLINE void LL_COMP_SetPowerMode ( COMP_TypeDef *  COMPx,
uint32_t  PowerMode 
)

Set comparator instance operating mode to adjust power and speed. CSR PWRMODE LL_COMP_SetPowerMode.

Parameters
COMPxComparator instance
PowerModeThis parameter can be one of the following values:
  • LL_COMP_POWERMODE_HIGHSPEED
  • LL_COMP_POWERMODE_MEDIUMSPEED
  • LL_COMP_POWERMODE_ULTRALOWPOWER
Return values
None

Definition at line 392 of file stm32l4xx_ll_comp.h.

393 {
394  MODIFY_REG(COMPx->CSR, COMP_CSR_PWRMODE, PowerMode);
395 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)