Optimize the code.
This commit is contained in:
parent
3e96dd1083
commit
8cd207b805
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue