STM32H735xx HAL User Manual
Functions
Initialization/de-initialization functions
COMP Exported Functions

Initialization and de-initialization functions. More...

Functions

HAL_StatusTypeDef HAL_COMP_Init (COMP_HandleTypeDef *hcomp)
 Initialize the COMP according to the specified parameters in the COMP_InitTypeDef and initialize the associated handle.
HAL_StatusTypeDef HAL_COMP_DeInit (COMP_HandleTypeDef *hcomp)
 DeInitialize the COMP peripheral.
__weak void HAL_COMP_MspInit (COMP_HandleTypeDef *hcomp)
 Initialize the COMP MSP.
__weak void HAL_COMP_MspDeInit (COMP_HandleTypeDef *hcomp)
 DeInitialize the COMP MSP.
HAL_StatusTypeDef HAL_COMP_RegisterCallback (COMP_HandleTypeDef *hcomp, HAL_COMP_CallbackIDTypeDef CallbackID, pCOMP_CallbackTypeDef pCallback)
 Register a User COMP Callback To be used instead of the weak predefined callback.
HAL_StatusTypeDef HAL_COMP_UnRegisterCallback (COMP_HandleTypeDef *hcomp, HAL_COMP_CallbackIDTypeDef CallbackID)
 Unregister a COMP Callback COMP callback is redirected to the weak predefined callback.

Detailed Description

Initialization and de-initialization functions.

 ===============================================================================
              ##### Initialization and de-initialization functions #####
 ===============================================================================
    [..]  This section provides functions to initialize and de-initialize comparators 


Function Documentation

HAL_StatusTypeDef HAL_COMP_DeInit ( COMP_HandleTypeDef hcomp)

DeInitialize the COMP peripheral.

Note:
Deinitialization cannot be performed if the COMP configuration is locked. To unlock the configuration, perform a system reset.
Parameters:
hcompCOMP handle
Return values:
HALstatus

Definition at line 493 of file stm32h7xx_hal_comp.c.

References __HAL_COMP_IS_LOCKED, assert_param, HAL_COMP_MspDeInit(), HAL_COMP_STATE_RESET, __COMP_HandleTypeDef::Instance, __COMP_HandleTypeDef::MspDeInitCallback, and __COMP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_COMP_Init ( COMP_HandleTypeDef hcomp)

DeInitialize the COMP MSP.

Parameters:
hcompCOMP handle
Return values:
None

Definition at line 556 of file stm32h7xx_hal_comp.c.

Referenced by HAL_COMP_DeInit(), and HAL_COMP_UnRegisterCallback().

Initialize the COMP MSP.

Parameters:
hcompCOMP handle
Return values:
None

Definition at line 542 of file stm32h7xx_hal_comp.c.

Referenced by HAL_COMP_Init(), and HAL_COMP_UnRegisterCallback().

HAL_StatusTypeDef HAL_COMP_RegisterCallback ( COMP_HandleTypeDef hcomp,
HAL_COMP_CallbackIDTypeDef  CallbackID,
pCOMP_CallbackTypeDef  pCallback 
)

Register a User COMP Callback To be used instead of the weak predefined callback.

Parameters:
hcompPointer to a COMP_HandleTypeDef structure that contains the configuration information for the specified COMP.
CallbackIDID of the callback to be registered This parameter can be one of the following values:
pCallbackpointer to the Callback function
Return values:
HALstatus

Definition at line 579 of file stm32h7xx_hal_comp.c.

References __COMP_HandleTypeDef::ErrorCode, HAL_COMP_ERROR_INVALID_CALLBACK, HAL_COMP_MSPDEINIT_CB_ID, HAL_COMP_MSPINIT_CB_ID, HAL_COMP_STATE_READY, HAL_COMP_STATE_RESET, HAL_COMP_TRIGGER_CB_ID, __COMP_HandleTypeDef::MspDeInitCallback, __COMP_HandleTypeDef::MspInitCallback, __COMP_HandleTypeDef::State, and __COMP_HandleTypeDef::TriggerCallback.

HAL_StatusTypeDef HAL_COMP_UnRegisterCallback ( COMP_HandleTypeDef hcomp,
HAL_COMP_CallbackIDTypeDef  CallbackID 
)

Unregister a COMP Callback COMP callback is redirected to the weak predefined callback.

Parameters:
hcompPointer to a COMP_HandleTypeDef structure that contains the configuration information for the specified COMP.
CallbackIDID of the callback to be unregistered This parameter can be one of the following values:
Return values:
HALstatus

Definition at line 661 of file stm32h7xx_hal_comp.c.

References __COMP_HandleTypeDef::ErrorCode, HAL_COMP_ERROR_INVALID_CALLBACK, HAL_COMP_MspDeInit(), HAL_COMP_MSPDEINIT_CB_ID, HAL_COMP_MspInit(), HAL_COMP_MSPINIT_CB_ID, HAL_COMP_STATE_READY, HAL_COMP_STATE_RESET, HAL_COMP_TRIGGER_CB_ID, HAL_COMP_TriggerCallback(), __COMP_HandleTypeDef::MspDeInitCallback, __COMP_HandleTypeDef::MspInitCallback, __COMP_HandleTypeDef::State, and __COMP_HandleTypeDef::TriggerCallback.