Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Peripheral Control functions
[COMP Exported Functions]
Management functions. More...
Functions | |
HAL_StatusTypeDef | HAL_COMP_Lock (COMP_HandleTypeDef *hcomp) |
Lock the selected comparator configuration. | |
uint32_t | HAL_COMP_GetOutputLevel (COMP_HandleTypeDef *hcomp) |
Return the output level (high or low) of the selected comparator. | |
__weak void | HAL_COMP_TriggerCallback (COMP_HandleTypeDef *hcomp) |
Comparator callback. |
Detailed Description
Management functions.
=============================================================================== ##### Peripheral Control functions ##### =============================================================================== [..] This subsection provides a set of functions allowing to control the comparators.
Function Documentation
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:
-
hcomp COMP handle
- Return values:
-
Returns the selected comparator output level: - COMP_OUTPUT_LEVEL_LOW
- COMP_OUTPUT_LEVEL_HIGH
Definition at line 673 of file stm32l4xx_hal_comp.c.
HAL_StatusTypeDef HAL_COMP_Lock | ( | COMP_HandleTypeDef * | hcomp ) |
Lock the selected comparator configuration.
- Note:
- A system reset is required to unlock the comparator configuration.
- Locking the comparator from reset state is possible if __HAL_RCC_SYSCFG_CLK_ENABLE() is being called before.
- Parameters:
-
hcomp COMP handle
- Return values:
-
HAL status
Definition at line 627 of file stm32l4xx_hal_comp.c.
__weak void HAL_COMP_TriggerCallback | ( | COMP_HandleTypeDef * | hcomp ) |
Comparator callback.
- Parameters:
-
hcomp COMP handle
- Return values:
-
None
Definition at line 687 of file stm32l4xx_hal_comp.c.
Generated on Tue Jul 12 2022 11:00:03 by
