STM8L15x Standard Peripherals Drivers
|
stm8l15x_comp.h File Reference
This file contains all the functions prototypes for the COMP firmware library. More...
#include "stm8l15x.h"
Go to the source code of this file.
Defines | |
#define | IS_COMP_ALL_PERIPH(PERIPH) |
#define | IS_COMP_EDGE(EDGE) |
#define | IS_COMP_INVERTING_INPUT(INPUT) |
#define | IS_COMP_OUTPUT(OUTPUT) |
#define | IS_COMP_SPEED(SPEED) |
#define | IS_COMP_TRIGGERGROUP(TRIGGERGROUP) |
#define | IS_COMP_TRIGGERPIN(TRIGGERPIN) |
Enumerations | |
enum | COMP_Edge_TypeDef { COMP_Edge_Falling = ((uint8_t)0x01), COMP_Edge_Rising = ((uint8_t)0x02), COMP_Edge_Rising_Falling = ((uint8_t)0x03) } |
enum | COMP_InvertingInput_Typedef { COMP_InvertingInput_IO = ((uint8_t)0x08), COMP_InvertingInput_VREFINT = ((uint8_t)0x10), COMP_InvertingInput_3_4VREFINT = ((uint8_t)0x18), COMP_InvertingInput_1_2VREFINT = ((uint8_t)0x20), COMP_InvertingInput_1_4VREFINT = ((uint8_t)0x28), COMP_InvertingInput_DAC1 = ((uint8_t)0x30), COMP_InvertingInput_DAC2 = ((uint8_t)0x38) } |
enum | COMP_OutputLevel_TypeDef { COMP_OutputLevel_Low = ((uint8_t)0x00), COMP_OutputLevel_High = ((uint8_t)0x01) } |
enum | COMP_OutputSelect_Typedef { COMP_OutputSelect_TIM2IC2 = ((uint8_t)0x00), COMP_OutputSelect_TIM3IC2 = ((uint8_t)0x40), COMP_OutputSelect_TIM1BRK = ((uint8_t)0x80), COMP_OutputSelect_TIM1OCREFCLR = ((uint8_t)0xC0) } |
enum | COMP_Selection_TypeDef { COMP_Selection_COMP1 = ((uint8_t)0x01), COMP_Selection_COMP2 = ((uint8_t)0x02) } |
enum | COMP_Speed_TypeDef { COMP_Speed_Slow = ((uint8_t)0x00), COMP_Speed_Fast = ((uint8_t)0x04) } |
enum | COMP_TriggerGroup_TypeDef { COMP_TriggerGroup_InvertingInput = ((uint8_t)0x01), COMP_TriggerGroup_NonInvertingInput = ((uint8_t)0x02), COMP_TriggerGroup_VREFINTOutput = ((uint8_t)0x03), COMP_TriggerGroup_DACOutput = ((uint8_t)0x04) } |
enum | COMP_TriggerPin_TypeDef { COMP_TriggerPin_0 = ((uint8_t)0x01), COMP_TriggerPin_1 = ((uint8_t)0x02), COMP_TriggerPin_2 = ((uint8_t)0x04) } |
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 contains all the functions prototypes for the COMP firmware library.
- 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.h.