STM8L15x Standard Peripherals Drivers
|
stm8l15x_adc.c File Reference
This file provides firmware functions to manage the following functionalities of the Analog to Digital Convertor (ADC) peripheral:
- Initialization and Configuration
- Power saving
- Analog Watchdog configuration
- Temperature Sensor & Vrefint (Voltage Reference internal) management
- Regular Channels Configuration
- Regular Channels DMA Configuration
- Injected channels Configuration
- Interrupts and flags management.
#include "stm8l15x_adc.h"
Go to the source code of this file.
Functions | |
void | ADC_AnalogWatchdogChannelSelect (ADC_TypeDef *ADCx, ADC_AnalogWatchdogSelection_TypeDef ADC_AnalogWatchdogSelection) |
Configures the channel to be checked by the Analog watchdog. | |
void | ADC_AnalogWatchdogConfig (ADC_TypeDef *ADCx, ADC_AnalogWatchdogSelection_TypeDef ADC_AnalogWatchdogSelection, uint16_t HighThreshold, uint16_t LowThreshold) |
Configures the Analog watchdog. | |
void | ADC_AnalogWatchdogThresholdsConfig (ADC_TypeDef *ADCx, uint16_t HighThreshold, uint16_t LowThreshold) |
Configures the high and low thresholds of the Analog watchdog. | |
void | ADC_ChannelCmd (ADC_TypeDef *ADCx, ADC_Channel_TypeDef ADC_Channels, FunctionalState NewState) |
Enables or disables the selected ADC channel(s). | |
void | ADC_ClearFlag (ADC_TypeDef *ADCx, ADC_FLAG_TypeDef ADC_FLAG) |
Clears the ADC's pending flags. | |
void | ADC_ClearITPendingBit (ADC_TypeDef *ADCx, ADC_IT_TypeDef ADC_IT) |
Clears the ADC�s interrupt pending bits. | |
void | ADC_Cmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the selected ADC peripheral. | |
void | ADC_DeInit (ADC_TypeDef *ADCx) |
Deinitializes the ADC peripheral registers to their default reset values. | |
void | ADC_DMACmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
Enables or disables the specified ADC DMA request. | |
void | ADC_ExternalTrigConfig (ADC_TypeDef *ADCx, ADC_ExtEventSelection_TypeDef ADC_ExtEventSelection, ADC_ExtTRGSensitivity_TypeDef ADC_ExtTRGSensitivity) |
Configures the ADC conversion through external trigger. | |
uint16_t | ADC_GetConversionValue (ADC_TypeDef *ADCx) |
Returns the last ADC converted data. | |
FlagStatus | ADC_GetFlagStatus (ADC_TypeDef *ADCx, ADC_FLAG_TypeDef ADC_FLAG) |
Checks whether the specified ADC flag is set or not. | |
ITStatus | ADC_GetITStatus (ADC_TypeDef *ADCx, ADC_IT_TypeDef ADC_IT) |
Checks whether the specified ADC interrupt has occurred or not. | |
void | ADC_Init (ADC_TypeDef *ADCx, ADC_ConversionMode_TypeDef ADC_ConversionMode, ADC_Resolution_TypeDef ADC_Resolution, ADC_Prescaler_TypeDef ADC_Prescaler) |
Initializes the specified ADC peripheral according to the specified parameters. | |
void | ADC_ITConfig (ADC_TypeDef *ADCx, ADC_IT_TypeDef ADC_IT, FunctionalState NewState) |
Enables or disables the specified ADC interrupts. | |
void | ADC_SamplingTimeConfig (ADC_TypeDef *ADCx, ADC_Group_TypeDef ADC_GroupChannels, ADC_SamplingTime_TypeDef ADC_SamplingTime) |
Configures the sampling time for the selected ADC channel group. | |
void | ADC_SchmittTriggerConfig (ADC_TypeDef *ADCx, ADC_Channel_TypeDef ADC_Channels, FunctionalState NewState) |
Configures the status of the Schmitt Trigger for the selected ADC channel(s). | |
void | ADC_SoftwareStartConv (ADC_TypeDef *ADCx) |
Starts ADC conversion, by software trigger. | |
void | ADC_TempSensorCmd (FunctionalState NewState) |
Enables or disables the Temperature sensor internal reference. | |
void | ADC_VrefintCmd (FunctionalState NewState) |
Enables or disables the Internal Voltage reference. |
Detailed Description
This file provides firmware functions to manage the following functionalities of the Analog to Digital Convertor (ADC) peripheral:
- Initialization and Configuration
- Power saving
- Analog Watchdog configuration
- Temperature Sensor & Vrefint (Voltage Reference internal) management
- Regular Channels Configuration
- Regular Channels DMA Configuration
- Injected channels 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_adc.c.