思澈科技软件开发工具包  2.20
COMP_Exported_Functions_Group1

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. More...
 
HAL_StatusTypeDef HAL_COMP_DeInit (COMP_HandleTypeDef *hcomp)
 DeInitialize the COMP peripheral. More...
 
void HAL_COMP_MspInit (COMP_HandleTypeDef *hcomp)
 Initialize the COMP MSP. More...
 
HAL_StatusTypeDef HAL_COMP_Config (COMP_HandleTypeDef *hcomp, COMP_ConfigTypeDef *cfg)
 select which comparator to work. More...
 
int HAL_COMP_PollForComp (COMP_HandleTypeDef *hcomp, uint8_t channel, uint32_t timeout)
 polling compare result. More...
 
void HAL_COMP_MspDeInit (COMP_HandleTypeDef *hcomp)
 DeInitialize the COMP MSP. More...
 

Detailed Description

Function Documentation

◆ HAL_COMP_Config()

HAL_StatusTypeDef HAL_COMP_Config ( COMP_HandleTypeDef hcomp,
COMP_ConfigTypeDef cfg 
)

select which comparator to work.

Parameters
hcompCOMP handle
cfgconfigure parameters
Return values
HALstatus

◆ HAL_COMP_DeInit()

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

◆ HAL_COMP_Init()

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.

Note
If the selected comparator is locked, initialization can't be performed. To unlock the configuration, perform a system reset.
Parameters
hcompCOMP handle
Return values
HALstatus

◆ HAL_COMP_MspDeInit()

void HAL_COMP_MspDeInit ( COMP_HandleTypeDef hcomp)

DeInitialize the COMP MSP.

Parameters
hcompCOMP handle
Return values
None

◆ HAL_COMP_MspInit()

void HAL_COMP_MspInit ( COMP_HandleTypeDef hcomp)

Initialize the COMP MSP.

Parameters
hcompCOMP handle
Return values
None

◆ HAL_COMP_PollForComp()

int HAL_COMP_PollForComp ( COMP_HandleTypeDef hcomp,
uint8_t  channel,
uint32_t  timeout 
)

polling compare result.

Parameters
hcompCOMP handle
channelchannel select, 0, 1 valid
timeouttimeout in ms
Return values
compareresult