- ao_arch_block_interrupts();
- while (!ao_adc_done)
- ao_sleep(&ao_adc_done);
- ao_arch_release_interrupts();
-
- ao_dma_done_transfer(STM_DMA_INDEX(STM_DMA_CHANNEL_ADC_1));
-
- stm_adc.cr |= (1 << STM_ADC_CR_ADSTP);
- while ((stm_adc.cr & (1 << STM_ADC_CR_ADSTP)) != 0)
- ;