STM8S/A Standard Peripherals Drivers
|
Functions | |
void | ADC1_AWDChannelConfig (ADC1_Channel_TypeDef Channel, FunctionalState NewState) |
Enables or disables the analog watchdog for the given channel. | |
void | ADC1_ClearFlag (ADC1_Flag_TypeDef Flag) |
Clear the specified ADC1 Flag. | |
void | ADC1_ClearITPendingBit (ADC1_IT_TypeDef ITPendingBit) |
Clear the ADC1 End of Conversion pending bit. | |
void | ADC1_Cmd (FunctionalState NewState) |
Enables or Disables the ADC1 peripheral. | |
void | ADC1_ConversionConfig (ADC1_ConvMode_TypeDef ADC1_ConversionMode, ADC1_Channel_TypeDef ADC1_Channel, ADC1_Align_TypeDef ADC1_Align) |
Configure the ADC1 conversion on selected channel. | |
void | ADC1_DataBufferCmd (FunctionalState NewState) |
Enables or Disables the ADC1 data store into the Data Buffer registers rather than in the Data Register. | |
void | ADC1_DeInit (void) |
Deinitializes the ADC1 peripheral registers to their default reset values. | |
void | ADC1_ExternalTriggerConfig (ADC1_ExtTrig_TypeDef ADC1_ExtTrigger, FunctionalState NewState) |
Configure the ADC1 conversion on external trigger event. | |
FlagStatus | ADC1_GetAWDChannelStatus (ADC1_Channel_TypeDef Channel) |
Checks the specified analog watchdog channel status. | |
uint16_t | ADC1_GetBufferValue (uint8_t Buffer) |
Get one sample of measured signal. | |
uint16_t | ADC1_GetConversionValue (void) |
Get one sample of measured signal. | |
FlagStatus | ADC1_GetFlagStatus (ADC1_Flag_TypeDef Flag) |
Checks the specified ADC1 flag status. | |
ITStatus | ADC1_GetITStatus (ADC1_IT_TypeDef ITPendingBit) |
Returns the specified pending bit status. | |
void | ADC1_Init (ADC1_ConvMode_TypeDef ADC1_ConversionMode, ADC1_Channel_TypeDef ADC1_Channel, ADC1_PresSel_TypeDef ADC1_PrescalerSelection, ADC1_ExtTrig_TypeDef ADC1_ExtTrigger, FunctionalState ADC1_ExtTriggerState, ADC1_Align_TypeDef ADC1_Align, ADC1_SchmittTrigg_TypeDef ADC1_SchmittTriggerChannel, FunctionalState ADC1_SchmittTriggerState) |
Initializes the ADC1 peripheral according to the specified parameters. | |
void | ADC1_ITConfig (ADC1_IT_TypeDef ADC1_IT, FunctionalState NewState) |
Enables or disables the ADC1 interrupt. | |
void | ADC1_PrescalerConfig (ADC1_PresSel_TypeDef ADC1_Prescaler) |
Configure the ADC1 prescaler division factor. | |
void | ADC1_ScanModeCmd (FunctionalState NewState) |
Enables or Disables the ADC1 scan mode. | |
void | ADC1_SchmittTriggerConfig (ADC1_SchmittTrigg_TypeDef ADC1_SchmittTriggerChannel, FunctionalState NewState) |
Enables or disables the ADC1 Schmitt Trigger on a selected channel. | |
void | ADC1_SetHighThreshold (uint16_t Threshold) |
Sets the high threshold of the analog watchdog. | |
void | ADC1_SetLowThreshold (uint16_t Threshold) |
Sets the low threshold of the analog watchdog. | |
void | ADC1_StartConversion (void) |
Start ADC1 conversion. |
Function Documentation
void ADC1_AWDChannelConfig | ( | ADC1_Channel_TypeDef | Channel, |
FunctionalState | NewState | ||
) |
Enables or disables the analog watchdog for the given channel.
Definition at line 405 of file stm8s_adc1.c.
References DISABLE, IS_ADC1_CHANNEL_OK, and IS_FUNCTIONALSTATE_OK.
void ADC1_ClearFlag | ( | ADC1_Flag_TypeDef | Flag | ) |
Clear the specified ADC1 Flag.
Definition at line 567 of file stm8s_adc1.c.
References IS_ADC1_FLAG_OK.
void ADC1_ClearITPendingBit | ( | ADC1_IT_TypeDef | ITPendingBit | ) |
Clear the ADC1 End of Conversion pending bit.
Definition at line 662 of file stm8s_adc1.c.
References IS_ADC1_ITPENDINGBIT_OK.
void ADC1_Cmd | ( | FunctionalState | NewState | ) |
Enables or Disables the ADC1 peripheral.
Definition at line 126 of file stm8s_adc1.c.
References DISABLE, and IS_FUNCTIONALSTATE_OK.
void ADC1_ConversionConfig | ( | ADC1_ConvMode_TypeDef | ADC1_ConversionMode, |
ADC1_Channel_TypeDef | ADC1_Channel, | ||
ADC1_Align_TypeDef | ADC1_Align | ||
) |
Configure the ADC1 conversion on selected channel.
Definition at line 286 of file stm8s_adc1.c.
References ADC1_CONVERSIONMODE_CONTINUOUS, IS_ADC1_ALIGN_OK, IS_ADC1_CHANNEL_OK, and IS_ADC1_CONVERSIONMODE_OK.
Referenced by ADC1_Init().
void ADC1_DataBufferCmd | ( | FunctionalState | NewState | ) |
Enables or Disables the ADC1 data store into the Data Buffer registers rather than in the Data Register.
Definition at line 166 of file stm8s_adc1.c.
References DISABLE, and IS_FUNCTIONALSTATE_OK.
void ADC1_DeInit | ( | void | ) |
Deinitializes the ADC1 peripheral registers to their default reset values.
Definition at line 52 of file stm8s_adc1.c.
void ADC1_ExternalTriggerConfig | ( | ADC1_ExtTrig_TypeDef | ADC1_ExtTrigger, |
FunctionalState | NewState | ||
) |
Configure the ADC1 conversion on external trigger event.
Definition at line 325 of file stm8s_adc1.c.
References DISABLE, IS_ADC1_EXTTRIG_OK, and IS_FUNCTIONALSTATE_OK.
Referenced by ADC1_Init().
FlagStatus ADC1_GetAWDChannelStatus | ( | ADC1_Channel_TypeDef | Channel | ) |
Checks the specified analog watchdog channel status.
Definition at line 502 of file stm8s_adc1.c.
References IS_ADC1_CHANNEL_OK.
Get one sample of measured signal.
Definition at line 466 of file stm8s_adc1.c.
References ADC1_BaseAddress, and IS_ADC1_BUFFER_OK.
uint16_t ADC1_GetConversionValue | ( | void | ) |
Get one sample of measured signal.
Definition at line 370 of file stm8s_adc1.c.
FlagStatus ADC1_GetFlagStatus | ( | ADC1_Flag_TypeDef | Flag | ) |
Checks the specified ADC1 flag status.
Definition at line 527 of file stm8s_adc1.c.
References IS_ADC1_FLAG_OK.
ITStatus ADC1_GetITStatus | ( | ADC1_IT_TypeDef | ITPendingBit | ) |
Returns the specified pending bit status.
Definition at line 616 of file stm8s_adc1.c.
References IS_ADC1_ITPENDINGBIT_OK, and RESET.
void ADC1_Init | ( | ADC1_ConvMode_TypeDef | ADC1_ConversionMode, |
ADC1_Channel_TypeDef | ADC1_Channel, | ||
ADC1_PresSel_TypeDef | ADC1_PrescalerSelection, | ||
ADC1_ExtTrig_TypeDef | ADC1_ExtTrigger, | ||
FunctionalState | ADC1_ExtTriggerState, | ||
ADC1_Align_TypeDef | ADC1_Align, | ||
ADC1_SchmittTrigg_TypeDef | ADC1_SchmittTriggerChannel, | ||
FunctionalState | ADC1_SchmittTriggerState | ||
) |
Initializes the ADC1 peripheral according to the specified parameters.
Definition at line 88 of file stm8s_adc1.c.
References ADC1_ConversionConfig(), ADC1_ExternalTriggerConfig(), ADC1_PrescalerConfig(), ADC1_SchmittTriggerConfig(), IS_ADC1_ALIGN_OK, IS_ADC1_CHANNEL_OK, IS_ADC1_CONVERSIONMODE_OK, IS_ADC1_EXTTRIG_OK, IS_ADC1_PRESSEL_OK, IS_ADC1_SCHMITTTRIG_OK, and IS_FUNCTIONALSTATE_OK.
void ADC1_ITConfig | ( | ADC1_IT_TypeDef | ADC1_IT, |
FunctionalState | NewState | ||
) |
Enables or disables the ADC1 interrupt.
Definition at line 190 of file stm8s_adc1.c.
References DISABLE, IS_ADC1_IT_OK, and IS_FUNCTIONALSTATE_OK.
void ADC1_PrescalerConfig | ( | ADC1_PresSel_TypeDef | ADC1_Prescaler | ) |
Configure the ADC1 prescaler division factor.
Definition at line 214 of file stm8s_adc1.c.
References IS_ADC1_PRESSEL_OK.
Referenced by ADC1_Init().
void ADC1_ScanModeCmd | ( | FunctionalState | NewState | ) |
Enables or Disables the ADC1 scan mode.
Definition at line 146 of file stm8s_adc1.c.
References DISABLE, and IS_FUNCTIONALSTATE_OK.
void ADC1_SchmittTriggerConfig | ( | ADC1_SchmittTrigg_TypeDef | ADC1_SchmittTriggerChannel, |
FunctionalState | NewState | ||
) |
Enables or disables the ADC1 Schmitt Trigger on a selected channel.
Definition at line 233 of file stm8s_adc1.c.
References ADC1_SCHMITTTRIG_ALL, ADC1_SCHMITTTRIG_CHANNEL8, DISABLE, IS_ADC1_SCHMITTTRIG_OK, and IS_FUNCTIONALSTATE_OK.
Referenced by ADC1_Init().
void ADC1_SetHighThreshold | ( | uint16_t | Threshold | ) |
Sets the high threshold of the analog watchdog.
Definition at line 441 of file stm8s_adc1.c.
void ADC1_SetLowThreshold | ( | uint16_t | Threshold | ) |
Sets the low threshold of the analog watchdog.
Definition at line 453 of file stm8s_adc1.c.
void ADC1_StartConversion | ( | void | ) |
Start ADC1 conversion.
Definition at line 358 of file stm8s_adc1.c.