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

Functions

uint32_t HAL_COMP_GetOutputLevel (COMP_HandleTypeDef *hcomp)
 Return the output level (high or low) of the selected comparator. The output level depends on the selected polarity. If the polarity is not inverted: More...
 
void HAL_COMP_TriggerCallback (COMP_HandleTypeDef *hcomp)
 Comparator trigger callback. More...
 

Detailed Description

Function Documentation

◆ HAL_COMP_GetOutputLevel()

uint32_t HAL_COMP_GetOutputLevel ( COMP_HandleTypeDef hcomp)

Return the output level (high or low) of the selected comparator. The output level depends on the selected polarity. If the polarity is not inverted:

  • Comparator output is low when the input plus is at a lower voltage than the input minus
  • Comparator output is high when the input plus is at a higher voltage than the input minus If the polarity is inverted:
  • Comparator output is high when the input plus is at a lower voltage than the input minus
  • Comparator output is low when the input plus is at a higher voltage than the input minus
    Parameters
    hcompCOMP handle
    Return values
    Returnsthe selected comparator output level:
    • COMP_OUTPUT_LEVEL_LOW
    • COMP_OUTPUT_LEVEL_HIGH

◆ HAL_COMP_TriggerCallback()

void HAL_COMP_TriggerCallback ( COMP_HandleTypeDef hcomp)

Comparator trigger callback.

Parameters
hcompCOMP handle
Return values
None