STM32H735xx HAL User Manual
Defines
COMP external interrupt line management
COMP Exported Macros

Defines

#define __HAL_COMP_COMP1_EXTI_ENABLE_RISING_EDGE()   SET_BIT(EXTI->RTSR1, COMP_EXTI_LINE_COMP1)
 Enable the COMP1 EXTI line rising edge trigger.
#define __HAL_COMP_COMP1_EXTI_DISABLE_RISING_EDGE()   CLEAR_BIT(EXTI->RTSR1, COMP_EXTI_LINE_COMP1)
 Disable the COMP1 EXTI line rising edge trigger.
#define __HAL_COMP_COMP1_EXTI_ENABLE_FALLING_EDGE()   SET_BIT(EXTI->FTSR1, COMP_EXTI_LINE_COMP1)
 Enable the COMP1 EXTI line falling edge trigger.
#define __HAL_COMP_COMP1_EXTI_DISABLE_FALLING_EDGE()   CLEAR_BIT(EXTI->FTSR1, COMP_EXTI_LINE_COMP1)
 Disable the COMP1 EXTI line falling edge trigger.
#define __HAL_COMP_COMP1_EXTI_ENABLE_RISING_FALLING_EDGE()
 Enable the COMP1 EXTI line rising & falling edge trigger.
#define __HAL_COMP_COMP1_EXTI_DISABLE_RISING_FALLING_EDGE()
 Disable the COMP1 EXTI line rising & falling edge trigger.
#define __HAL_COMP_COMP1_EXTI_ENABLE_IT()   SET_BIT(EXTI_D1->IMR1, COMP_EXTI_LINE_COMP1)
 Enable the COMP1 EXTI line in interrupt mode.
#define __HAL_COMP_COMP1_EXTI_DISABLE_IT()   CLEAR_BIT(EXTI_D1->IMR1, COMP_EXTI_LINE_COMP1)
 Disable the COMP1 EXTI line in interrupt mode.
#define __HAL_COMP_COMP1_EXTI_ENABLE_EVENT()   SET_BIT(EXTI_D1->EMR1, COMP_EXTI_LINE_COMP1)
 Enable the COMP1 EXTI Line in event mode.
#define __HAL_COMP_COMP1_EXTI_DISABLE_EVENT()   CLEAR_BIT(EXTI_D1->EMR1, COMP_EXTI_LINE_COMP1)
 Disable the COMP1 EXTI Line in event mode.
#define __HAL_COMP_COMP1_EXTI_GET_FLAG()   READ_BIT(EXTI_D1->PR1, COMP_EXTI_LINE_COMP1)
 Check whether the COMP1 EXTI line flag is set or not.
#define __HAL_COMP_COMP1_EXTI_CLEAR_FLAG()   WRITE_REG(EXTI_D1->PR1, COMP_EXTI_LINE_COMP1)
 Clear the COMP1 EXTI flag.
#define __HAL_COMP_COMP1_EXTI_GENERATE_SWIT()   SET_BIT(EXTI->SWIER1, COMP_EXTI_LINE_COMP1)
 Generate a software interrupt on the COMP1 EXTI line.
#define __HAL_COMP_COMP1_EXTID3_ENABLE_EVENT()   SET_BIT(EXTI->D3PMR1, COMP_EXTI_LINE_COMP1)
 Enable the COMP1 D3 EXTI Line in event mode.
#define __HAL_COMP_COMP1_EXTID3_DISABLE_EVENT()   CLEAR_BIT(EXTI->D3PMR1, COMP_EXTI_LINE_COMP1)
 Disable the COMP1 D3 EXTI Line in event mode.
#define __HAL_COMP_COMP2_EXTI_ENABLE_RISING_EDGE()   SET_BIT(EXTI->RTSR1, COMP_EXTI_LINE_COMP2)
 Enable the COMP2 EXTI line rising edge trigger.
#define __HAL_COMP_COMP2_EXTI_DISABLE_RISING_EDGE()   CLEAR_BIT(EXTI->RTSR1, COMP_EXTI_LINE_COMP2)
 Disable the COMP2 EXTI line rising edge trigger.
#define __HAL_COMP_COMP2_EXTI_ENABLE_FALLING_EDGE()   SET_BIT(EXTI->FTSR1, COMP_EXTI_LINE_COMP2)
 Enable the COMP2 EXTI line falling edge trigger.
#define __HAL_COMP_COMP2_EXTI_DISABLE_FALLING_EDGE()   CLEAR_BIT(EXTI->FTSR1, COMP_EXTI_LINE_COMP2)
 Disable the COMP2 EXTI line falling edge trigger.
#define __HAL_COMP_COMP2_EXTI_ENABLE_RISING_FALLING_EDGE()
 Enable the COMP2 EXTI line rising & falling edge trigger.
#define __HAL_COMP_COMP2_EXTI_DISABLE_RISING_FALLING_EDGE()
 Disable the COMP2 EXTI line rising & falling edge trigger.
#define __HAL_COMP_COMP2_EXTI_ENABLE_IT()   SET_BIT(EXTI_D1->IMR1, COMP_EXTI_LINE_COMP2)
 Enable the COMP2 EXTI line.
#define __HAL_COMP_COMP2_EXTI_DISABLE_IT()   CLEAR_BIT(EXTI_D1->IMR1, COMP_EXTI_LINE_COMP2)
 Disable the COMP2 EXTI line.
#define __HAL_COMP_COMP2_EXTI_ENABLE_EVENT()   SET_BIT(EXTI_D1->EMR1, COMP_EXTI_LINE_COMP2)
 Enable the COMP2 EXTI Line in event mode.
#define __HAL_COMP_COMP2_EXTI_DISABLE_EVENT()   CLEAR_BIT(EXTI_D1->EMR1, COMP_EXTI_LINE_COMP2)
 Disable the COMP2 EXTI Line in event mode.
#define __HAL_COMP_COMP2_EXTI_GET_FLAG()   READ_BIT(EXTI_D1->PR1, COMP_EXTI_LINE_COMP2)
 Check whether the COMP2 EXTI line flag is set or not.
#define __HAL_COMP_COMP2_EXTI_CLEAR_FLAG()   WRITE_REG(EXTI_D1->PR1, COMP_EXTI_LINE_COMP2)
 Clear the the COMP2 EXTI flag.
#define __HAL_COMP_COMP2_EXTID3_ENABLE_EVENT()   SET_BIT(EXTI->D3PMR1, COMP_EXTI_LINE_COMP2)
 Enable the COMP2 D3 EXTI Line in event mode.
#define __HAL_COMP_COMP2_EXTID3_DISABLE_EVENT()   CLEAR_BIT(EXTI->D3PMR1, COMP_EXTI_LINE_COMP2)
 Disable the COMP2 D3 EXTI Line in event mode.
#define __HAL_COMP_COMP2_EXTI_GENERATE_SWIT()   SET_BIT(EXTI->SWIER1, COMP_EXTI_LINE_COMP2)
 Generate a software interrupt on the COMP2 EXTI line.
#define __HAL_COMP_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)   ((((__HANDLE__)->Instance->CFGR & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
 Checks if the specified COMP interrupt source is enabled or disabled.
#define __HAL_COMP_GET_FLAG(__FLAG__)   ((COMP12->SR & (__FLAG__)) == (__FLAG__))
 Checks whether the specified COMP flag is set or not.
#define __HAL_COMP_CLEAR_FLAG(__FLAG__)   (COMP12->ICFR = (__FLAG__))
 Clears the specified COMP pending flag.
#define __HAL_COMP_CLEAR_C1IFLAG()   __HAL_COMP_CLEAR_FLAG( COMP_CLEAR_C1IF)
 Clear the COMP C1I flag.
#define __HAL_COMP_CLEAR_C2IFLAG()   __HAL_COMP_CLEAR_FLAG( COMP_CLEAR_C2IF)
 Clear the COMP C2I flag.
#define __HAL_COMP_ENABLE_IT(__HANDLE__, __INTERRUPT__)   ( ((__HANDLE__)->Instance->CFGR) |= (__INTERRUPT__) )
 Enable the specified COMP interrupt.
#define __HAL_COMP_DISABLE_IT(__HANDLE__, __INTERRUPT__)   (((__HANDLE__)->Instance->CFGR) &= ~(__INTERRUPT__))
 Disable the specified COMP interrupt.

Define Documentation

Clear the COMP C1I flag.

Return values:
None

Definition at line 688 of file stm32h7xx_hal_comp.h.

Referenced by HAL_COMP_IRQHandler().

Clear the COMP C2I flag.

Return values:
None

Definition at line 693 of file stm32h7xx_hal_comp.h.

Referenced by HAL_COMP_IRQHandler().

#define __HAL_COMP_CLEAR_FLAG (   __FLAG__)    (COMP12->ICFR = (__FLAG__))

Clears the specified COMP pending flag.

Parameters:
__FLAG__,:specifies the flag to check. This parameter can be any combination of the following values:
  • COMP_CLEAR_C1IF : Clear Comparator 1 Interrupt Flag
  • COMP_CLEAR_C2IF : Clear Comparator 2 Interrupt Flag
Return values:
None

Definition at line 683 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP1_EXTI_CLEAR_FLAG ( )    WRITE_REG(EXTI_D1->PR1, COMP_EXTI_LINE_COMP1)

Clear the COMP1 EXTI flag.

Return values:
None

Definition at line 458 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP1_EXTI_DISABLE_EVENT ( )    CLEAR_BIT(EXTI_D1->EMR1, COMP_EXTI_LINE_COMP1)

Disable the COMP1 EXTI Line in event mode.

Return values:
None

Definition at line 447 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP1_EXTI_DISABLE_FALLING_EDGE ( )    CLEAR_BIT(EXTI->FTSR1, COMP_EXTI_LINE_COMP1)

Disable the COMP1 EXTI line falling edge trigger.

Return values:
None

Definition at line 402 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP1_EXTI_DISABLE_IT ( )    CLEAR_BIT(EXTI_D1->IMR1, COMP_EXTI_LINE_COMP1)

Disable the COMP1 EXTI line in interrupt mode.

Return values:
None

Definition at line 435 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP1_EXTI_DISABLE_RISING_EDGE ( )    CLEAR_BIT(EXTI->RTSR1, COMP_EXTI_LINE_COMP1)

Disable the COMP1 EXTI line rising edge trigger.

Return values:
None

Definition at line 390 of file stm32h7xx_hal_comp.h.

Value:
do {                                            \
                                                               __HAL_COMP_COMP1_EXTI_DISABLE_RISING_EDGE();  \
                                                               __HAL_COMP_COMP1_EXTI_DISABLE_FALLING_EDGE(); \
                                                             } while(0)

Disable the COMP1 EXTI line rising & falling edge trigger.

Return values:
None

Definition at line 419 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP1_EXTI_ENABLE_EVENT ( )    SET_BIT(EXTI_D1->EMR1, COMP_EXTI_LINE_COMP1)

Enable the COMP1 EXTI Line in event mode.

Return values:
None

Definition at line 441 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP1_EXTI_ENABLE_FALLING_EDGE ( )    SET_BIT(EXTI->FTSR1, COMP_EXTI_LINE_COMP1)

Enable the COMP1 EXTI line falling edge trigger.

Return values:
None

Definition at line 396 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP1_EXTI_ENABLE_IT ( )    SET_BIT(EXTI_D1->IMR1, COMP_EXTI_LINE_COMP1)

Enable the COMP1 EXTI line in interrupt mode.

Return values:
None

Definition at line 429 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP1_EXTI_ENABLE_RISING_EDGE ( )    SET_BIT(EXTI->RTSR1, COMP_EXTI_LINE_COMP1)

Enable the COMP1 EXTI line rising edge trigger.

Return values:
None

Definition at line 383 of file stm32h7xx_hal_comp.h.

Value:
do {                                           \
                                                               __HAL_COMP_COMP1_EXTI_ENABLE_RISING_EDGE();  \
                                                               __HAL_COMP_COMP1_EXTI_ENABLE_FALLING_EDGE(); \
                                                             } while(0)

Enable the COMP1 EXTI line rising & falling edge trigger.

Return values:
None

Definition at line 409 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP1_EXTI_GENERATE_SWIT ( )    SET_BIT(EXTI->SWIER1, COMP_EXTI_LINE_COMP1)

Generate a software interrupt on the COMP1 EXTI line.

Return values:
None

Definition at line 464 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP1_EXTI_GET_FLAG ( )    READ_BIT(EXTI_D1->PR1, COMP_EXTI_LINE_COMP1)

Check whether the COMP1 EXTI line flag is set or not.

Return values:
RESETor SET

Definition at line 453 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP1_EXTID3_DISABLE_EVENT ( )    CLEAR_BIT(EXTI->D3PMR1, COMP_EXTI_LINE_COMP1)

Disable the COMP1 D3 EXTI Line in event mode.

Return values:
None

Definition at line 476 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP1_EXTID3_ENABLE_EVENT ( )    SET_BIT(EXTI->D3PMR1, COMP_EXTI_LINE_COMP1)

Enable the COMP1 D3 EXTI Line in event mode.

Return values:
None

Definition at line 470 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP2_EXTI_CLEAR_FLAG ( )    WRITE_REG(EXTI_D1->PR1, COMP_EXTI_LINE_COMP2)

Clear the the COMP2 EXTI flag.

Return values:
None

Definition at line 592 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP2_EXTI_DISABLE_EVENT ( )    CLEAR_BIT(EXTI_D1->EMR1, COMP_EXTI_LINE_COMP2)

Disable the COMP2 EXTI Line in event mode.

Return values:
None

Definition at line 580 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP2_EXTI_DISABLE_FALLING_EDGE ( )    CLEAR_BIT(EXTI->FTSR1, COMP_EXTI_LINE_COMP2)

Disable the COMP2 EXTI line falling edge trigger.

Return values:
None

Definition at line 539 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP2_EXTI_DISABLE_IT ( )    CLEAR_BIT(EXTI_D1->IMR1, COMP_EXTI_LINE_COMP2)

Disable the COMP2 EXTI line.

Return values:
None

Definition at line 568 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP2_EXTI_DISABLE_RISING_EDGE ( )    CLEAR_BIT(EXTI->RTSR1, COMP_EXTI_LINE_COMP2)

Disable the COMP2 EXTI line rising edge trigger.

Return values:
None

Definition at line 527 of file stm32h7xx_hal_comp.h.

Value:
do {                                           \
                                                               __HAL_COMP_COMP2_EXTI_DISABLE_RISING_EDGE();  \
                                                               __HAL_COMP_COMP2_EXTI_DISABLE_FALLING_EDGE(); \
                                                             } while(0)

Disable the COMP2 EXTI line rising & falling edge trigger.

Return values:
None

Definition at line 554 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP2_EXTI_ENABLE_EVENT ( )    SET_BIT(EXTI_D1->EMR1, COMP_EXTI_LINE_COMP2)

Enable the COMP2 EXTI Line in event mode.

Return values:
None

Definition at line 574 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP2_EXTI_ENABLE_FALLING_EDGE ( )    SET_BIT(EXTI->FTSR1, COMP_EXTI_LINE_COMP2)

Enable the COMP2 EXTI line falling edge trigger.

Return values:
None

Definition at line 533 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP2_EXTI_ENABLE_IT ( )    SET_BIT(EXTI_D1->IMR1, COMP_EXTI_LINE_COMP2)

Enable the COMP2 EXTI line.

Return values:
None

Definition at line 562 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP2_EXTI_ENABLE_RISING_EDGE ( )    SET_BIT(EXTI->RTSR1, COMP_EXTI_LINE_COMP2)

Enable the COMP2 EXTI line rising edge trigger.

Return values:
None

Definition at line 521 of file stm32h7xx_hal_comp.h.

Value:
do {                                           \
                                                               __HAL_COMP_COMP2_EXTI_ENABLE_RISING_EDGE();  \
                                                               __HAL_COMP_COMP2_EXTI_ENABLE_FALLING_EDGE(); \
                                                             } while(0)

Enable the COMP2 EXTI line rising & falling edge trigger.

Return values:
None

Definition at line 545 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP2_EXTI_GENERATE_SWIT ( )    SET_BIT(EXTI->SWIER1, COMP_EXTI_LINE_COMP2)

Generate a software interrupt on the COMP2 EXTI line.

Return values:
None

Definition at line 610 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP2_EXTI_GET_FLAG ( )    READ_BIT(EXTI_D1->PR1, COMP_EXTI_LINE_COMP2)

Check whether the COMP2 EXTI line flag is set or not.

Return values:
RESETor SET

Definition at line 586 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP2_EXTID3_DISABLE_EVENT ( )    CLEAR_BIT(EXTI->D3PMR1, COMP_EXTI_LINE_COMP2)

Disable the COMP2 D3 EXTI Line in event mode.

Return values:
None

Definition at line 604 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_COMP2_EXTID3_ENABLE_EVENT ( )    SET_BIT(EXTI->D3PMR1, COMP_EXTI_LINE_COMP2)

Enable the COMP2 D3 EXTI Line in event mode.

Return values:
None

Definition at line 598 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_DISABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    (((__HANDLE__)->Instance->CFGR) &= ~(__INTERRUPT__))

Disable the specified COMP interrupt.

Parameters:
__HANDLE__,:specifies the COMP Handle.
__INTERRUPT__,:specifies the COMP interrupt source to enable. This parameter can be one of the following values:
  • COMP_CFGRx_ITEN : Comparator interrupt
Return values:
None

Definition at line 711 of file stm32h7xx_hal_comp.h.

Referenced by HAL_COMP_IRQHandler().

#define __HAL_COMP_ENABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    ( ((__HANDLE__)->Instance->CFGR) |= (__INTERRUPT__) )

Enable the specified COMP interrupt.

Parameters:
__HANDLE__,:specifies the COMP Handle.
__INTERRUPT__,:specifies the COMP interrupt source to enable. This parameter can be one of the following values:
  • COMP_CFGRx_ITEN : Comparator interrupt
Return values:
None

Definition at line 702 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_GET_FLAG (   __FLAG__)    ((COMP12->SR & (__FLAG__)) == (__FLAG__))

Checks whether the specified COMP flag is set or not.

Parameters:
__FLAG__,:specifies the flag to check. This parameter can be one of the following values:
  • COMP_FLAG_C1I: Comparator 1 Interrupt Flag
  • COMP_FLAG_C2I: Comparator 2 Interrupt Flag
Return values:
Thenew state of __FLAG__ (TRUE or FALSE)

Definition at line 674 of file stm32h7xx_hal_comp.h.

Referenced by HAL_COMP_IRQHandler().

#define __HAL_COMP_GET_IT_SOURCE (   __HANDLE__,
  __INTERRUPT__ 
)    ((((__HANDLE__)->Instance->CFGR & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

Checks if the specified COMP interrupt source is enabled or disabled.

Parameters:
__HANDLE__,:specifies the COMP Handle. This parameter can be COMP1 where x: 1 or 2 to select the COMP peripheral.
__INTERRUPT__,:specifies the COMP interrupt source to check. This parameter can be one of the following values:
  • COMP_IT_EN: Comparator interrupt enable
Return values:
Thenew state of __IT__ (TRUE or FALSE)

Definition at line 665 of file stm32h7xx_hal_comp.h.

Referenced by HAL_COMP_IRQHandler().