STM8S/A Standard Peripherals Drivers
|
Functions | |
void | ADC2_ClearFlag (void) |
Clear the ADC2 EOC Flag. | |
void | ADC2_ClearITPendingBit (void) |
Clear the ADC2 End of Conversion pending bit. | |
void | ADC2_Cmd (FunctionalState NewState) |
Enables or Disables the ADC2 peripheral. | |
void | ADC2_ConversionConfig (ADC2_ConvMode_TypeDef ADC2_ConversionMode, ADC2_Channel_TypeDef ADC2_Channel, ADC2_Align_TypeDef ADC2_Align) |
Configure the ADC2 conversion on selected channel. | |
void | ADC2_DeInit (void) |
Deinitializes the ADC2 peripheral registers to their default reset values. | |
void | ADC2_ExternalTriggerConfig (ADC2_ExtTrig_TypeDef ADC2_ExtTrigger, FunctionalState NewState) |
Configure the ADC2 conversion on external trigger event. | |
uint16_t | ADC2_GetConversionValue (void) |
Get one sample of measured signal. | |
FlagStatus | ADC2_GetFlagStatus (void) |
Checks the ADC2 EOC flag status. | |
ITStatus | ADC2_GetITStatus (void) |
Returns the EOC pending bit status. | |
void | ADC2_Init (ADC2_ConvMode_TypeDef ADC2_ConversionMode, ADC2_Channel_TypeDef ADC2_Channel, ADC2_PresSel_TypeDef ADC2_PrescalerSelection, ADC2_ExtTrig_TypeDef ADC2_ExtTrigger, FunctionalState ADC2_ExtTriggerState, ADC2_Align_TypeDef ADC2_Align, ADC2_SchmittTrigg_TypeDef ADC2_SchmittTriggerChannel, FunctionalState ADC2_SchmittTriggerState) |
Initializes the ADC2 peripheral according to the specified parameters. | |
void | ADC2_ITConfig (FunctionalState NewState) |
Enables or disables the ADC2 interrupt. | |
void | ADC2_PrescalerConfig (ADC2_PresSel_TypeDef ADC2_Prescaler) |
Configure the ADC2 prescaler division factor. | |
void | ADC2_SchmittTriggerConfig (ADC2_SchmittTrigg_TypeDef ADC2_SchmittTriggerChannel, FunctionalState NewState) |
Enables or disables the ADC2 Schmitt Trigger on a selected channel. | |
void | ADC2_StartConversion (void) |
Start ADC2 conversion. |
Function Documentation
void ADC2_ClearFlag | ( | void | ) |
Clear the ADC2 EOC Flag.
Definition at line 363 of file stm8s_adc2.c.
void ADC2_ClearITPendingBit | ( | void | ) |
Clear the ADC2 End of Conversion pending bit.
Definition at line 384 of file stm8s_adc2.c.
void ADC2_Cmd | ( | FunctionalState | NewState | ) |
Enables or Disables the ADC2 peripheral.
Definition at line 121 of file stm8s_adc2.c.
References DISABLE, and IS_FUNCTIONALSTATE_OK.
void ADC2_ConversionConfig | ( | ADC2_ConvMode_TypeDef | ADC2_ConversionMode, |
ADC2_Channel_TypeDef | ADC2_Channel, | ||
ADC2_Align_TypeDef | ADC2_Align | ||
) |
Configure the ADC2 conversion on selected channel.
Definition at line 236 of file stm8s_adc2.c.
References ADC2_CONVERSIONMODE_CONTINUOUS, IS_ADC2_ALIGN_OK, IS_ADC2_CHANNEL_OK, and IS_ADC2_CONVERSIONMODE_OK.
Referenced by ADC2_Init().
void ADC2_DeInit | ( | void | ) |
Deinitializes the ADC2 peripheral registers to their default reset values.
Definition at line 54 of file stm8s_adc2.c.
void ADC2_ExternalTriggerConfig | ( | ADC2_ExtTrig_TypeDef | ADC2_ExtTrigger, |
FunctionalState | NewState | ||
) |
Configure the ADC2 conversion on external trigger event.
Definition at line 275 of file stm8s_adc2.c.
References DISABLE, IS_ADC2_EXTTRIG_OK, and IS_FUNCTIONALSTATE_OK.
Referenced by ADC2_Init().
uint16_t ADC2_GetConversionValue | ( | void | ) |
Get one sample of measured signal.
Definition at line 320 of file stm8s_adc2.c.
FlagStatus ADC2_GetFlagStatus | ( | void | ) |
Checks the ADC2 EOC flag status.
Definition at line 352 of file stm8s_adc2.c.
ITStatus ADC2_GetITStatus | ( | void | ) |
Returns the EOC pending bit status.
Definition at line 374 of file stm8s_adc2.c.
void ADC2_Init | ( | ADC2_ConvMode_TypeDef | ADC2_ConversionMode, |
ADC2_Channel_TypeDef | ADC2_Channel, | ||
ADC2_PresSel_TypeDef | ADC2_PrescalerSelection, | ||
ADC2_ExtTrig_TypeDef | ADC2_ExtTrigger, | ||
FunctionalState | ADC2_ExtTriggerState, | ||
ADC2_Align_TypeDef | ADC2_Align, | ||
ADC2_SchmittTrigg_TypeDef | ADC2_SchmittTriggerChannel, | ||
FunctionalState | ADC2_SchmittTriggerState | ||
) |
Initializes the ADC2 peripheral according to the specified parameters.
Definition at line 83 of file stm8s_adc2.c.
References ADC2_ConversionConfig(), ADC2_ExternalTriggerConfig(), ADC2_PrescalerConfig(), ADC2_SchmittTriggerConfig(), IS_ADC2_ALIGN_OK, IS_ADC2_CHANNEL_OK, IS_ADC2_CONVERSIONMODE_OK, IS_ADC2_EXTTRIG_OK, IS_ADC2_PRESSEL_OK, IS_ADC2_SCHMITTTRIG_OK, and IS_FUNCTIONALSTATE_OK.
void ADC2_ITConfig | ( | FunctionalState | NewState | ) |
Enables or disables the ADC2 interrupt.
Definition at line 141 of file stm8s_adc2.c.
References DISABLE, and IS_FUNCTIONALSTATE_OK.
void ADC2_PrescalerConfig | ( | ADC2_PresSel_TypeDef | ADC2_Prescaler | ) |
Configure the ADC2 prescaler division factor.
Definition at line 164 of file stm8s_adc2.c.
References IS_ADC2_PRESSEL_OK.
Referenced by ADC2_Init().
void ADC2_SchmittTriggerConfig | ( | ADC2_SchmittTrigg_TypeDef | ADC2_SchmittTriggerChannel, |
FunctionalState | NewState | ||
) |
Enables or disables the ADC2 Schmitt Trigger on a selected channel.
Definition at line 183 of file stm8s_adc2.c.
References ADC2_SCHMITTTRIG_ALL, ADC2_SCHMITTTRIG_CHANNEL8, DISABLE, IS_ADC2_SCHMITTTRIG_OK, and IS_FUNCTIONALSTATE_OK.
Referenced by ADC2_Init().
void ADC2_StartConversion | ( | void | ) |
Start ADC2 conversion.
Definition at line 308 of file stm8s_adc2.c.