92 #define CFGR_CLEAR_Mask ((uint32_t)0xFDFFC007) 95 #define JSQR_CLEAR_Mask ((uint32_t)0x00000000) 98 #define CCR_CLEAR_MASK ((uint32_t)0xFFFC10E0) 101 #define JDR_Offset ((uint8_t)0x80) 145 if((ADCx ==
ADC1) || (ADCx ==
ADC2))
152 else if((ADCx ==
ADC3) || (ADCx == ADC4))
170 uint32_t tmpreg1 = 0;
184 tmpreg1 = ADCx->CFGR;
198 ADCx->CFGR = tmpreg1;
202 tmpreg1 = ADCx->
SQR1;
209 ADCx->
SQR1 = tmpreg1;
241 uint32_t tmpreg1 = 0;
254 tmpreg1 = ADCx->
JSQR;
268 ADCx->
JSQR = tmpreg1;
297 uint32_t tmpreg1 = 0;
305 if((ADCx ==
ADC1) || (ADCx ==
ADC2))
308 tmpreg1 = ADC1_2->CCR;
316 tmpreg1 = ADC3_4->CCR;
329 tmpreg1 |= (uint32_t)(ADC_CommonInitStruct->
ADC_Mode |
332 (uint32_t)(ADC_CommonInitStruct->
ADC_DMAMode << 12) |
335 if((ADCx ==
ADC1) || (ADCx ==
ADC2))
338 ADC1_2->CCR = tmpreg1;
343 ADC3_4->CCR = tmpreg1;
388 ADCx->CR |= ADC_CR_ADEN;
393 ADCx->CR |= ADC_CR_ADDIS;
408 ADCx->CR |= ADC_CR_ADCAL;
422 return (uint32_t)ADCx->CALFACT;
436 ADCx->CALFACT = ADC_Calibration;
454 ADCx->CR &= (~ADC_CR_ADCALDIF);
455 ADCx->CR |= ADC_CalibrationMode;
470 if ((ADCx->CR & ADC_CR_ADCAL) != (uint32_t)
RESET)
495 ADCx->CR |= ADC_CR_ADDIS;
511 if ((ADCx->CR & ADC_CR_ADDIS) != (uint32_t)
RESET)
540 ADCx->CR &= ~(ADC_CR_ADVREGEN);
545 ADCx->CR |= ADC_CR_ADVREGEN_0;
550 ADCx->CR |=ADC_CR_ADVREGEN_1;
586 ADCx->DIFSEL |= (uint32_t)(1 << ADC_Channel );
591 ADCx->DIFSEL &= ~(uint32_t)(1 << ADC_Channel);
611 ADCx->CFGR |= (uint32_t)(ADC_CFGR_JQM );
616 ADCx->CFGR &= ~(uint32_t)(ADC_CFGR_JQM);
636 ADCx->CFGR |= (uint32_t)(ADC_CFGR_AUTDLY );
641 ADCx->CFGR &= ~(uint32_t)(ADC_CFGR_AUTDLY);
703 tmpreg &= ~(uint32_t)(ADC_CFGR_AWD1SGL|ADC_CFGR_AWD1EN|ADC_CFGR_JAWD1EN);
705 tmpreg |= ADC_AnalogWatchdog;
720 uint16_t LowThreshold)
727 ADCx->TR1 &= ~(uint32_t)ADC_TR1_HT1;
728 ADCx->TR1 |= (uint32_t)((uint32_t)HighThreshold << 16);
731 ADCx->TR1 &= ~(uint32_t)ADC_TR1_LT1;
732 ADCx->TR1 |= LowThreshold;
745 uint8_t LowThreshold)
751 ADCx->TR2 &= ~(uint32_t)ADC_TR2_HT2;
752 ADCx->TR2 |= (uint32_t)((uint32_t)HighThreshold << 16);
755 ADCx->TR2 &= ~(uint32_t)ADC_TR2_LT2;
756 ADCx->TR2 |= LowThreshold;
769 uint8_t LowThreshold)
775 ADCx->TR3 &= ~(uint32_t)ADC_TR3_HT3;
776 ADCx->TR3 |= (uint32_t)((uint32_t)HighThreshold << 16);
779 ADCx->TR3 &= ~(uint32_t)ADC_TR3_LT3;
780 ADCx->TR3 |= LowThreshold;
817 tmpreg &= ~(uint32_t)ADC_CFGR_AWD1CH;
819 tmpreg |= (uint32_t)((uint32_t)ADC_Channel << 26);
856 tmpreg = ADCx->AWD2CR;
858 tmpreg &= ~(uint32_t)ADC_AWD2CR_AWD2CH;
860 tmpreg |= (uint32_t)1 << (ADC_Channel);
862 ADCx->AWD2CR |= tmpreg;
897 tmpreg = ADCx->AWD3CR;
899 tmpreg &= ~(uint32_t)ADC_AWD3CR_AWD3CH;
901 tmpreg |= (uint32_t)1 << (ADC_Channel);
903 ADCx->AWD3CR |= tmpreg;
949 # pragma GCC diagnostic push 950 # pragma GCC diagnostic ignored "-Wunused-parameter" 960 ADC1_2->CCR |= ADC12_CCR_TSEN;
965 ADC1_2->CCR &= ~(uint32_t)ADC12_CCR_TSEN;
969 # pragma GCC diagnostic pop 985 if((ADCx ==
ADC1) || (ADCx ==
ADC2))
990 ADC1_2->CCR |= ADC12_CCR_VREFEN;
995 ADC1_2->CCR &= ~(uint32_t)ADC12_CCR_VREFEN;
1003 ADC3_4->CCR |= ADC34_CCR_VREFEN;
1008 ADC3_4->CCR &= ~(uint32_t)ADC34_CCR_VREFEN;
1021 # pragma GCC diagnostic push 1022 # pragma GCC diagnostic ignored "-Wunused-parameter" 1032 ADC1_2->CCR |= ADC12_CCR_VBATEN;
1037 ADC1_2->CCR &= ~(uint32_t)ADC12_CCR_VBATEN;
1041 # pragma GCC diagnostic pop 1143 uint32_t tmpreg1 = 0, tmpreg2 = 0;
1154 tmpreg1 = ADCx->
SQR1;
1156 tmpreg2 = 0x1F << (6 * (Rank ));
1158 tmpreg1 &= ~tmpreg2;
1160 tmpreg2 = (uint32_t)(ADC_Channel) << (6 * (Rank));
1164 ADCx->
SQR1 = tmpreg1;
1170 tmpreg1 = ADCx->
SQR2;
1172 tmpreg2 = ADC_SQR2_SQ5 << (6 * (Rank - 5));
1174 tmpreg1 &= ~tmpreg2;
1176 tmpreg2 = (uint32_t)(ADC_Channel) << (6 * (Rank - 5));
1180 ADCx->
SQR2 = tmpreg1;
1186 tmpreg1 = ADCx->
SQR3;
1188 tmpreg2 = ADC_SQR3_SQ10 << (6 * (Rank - 10));
1190 tmpreg1 &= ~tmpreg2;
1192 tmpreg2 = (uint32_t)(ADC_Channel) << (6 * (Rank - 10));
1196 ADCx->
SQR3 = tmpreg1;
1201 tmpreg1 = ADCx->SQR4;
1203 tmpreg2 = ADC_SQR3_SQ15 << (6 * (Rank - 15));
1205 tmpreg1 &= ~tmpreg2;
1207 tmpreg2 = (uint32_t)(ADC_Channel) << (6 * (Rank - 15));
1211 ADCx->SQR4 = tmpreg1;
1219 tmpreg1 = ADCx->
SMPR2;
1221 tmpreg2 = ADC_SMPR2_SMP10 << (3 * (ADC_Channel - 10));
1223 ADCx->
SMPR2 &= ~tmpreg2;
1225 ADCx->
SMPR2 |= (uint32_t)ADC_SampleTime << (3 * (ADC_Channel - 10));
1231 tmpreg1 = ADCx->
SMPR1;
1233 tmpreg2 = ADC_SMPR1_SMP1 << (3 * (ADC_Channel - 1));
1235 ADCx->
SMPR1 &= ~tmpreg2;
1237 ADCx->
SMPR1 |= (uint32_t)ADC_SampleTime << (3 * (ADC_Channel));
1255 ADCx->
SQR1 |= (uint32_t)(SequencerLength - 1);
1296 ADCx->CFGR &= ~(ADC_CFGR_EXTEN | ADC_CFGR_EXTSEL);
1297 ADCx->CFGR |= (uint32_t)(ADC_ExternalTrigEventEdge | ADC_ExternalTrigConvEvent);
1311 ADCx->CR |= ADC_CR_ADSTART;
1325 if ((ADCx->CR & ADC_CR_ADSTART) != (uint32_t)
RESET)
1350 ADCx->CR |= ADC_CR_ADSTP;
1364 uint32_t tmpreg1 = 0;
1365 uint32_t tmpreg2 = 0;
1370 tmpreg1 = ADCx->CFGR;
1372 tmpreg1 &= ~(uint32_t)(ADC_CFGR_DISCNUM);
1374 tmpreg2 = Number - 1;
1375 tmpreg1 |= tmpreg2 << 17;
1377 ADCx->CFGR = tmpreg1;
1397 ADCx->CFGR |= ADC_CFGR_DISCEN;
1402 ADCx->CFGR &= ~(uint32_t)(ADC_CFGR_DISCEN);
1416 return (uint16_t) ADCx->
DR;
1430 uint32_t tmpreg1 = 0;
1435 if((ADCx ==
ADC1) || (ADCx==
ADC2))
1438 tmpreg1 = ADC1_2->CDR;
1443 tmpreg1 = ADC3_4->CDR;
1446 return (uint32_t) tmpreg1;
1484 ADCx->OFR1 &= ~ (uint32_t) ADC_OFR1_OFFSET1_CH;
1485 ADCx->OFR1 |= (uint32_t)((uint32_t)ADC_Channel << 26);
1488 ADCx->OFR1 &= ~ (uint32_t) ADC_OFR1_OFFSET1;
1489 ADCx->OFR1 |= (uint32_t)Offset;
1527 ADCx->OFR2 &= ~ (uint32_t) ADC_OFR2_OFFSET2_CH;
1528 ADCx->OFR2 |= (uint32_t)((uint32_t)ADC_Channel << 26);
1531 ADCx->OFR2 &= ~ (uint32_t) ADC_OFR2_OFFSET2;
1532 ADCx->OFR2 |= (uint32_t)Offset;
1570 ADCx->OFR3 &= ~ (uint32_t) ADC_OFR3_OFFSET3_CH;
1571 ADCx->OFR3 |= (uint32_t)((uint32_t)ADC_Channel << 26);
1574 ADCx->OFR3 &= ~ (uint32_t) ADC_OFR3_OFFSET3;
1575 ADCx->OFR3 |= (uint32_t)Offset;
1613 ADCx->OFR4 &= ~ (uint32_t) ADC_OFR4_OFFSET4_CH;
1614 ADCx->OFR4 |= (uint32_t)((uint32_t)ADC_Channel << 26);
1617 ADCx->OFR4 &= ~ (uint32_t) ADC_OFR4_OFFSET4;
1618 ADCx->OFR4 |= (uint32_t)Offset;
1637 ADCx->OFR1 |= ADC_OFR1_OFFSET1_EN;
1642 ADCx->OFR1 &= ~(ADC_OFR1_OFFSET1_EN);
1662 ADCx->OFR2 |= ADC_OFR2_OFFSET2_EN;
1667 ADCx->OFR2 &= ~(ADC_OFR2_OFFSET2_EN);
1687 ADCx->OFR3 |= ADC_OFR3_OFFSET3_EN;
1692 ADCx->OFR3 &= ~(ADC_OFR3_OFFSET3_EN);
1712 ADCx->OFR4 |= ADC_OFR4_OFFSET4_EN;
1717 ADCx->OFR4 &= ~(ADC_OFR4_OFFSET4_EN);
1762 ADCx->CFGR |= ADC_CFGR_DMAEN;
1767 ADCx->CFGR &= ~(uint32_t)ADC_CFGR_DMAEN;
1787 ADCx->CFGR &= ~(uint32_t)ADC_CFGR_DMACFG;
1788 ADCx->CFGR |= ADC_DMAMode;
1855 uint32_t tmpreg1 = 0;
1866 tmpreg1 = ADC_SMPR2_SMP10 << (3 * (ADC_InjectedChannel - 10));
1868 ADCx->
SMPR2 &= ~tmpreg1;
1870 ADCx->
SMPR2 |= (uint32_t)ADC_SampleTime << (3 * (ADC_InjectedChannel - 10));
1876 tmpreg1 = ADC_SMPR1_SMP1 << (3 * (ADC_InjectedChannel - 1));
1878 ADCx->
SMPR1 &= ~tmpreg1;
1880 ADCx->
SMPR1 |= (uint32_t)ADC_SampleTime << (3 * (ADC_InjectedChannel));
1899 ADCx->CR |= ADC_CR_JADSTART;
1913 ADCx->CR |= ADC_CR_JADSTP;
1928 if ((ADCx->CR & ADC_CR_JADSTART) != (uint32_t)
RESET)
1958 ADCx->CFGR |= ADC_CFGR_JAUTO;
1963 ADCx->CFGR &= ~ADC_CFGR_JAUTO;
1984 ADCx->CFGR |= ADC_CFGR_JDISCEN;
1989 ADCx->CFGR &= ~ADC_CFGR_JDISCEN;
2006 __IO uint32_t tmp = 0;
2012 tmp = (uint32_t)ADCx;
2013 tmp += ((ADC_InjectedSequence - 1 )<< 2) +
JDR_Offset;
2016 return (uint16_t) (*(
__IO uint32_t*) tmp);
2147 ADCx->IER |= ADC_IT;
2152 ADCx->IER &= (~(uint32_t)ADC_IT);
2182 if ((ADCx->ISR & ADC_FLAG) != (uint32_t)
RESET)
2220 ADCx->ISR = (uint32_t)ADC_FLAG;
2254 uint32_t tmpreg1 = 0;
2261 if((ADCx ==
ADC1) || (ADCx ==
ADC2))
2263 tmpreg1 = ADC1_2->CSR;
2267 tmpreg1 = ADC3_4->CSR;
2270 if ((tmpreg1 & ADC_FLAG) != (uint32_t)
RESET)
2319 if((ADCx ==
ADC1) || (ADCx ==
ADC2))
2322 ADC1_2->CSR |= (uint32_t)ADC_FLAG;
2327 ADC3_4->CSR |= (uint32_t)ADC_FLAG;
2352 uint16_t itstatus = 0x0, itenable = 0x0;
2357 itstatus = ADCx->ISR & ADC_IT;
2359 itenable = ADCx->IER & ADC_IT;
2360 if ((itstatus != (uint32_t)
RESET) && (itenable != (uint32_t)RESET))
2395 ADCx->ISR = (uint32_t)ADC_IT;
#define IS_ADC_CLEAR_COMMONFLAG(FLAG)
#define IS_ADC_MODE(MODE)
#define IS_EXTERNALTRIGINJ_EDGE(EDGE)
#define IS_ADC_INJECTED_CHANNEL(CHANNEL)
void ADC_SetChannelOffset2(ADC_TypeDef *ADCx, uint8_t ADC_Channel, uint16_t Offset)
Set the ADC channels conversion value offset2.
void ADC_AutoInjectedConvCmd(ADC_TypeDef *ADCx, FunctionalState NewState)
Enables or disables the selected ADC automatic injected group conversion after regular one...
#define IS_ADC_OVRUNMODE(MODE)
#define IS_ADC_ANALOG_WATCHDOG(WATCHDOG)
#define RCC_AHBPeriph_ADC12
void ADC_VbatCmd(ADC_TypeDef *ADCx, FunctionalState NewState)
Enables or disables the Vbat channel.
ITStatus ADC_GetITStatus(ADC_TypeDef *ADCx, uint32_t ADC_IT)
Checks whether the specified ADC interrupt has occurred or not.
FlagStatus ADC_GetDisableCmdStatus(ADC_TypeDef *ADCx)
Gets the selected ADC disable command Status.
void ADC_VrefintCmd(ADC_TypeDef *ADCx, FunctionalState NewState)
Enables or disables the Vrefint channel.
#define ADC_InjectedChannel_9
#define ADC_ExternalTrigInjecEventEdge_None
ADC Init structure definition.
#define ADC_ExternalTrigConvEvent_0
void ADC_SetChannelOffset3(ADC_TypeDef *ADCx, uint8_t ADC_Channel, uint16_t Offset)
Set the ADC channels conversion value offset3.
Analog to Digital Converter.
#define ADC_Mode_Independent
void ADC_DMAConfig(ADC_TypeDef *ADCx, uint32_t ADC_DMAMode)
Configure ADC DMA mode.
void ADC_Cmd(ADC_TypeDef *ADCx, FunctionalState NewState)
Enables or disables the specified ADC peripheral.
#define RCC_AHBPeriph_ADC34
#define ADC_DMAAccessMode_Disabled
void ADC_SetChannelOffset1(ADC_TypeDef *ADCx, uint8_t ADC_Channel, uint16_t Offset)
Set the ADC channels conversion value offset1.
FunctionalState ADC_ContinuousConvMode
#define IS_EXTERNALTRIG_EDGE(EDGE)
void ADC_ChannelOffset1Cmd(ADC_TypeDef *ADCx, FunctionalState NewState)
Enables or disables the Offset1.
#define IS_ADC_DMA_ACCESS_MODE(MODE)
#define ADC_ExternalTrigInjecConvEvent_0
void ADC_StructInit(ADC_InitTypeDef *ADC_InitStruct)
Fills each ADC_InitStruct member with its default value.
#define IS_ADC_CHANNEL(CHANNEL)
#define IS_ADC_GET_FLAG(FLAG)
void ADC_DMACmd(ADC_TypeDef *ADCx, FunctionalState NewState)
Enables or disables the specified ADC DMA request.
#define IS_ADC_REGULAR_DISC_NUMBER(NUMBER)
#define IS_ADC_GET_COMMONFLAG(FLAG)
FlagStatus ADC_GetStartConversionStatus(ADC_TypeDef *ADCx)
Gets the selected ADC start conversion Status.
void ADC_AnalogWatchdog1SingleChannelConfig(ADC_TypeDef *ADCx, uint8_t ADC_Channel)
Configures the analog watchdog 2 guarded single channel.
void assert_param(int val)
#define IS_ADC_RESOLUTION(RESOLUTION)
#define IS_ADC_CLOCKMODE(CLOCK)
uint8_t ADC_NbrOfRegChannel
#define IS_ADC_THRESHOLD(THRESHOLD)
void ADC_CommonInit(ADC_TypeDef *ADCx, ADC_CommonInitTypeDef *ADC_CommonInitStruct)
Initializes the ADCs peripherals according to the specified parameters in the ADC_CommonInitStruct.
#define IS_FUNCTIONAL_STATE(STATE)
void ADC_StopInjectedConversion(ADC_TypeDef *ADCx)
Stops the selected ADC ongoing injected conversion.
uint32_t ADC_GetCalibrationValue(ADC_TypeDef *ADCx)
Returns the ADCx calibration value.
ADC Common Init structure definition.
uint32_t ADC_ExternalTrigInjecConvEvent
#define ADC_InjectedChannel_1
void ADC_ChannelOffset4Cmd(ADC_TypeDef *ADCx, FunctionalState NewState)
Enables or disables the Offset4.
#define IS_ADC_CONVMODE(MODE)
This file contains all the functions prototypes for the RCC firmware library.
#define IS_ADC_CALIBRATION_MODE(MODE)
void ADC_VoltageRegulatorCmd(ADC_TypeDef *ADCx, FunctionalState NewState)
Enables or disables the specified ADC Voltage Regulator.
void ADC_AnalogWatchdog2ThresholdsConfig(ADC_TypeDef *ADCx, uint8_t HighThreshold, uint8_t LowThreshold)
Configures the high and low thresholds of the analog watchdog2.
void ADC_AutoDelayCmd(ADC_TypeDef *ADCx, FunctionalState NewState)
Selects the ADC Delayed Conversion Mode.
#define IS_ADC_DMA_PERIPH(PERIPH)
void ADC_TempSensorCmd(ADC_TypeDef *ADCx, FunctionalState NewState)
Enables or disables the temperature sensor channel.
void ADC_ChannelOffset2Cmd(ADC_TypeDef *ADCx, FunctionalState NewState)
Enables or disables the Offset2.
void ADC_StartInjectedConversion(ADC_TypeDef *ADCx)
Enables or disables the selected ADC start of the injected channels conversion.
#define IS_ADC_CLEAR_FLAG(FLAG)
void ADC_StartCalibration(ADC_TypeDef *ADCx)
Starts the selected ADC calibration process.
void ADC_DeInit(ADC_TypeDef *ADCx)
Deinitializes the ADCx peripheral registers to their default reset values.
void ADC_AnalogWatchdogCmd(ADC_TypeDef *ADCx, uint32_t ADC_AnalogWatchdog)
Enables or disables the analog watchdog on single/all regular or injected channels.
#define IS_ADC_SAMPLE_TIME(TIME)
void ADC_ExternalTriggerConfig(ADC_TypeDef *ADCx, uint16_t ADC_ExternalTrigConvEvent, uint16_t ADC_ExternalTrigEventEdge)
External Trigger Enable and Polarity Selection for regular channels.
void ADC_InjectedDiscModeCmd(ADC_TypeDef *ADCx, FunctionalState NewState)
Enables or disables the discontinuous mode for injected group channel for the specified ADC...
void ADC_SelectCalibrationMode(ADC_TypeDef *ADCx, uint32_t ADC_CalibrationMode)
Select the ADC calibration mode.
#define IS_ADC_INJECTED_SEQUENCE(SEQUENCE)
void ADC_InjectedStructInit(ADC_InjectedInitTypeDef *ADC_InjectedInitStruct)
Fills each ADC_InjectedInitStruct member with its default value.
void ADC_DisableCmd(ADC_TypeDef *ADCx)
ADC Disable Command.
uint32_t ADC_InjecSequence4
uint32_t ADC_TwoSamplingDelay
This file contains all the functions prototypes for the ADC firmware library.
void ADC_SetCalibrationValue(ADC_TypeDef *ADCx, uint32_t ADC_Calibration)
Sets the ADCx calibration register.
void ADC_SelectDifferentialMode(ADC_TypeDef *ADCx, uint8_t ADC_Channel, FunctionalState NewState)
Selectes the differential mode for a specific channel.
#define IS_ADC_EXT_INJEC_TRIG(INJTRIG)
uint16_t ADC_GetConversionValue(ADC_TypeDef *ADCx)
Returns the last ADCx conversion result data for regular channel.
FlagStatus ADC_GetStartInjectedConversionStatus(ADC_TypeDef *ADCx)
Gets the selected ADC Software start injected conversion Status.
uint32_t ADC_ExternalTrigInjecEventEdge
void ADC_ClearITPendingBit(ADC_TypeDef *ADCx, uint32_t ADC_IT)
Clears the ADCx's interrupt pending bits.
uint32_t ADC_GetDualModeConversionValue(ADC_TypeDef *ADCx)
Returns the last ADC1, ADC2, ADC3 and ADC4 regular conversions results data in the selected dual mode...
#define IS_ADC_OFFSET(OFFSET)
void ADC_DiscModeChannelCountConfig(ADC_TypeDef *ADCx, uint8_t Number)
Configures the discontinuous mode for the selected ADC regular group channel.
void ADC_ChannelOffset3Cmd(ADC_TypeDef *ADCx, FunctionalState NewState)
Enables or disables the Offset3.
#define IS_ADC_AUTOINJECMODE(MODE)
#define ADC_Resolution_12b
#define IS_ADC_GET_IT(IT)
#define IS_ADC_DMA_MODE(MODE)
#define ADC_ExternalTrigEventEdge_None
#define IS_ADC_INJECTED_LENGTH(LENGTH)
void ADC_ClearCommonFlag(ADC_TypeDef *ADCx, uint32_t ADC_FLAG)
Clears the ADCx's pending flags.
uint32_t ADC_DMAAccessMode
#define ADC_DMAMode_OneShot
#define ADC_Clock_AsynClkMode
void ADC_RegularChannelSequencerLengthConfig(ADC_TypeDef *ADCx, uint8_t SequencerLength)
Sets the ADC regular channel sequence lenght.
uint16_t ADC_GetInjectedConversionValue(ADC_TypeDef *ADCx, uint8_t ADC_InjectedChannel)
Returns the ADC injected channel conversion result.
void ADC_StopConversion(ADC_TypeDef *ADCx)
Stops the selected ADC ongoing conversion.
FlagStatus ADC_GetCommonFlagStatus(ADC_TypeDef *ADCx, uint32_t ADC_FLAG)
Checks whether the specified ADC flag is set or not.
FlagStatus ADC_GetFlagStatus(ADC_TypeDef *ADCx, uint32_t ADC_FLAG)
Checks whether the specified ADC flag is set or not.
void ADC_ITConfig(ADC_TypeDef *ADCx, uint32_t ADC_IT, FunctionalState NewState)
Enables or disables the specified ADC interrupts.
#define IS_ADC_DIFFCHANNEL(CHANNEL)
void ADC_ClearFlag(ADC_TypeDef *ADCx, uint32_t ADC_FLAG)
Clears the ADCx's pending flags.
void ADC_InjectedInit(ADC_TypeDef *ADCx, ADC_InjectedInitTypeDef *ADC_InjectedInitStruct)
Initializes the ADCx peripheral according to the specified parameters in the ADC_InitStruct.
FlagStatus ADC_GetCalibrationStatus(ADC_TypeDef *ADCx)
Gets the selected ADC calibration status.
void ADC_StartConversion(ADC_TypeDef *ADCx)
Enables or disables the selected ADC start conversion .
#define IS_ADC_DATA_ALIGN(ALIGN)
void ADC_AnalogWatchdog3ThresholdsConfig(ADC_TypeDef *ADCx, uint8_t HighThreshold, uint8_t LowThreshold)
Configures the high and low thresholds of the analog watchdog3.
void ADC_AnalogWatchdog2SingleChannelConfig(ADC_TypeDef *ADCx, uint8_t ADC_Channel)
Configures the analog watchdog 2 guarded single channel.
#define IS_ADC_ALL_PERIPH(PERIPH)
uint32_t ADC_ExternalTrigConvEvent
void ADC_RegularChannelConfig(ADC_TypeDef *ADCx, 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 sampl...
void ADC_InjectedChannelSampleTimeConfig(ADC_TypeDef *ADCx, uint8_t ADC_InjectedChannel, uint8_t ADC_SampleTime)
Configures for the selected ADC injected channel its corresponding sample time.
uint32_t ADC_InjecSequence1
#define ADC_DataAlign_Right
uint32_t ADC_InjecSequence3
void ADC_CommonStructInit(ADC_CommonInitTypeDef *ADC_CommonInitStruct)
Fills each ADC_CommonInitStruct member with its default value.
uint32_t ADC_InjecSequence2
void ADC_SelectQueueOfContextMode(ADC_TypeDef *ADCx, FunctionalState NewState)
Selects the Queue Of Context Mode for injected channels.
#define IS_ADC_REGULAR_LENGTH(LENGTH)
void ADC_SetChannelOffset4(ADC_TypeDef *ADCx, uint8_t ADC_Channel, uint16_t Offset)
Set the ADC channels conversion value offset4.
void ADC_AnalogWatchdog1ThresholdsConfig(ADC_TypeDef *ADCx, uint16_t HighThreshold, uint16_t LowThreshold)
Configures the high and low thresholds of the analog watchdog1.
#define IS_ADC_TWOSAMPLING_DELAY(DELAY)
void ADC_DiscModeCmd(ADC_TypeDef *ADCx, FunctionalState NewState)
Enables or disables the discontinuous mode on regular group channel for the specified ADC...
uint8_t ADC_NbrOfInjecChannel
void ADC_AnalogWatchdog3SingleChannelConfig(ADC_TypeDef *ADCx, uint8_t ADC_Channel)
Configures the analog watchdog 3 guarded single channel.
ADC Init structure definition.
#define IS_ADC_EXT_TRIG(REGTRIG)
void ADC_Init(ADC_TypeDef *ADCx, ADC_InitTypeDef *ADC_InitStruct)
Initializes the ADCx peripheral according to the specified parameters in the ADC_InitStruct.
uint32_t ADC_ExternalTrigEventEdge
void RCC_AHBPeriphResetCmd(uint32_t RCC_AHBPeriph, FunctionalState NewState)
Forces or releases AHB peripheral reset.