WB32F10x Standard Peripherals Firmware Library

宏定义 | 函数
wb32f10x_adc.c 文件参考

This file provides all the ADC firmware functions. 更多...

`#include "wb32f10x_adc.h"`
`#include "wb32f10x_rcc.h"`

## 宏定义
#define | CR1_DISCNUM_Reset ((uint32_t)0xFFFF1FFF)
#define | CR1_DISCEN_Set ((uint32_t)0x00000800)
#define | CR1_DISCEN_Reset ((uint32_t)0xFFFFF7FF)
#define | CR1_JAUTO_Set ((uint32_t)0x00000400)
#define | CR1_JAUTO_Reset ((uint32_t)0xFFFFFBFF)
#define | CR1_JDISCEN_Set ((uint32_t)0x00001000)
#define | CR1_JDISCEN_Reset ((uint32_t)0xFFFFEFFF)
#define | CR1_AWDCH_Reset ((uint32_t)0xFFFFFFE0)
#define | CR1_AWDMode_Reset ((uint32_t)0xFF3FFDFF)
#define | CR1_CLEAR_Mask ((uint32_t)0xFFF0FEFF)
#define | CR2_ADON_Set ((uint32_t)0x00000001)
#define | CR2_ADON_Reset ((uint32_t)0xFFFFFFFE)
#define | CR2_DMA_Set ((uint32_t)0x00000100)
#define | CR2_DMA_Reset ((uint32_t)0xFFFFFEFF)
#define | CR2_RSTCAL_Set ((uint32_t)0x00000008)
#define | CR2_CAL_Set ((uint32_t)0x00000004)
#define | CR2_SWSTART_Set ((uint32_t)0x00400000)
#define | CR2_EXTTRIG_Set ((uint32_t)0x00100000)
#define | CR2_EXTTRIG_Reset ((uint32_t)0xFFEFFFFF)
#define | CR2_EXTTRIG_SWSTART_Set ((uint32_t)0x00400000)
#define | CR2_EXTTRIG_SWSTART_Reset ((uint32_t)0xFFBFFFFF)
#define | CR2_JEXTSEL_Reset ((uint32_t)0xFFFF8FFF)
#define | CR2_JEXTTRIG_Set ((uint32_t)0x00008000)
#define | CR2_JEXTTRIG_Reset ((uint32_t)0xFFFF7FFF)
#define | CR2_JSWSTART_Set ((uint32_t)0x00200000)
#define | CR2_JEXTTRIG_JSWSTART_Set ((uint32_t)0x00208000)
#define | CR2_JEXTTRIG_JSWSTART_Reset ((uint32_t)0xFFDF7FFF)
#define | CR2_TSVREFE_Set ((uint32_t)0x00800000)
#define | CR2_TSVREFE_Reset ((uint32_t)0xFF7FFFFF)
#define | CR2_CLEAR_Mask ((uint32_t)0xFFF1F7FD)
#define | SQR3_SQ_Set ((uint32_t)0x0000001F)
#define | SQR2_SQ_Set ((uint32_t)0x0000001F)
#define | SQR1_SQ_Set ((uint32_t)0x0000001F)
#define | SQR1_CLEAR_Mask ((uint32_t)0xFF0FFFFF)
#define | JSQR_JSQ_Set ((uint32_t)0x0000001F)
#define | JSQR_JL_Set ((uint32_t)0x00300000)
#define | JSQR_JL_Reset ((uint32_t)0xFFCFFFFF)
#define | SMPR1_SMP_Set ((uint32_t)0x00000007)
#define | SMPR2_SMP_Set ((uint32_t)0x00000007)
#define | JDR_Offset ((uint8_t)0x28)

## 函数
void | ADC_DeInit (void)
| Deinitializes the ADC peripheral registers to their default reset values. 更多...
void | ADC_Init (ADC_InitTypeDef *ADC_InitStruct)
| Initializes the ADC peripheral according to the specified parameters in the ADC_InitStruct. 更多...
void | ADC_StructInit (ADC_InitTypeDef *ADC_InitStruct)
| Fills each ADC_InitStruct member with its default value. 更多...
void | ADC_Cmd (FunctionalState NewState)
| Enables or disables the ADC peripheral. 更多...
void | ADC_DMACmd (FunctionalState NewState)
| Enables or disables the ADC DMA request. 更多...
void | ADC_InjectedDMACmd (FunctionalState NewState)
| Enables or disables the ADC injected group DMA request. 更多...
void | ADC_ITConfig (uint16_t ADC_IT, FunctionalState NewState)
| Enables or disables the specified ADC interrupts. 更多...
void | ADC_ResetCalibration (void)
| Resets the selected ADC calibration registers. 更多...
FlagStatus | ADC_GetResetCalibrationStatus (void)
| Gets the selected ADC reset calibration registers status. 更多...
void | ADC_StartCalibration (void)
| Starts the selected ADC calibration process. 更多...
FlagStatus | ADC_GetCalibrationStatus (void)
| Gets the selected ADC calibration status. 更多...
void | ADC_SoftwareStartConvCmd (FunctionalState NewState)
| Enables or disables the selected ADC software start conversion . 更多...
FlagStatus | ADC_GetSoftwareStartConvStatus (void)
| Gets the selected ADC Software start conversion Status. 更多...
void | ADC_DiscModeChannelCountConfig (uint8_t Number)
| Configures the discontinuous mode for the selected ADC regular group channel. 更多...
void | ADC_DiscModeCmd (FunctionalState NewState)
| Enables or disables the discontinuous mode on regular group channel for the ADC 更多...
void | ADC_RegularChannelConfig (uint8_t ADC_Channel, uint8_t Rank, uint8_t ADC_SampleTime)
| Configures for the selected ADC regular channel its corresponding rank in the sequencer and its sample time. 更多...
void | ADC_ExternalTrigConvCmd (FunctionalState NewState)
| Enables or disables the ADC conversion through external trigger. 更多...
uint16_t | ADC_GetConversionValue (void)
| Returns the last ADC conversion result data for regular channel. 更多...
void | ADC_AutoInjectedConvCmd (FunctionalState NewState)
| Enables or disables the selected ADC automatic injected group conversion after regular one. 更多...
void | ADC_InjectedDiscModeCmd (FunctionalState NewState)
| Enables or disables the discontinuous mode for injected group channel for the ADC 更多...
void | ADC_ExternalTrigInjectedConvConfig (uint32_t ADC_ExternalTrigInjecConv)
| Configures the ADC external trigger for injected channels conversion. 更多...
void | ADC_ExternalTrigInjectedConvCmd (FunctionalState NewState)
| Enables or disables the ADC injected channels conversion through external trigger 更多...
void | ADC_SoftwareStartInjectedConvCmd (FunctionalState NewState)
| Enables or disables the selected ADC start of the injected channels conversion. 更多...
FlagStatus | ADC_GetSoftwareStartInjectedConvCmdStatus (void)
| Gets the selected ADC Software start injected conversion Status. 更多...
void | ADC_InjectedChannelConfig (uint8_t ADC_Channel, uint8_t Rank, uint8_t ADC_SampleTime)
| Configures for the selected ADC injected channel its corresponding rank in the sequencer and its sample time. 更多...
void | ADC_InjectedSequencerLengthConfig (uint8_t Length)
| Configures the sequencer length for injected channels 更多...
void | ADC_SetInjectedOffset (uint8_t ADC_InjectedChannel, uint16_t Offset)
| Set the injected channels conversion value offset 更多...
uint16_t | ADC_GetInjectedConversionValue (uint8_t ADC_InjectedChannel)
| Returns the ADC injected channel conversion result 更多...
void | ADC_AnalogWatchdogCmd (uint32_t ADC_AnalogWatchdog)
| Enables or disables the analog watchdog on single/all regular or injected channels 更多...
void | ADC_AnalogWatchdogThresholdsConfig (uint16_t HighThreshold, uint16_t LowThreshold)
| Configures the high and low thresholds of the analog watchdog. 更多...
void | ADC_AnalogWatchdogSingleChannelConfig (uint8_t ADC_Channel)
| Configures the analog watchdog guarded single channel 更多...
void | ADC_TempSensorVrefintCmd (FunctionalState NewState)
| Enables or disables the temperature sensor and Vrefint channel. 更多...
FlagStatus | ADC_GetFlagStatus (uint8_t ADC_FLAG)
| Checks whether the specified ADC flag is set or not. 更多...
void | ADC_ClearFlag (uint8_t ADC_FLAG)
| Clears the ADC's pending flags. 更多...
ITStatus | ADC_GetITStatus (uint16_t ADC_IT)
| Checks whether the specified ADC interrupt has occurred or not. 更多...
void | ADC_ClearITPendingBit (uint16_t ADC_IT)
| Clears the ADC's interrupt pending bits. 更多...
uint16_t | ADC_GetADValue (uint16_t data)
| Adjust the ADC conversion result. 更多...

## 详细描述

This file provides all the ADC firmware functions.

作者
  Westberry Application Team

版本
  V0.1.10

日期
  05-January-2023