STM8L15x Standard Peripherals Drivers
|
Initialization and Configuration functions. More...
Functions | |
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_ExternalTrigConfig (ADC_TypeDef *ADCx, ADC_ExtEventSelection_TypeDef ADC_ExtEventSelection, ADC_ExtTRGSensitivity_TypeDef ADC_ExtTRGSensitivity) |
Configures the ADC conversion through external trigger. | |
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_SoftwareStartConv (ADC_TypeDef *ADCx) |
Starts ADC conversion, by software trigger. |
Detailed Description
Initialization and Configuration functions.
=============================================================================== Initialization and Configuration functions =============================================================================== This section provides functions allowing to: - Enable or disable the ADC peripheral, - Initialize and configure the ADC Prescaler, ADC Conversion Resolution (12bit..6bit), ADC Continuous Conversion Mode (Continuous or Single conversion), - Configure External trigger Sensitivity and source, - Start ADC conversion, by software trigger.
Function Documentation
void ADC_Cmd | ( | ADC_TypeDef * | ADCx, |
FunctionalState | NewState | ||
) |
Enables or disables the selected ADC peripheral.
Definition at line 210 of file stm8l15x_adc.c.
References ADC_CR1_ADON, ADC_struct::CR1, DISABLE, and IS_FUNCTIONAL_STATE.
void ADC_DeInit | ( | ADC_TypeDef * | ADCx | ) |
Deinitializes the ADC peripheral registers to their default reset values.
Definition at line 129 of file stm8l15x_adc.c.
References ADC_CR1_RESET_VALUE, ADC_CR2_RESET_VALUE, ADC_CR3_RESET_VALUE, ADC_HTRH_RESET_VALUE, ADC_HTRL_RESET_VALUE, ADC_LTRH_RESET_VALUE, ADC_LTRL_RESET_VALUE, ADC_SQR1_RESET_VALUE, ADC_SQR2_RESET_VALUE, ADC_SQR3_RESET_VALUE, ADC_SQR4_RESET_VALUE, ADC_SR_RESET_VALUE, ADC_TRIGR1_RESET_VALUE, ADC_TRIGR2_RESET_VALUE, ADC_TRIGR3_RESET_VALUE, ADC_TRIGR4_RESET_VALUE, ADC_struct::CR1, ADC_struct::CR2, ADC_struct::CR3, ADC_struct::HTRH, ADC_struct::HTRL, ADC_struct::LTRH, ADC_struct::LTRL, ADC_struct::SQR, ADC_struct::SR, and ADC_struct::TRIGR.
void ADC_ExternalTrigConfig | ( | ADC_TypeDef * | ADCx, |
ADC_ExtEventSelection_TypeDef | ADC_ExtEventSelection, | ||
ADC_ExtTRGSensitivity_TypeDef | ADC_ExtTRGSensitivity | ||
) |
Configures the ADC conversion through external trigger.
Definition at line 255 of file stm8l15x_adc.c.
References ADC_CR2_EXTSEL, ADC_CR2_TRIGEDGE, ADC_struct::CR2, IS_ADC_EXT_EVENT_SELECTION, and IS_ADC_EXT_TRG_SENSITIVITY.
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.
Definition at line 180 of file stm8l15x_adc.c.
References ADC_CR1_CONT, ADC_CR1_RES, ADC_CR2_PRESC, ADC_struct::CR1, ADC_struct::CR2, IS_ADC_CONVERSION_MODE, IS_ADC_PRESCALER, and IS_ADC_RESOLUTION.
void ADC_SoftwareStartConv | ( | ADC_TypeDef * | ADCx | ) |
Starts ADC conversion, by software trigger.
Definition at line 233 of file stm8l15x_adc.c.
References ADC_CR1_START, and ADC_struct::CR1.