34 #if defined( ADC_COUNT ) && ( ADC_COUNT > 0 )
62 #define ADC_REF_VALID(ref) ((ref) == ADC0)
65 #if defined( _SILICON_LABS_32B_SERIES_0 )
66 #define ADC_MAX_CLOCK 13000000
68 #define ADC_MAX_CLOCK 16000000
72 #define ADC_MIN_CLOCK 32000
75 #if defined( _DEVINFO_ADC0CAL0_1V25_GAIN_MASK )
76 #define DEVINFO_ADC0_GAIN1V25_MASK _DEVINFO_ADC0CAL0_1V25_GAIN_MASK
77 #elif defined( _DEVINFO_ADC0CAL0_GAIN1V25_MASK )
78 #define DEVINFO_ADC0_GAIN1V25_MASK _DEVINFO_ADC0CAL0_GAIN1V25_MASK
81 #if defined( _DEVINFO_ADC0CAL0_1V25_GAIN_SHIFT )
82 #define DEVINFO_ADC0_GAIN1V25_SHIFT _DEVINFO_ADC0CAL0_1V25_GAIN_SHIFT
83 #elif defined( _DEVINFO_ADC0CAL0_GAIN1V25_SHIFT )
84 #define DEVINFO_ADC0_GAIN1V25_SHIFT _DEVINFO_ADC0CAL0_GAIN1V25_SHIFT
87 #if defined( _DEVINFO_ADC0CAL0_1V25_OFFSET_MASK )
88 #define DEVINFO_ADC0_OFFSET1V25_MASK _DEVINFO_ADC0CAL0_1V25_OFFSET_MASK
89 #elif defined( _DEVINFO_ADC0CAL0_OFFSET1V25_MASK )
90 #define DEVINFO_ADC0_OFFSET1V25_MASK _DEVINFO_ADC0CAL0_OFFSET1V25_MASK
93 #if defined( _DEVINFO_ADC0CAL0_1V25_OFFSET_SHIFT )
94 #define DEVINFO_ADC0_OFFSET1V25_SHIFT _DEVINFO_ADC0CAL0_1V25_OFFSET_SHIFT
95 #elif defined( _DEVINFO_ADC0CAL0_OFFSET1V25_SHIFT )
96 #define DEVINFO_ADC0_OFFSET1V25_SHIFT _DEVINFO_ADC0CAL0_OFFSET1V25_SHIFT
99 #if defined( _DEVINFO_ADC0CAL0_2V5_GAIN_MASK )
100 #define DEVINFO_ADC0_GAIN2V5_MASK _DEVINFO_ADC0CAL0_2V5_GAIN_MASK
101 #elif defined( _DEVINFO_ADC0CAL0_GAIN2V5_MASK )
102 #define DEVINFO_ADC0_GAIN2V5_MASK _DEVINFO_ADC0CAL0_GAIN2V5_MASK
105 #if defined( _DEVINFO_ADC0CAL0_2V5_GAIN_SHIFT )
106 #define DEVINFO_ADC0_GAIN2V5_SHIFT _DEVINFO_ADC0CAL0_2V5_GAIN_SHIFT
107 #elif defined( _DEVINFO_ADC0CAL0_GAIN2V5_SHIFT )
108 #define DEVINFO_ADC0_GAIN2V5_SHIFT _DEVINFO_ADC0CAL0_GAIN2V5_SHIFT
111 #if defined( _DEVINFO_ADC0CAL0_2V5_OFFSET_MASK )
112 #define DEVINFO_ADC0_OFFSET2V5_MASK _DEVINFO_ADC0CAL0_2V5_OFFSET_MASK
113 #elif defined( _DEVINFO_ADC0CAL0_OFFSET2V5_MASK )
114 #define DEVINFO_ADC0_OFFSET2V5_MASK _DEVINFO_ADC0CAL0_OFFSET2V5_MASK
117 #if defined( _DEVINFO_ADC0CAL0_2V5_OFFSET_SHIFT )
118 #define DEVINFO_ADC0_OFFSET2V5_SHIFT _DEVINFO_ADC0CAL0_2V5_OFFSET_SHIFT
119 #elif defined( _DEVINFO_ADC0CAL0_OFFSET2V5_SHIFT )
120 #define DEVINFO_ADC0_OFFSET2V5_SHIFT _DEVINFO_ADC0CAL0_OFFSET2V5_SHIFT
123 #if defined( _DEVINFO_ADC0CAL1_VDD_GAIN_MASK )
124 #define DEVINFO_ADC0_GAINVDD_MASK _DEVINFO_ADC0CAL1_VDD_GAIN_MASK
125 #elif defined( _DEVINFO_ADC0CAL1_GAINVDD_MASK )
126 #define DEVINFO_ADC0_GAINVDD_MASK _DEVINFO_ADC0CAL1_GAINVDD_MASK
129 #if defined( _DEVINFO_ADC0CAL1_VDD_GAIN_SHIFT )
130 #define DEVINFO_ADC0_GAINVDD_SHIFT _DEVINFO_ADC0CAL1_VDD_GAIN_SHIFT
131 #elif defined( _DEVINFO_ADC0CAL1_GAINVDD_SHIFT )
132 #define DEVINFO_ADC0_GAINVDD_SHIFT _DEVINFO_ADC0CAL1_GAINVDD_SHIFT
135 #if defined( _DEVINFO_ADC0CAL1_VDD_OFFSET_MASK )
136 #define DEVINFO_ADC0_OFFSETVDD_MASK _DEVINFO_ADC0CAL1_VDD_OFFSET_MASK
137 #elif defined( _DEVINFO_ADC0CAL1_OFFSETVDD_MASK )
138 #define DEVINFO_ADC0_OFFSETVDD_MASK _DEVINFO_ADC0CAL1_OFFSETVDD_MASK
141 #if defined( _DEVINFO_ADC0CAL1_VDD_OFFSET_SHIFT )
142 #define DEVINFO_ADC0_OFFSETVDD_SHIFT _DEVINFO_ADC0CAL1_VDD_OFFSET_SHIFT
143 #elif defined( _DEVINFO_ADC0CAL1_OFFSETVDD_SHIFT )
144 #define DEVINFO_ADC0_OFFSETVDD_SHIFT _DEVINFO_ADC0CAL1_OFFSETVDD_SHIFT
147 #if defined( _DEVINFO_ADC0CAL1_5VDIFF_GAIN_MASK )
148 #define DEVINFO_ADC0_GAIN5VDIFF_MASK _DEVINFO_ADC0CAL1_5VDIFF_GAIN_MASK
149 #elif defined( _DEVINFO_ADC0CAL1_GAIN5VDIFF_MASK )
150 #define DEVINFO_ADC0_GAIN5VDIFF_MASK _DEVINFO_ADC0CAL1_GAIN5VDIFF_MASK
153 #if defined( _DEVINFO_ADC0CAL1_5VDIFF_GAIN_SHIFT )
154 #define DEVINFO_ADC0_GAIN5VDIFF_SHIFT _DEVINFO_ADC0CAL1_5VDIFF_GAIN_SHIFT
155 #elif defined( _DEVINFO_ADC0CAL1_GAIN5VDIFF_SHIFT )
156 #define DEVINFO_ADC0_GAIN5VDIFF_SHIFT _DEVINFO_ADC0CAL1_GAIN5VDIFF_SHIFT
159 #if defined( _DEVINFO_ADC0CAL1_5VDIFF_OFFSET_MASK )
160 #define DEVINFO_ADC0_OFFSET5VDIFF_MASK _DEVINFO_ADC0CAL1_5VDIFF_OFFSET_MASK
161 #elif defined( _DEVINFO_ADC0CAL1_OFFSET5VDIFF_MASK )
162 #define DEVINFO_ADC0_OFFSET5VDIFF_MASK _DEVINFO_ADC0CAL1_OFFSET5VDIFF_MASK
165 #if defined( _DEVINFO_ADC0CAL1_5VDIFF_OFFSET_SHIFT )
166 #define DEVINFO_ADC0_OFFSET5VDIFF_SHIFT _DEVINFO_ADC0CAL1_5VDIFF_OFFSET_SHIFT
167 #elif defined( _DEVINFO_ADC0CAL1_OFFSET5VDIFF_SHIFT )
168 #define DEVINFO_ADC0_OFFSET5VDIFF_SHIFT _DEVINFO_ADC0CAL1_OFFSET5VDIFF_SHIFT
171 #if defined( _DEVINFO_ADC0CAL2_2XVDDVSS_OFFSET_MASK )
172 #define DEVINFO_ADC0_OFFSET2XVDD_MASK _DEVINFO_ADC0CAL2_2XVDDVSS_OFFSET_MASK
173 #elif defined( _DEVINFO_ADC0CAL2_OFFSET2XVDD_MASK )
174 #define DEVINFO_ADC0_OFFSET2XVDD_MASK _DEVINFO_ADC0CAL2_OFFSET2XVDD_MASK
177 #if defined( _DEVINFO_ADC0CAL2_2XVDDVSS_OFFSET_SHIFT )
178 #define DEVINFO_ADC0_OFFSET2XVDD_SHIFT _DEVINFO_ADC0CAL2_2XVDDVSS_OFFSET_SHIFT
179 #elif defined( _DEVINFO_ADC0CAL2_OFFSET2XVDD_SHIFT )
180 #define DEVINFO_ADC0_OFFSET2XVDD_SHIFT _DEVINFO_ADC0CAL2_OFFSET2XVDD_SHIFT
183 #if defined( _SILICON_LABS_32B_SERIES_1 )
184 #define FIX_ADC_TEMP_BIAS_EN
228 #if defined( _ADC_CAL_SCANOFFSETINV_MASK )
237 #if defined( _ADC_CAL_SINGLEOFFSETINV_MASK )
243 calReg = adc->
CAL & mask;
249 newCal |= ((
DEVINFO->ADC0CAL0 & DEVINFO_ADC0_GAIN1V25_MASK)
250 >> DEVINFO_ADC0_GAIN1V25_SHIFT)
252 newCal |= ((
DEVINFO->ADC0CAL0 & DEVINFO_ADC0_OFFSET1V25_MASK)
253 >> DEVINFO_ADC0_OFFSET1V25_SHIFT)
255 #if defined( _ADC_CAL_SINGLEOFFSETINV_MASK )
263 newCal |= ((
DEVINFO->ADC0CAL0 & DEVINFO_ADC0_GAIN2V5_MASK)
264 >> DEVINFO_ADC0_GAIN2V5_SHIFT)
266 newCal |= ((
DEVINFO->ADC0CAL0 & DEVINFO_ADC0_OFFSET2V5_MASK)
267 >> DEVINFO_ADC0_OFFSET2V5_SHIFT)
269 #if defined( _ADC_CAL_SINGLEOFFSETINV_MASK )
277 newCal |= ((
DEVINFO->ADC0CAL1 & DEVINFO_ADC0_GAINVDD_MASK)
278 >> DEVINFO_ADC0_GAINVDD_SHIFT)
280 newCal |= ((
DEVINFO->ADC0CAL1 & DEVINFO_ADC0_OFFSETVDD_MASK)
281 >> DEVINFO_ADC0_OFFSETVDD_SHIFT)
283 #if defined( _ADC_CAL_SINGLEOFFSETINV_MASK )
291 newCal |= ((
DEVINFO->ADC0CAL1 & DEVINFO_ADC0_GAIN5VDIFF_MASK)
292 >> DEVINFO_ADC0_GAIN5VDIFF_SHIFT)
294 newCal |= ((
DEVINFO->ADC0CAL1 & DEVINFO_ADC0_OFFSET5VDIFF_MASK)
295 >> DEVINFO_ADC0_OFFSET5VDIFF_SHIFT)
297 #if defined( _ADC_CAL_SINGLEOFFSETINV_MASK )
306 newCal |= ((
DEVINFO->ADC0CAL2 & DEVINFO_ADC0_OFFSET2XVDD_MASK)
307 >> DEVINFO_ADC0_OFFSET2XVDD_SHIFT)
309 #if defined( _ADC_CAL_SINGLEOFFSETINV_MASK )
316 #if defined( _ADC_SINGLECTRLX_VREFSEL_VDDXWATT )
318 newCal |= ((
DEVINFO->ADC0CAL1 & DEVINFO_ADC0_GAINVDD_MASK)
319 >> DEVINFO_ADC0_GAINVDD_SHIFT)
321 newCal |= ((
DEVINFO->ADC0CAL1 & DEVINFO_ADC0_OFFSETVDD_MASK)
322 >> DEVINFO_ADC0_OFFSETVDD_SHIFT)
339 adc->
CAL = calReg | (newCal << shift);
376 EFM_ASSERT(ADC_REF_VALID(adc));
386 #if defined(_ADC_CTRL_ADCCLKMODE_MASK)
403 #
if defined ( _ADC_CTRL_LPFMODE_MASK )
404 | ((uint32_t)(init->lpfMode) << _ADC_CTRL_LPFMODE_SHIFT)
415 #if defined( _ADC_CTRL_ADCCLKMODE_MASK )
421 #if defined( _SILICON_LABS_GECKO_INTERNAL_SDID_80 )
428 #if defined( _ADC_SCANINPUTSEL_MASK )
472 ADC_ScanInputGroup_TypeDef inputGroup,
479 scanInit->
diff =
false;
482 EFM_ASSERT((singleEndedSel <= adcPosSelAPORT0YCH0) || (singleEndedSel >= adcPosSelAPORT0YCH15));
485 newSel = singleEndedSel >> 3;
490 if (currentSel == ADC_SCANINPUTSEL_GROUP_NONE)
495 else if (currentSel == newSel)
506 scanId = (inputGroup * 8) + (singleEndedSel & 0x7);
507 EFM_ASSERT(scanId < 32);
544 ADC_ScanInputGroup_TypeDef inputGroup,
546 ADC_ScanNegInput_TypeDef negInput)
548 uint32_t negInputRegMask = 0;
549 uint32_t negInputRegShift = 0;
550 uint32_t negInputRegVal = 0;
557 scanInit->
diff =
true;
560 if (negInput != adcScanNegInputDefault)
566 EFM_ASSERT(inputGroup == 0);
568 else if (scanId == 2)
572 EFM_ASSERT(inputGroup == 0);
574 else if (scanId == 4)
578 EFM_ASSERT(inputGroup == 0);
580 else if (scanId == 6)
584 EFM_ASSERT(inputGroup == 0);
586 else if (scanId == 9)
590 EFM_ASSERT(inputGroup == 1);
592 else if (scanId == 11)
596 EFM_ASSERT(inputGroup == 1);
598 else if (scanId == 13)
602 EFM_ASSERT(inputGroup == 1);
604 else if (scanId == 15)
608 EFM_ASSERT(inputGroup == 1);
621 case adcScanNegInput1:
625 case adcScanNegInput3:
629 case adcScanNegInput5:
633 case adcScanNegInput7:
643 else if (inputGroup == 1)
648 case adcScanNegInput8:
652 case adcScanNegInput10:
656 case adcScanNegInput12:
660 case adcScanNegInput14:
714 EFM_ASSERT(ADC_REF_VALID(adc));
720 ADC_LoadDevinfoCal(adc, init->
reference,
true);
723 #if defined ( _ADC_SCANCTRL_PRSSEL_MASK )
724 | (init->
prsSel << _ADC_SCANCTRL_PRSSEL_SHIFT)
727 #if defined ( _ADC_SCANCTRL_INPUTMASK_MASK )
742 #if defined( _ADC_SCANCTRL_INPUTMASK_MASK )
744 #elif defined( _ADC_SCANINPUTSEL_MASK )
753 #if defined( _SILICON_LABS_GECKO_INTERNAL_SDID_80 )
762 #if defined ( _ADC_SCANCTRLX_VREFSEL_MASK )
776 #if defined( _ADC_SCANCTRL_INPUTMASK_MASK )
783 #if defined ( _ADC_SCANCTRLX_MASK )
802 #if defined( _ADC_CTRL_SCANDMAWU_MASK )
807 #if defined( _ADC_SCANINPUTSEL_MASK )
818 #if defined( _ADC_BUSCONFLICT_MASK )
820 EFM_ASSERT(!(tmp & adc->BUSCONFLICT));
858 EFM_ASSERT(ADC_REF_VALID(adc));
864 ADC_LoadDevinfoCal(adc, init->
reference,
false);
867 #if defined( _ADC_SINGLECTRL_PRSSEL_MASK )
868 | (init->
prsSel << _ADC_SINGLECTRL_PRSSEL_SHIFT)
871 #if defined( _ADC_SINGLECTRL_INPUTSEL_MASK )
872 | (init->input << _ADC_SINGLECTRL_INPUTSEL_SHIFT)
902 #if defined( _ADC_SINGLECTRL_POSSEL_TEMP )
905 if ((init->
posSel == adcPosSelTEMP)
915 #if defined ( _ADC_SINGLECTRLX_MASK )
931 #if defined ( _ADC_SINGLECTRLX_VREFSEL_MASK )
951 #if defined( _ADC_CTRL_SINGLEDMAWU_MASK )
955 #if defined( _ADC_BIASPROG_GPBIASACC_MASK ) && defined( FIX_ADC_TEMP_BIAS_EN )
956 if (init->
posSel == adcPosSelTEMP)
970 #if defined( _ADC_BUSCONFLICT_MASK )
972 EFM_ASSERT(!(tmp & adc->BUSCONFLICT));
978 #if defined( _ADC_SCANDATAX_MASK )
1030 if (adcFreq > ADC_MAX_CLOCK)
1032 adcFreq = ADC_MAX_CLOCK;
1034 else if (adcFreq < ADC_MIN_CLOCK)
1036 adcFreq = ADC_MIN_CLOCK;
1045 ret = (hfperFreq + adcFreq - 1) / adcFreq;
1051 return (uint8_t)ret;
1071 #if defined( _ADC_SINGLECTRLX_MASK )
1075 #if defined( _ADC_SCANCTRLX_MASK )
1082 #if defined( _ADC_SCANMASK_MASK )
1085 #if defined( _ADC_SCANINPUTSEL_MASK )
1088 #if defined( _ADC_SCANNEGSEL_MASK )
1093 #if defined( _ADC_SINGLEFIFOCLEAR_MASK )
1102 #if defined( _ADC_SCANINPUTSEL_MASK )
1130 #if defined( _EFM32_GIANT_FAMILY ) || defined( _EFM32_WONDER_FAMILY )
1136 if ( hfperFreq > 32000000 )
1138 hfperFreq = 32000000;
1142 hfperFreq += 999999;
1143 hfperFreq /= 1000000;
1146 return (uint8_t)(hfperFreq - 1);
#define _ADC_SCANCTRLX_RESETVALUE
Clock management unit (CMU) API.
#define _ADC_CAL_SCANOFFSETINV_MASK
#define _DEVINFO_ADC0CAL1_NEGSEOFFSET5VDIFF_MASK
#define _ADC_SINGLECTRL_AT_MASK
#define ADC_SCANCTRL_DIFF
#define _ADC_CTRL_OVSRSEL_SHIFT
#define ADC_SCANCTRL_REF_CONF
#define ADC_SINGLECTRL_PRSEN
#define _ADC_SCANCTRLX_FIFOOFACT_MASK
#define _ADC_SCANNEGSEL_INPUT13NEGSEL_SHIFT
ADC_PosSel_TypeDef posSel
#define _ADC_SCANNEGSEL_INPUT0NEGSEL_INPUT3
#define ADC_SINGLECTRL_ADJ_LEFT
#define _DEVINFO_ADC0CAL2_NEGSEOFFSET2XVDD_SHIFT
#define _ADC_CAL_SCANOFFSET_SHIFT
#define _ADC_SCANCTRLX_PRSSEL_SHIFT
#define _ADC_SCANNEGSEL_INPUT4NEGSEL_SHIFT
#define _ADC_SCANNEGSEL_INPUT13NEGSEL_MASK
#define _ADC_CTRL_TIMEBASE_MASK
#define _DEVINFO_ADC0CAL0_NEGSEOFFSET2V5_SHIFT
Emlib peripheral API "assert" implementation.
#define _DEVINFO_ADC0CAL0_NEGSEOFFSET1V25_SHIFT
#define _ADC_SCANINPUTSEL_RESETVALUE
#define _ADC_SINGLECTRL_NEGSEL_SHIFT
#define ADC_CTRL_TAILGATE
#define _ADC_SCANCTRLX_PRSSEL_MASK
__IOM uint32_t SCANNEGSEL
ADC_EM2ClockConfig_TypeDef em2ClockConfig
void ADC_Reset(ADC_TypeDef *adc)
Reset ADC to same state as after a HW reset.
#define _ADC_SINGLECTRL_AT_SHIFT
#define _ADC_SINGLECTRL_REF_SHIFT
#define _ADC_SCANCTRL_AT_SHIFT
ADC_AcqTime_TypeDef acqTime
__IOM uint32_t SINGLECTRLX
#define ADC_SINGLEFIFOCLEAR_SINGLEFIFOCLEAR
#define _ADC_SINGLECTRL_RESETVALUE
ADC_NegSel_TypeDef negSel
__STATIC_INLINE void ADC_IntClear(ADC_TypeDef *adc, uint32_t flags)
Clear one or more pending ADC interrupts.
#define _ADC_CAL_SCANOFFSET_MASK
#define _ADC_IEN_RESETVALUE
#define _ADC_SCANNEGSEL_INPUT9NEGSEL_SHIFT
#define _ADC_BIASPROG_GPBIASACC_SHIFT
#define _ADC_CTRL_ASYNCCLKEN_MASK
ADC_PRSSEL_TypeDef prsSel
#define _ADC_STATUS_PROGERR_MASK
#define _ADC_CTRL_ADCCLKMODE_MASK
#define _ADC_SINGLECTRLX_VREFSEL_SHIFT
__IOM uint32_t SCANFIFOCLEAR
#define ADC_CTRLX_VREFSEL_REG
#define _DEVINFO_ADC0CAL0_NEGSEOFFSET2V5_MASK
#define _ADC_SCANNEGSEL_INPUT0NEGSEL_MASK
#define _ADC_SCANNEGSEL_INPUT9NEGSEL_INPUT8
void ADC_Init(ADC_TypeDef *adc, const ADC_Init_TypeDef *init)
Initialize ADC.
__IOM uint32_t SINGLECTRL
#define _ADC_SCANNEGSEL_INPUT9NEGSEL_INPUT14
#define _ADC_SINGLECTRLX_PRSSEL_MASK
#define _ADC_SCANNEGSEL_INPUT0NEGSEL_INPUT1
#define _ADC_CAL_SINGLEOFFSETINV_MASK
ADC_PRSSEL_TypeDef prsSel
__IOM uint32_t SCANINPUTSEL
#define _ADC_CAL_SINGLEGAIN_MASK
uint32_t ADC_DataIdScanGet(ADC_TypeDef *adc, uint32_t *scanId)
Get scan result and scan select ID.
#define _ADC_SCANNEGSEL_INPUT6NEGSEL_MASK
#define _ADC_SCANNEGSEL_INPUT0NEGSEL_INPUT7
#define _ADC_SCANNEGSEL_INPUT0NEGSEL_SHIFT
void ADC_ScanInputClear(ADC_InitScan_TypeDef *scanInit)
Clear ADC scan input configuration.
#define _ADC_CTRL_RESETVALUE
uint8_t ADC_TimebaseCalc(uint32_t hfperFreq)
Calculate timebase value in order to get a timebase providing at least 1us.
#define _ADC_CAL_SINGLEGAIN_SHIFT
#define _ADC_CAL_SCANGAIN_MASK
#define _DEVINFO_ADC0CAL0_NEGSEOFFSET1V25_MASK
#define _ADC_CTRL_PRESC_MASK
#define _ADC_SCANDATAX_DATA_SHIFT
#define _ADC_SCANNEGSEL_INPUT11NEGSEL_MASK
#define _DEVINFO_ADC0CAL1_NEGSEOFFSETVDD_MASK
#define _ADC_SINGLECTRL_POSSEL_MASK
uint32_t ADC_ScanDifferentialInputAdd(ADC_InitScan_TypeDef *scanInit, ADC_ScanInputGroup_TypeDef inputGroup, ADC_PosSel_TypeDef posSel, ADC_ScanNegInput_TypeDef adcScanNegInput)
Initialize ADC scan differential input configuration.
#define _ADC_SCANCTRL_RES_SHIFT
#define ADC_SCANFIFOCLEAR_SCANFIFOCLEAR
#define _ADC_SCANMASK_RESETVALUE
#define _ADC_SCANNEGSEL_INPUT4NEGSEL_MASK
#define ADC_SINGLECTRL_DIFF
#define ADC_SINGLECTRL_REP
#define ADC_SINGLECTRLX_FIFOOFACT_OVERWRITE
#define _ADC_SINGLECTRL_RES_SHIFT
ADC_Res_TypeDef resolution
#define _ADC_SCANCTRL_RESETVALUE
#define _DEVINFO_ADC0CAL1_NEGSEOFFSETVDD_SHIFT
#define ADC_CMD_SINGLESTOP
void ADC_InitSingle(ADC_TypeDef *adc, const ADC_InitSingle_TypeDef *init)
Initialize single ADC sample conversion.
#define _ADC_CTRL_SCANDMAWU_SHIFT
ADC_InitScanInput_TypeDef scanInputConfig
#define ADC_SCANCTRL_PRSEN
#define ADC_SINGLECTRL_REF_CONF
#define _ADC_CTRL_TIMEBASE_SHIFT
uint32_t ADC_ScanSingleEndedInputAdd(ADC_InitScan_TypeDef *scanInit, ADC_ScanInputGroup_TypeDef inputGroup, ADC_PosSel_TypeDef singleEndedSel)
Initialize ADC scan single-ended input configuration.
#define _ADC_SCANNEGSEL_INPUT6NEGSEL_SHIFT
#define _ADC_SINGLECTRL_NEGSEL_MASK
#define _ADC_SCANNEGSEL_INPUT9NEGSEL_INPUT10
#define _ADC_CAL_SINGLEOFFSET_MASK
#define _ADC_SCANNEGSEL_INPUT2NEGSEL_SHIFT
#define _ADC_SCANNEGSEL_RESETVALUE
#define _ADC_SINGLECTRLX_RESETVALUE
#define _DEVINFO_ADC0CAL2_NEGSEOFFSET2XVDD_MASK
#define _ADC_CTRL_PRESC_SHIFT
__STATIC_INLINE void BUS_RegMaskedWrite(volatile uint32_t *addr, uint32_t mask, uint32_t val)
Perform peripheral register masked clear and value write.
uint8_t ADC_PrescaleCalc(uint32_t adcFreq, uint32_t hfperFreq)
Calculate prescaler value used to determine ADC clock.
#define _ADC_SCANNEGSEL_INPUT9NEGSEL_MASK
#define _ADC_CAL_SINGLEOFFSET_SHIFT
void ADC_InitScan(ADC_TypeDef *adc, const ADC_InitScan_TypeDef *init)
Initialize ADC scan sequence.
#define _DEVINFO_ADC0CAL1_NEGSEOFFSET5VDIFF_SHIFT
#define _ADC_SINGLECTRLX_VREFSEL_MASK
#define ADC_CTRL_ADCCLKMODE_SYNC
Analog to Digital Converter (ADC) peripheral API.
__STATIC_INLINE void BUS_RegBitWrite(volatile uint32_t *addr, unsigned int bit, unsigned int val)
Perform a single-bit write operation on a peripheral register.
ADC_Ref_TypeDef reference
#define _ADC_CTRL_SINGLEDMAWU_SHIFT
#define _ADC_BIASPROG_RESETVALUE
#define _ADC_SINGLECTRLX_FIFOOFACT_MASK
__IOM uint32_t SINGLEFIFOCLEAR
#define _ADC_SCANNEGSEL_INPUT11NEGSEL_SHIFT
#define _ADC_SCANNEGSEL_INPUT15NEGSEL_SHIFT
#define _ADC_CTRL_WARMUPMODE_SHIFT
ADC_OvsRateSel_TypeDef ovsRateSel
#define _ADC_SCANNEGSEL_INPUT2NEGSEL_MASK
uint32_t CMU_ClockFreqGet(CMU_Clock_TypeDef clock)
Get clock frequency for a clock point.
#define _ADC_CAL_SINGLEOFFSETINV_SHIFT
#define _ADC_SCANCTRLX_VREFSEL_MASK
ADC_Ref_TypeDef reference
#define _ADC_SCANCTRLX_VREFSEL_SHIFT
#define ADC_SCANCTRL_ADJ_LEFT
#define _ADC_SINGLECTRLX_PRSSEL_SHIFT
#define _ADC_SCANNEGSEL_INPUT0NEGSEL_INPUT5
ADC_Res_TypeDef resolution
#define ADC_SCANCTRLX_FIFOOFACT_OVERWRITE
#define _ADC_SCANNEGSEL_INPUT15NEGSEL_MASK
ADC_AcqTime_TypeDef acqTime
ADC_Warmup_TypeDef warmUpMode
#define _ADC_SINGLECTRL_POSSEL_SHIFT
#define _ADC_SCANDATAX_SCANINPUTID_MASK
#define _ADC_SCANCTRL_REF_SHIFT
#define _ADC_SCANDATAX_SCANINPUTID_SHIFT
#define _ADC_SCANNEGSEL_INPUT9NEGSEL_INPUT12
#define _ADC_SCANDATAX_DATA_MASK