![]() |
STM32F0 Standard Peripheral bibliotheek
1.0
ST Microelectronics standard peripheral bibliotheek documentatie voor de STM32F0 familie
|
ADC driver modules. More...
Modules | |
| ADC_Exported_Constants | |
| ADC_Private_Functions | |
Data Structures | |
| struct | ADC_InitTypeDef |
| ADC Init structure definition. More... | |
Macros | |
| #define | CFGR1_CLEAR_MASK ((uint32_t)0xFFFFD203) |
| #define | CALIBRATION_TIMEOUT ((uint32_t)0x0000F000) |
Functions | |
| void | ADC_DeInit (ADC_TypeDef *ADCx) |
| Deinitializes ADC1 peripheral registers to their default reset values. More... | |
| void | ADC_Init (ADC_TypeDef *ADCx, ADC_InitTypeDef *ADC_InitStruct) |
| Initializes the ADCx peripheral according to the specified parameters in the ADC_InitStruct. More... | |
| void | ADC_StructInit (ADC_InitTypeDef *ADC_InitStruct) |
| Fills each ADC_InitStruct member with its default value. More... | |
| void | ADC_JitterCmd (ADC_TypeDef *ADCx, uint32_t ADC_JitterOff, FunctionalState NewState) |
| Enables or disables the jitter when the ADC is clocked by PCLK div2 or div4. More... | |
| void | ADC_Cmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
| Enables or disables the specified ADC peripheral. More... | |
| void | ADC_AutoPowerOffCmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
| Enables or disables the ADC Power Off. More... | |
| void | ADC_WaitModeCmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
| Enables or disables the Wait conversion mode. More... | |
| void | ADC_AnalogWatchdogCmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
| Enables or disables the analog watchdog. More... | |
| void | ADC_AnalogWatchdogThresholdsConfig (ADC_TypeDef *ADCx, uint16_t HighThreshold, uint16_t LowThreshold) |
| Configures the high and low thresholds of the analog watchdog. More... | |
| void | ADC_AnalogWatchdogSingleChannelConfig (ADC_TypeDef *ADCx, uint32_t ADC_AnalogWatchdog_Channel) |
| Configures the analog watchdog guarded single channel. More... | |
| void | ADC_AnalogWatchdogSingleChannelCmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
| Enables or disables the ADC Analog Watchdog Single Channel. More... | |
| void | ADC_TempSensorCmd (FunctionalState NewState) |
| Enables or disables the temperature sensor channel. More... | |
| void | ADC_VrefintCmd (FunctionalState NewState) |
| Enables or disables the Vrefint channel. More... | |
| void | ADC_VbatCmd (FunctionalState NewState) |
| Enables or disables the Vbat channel. More... | |
| void | ADC_ChannelConfig (ADC_TypeDef *ADCx, uint32_t ADC_Channel, uint32_t ADC_SampleTime) |
| Configures for the selected ADC and its sampling time. More... | |
| void | ADC_ContinuousModeCmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
| Enable the Continuous mode for the selected ADCx channels. More... | |
| void | ADC_DiscModeCmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
| Enable the discontinuous mode for the selected ADC channels. More... | |
| void | ADC_OverrunModeCmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
| Enable the Overrun mode for the selected ADC channels. More... | |
| uint32_t | ADC_GetCalibrationFactor (ADC_TypeDef *ADCx) |
| Active the Calibration operation for the selected ADC. More... | |
| void | ADC_StopOfConversion (ADC_TypeDef *ADCx) |
| Stop the on going conversions for the selected ADC. More... | |
| void | ADC_StartOfConversion (ADC_TypeDef *ADCx) |
| Start Conversion for the selected ADC channels. More... | |
| uint16_t | ADC_GetConversionValue (ADC_TypeDef *ADCx) |
| Returns the last ADCx conversion result data for ADC channel. More... | |
| void | ADC_DMACmd (ADC_TypeDef *ADCx, FunctionalState NewState) |
| Enables or disables the specified ADC DMA request. More... | |
| void | ADC_DMARequestModeConfig (ADC_TypeDef *ADCx, uint32_t ADC_DMARequestMode) |
| Enables or disables the ADC DMA request after last transfer (Single-ADC mode) More... | |
| void | ADC_ITConfig (ADC_TypeDef *ADCx, uint32_t ADC_IT, FunctionalState NewState) |
| Enables or disables the specified ADC interrupts. More... | |
| FlagStatus | ADC_GetFlagStatus (ADC_TypeDef *ADCx, uint32_t ADC_FLAG) |
| Checks whether the specified ADC flag is set or not. More... | |
| void | ADC_ClearFlag (ADC_TypeDef *ADCx, uint32_t ADC_FLAG) |
| Clears the ADCx's pending flags. More... | |
| ITStatus | ADC_GetITStatus (ADC_TypeDef *ADCx, uint32_t ADC_IT) |
| Checks whether the specified ADC interrupt has occurred or not. More... | |
| void | ADC_ClearITPendingBit (ADC_TypeDef *ADCx, uint32_t ADC_IT) |
| Clears the ADCx's interrupt pending bits. More... | |
ADC driver modules.
| void ADC_AnalogWatchdogCmd | ( | ADC_TypeDef * | ADCx, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the analog watchdog.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| NewState,: | new state of the ADCx Analog Watchdog. This parameter can be: ENABLE or DISABLE. |
| None |
| void ADC_AnalogWatchdogSingleChannelCmd | ( | ADC_TypeDef * | ADCx, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the ADC Analog Watchdog Single Channel.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| NewState,: | new state of the ADCx ADC Analog Watchdog Single Channel. This parameter can be: ENABLE or DISABLE. |
| None |
| void ADC_AnalogWatchdogSingleChannelConfig | ( | ADC_TypeDef * | ADCx, |
| uint32_t | ADC_AnalogWatchdog_Channel | ||
| ) |
Configures the analog watchdog guarded single channel.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| ADC_AnalogWatchdog_Channel,: | the ADC channel to configure for the analog watchdog. This parameter can be one of the following values:
|
| None |
| void ADC_AnalogWatchdogThresholdsConfig | ( | ADC_TypeDef * | ADCx, |
| uint16_t | HighThreshold, | ||
| uint16_t | LowThreshold | ||
| ) |
Configures the high and low thresholds of the analog watchdog.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| HighThreshold,: | the ADC analog watchdog High threshold value. This parameter must be a 12bit value. |
| LowThreshold,: | the ADC analog watchdog Low threshold value. This parameter must be a 12bit value. |
| None |
| void ADC_AutoPowerOffCmd | ( | ADC_TypeDef * | ADCx, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the ADC Power Off.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| NewState,: | new state of the ADCx power Off. This parameter can be: ENABLE or DISABLE. |
| None |
| void ADC_ChannelConfig | ( | ADC_TypeDef * | ADCx, |
| uint32_t | ADC_Channel, | ||
| uint32_t | ADC_SampleTime | ||
| ) |
Configures for the selected ADC and its sampling time.
| ADCx,: | where x can be 1 to select the ADC peripheral. |
| ADC_Channel,: | the ADC channel to configure. This parameter can be any combination of the following values:
|
| ADC_SampleTime,: | The sample time value to be set for the selected channel. This parameter can be one of the following values:
|
| None |
| void ADC_ClearFlag | ( | ADC_TypeDef * | ADCx, |
| uint32_t | ADC_FLAG | ||
| ) |
Clears the ADCx's pending flags.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| ADC_FLAG,: | specifies the flag to clear. This parameter can be any combination of the following values:
|
| None |
| void ADC_ClearITPendingBit | ( | ADC_TypeDef * | ADCx, |
| uint32_t | ADC_IT | ||
| ) |
Clears the ADCx's interrupt pending bits.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| ADC_IT,: | specifies the ADC interrupt pending bit to clear. This parameter can be one of the following values:
|
| None |
| void ADC_Cmd | ( | ADC_TypeDef * | ADCx, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the specified ADC peripheral.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| NewState,: | new state of the ADCx peripheral. This parameter can be: ENABLE or DISABLE. |
| None |
| void ADC_ContinuousModeCmd | ( | ADC_TypeDef * | ADCx, |
| FunctionalState | NewState | ||
| ) |
Enable the Continuous mode for the selected ADCx channels.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| NewState,: | new state of the Continuous mode. This parameter can be: ENABLE or DISABLE. |
| None |
| void ADC_DeInit | ( | ADC_TypeDef * | ADCx | ) |
Deinitializes ADC1 peripheral registers to their default reset values.
| ADCx,: | where x can be 1 to select the ADC peripheral. |
| None |
| void ADC_DiscModeCmd | ( | ADC_TypeDef * | ADCx, |
| FunctionalState | NewState | ||
| ) |
Enable the discontinuous mode for the selected ADC channels.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| NewState,: | new state of the discontinuous mode. This parameter can be: ENABLE or DISABLE. |
| None |
| void ADC_DMACmd | ( | ADC_TypeDef * | ADCx, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the specified ADC DMA request.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| NewState,: | new state of the selected ADC DMA transfer. This parameter can be: ENABLE or DISABLE. |
| None |
| void ADC_DMARequestModeConfig | ( | ADC_TypeDef * | ADCx, |
| uint32_t | ADC_DMARequestMode | ||
| ) |
Enables or disables the ADC DMA request after last transfer (Single-ADC mode)
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| ADC_DMARequestMode,: | the ADC channel to configure. This parameter can be one of the following values:
|
| None |
| uint32_t ADC_GetCalibrationFactor | ( | ADC_TypeDef * | ADCx | ) |
Active the Calibration operation for the selected ADC.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| ADC | Calibration factor |
| uint16_t ADC_GetConversionValue | ( | ADC_TypeDef * | ADCx | ) |
Returns the last ADCx conversion result data for ADC channel.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| The | Data conversion value. |
| FlagStatus ADC_GetFlagStatus | ( | ADC_TypeDef * | ADCx, |
| uint32_t | ADC_FLAG | ||
| ) |
Checks whether the specified ADC flag is set or not.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| ADC_FLAG,: | specifies the flag to check. This parameter can be one of the following values:
|
| The | new state of ADC_FLAG (SET or RESET). |
| ITStatus ADC_GetITStatus | ( | ADC_TypeDef * | ADCx, |
| uint32_t | ADC_IT | ||
| ) |
Checks whether the specified ADC interrupt has occurred or not.
| ADCx,: | where x can be 1 to select the ADC1 peripheral |
| ADC_IT,: | specifies the ADC interrupt source to check. This parameter can be one of the following values:
|
| The | new state of ADC_IT (SET or RESET). |
| void ADC_Init | ( | ADC_TypeDef * | ADCx, |
| ADC_InitTypeDef * | ADC_InitStruct | ||
| ) |
Initializes the ADCx peripheral according to the specified parameters in the ADC_InitStruct.
| ADCx,: | where x can be 1 to select the ADC peripheral. |
| ADC_InitStruct,: | pointer to an ADC_InitTypeDef structure that contains the configuration information for the specified ADC peripheral. |
| None |
| void ADC_ITConfig | ( | ADC_TypeDef * | ADCx, |
| uint32_t | ADC_IT, | ||
| FunctionalState | NewState | ||
| ) |
Enables or disables the specified ADC interrupts.
| ADCx,: | where x can be 1 to select the ADC peripheral. |
| ADC_IT,: | specifies the ADC interrupt sources to be enabled or disabled. This parameter can be one of the following values:
|
| NewState,: | new state of the specified ADC interrupts. This parameter can be: ENABLE or DISABLE. |
| None |
| void ADC_JitterCmd | ( | ADC_TypeDef * | ADCx, |
| uint32_t | ADC_JitterOff, | ||
| FunctionalState | NewState | ||
| ) |
Enables or disables the jitter when the ADC is clocked by PCLK div2 or div4.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| ADC_JitterOff,: | This parameter can be :
|
| NewState,: | new state of the ADCx jitter. This parameter can be: ENABLE or DISABLE. |
| None |
| void ADC_OverrunModeCmd | ( | ADC_TypeDef * | ADCx, |
| FunctionalState | NewState | ||
| ) |
Enable the Overrun mode for the selected ADC channels.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| NewState,: | new state of the Overrun mode. This parameter can be: ENABLE or DISABLE. |
| None |
| void ADC_StartOfConversion | ( | ADC_TypeDef * | ADCx | ) |
Start Conversion for the selected ADC channels.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| None |
| void ADC_StopOfConversion | ( | ADC_TypeDef * | ADCx | ) |
Stop the on going conversions for the selected ADC.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| None |
| void ADC_StructInit | ( | ADC_InitTypeDef * | ADC_InitStruct | ) |
Fills each ADC_InitStruct member with its default value.
| ADC_InitStruct,: | pointer to an ADC_InitTypeDef structure which will be initialized. |
| None |
| void ADC_TempSensorCmd | ( | FunctionalState | NewState | ) |
Enables or disables the temperature sensor channel.
| NewState,: | new state of the temperature sensor input channel. This parameter can be: ENABLE or DISABLE. |
| None |
| void ADC_VbatCmd | ( | FunctionalState | NewState | ) |
Enables or disables the Vbat channel.
| NewState,: | new state of the Vbat input channel. This parameter can be: ENABLE or DISABLE. |
| None |
| void ADC_VrefintCmd | ( | FunctionalState | NewState | ) |
Enables or disables the Vrefint channel.
| NewState,: | new state of the Vref input channel. This parameter can be: ENABLE or DISABLE. |
| None |
| void ADC_WaitModeCmd | ( | ADC_TypeDef * | ADCx, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the Wait conversion mode.
| ADCx,: | where x can be 1 to select the ADC1 peripheral. |
| NewState,: | new state of the ADCx Auto-Delay. This parameter can be: ENABLE or DISABLE. |
| None |