cpu/stm32f4/periph/adc: ADC_SR_STRT flag is unused
This commit is contained in:
parent
d66625b6ca
commit
88018849e9
@ -110,8 +110,6 @@ int adc_sample(adc_t line, adc_res_t res)
|
|||||||
/* lock and power on the ADC device */
|
/* lock and power on the ADC device */
|
||||||
prep(line);
|
prep(line);
|
||||||
|
|
||||||
/* wait for any ongoing conversions to finish */
|
|
||||||
while (dev(line)->SR & ADC_SR_STRT) {}
|
|
||||||
/* set resolution and conversion channel */
|
/* set resolution and conversion channel */
|
||||||
dev(line)->CR1 = res;
|
dev(line)->CR1 = res;
|
||||||
dev(line)->SQR3 = adc_config[line].chan;
|
dev(line)->SQR3 = adc_config[line].chan;
|
||||||
@ -120,7 +118,6 @@ int adc_sample(adc_t line, adc_res_t res)
|
|||||||
while (!(dev(line)->SR & ADC_SR_EOC)) {}
|
while (!(dev(line)->SR & ADC_SR_EOC)) {}
|
||||||
/* finally read sample and reset the STRT bit in the status register */
|
/* finally read sample and reset the STRT bit in the status register */
|
||||||
sample = (int)dev(line)->DR;
|
sample = (int)dev(line)->DR;
|
||||||
dev(line)->SR &= ~ADC_SR_STRT;
|
|
||||||
|
|
||||||
/* power off and unlock device again */
|
/* power off and unlock device again */
|
||||||
done(line);
|
done(line);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user