STM32L4xx_HAL_Driver  1.14.0
Configuration of comparator output

Functions

__STATIC_INLINE void LL_COMP_SetOutputPolarity (COMP_TypeDef *COMPx, uint32_t OutputPolarity)
 Set comparator instance output polarity. CSR POLARITY LL_COMP_SetOutputPolarity. More...
 
__STATIC_INLINE uint32_t LL_COMP_GetOutputPolarity (COMP_TypeDef *COMPx)
 Get comparator instance output polarity. CSR POLARITY LL_COMP_GetOutputPolarity. More...
 
__STATIC_INLINE void LL_COMP_SetOutputBlankingSource (COMP_TypeDef *COMPx, uint32_t BlankingSource)
 Set comparator instance blanking source. More...
 
__STATIC_INLINE uint32_t LL_COMP_GetOutputBlankingSource (COMP_TypeDef *COMPx)
 Get comparator instance blanking source. More...
 

Detailed Description

Function Documentation

◆ LL_COMP_GetOutputBlankingSource()

__STATIC_INLINE uint32_t LL_COMP_GetOutputBlankingSource ( COMP_TypeDef *  COMPx)

Get comparator instance blanking source.

Note
Availability of parameters of blanking source from timer depends on timers availability on the selected device.
Blanking source may be specific to each comparator instance. Refer to description of parameters or to reference manual. CSR BLANKING LL_COMP_GetOutputBlankingSource
Parameters
COMPxComparator instance
Return values
Returnedvalue can be one of the following values:
  • LL_COMP_BLANKINGSRC_NONE
  • LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1 (1)(2)
  • LL_COMP_BLANKINGSRC_TIM2_OC3_COMP1 (1)(2)
  • LL_COMP_BLANKINGSRC_TIM3_OC3_COMP1 (1)(2)
  • LL_COMP_BLANKINGSRC_TIM3_OC4_COMP2 (1)(3)
  • LL_COMP_BLANKINGSRC_TIM8_OC5_COMP2 (1)(3)
  • LL_COMP_BLANKINGSRC_TIM15_OC1_COMP2 (1)(3)
(1) Parameter availability depending on timer availability on the selected device. (2) On STM32L4, parameter available only on comparator instance: COMP1. (3) On STM32L4, parameter available only on comparator instance: COMP2.

Definition at line 710 of file stm32l4xx_ll_comp.h.

711 {
712  return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_BLANKING));
713 }

◆ LL_COMP_GetOutputPolarity()

__STATIC_INLINE uint32_t LL_COMP_GetOutputPolarity ( COMP_TypeDef *  COMPx)

Get comparator instance output polarity. CSR POLARITY LL_COMP_GetOutputPolarity.

Parameters
COMPxComparator instance
Return values
Returnedvalue can be one of the following values:
  • LL_COMP_OUTPUTPOL_NONINVERTED
  • LL_COMP_OUTPUTPOL_INVERTED

Definition at line 655 of file stm32l4xx_ll_comp.h.

656 {
657  return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_POLARITY));
658 }

◆ LL_COMP_SetOutputBlankingSource()

__STATIC_INLINE void LL_COMP_SetOutputBlankingSource ( COMP_TypeDef *  COMPx,
uint32_t  BlankingSource 
)

Set comparator instance blanking source.

Note
Blanking source may be specific to each comparator instance. Refer to description of parameters or to reference manual.
Availability of parameters of blanking source from timer depends on timers availability on the selected device. CSR BLANKING LL_COMP_SetOutputBlankingSource
Parameters
COMPxComparator instance
BlankingSourceThis parameter can be one of the following values:
  • LL_COMP_BLANKINGSRC_NONE
  • LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1 (1)(2)
  • LL_COMP_BLANKINGSRC_TIM2_OC3_COMP1 (1)(2)
  • LL_COMP_BLANKINGSRC_TIM3_OC3_COMP1 (1)(2)
  • LL_COMP_BLANKINGSRC_TIM3_OC4_COMP2 (1)(3)
  • LL_COMP_BLANKINGSRC_TIM8_OC5_COMP2 (1)(3)
  • LL_COMP_BLANKINGSRC_TIM15_OC1_COMP2 (1)(3)
(1) Parameter availability depending on timer availability on the selected device. (2) On STM32L4, parameter available only on comparator instance: COMP1. (3) On STM32L4, parameter available only on comparator instance: COMP2.
Return values
None

Definition at line 683 of file stm32l4xx_ll_comp.h.

684 {
685  MODIFY_REG(COMPx->CSR, COMP_CSR_BLANKING, BlankingSource);
686 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_COMP_SetOutputPolarity()

__STATIC_INLINE void LL_COMP_SetOutputPolarity ( COMP_TypeDef *  COMPx,
uint32_t  OutputPolarity 
)

Set comparator instance output polarity. CSR POLARITY LL_COMP_SetOutputPolarity.

Parameters
COMPxComparator instance
OutputPolarityThis parameter can be one of the following values:
  • LL_COMP_OUTPUTPOL_NONINVERTED
  • LL_COMP_OUTPUTPOL_INVERTED
Return values
None

Definition at line 642 of file stm32l4xx_ll_comp.h.

643 {
644  MODIFY_REG(COMPx->CSR, COMP_CSR_POLARITY, OutputPolarity);
645 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)