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

Functions

__STATIC_INLINE void LL_COMP_SetCommonWindowMode (COMP_Common_TypeDef *COMPxy_COMMON, uint32_t WindowMode)
 Set window mode of a pair of comparators instances (2 consecutive COMP instances odd and even COMP<x> and COMP<x+1>). CSR WINMODE LL_COMP_SetCommonWindowMode. More...
 
__STATIC_INLINE uint32_t LL_COMP_GetCommonWindowMode (COMP_Common_TypeDef *COMPxy_COMMON)
 Get window mode of a pair of comparators instances (2 consecutive COMP instances odd and even COMP<x> and COMP<x+1>). CSR WINMODE LL_COMP_GetCommonWindowMode. More...
 

Detailed Description

Function Documentation

◆ LL_COMP_GetCommonWindowMode()

__STATIC_INLINE uint32_t LL_COMP_GetCommonWindowMode ( COMP_Common_TypeDef *  COMPxy_COMMON)

Get window mode of a pair of comparators instances (2 consecutive COMP instances odd and even COMP<x> and COMP<x+1>). CSR WINMODE LL_COMP_GetCommonWindowMode.

Parameters
COMPxy_COMMONComparator common instance (can be set directly from CMSIS definition or by using helper macro __LL_COMP_COMMON_INSTANCE() )
Return values
Returnedvalue can be one of the following values:
  • LL_COMP_WINDOWMODE_DISABLE
  • LL_COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON

Definition at line 368 of file stm32l4xx_ll_comp.h.

369 {
370  return (uint32_t)(READ_BIT(COMPxy_COMMON->CSR, COMP_CSR_WINMODE));
371 }

◆ LL_COMP_SetCommonWindowMode()

__STATIC_INLINE void LL_COMP_SetCommonWindowMode ( COMP_Common_TypeDef *  COMPxy_COMMON,
uint32_t  WindowMode 
)

Set window mode of a pair of comparators instances (2 consecutive COMP instances odd and even COMP<x> and COMP<x+1>). CSR WINMODE LL_COMP_SetCommonWindowMode.

Parameters
COMPxy_COMMONComparator common instance (can be set directly from CMSIS definition or by using helper macro __LL_COMP_COMMON_INSTANCE() )
WindowModeThis parameter can be one of the following values:
  • LL_COMP_WINDOWMODE_DISABLE
  • LL_COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON
Return values
None

Definition at line 351 of file stm32l4xx_ll_comp.h.

352 {
353  /* Note: On this STM32 serie, window mode can be set only */
354  /* from COMP instance: COMP2. */
355  MODIFY_REG(COMPxy_COMMON->CSR, COMP_CSR_WINMODE, WindowMode);
356 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)