L4 HAL Drivers
Operation
[COMP Exported Functions]
Functions | |
__STATIC_INLINE void | LL_COMP_Enable (COMP_TypeDef *COMPx) |
Enable comparator instance. | |
__STATIC_INLINE void | LL_COMP_Disable (COMP_TypeDef *COMPx) |
Disable comparator instance. | |
__STATIC_INLINE uint32_t | LL_COMP_IsEnabled (COMP_TypeDef *COMPx) |
Get COMP enable state (0: COMP is disabled, 1: COMP is enabled) CSR EN LL_COMP_IsEnabled. | |
__STATIC_INLINE void | LL_COMP_Lock (COMP_TypeDef *COMPx) |
Lock comparator instance. | |
__STATIC_INLINE uint32_t | LL_COMP_IsLocked (COMP_TypeDef *COMPx) |
Get COMP lock state. | |
__STATIC_INLINE uint32_t | LL_COMP_ReadOutputLevel (COMP_TypeDef *COMPx) |
Read comparator instance output level. |
Function Documentation
__STATIC_INLINE void LL_COMP_Disable | ( | COMP_TypeDef * | COMPx ) |
Disable comparator instance.
CSR EN LL_COMP_Disable
- Parameters:
-
COMPx Comparator instance
- Return values:
-
None
Definition at line 527 of file stm32l4xx_ll_comp.h.
__STATIC_INLINE void LL_COMP_Enable | ( | COMP_TypeDef * | COMPx ) |
Enable comparator instance.
CSR EN LL_COMP_Enable
- Parameters:
-
COMPx Comparator instance
- Return values:
-
None
Definition at line 516 of file stm32l4xx_ll_comp.h.
__STATIC_INLINE uint32_t LL_COMP_IsEnabled | ( | COMP_TypeDef * | COMPx ) |
Get COMP enable state (0: COMP is disabled, 1: COMP is enabled) CSR EN LL_COMP_IsEnabled.
- Parameters:
-
COMPx Comparator instance
- Return values:
-
State of bit (1 or 0).
Definition at line 539 of file stm32l4xx_ll_comp.h.
__STATIC_INLINE uint32_t LL_COMP_IsLocked | ( | COMP_TypeDef * | COMPx ) |
Get COMP lock state.
(0: COMP is unlocked, 1: COMP is locked) CSR LOCK LL_COMP_IsLocked
- Parameters:
-
COMPx Comparator instance
- Return values:
-
State of bit (1 or 0).
Definition at line 564 of file stm32l4xx_ll_comp.h.
__STATIC_INLINE void LL_COMP_Lock | ( | COMP_TypeDef * | COMPx ) |
Lock comparator instance.
Once locked, comparator configuration can be accessed in read-only. The only way to unlock the comparator is a device hardware reset. CSR LOCK LL_COMP_Lock
- Parameters:
-
COMPx Comparator instance
- Return values:
-
None
Definition at line 552 of file stm32l4xx_ll_comp.h.
__STATIC_INLINE uint32_t LL_COMP_ReadOutputLevel | ( | COMP_TypeDef * | COMPx ) |
Read comparator instance output level.
The output level depends on the selected polarity. If the polarity is not inverted:
- Comparator output is low when the non-inverting input is at a lower voltage than the inverting input
- Comparator output is high when the non-inverting input is at a higher voltage than the inverting input If the polarity is inverted:
- Comparator output is high when the non-inverting input is at a lower voltage than the inverting input
- Comparator output is low when the non-inverting input is at a higher voltage than the inverting input CSR VALUE LL_COMP_ReadOutputLevel
- Parameters:
-
COMPx Comparator instance
- Return values:
-
Returned value can be one of the following values: - LL_COMP_OUTPUT_LEVEL_LOW
- LL_COMP_OUTPUT_LEVEL_HIGH
Definition at line 588 of file stm32l4xx_ll_comp.h.
Generated on Tue Jul 12 2022 10:58:13 by 1.7.2