From a16c9cc4b11eca6e2479d01c8b0386c6668e3c9c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 27 Dec 2012 11:32:58 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4978 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32F3xx/adc_lld.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/os/hal/platforms/STM32F3xx/adc_lld.c b/os/hal/platforms/STM32F3xx/adc_lld.c index c73aadded..8f0518acb 100644 --- a/os/hal/platforms/STM32F3xx/adc_lld.c +++ b/os/hal/platforms/STM32F3xx/adc_lld.c @@ -420,15 +420,12 @@ void adc_lld_stop(ADCDriver *adcp) { /* Releasing the associated DMA channel.*/ dmaStreamRelease(adcp->dmastp); - /* Disabling the ADC.*/ - if (adcp->adcm->CR & ADC_CR_ADEN) { - /* Stopping the ongoing conversion, if any.*/ - adc_lld_stop_adc(adcp); + /* Stopping the ongoing conversion, if any.*/ + adc_lld_stop_adc(adcp); - /* Disabling ADC analog circuit and regulator.*/ - adc_lld_analog_off(adcp); - adc_lld_vreg_off(adcp); - } + /* Disabling ADC analog circuit and regulator.*/ + adc_lld_analog_off(adcp); + adc_lld_vreg_off(adcp); #if STM32_ADC_USE_ADC1 if (&ADCD1 == adcp)