Optimize the code.

This commit is contained in:
Joy 2022-08-22 15:15:46 +08:00
parent 3e96dd1083
commit 8cd207b805
2 changed files with 3 additions and 1 deletions

View File

@ -265,7 +265,7 @@ void adc_lld_start_conversion(ADCDriver *adcp) {
void adc_lld_stop_conversion(ADCDriver *adcp) {
dmaStreamDisable(adcp->dmastp);
adcp->adc->CR2 = 0;
rccResetADC();
}
#endif /* HAL_USE_ADC */

View File

@ -466,6 +466,8 @@ void dmaServeInterrupt(const wb32_dma_stream_t *dmastp) {
dma.streams[selfindex].func(dma.streams[selfindex].param, IT_flag);
}
}
dmaStreamClearInterrupt(dmastp);
}
#endif /* WB32_DMA_REQUIRED */