mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
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 */
|
||||
prep(line);
|
||||
|
||||
/* wait for any ongoing conversions to finish */
|
||||
while (dev(line)->SR & ADC_SR_STRT) {}
|
||||
/* set resolution and conversion channel */
|
||||
dev(line)->CR1 = res;
|
||||
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)) {}
|
||||
/* finally read sample and reset the STRT bit in the status register */
|
||||
sample = (int)dev(line)->DR;
|
||||
dev(line)->SR &= ~ADC_SR_STRT;
|
||||
|
||||
/* power off and unlock device again */
|
||||
done(line);
|
||||
|
Loading…
Reference in New Issue
Block a user