STM8L15x Standard Peripherals Drivers
|
Interrupts and flags management functions. More...
Functions | |
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. | |
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_ITConfig (ADC_TypeDef *ADCx, ADC_IT_TypeDef ADC_IT, FunctionalState NewState) |
Enables or disables the specified ADC interrupts. |
Detailed Description
Interrupts and flags management functions.
=============================================================================== Interrupts and flags management functions =============================================================================== This section provides functions allowing to configure the ADC Interrupts and get the status and clear flags and Interrupts pending bits. The ADC provides 3 Interrupt sources and 3 Flags: Flags : ---------- 1. ADC_FLAG_OVR : Overrun detection when ADC channel converted data is lost 2. ADC_FLAG_EOC : End of conversion�- to indicate the end of a regular CHANNEL conversion or a GROUP conversions, depending of the ADC Continuous Conversion Mode (Continuous or Single conversion) and of the DMA usage. Note : if DMA is used, EOC occurs at the end of the sequence conversion, else it occurs after each conversion 3. ADC_FLAG_AWD: to indicate if the converted voltage crosses the programmed Analog watchdog thresholds values. Interrupts : ------------ 1. ADC_IT_OVR : specifies the interrupt source for the Overrun detection event. 2. ADC_IT_EOC : specifies the interrupt source for the End of conversion event. 3. ADC_IT_AWD : specifies the interrupt source for the Analog watchdog event.
Function Documentation
void ADC_ClearFlag | ( | ADC_TypeDef * | ADCx, |
ADC_FLAG_TypeDef | ADC_FLAG | ||
) |
Clears the ADC's pending flags.
Definition at line 886 of file stm8l15x_adc.c.
References IS_ADC_CLEAR_FLAG, and ADC_struct::SR.
void ADC_ClearITPendingBit | ( | ADC_TypeDef * | ADCx, |
ADC_IT_TypeDef | ADC_IT | ||
) |
Clears the ADC�s interrupt pending bits.
Definition at line 949 of file stm8l15x_adc.c.
References IS_ADC_IT, and ADC_struct::SR.
FlagStatus ADC_GetFlagStatus | ( | ADC_TypeDef * | ADCx, |
ADC_FLAG_TypeDef | ADC_FLAG | ||
) |
Checks whether the specified ADC flag is set or not.
Definition at line 853 of file stm8l15x_adc.c.
References IS_ADC_GET_FLAG, RESET, SET, and ADC_struct::SR.
ITStatus ADC_GetITStatus | ( | ADC_TypeDef * | ADCx, |
ADC_IT_TypeDef | ADC_IT | ||
) |
Checks whether the specified ADC interrupt has occurred or not.
Definition at line 906 of file stm8l15x_adc.c.
References ADC_struct::CR1, IS_ADC_GET_IT, RESET, SET, and ADC_struct::SR.
void ADC_ITConfig | ( | ADC_TypeDef * | ADCx, |
ADC_IT_TypeDef | ADC_IT, | ||
FunctionalState | NewState | ||
) |
Enables or disables the specified ADC interrupts.
Definition at line 825 of file stm8l15x_adc.c.
References ADC_struct::CR1, DISABLE, IS_ADC_IT, and IS_FUNCTIONAL_STATE.