STM32H735xx HAL User Manual
Defines
COMP Handle Management
COMP Exported Macros

Defines

#define __HAL_COMP_RESET_HANDLE_STATE(__HANDLE__)
 Reset COMP handle state.
#define COMP_CLEAR_ERRORCODE(__HANDLE__)   ((__HANDLE__)->ErrorCode = HAL_COMP_ERROR_NONE)
 Clear COMP error code (set it to no error code "HAL_COMP_ERROR_NONE").
#define __HAL_COMP_ENABLE(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->CFGR, COMP_CFGRx_EN)
 Enable the specified comparator.
#define __HAL_COMP_DISABLE(__HANDLE__)   CLEAR_BIT((__HANDLE__)->Instance->CFGR, COMP_CFGRx_EN)
 Disable the specified comparator.
#define __HAL_COMP_LOCK(__HANDLE__)   SET_BIT((__HANDLE__)->Instance->CFGR, COMP_CFGRx_LOCK)
 Lock the specified comparator configuration.
#define __HAL_COMP_IS_LOCKED(__HANDLE__)   (READ_BIT((__HANDLE__)->Instance->CFGR, COMP_CFGRx_LOCK) == COMP_CFGRx_LOCK)
 Check whether the specified comparator is locked.

Define Documentation

#define __HAL_COMP_DISABLE (   __HANDLE__)    CLEAR_BIT((__HANDLE__)->Instance->CFGR, COMP_CFGRx_EN)

Disable the specified comparator.

Parameters:
__HANDLE__COMP handle
Return values:
None

Definition at line 351 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_ENABLE (   __HANDLE__)    SET_BIT((__HANDLE__)->Instance->CFGR, COMP_CFGRx_EN)

Enable the specified comparator.

Parameters:
__HANDLE__COMP handle
Return values:
None

Definition at line 344 of file stm32h7xx_hal_comp.h.

#define __HAL_COMP_IS_LOCKED (   __HANDLE__)    (READ_BIT((__HANDLE__)->Instance->CFGR, COMP_CFGRx_LOCK) == COMP_CFGRx_LOCK)

Check whether the specified comparator is locked.

Parameters:
__HANDLE__COMP handle
Return values:
Value0 if COMP instance is not locked, value 1 if COMP instance is locked

Definition at line 369 of file stm32h7xx_hal_comp.h.

Referenced by HAL_COMP_DeInit(), HAL_COMP_Init(), HAL_COMP_Lock(), HAL_COMP_Start(), HAL_COMP_Start_IT(), and HAL_COMP_Stop().

#define __HAL_COMP_LOCK (   __HANDLE__)    SET_BIT((__HANDLE__)->Instance->CFGR, COMP_CFGRx_LOCK)

Lock the specified comparator configuration.

Note:
Using this macro induce HAL COMP handle state machine being no more in line with COMP instance state. To keep HAL COMP handle state machine updated, it is recommended to use function "HAL_COMP_Lock')".
Parameters:
__HANDLE__COMP handle
Return values:
None

Definition at line 362 of file stm32h7xx_hal_comp.h.

Referenced by HAL_COMP_Lock().

#define __HAL_COMP_RESET_HANDLE_STATE (   __HANDLE__)
Value:
do{                                                 \
                                                     (__HANDLE__)->State = HAL_COMP_STATE_RESET;      \
                                                     (__HANDLE__)->MspInitCallback = NULL;            \
                                                     (__HANDLE__)->MspDeInitCallback = NULL;          \
                                                    } while(0)

Reset COMP handle state.

Parameters:
__HANDLE__COMP handle
Return values:
None

Definition at line 323 of file stm32h7xx_hal_comp.h.

#define COMP_CLEAR_ERRORCODE (   __HANDLE__)    ((__HANDLE__)->ErrorCode = HAL_COMP_ERROR_NONE)

Clear COMP error code (set it to no error code "HAL_COMP_ERROR_NONE").

Parameters:
__HANDLE__COMP handle
Return values:
None

Definition at line 337 of file stm32h7xx_hal_comp.h.

Referenced by HAL_COMP_Init().