STM8L15x Standard Peripherals Drivers
|
stm8l15x_comp.c File Reference
This file provides firmware functions to manage the following functionalities of the comparators (COMP1 and COMP2) peripheral:
- Comparators configuration
- Window mode control
- Internal Reference Voltage (VREFINT) output
- Comparator channels trigger configuration
- Interrupts and flags management.
#include "stm8l15x_comp.h"
Go to the source code of this file.
Functions | |
void | COMP_ClearFlag (COMP_Selection_TypeDef COMP_Selection) |
Clears the comparator�s pending flag. | |
void | COMP_ClearITPendingBit (COMP_Selection_TypeDef COMP_Selection) |
Clears the interrupt pending bits of the comparator. | |
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. | |
FlagStatus | COMP_GetFlagStatus (COMP_Selection_TypeDef COMP_Selection) |
Checks whether the comparator flag is set or not. | |
ITStatus | COMP_GetITStatus (COMP_Selection_TypeDef COMP_Selection) |
Checks whether the comparator interrupt has occurred or not. | |
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_ITConfig (COMP_Selection_TypeDef COMP_Selection, FunctionalState NewState) |
Enables or disables the interrupt generation when an event is detected. | |
void | COMP_SchmittTriggerCmd (FunctionalState NewState) |
Enables or disables the schmitt trigger. | |
void | COMP_TriggerConfig (COMP_TriggerGroup_TypeDef COMP_TriggerGroup, COMP_TriggerPin_TypeDef COMP_TriggerPin, FunctionalState NewState) |
Enables or disables trigger on the specified input/output group. | |
void | COMP_VrefintOutputCmd (FunctionalState NewState) |
Enables or disables the output of the internal reference voltage. | |
void | COMP_VrefintToCOMP1Connect (FunctionalState NewState) |
Enables or disables connection between VREFINT and COMP1 inverting input. | |
void | COMP_WindowCmd (FunctionalState NewState) |
Enables or disables the window mode. |
Detailed Description
This file provides firmware functions to manage the following functionalities of the comparators (COMP1 and COMP2) peripheral:
- Comparators configuration
- Window mode control
- Internal Reference Voltage (VREFINT) output
- Comparator channels trigger configuration
- Interrupts and flags management.
- Attention:
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
© COPYRIGHT 2011 STMicroelectronics
Definition in file stm8l15x_comp.c.