STM8L15x Standard Peripherals Drivers
|
Initialization and Configuration functions. More...
Functions | |
void | COMP_DeInit (void) |
Deinitializes the COMPx peripheral registers to their default reset values. | |
void | COMP_EdgeConfig (COMP_Selection_TypeDef COMP_Selection, COMP_Edge_TypeDef COMP_Edge) |
Configures the COMP edge detection. | |
COMP_OutputLevel_TypeDef | COMP_GetOutputLevel (COMP_Selection_TypeDef COMP_Selection) |
Returns the output level of the comparator. | |
void | COMP_Init (COMP_InvertingInput_Typedef COMP_InvertingInput, COMP_OutputSelect_Typedef COMP_OutputSelect, COMP_Speed_TypeDef COMP_Speed) |
Initializes the comparator inverting input, output and speed. | |
void | COMP_VrefintToCOMP1Connect (FunctionalState NewState) |
Enables or disables connection between VREFINT and COMP1 inverting input. |
Detailed Description
Initialization and Configuration functions.
=============================================================================== Initialization and Configuration functions ===============================================================================
Function Documentation
void COMP_DeInit | ( | void | ) |
Deinitializes the COMPx peripheral registers to their default reset values.
Definition at line 105 of file stm8l15x_comp.c.
References COMP, COMP_CSR1_RESET_VALUE, COMP_CSR2_RESET_VALUE, COMP_CSR3_RESET_VALUE, COMP_CSR4_RESET_VALUE, and COMP_CSR5_RESET_VALUE.
void COMP_EdgeConfig | ( | COMP_Selection_TypeDef | COMP_Selection, |
COMP_Edge_TypeDef | COMP_Edge | ||
) |
Configures the COMP edge detection.
Definition at line 206 of file stm8l15x_comp.c.
References COMP, COMP_CSR1_CMP1, COMP_CSR2_CMP2, COMP_Selection_COMP1, IS_COMP_ALL_PERIPH, and IS_COMP_EDGE.
COMP_OutputLevel_TypeDef COMP_GetOutputLevel | ( | COMP_Selection_TypeDef | COMP_Selection | ) |
Returns the output level of the comparator.
- Note:
- Comparators outputs aren't available on GPIO (outputs levels are only internal).
Definition at line 245 of file stm8l15x_comp.c.
References COMP, COMP_CSR1_CMP1OUT, COMP_CSR2_CMP2OUT, COMP_OutputLevel_High, COMP_OutputLevel_Low, COMP_Selection_COMP1, IS_COMP_ALL_PERIPH, and RESET.
void COMP_Init | ( | COMP_InvertingInput_Typedef | COMP_InvertingInput, |
COMP_OutputSelect_Typedef | COMP_OutputSelect, | ||
COMP_Speed_TypeDef | COMP_Speed | ||
) |
Initializes the comparator inverting input, output and speed.
- Note:
- This function configures only COMP2.
Definition at line 147 of file stm8l15x_comp.c.
References COMP, COMP_CSR2_SPEED, COMP_CSR3_INSEL, COMP_CSR3_OUTSEL, IS_COMP_INVERTING_INPUT, IS_COMP_OUTPUT, and IS_COMP_SPEED.
void COMP_VrefintToCOMP1Connect | ( | FunctionalState | NewState | ) |
Enables or disables connection between VREFINT and COMP1 inverting input.
Definition at line 177 of file stm8l15x_comp.c.
References COMP, COMP_CSR3_VREFEN, DISABLE, and IS_FUNCTIONAL_STATE.