STM32F0 Standard Peripheral bibliotheek  1.0
ST Microelectronics standard peripheral bibliotheek documentatie voor de STM32F0 familie
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
stm32f0xx_comp.h File Reference

This file contains all the functions prototypes for the COMP firmware library. More...

#include "stm32f0xx.h"

Go to the source code of this file.

Data Structures

struct  COMP_InitTypeDef
 COMP Init structure definition. More...
 

Macros

#define COMP_Selection_COMP1   ((uint32_t)0x00000000)
 
#define COMP_Selection_COMP2   ((uint32_t)0x00000010)
 
#define IS_COMP_ALL_PERIPH(PERIPH)
 
#define COMP_InvertingInput_1_4VREFINT   ((uint32_t)0x00000000)
 
#define COMP_InvertingInput_1_2VREFINT   COMP_CSR_COMP1INSEL_0
 
#define COMP_InvertingInput_3_4VREFINT   COMP_CSR_COMP1INSEL_1
 
#define COMP_InvertingInput_VREFINT   ((uint32_t)0x00000030)
 
#define COMP_InvertingInput_DAC1   COMP_CSR_COMP1INSEL_2
 
#define COMP_InvertingInput_IO   ((uint32_t)0x00000060)
 
#define IS_COMP_INVERTING_INPUT(INPUT)
 
#define COMP_Output_None   ((uint32_t)0x00000000)
 
#define COMP_Output_TIM1BKIN   COMP_CSR_COMP1OUTSEL_0
 
#define COMP_Output_TIM1IC1   COMP_CSR_COMP1OUTSEL_1
 
#define COMP_Output_TIM1OCREFCLR   ((uint32_t)0x00000300)
 
#define COMP_Output_TIM2IC4   COMP_CSR_COMP1OUTSEL_2
 
#define COMP_Output_TIM2OCREFCLR   ((uint32_t)0x00000500)
 
#define COMP_Output_TIM3IC1   ((uint32_t)0x00000600)
 
#define COMP_Output_TIM3OCREFCLR   COMP_CSR_COMP1OUTSEL
 
#define IS_COMP_OUTPUT(OUTPUT)
 
#define COMP_OutputPol_NonInverted   ((uint32_t)0x00000000)
 
#define COMP_OutputPol_Inverted   COMP_CSR_COMP1POL
 
#define IS_COMP_OUTPUT_POL(POL)
 
#define COMP_Hysteresis_No   0x00000000
 
#define COMP_Hysteresis_Low   COMP_CSR_COMP1HYST_0
 
#define COMP_Hysteresis_Medium   COMP_CSR_COMP1HYST_1
 
#define COMP_Hysteresis_High   COMP_CSR_COMP1HYST
 
#define IS_COMP_HYSTERESIS(HYSTERESIS)
 
#define COMP_Mode_HighSpeed   0x00000000
 
#define COMP_Mode_MediumSpeed   COMP_CSR_COMP1MODE_0
 
#define COMP_Mode_LowPower   COMP_CSR_COMP1MODE_1
 
#define COMP_Mode_UltraLowPower   COMP_CSR_COMP1MODE
 
#define IS_COMP_MODE(MODE)
 
#define COMP_OutputLevel_High   COMP_CSR_COMP1OUT
 
#define COMP_OutputLevel_Low   ((uint32_t)0x00000000)
 

Functions

void COMP_DeInit (void)
 Deinitializes COMP peripheral registers to their default reset values. More...
 
void COMP_Init (uint32_t COMP_Selection, COMP_InitTypeDef *COMP_InitStruct)
 Initializes the COMP peripheral according to the specified parameters in COMP_InitStruct. More...
 
void COMP_StructInit (COMP_InitTypeDef *COMP_InitStruct)
 Fills each COMP_InitStruct member with its default value. More...
 
void COMP_Cmd (uint32_t COMP_Selection, FunctionalState NewState)
 Enable or disable the COMP peripheral. More...
 
void COMP_SwitchCmd (FunctionalState NewState)
 Close or Open the SW1 switch. More...
 
uint32_t COMP_GetOutputLevel (uint32_t COMP_Selection)
 Return the output level (high or low) of the selected comparator. More...
 
void COMP_WindowCmd (FunctionalState NewState)
 Enables or disables the window mode. More...
 
void COMP_LockConfig (uint32_t COMP_Selection)
 Lock the selected comparator (COMP1/COMP2) configuration. More...
 

Detailed Description

This file contains all the functions prototypes for the COMP firmware library.

Author
MCD Application Team
Version
V1.0.1
Date
20-April-2012
Attention

© COPYRIGHT 2012 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.