RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Macros
COMP external interrupt line management

Macros

#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.
 

Detailed Description

Macro Definition Documentation

◆ __HAL_COMP_CLEAR_C1IFLAG

#define __HAL_COMP_CLEAR_C1IFLAG ( )    __HAL_COMP_CLEAR_FLAG( COMP_CLEAR_C1IF)

Clear the COMP C1I flag.

Return values
None

◆ __HAL_COMP_CLEAR_C2IFLAG

#define __HAL_COMP_CLEAR_C2IFLAG ( )    __HAL_COMP_CLEAR_FLAG( COMP_CLEAR_C2IF)

Clear the COMP C2I flag.

Return values
None

◆ __HAL_COMP_CLEAR_FLAG

#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

◆ __HAL_COMP_COMP1_EXTI_CLEAR_FLAG

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

Clear the COMP1 EXTI flag.

Return values
None

◆ __HAL_COMP_COMP1_EXTI_DISABLE_EVENT

#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

◆ __HAL_COMP_COMP1_EXTI_DISABLE_FALLING_EDGE

#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

◆ __HAL_COMP_COMP1_EXTI_DISABLE_IT

#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

◆ __HAL_COMP_COMP1_EXTI_DISABLE_RISING_EDGE

#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

◆ __HAL_COMP_COMP1_EXTI_DISABLE_RISING_FALLING_EDGE

#define __HAL_COMP_COMP1_EXTI_DISABLE_RISING_FALLING_EDGE ( )
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

◆ __HAL_COMP_COMP1_EXTI_ENABLE_EVENT

#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

◆ __HAL_COMP_COMP1_EXTI_ENABLE_FALLING_EDGE

#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

◆ __HAL_COMP_COMP1_EXTI_ENABLE_IT

#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

◆ __HAL_COMP_COMP1_EXTI_ENABLE_RISING_EDGE

#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

◆ __HAL_COMP_COMP1_EXTI_ENABLE_RISING_FALLING_EDGE

#define __HAL_COMP_COMP1_EXTI_ENABLE_RISING_FALLING_EDGE ( )
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

◆ __HAL_COMP_COMP1_EXTI_GENERATE_SWIT

#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

◆ __HAL_COMP_COMP1_EXTI_GET_FLAG

#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

◆ __HAL_COMP_COMP1_EXTID3_DISABLE_EVENT

#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

◆ __HAL_COMP_COMP1_EXTID3_ENABLE_EVENT

#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

◆ __HAL_COMP_COMP2_EXTI_CLEAR_FLAG

#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

◆ __HAL_COMP_COMP2_EXTI_DISABLE_EVENT

#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

◆ __HAL_COMP_COMP2_EXTI_DISABLE_FALLING_EDGE

#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

◆ __HAL_COMP_COMP2_EXTI_DISABLE_IT

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

Disable the COMP2 EXTI line.

Return values
None

◆ __HAL_COMP_COMP2_EXTI_DISABLE_RISING_EDGE

#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

◆ __HAL_COMP_COMP2_EXTI_DISABLE_RISING_FALLING_EDGE

#define __HAL_COMP_COMP2_EXTI_DISABLE_RISING_FALLING_EDGE ( )
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

◆ __HAL_COMP_COMP2_EXTI_ENABLE_EVENT

#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

◆ __HAL_COMP_COMP2_EXTI_ENABLE_FALLING_EDGE

#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

◆ __HAL_COMP_COMP2_EXTI_ENABLE_IT

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

Enable the COMP2 EXTI line.

Return values
None

◆ __HAL_COMP_COMP2_EXTI_ENABLE_RISING_EDGE

#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

◆ __HAL_COMP_COMP2_EXTI_ENABLE_RISING_FALLING_EDGE

#define __HAL_COMP_COMP2_EXTI_ENABLE_RISING_FALLING_EDGE ( )
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

◆ __HAL_COMP_COMP2_EXTI_GENERATE_SWIT

#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

◆ __HAL_COMP_COMP2_EXTI_GET_FLAG

#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

◆ __HAL_COMP_COMP2_EXTID3_DISABLE_EVENT

#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

◆ __HAL_COMP_COMP2_EXTID3_ENABLE_EVENT

#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

◆ __HAL_COMP_DISABLE_IT

#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

◆ __HAL_COMP_ENABLE_IT

#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

◆ __HAL_COMP_GET_FLAG

#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)

◆ __HAL_COMP_GET_IT_SOURCE

#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)