aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-12-27 11:32:58 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-12-27 11:32:58 +0000
commita16c9cc4b11eca6e2479d01c8b0386c6668e3c9c (patch)
treee59190d03b33a2c41391403be0bca18567c91e22 /os/hal/platforms
parentd2c0aea892777c860fa29e18eda06bd6c0694f48 (diff)
downloadChibiOS-a16c9cc4b11eca6e2479d01c8b0386c6668e3c9c.tar.gz
ChibiOS-a16c9cc4b11eca6e2479d01c8b0386c6668e3c9c.tar.bz2
ChibiOS-a16c9cc4b11eca6e2479d01c8b0386c6668e3c9c.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4978 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms')
-rw-r--r--os/hal/platforms/STM32F3xx/adc_lld.c15
1 files changed, 6 insertions, 9 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);
-
- /* Disabling ADC analog circuit and regulator.*/
- adc_lld_analog_off(adcp);
- adc_lld_vreg_off(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);
#if STM32_ADC_USE_ADC1
if (&ADCD1 == adcp)