git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4978 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2012-12-27 11:32:58 +00:00
parent d2c0aea892
commit a16c9cc4b1
1 changed files with 5 additions and 8 deletions

View File

@ -420,15 +420,12 @@ void adc_lld_stop(ADCDriver *adcp) {
/* Releasing the associated DMA channel.*/ /* Releasing the associated DMA channel.*/
dmaStreamRelease(adcp->dmastp); dmaStreamRelease(adcp->dmastp);
/* Disabling the ADC.*/
if (adcp->adcm->CR & ADC_CR_ADEN) {
/* Stopping the ongoing conversion, if any.*/ /* Stopping the ongoing conversion, if any.*/
adc_lld_stop_adc(adcp); adc_lld_stop_adc(adcp);
/* Disabling ADC analog circuit and regulator.*/ /* Disabling ADC analog circuit and regulator.*/
adc_lld_analog_off(adcp); adc_lld_analog_off(adcp);
adc_lld_vreg_off(adcp); adc_lld_vreg_off(adcp);
}
#if STM32_ADC_USE_ADC1 #if STM32_ADC_USE_ADC1
if (&ADCD1 == adcp) if (&ADCD1 == adcp)