STM32L4xx_HAL_Driver  1.14.0
Configuration of OPAMP hierarchical scope: common to several OPAMP instances

Functions

__STATIC_INLINE void LL_OPAMP_SetCommonPowerRange (OPAMP_Common_TypeDef *OPAMPxy_COMMON, uint32_t PowerRange)
 Set OPAMP power range. More...
 
__STATIC_INLINE uint32_t LL_OPAMP_GetCommonPowerRange (OPAMP_Common_TypeDef *OPAMPxy_COMMON)
 Get OPAMP power range. More...
 

Detailed Description

Function Documentation

◆ LL_OPAMP_GetCommonPowerRange()

__STATIC_INLINE uint32_t LL_OPAMP_GetCommonPowerRange ( OPAMP_Common_TypeDef *  OPAMPxy_COMMON)

Get OPAMP power range.

Note
The OPAMP power range applies to several OPAMP instances (if several OPAMP instances available on the selected device). CSR OPARANGE LL_OPAMP_GetCommonPowerRange
Parameters
OPAMPxy_COMMONOPAMP common instance (can be set directly from CMSIS definition or by using helper macro __LL_OPAMP_COMMON_INSTANCE() )
Return values
Returnedvalue can be one of the following values:
  • LL_OPAMP_POWERSUPPLY_RANGE_LOW
  • LL_OPAMP_POWERSUPPLY_RANGE_HIGH

Definition at line 395 of file stm32l4xx_ll_opamp.h.

396 {
397  /* Prevent unused parameter warning */
398  (void)(*OPAMPxy_COMMON);
399 
400  return (uint32_t)(READ_BIT(OPAMP1->CSR, OPAMP1_CSR_OPARANGE));
401 }

◆ LL_OPAMP_SetCommonPowerRange()

__STATIC_INLINE void LL_OPAMP_SetCommonPowerRange ( OPAMP_Common_TypeDef *  OPAMPxy_COMMON,
uint32_t  PowerRange 
)

Set OPAMP power range.

Note
The OPAMP power range applies to several OPAMP instances (if several OPAMP instances available on the selected device).
On this STM32 serie, setting of this feature is conditioned to OPAMP state: All OPAMP instances of the OPAMP common group must be disabled. This check can be done with function LL_OPAMP_IsEnabled() for each OPAMP instance or by using helper macro __LL_OPAMP_IS_ENABLED_ALL_COMMON_INSTANCE(). CSR OPARANGE LL_OPAMP_SetCommonPowerRange
Parameters
OPAMPxy_COMMONOPAMP common instance (can be set directly from CMSIS definition or by using helper macro __LL_OPAMP_COMMON_INSTANCE() )
PowerRangeThis parameter can be one of the following values:
  • LL_OPAMP_POWERSUPPLY_RANGE_LOW
  • LL_OPAMP_POWERSUPPLY_RANGE_HIGH
Return values
None

Definition at line 376 of file stm32l4xx_ll_opamp.h.

377 {
378  /* Prevent unused parameter warning */
379  (void)(*OPAMPxy_COMMON);
380 
381  MODIFY_REG(OPAMP1->CSR, OPAMP1_CSR_OPARANGE, PowerRange);
382 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)