From 19f97afd4d34430062ba5667df170f97772462a0 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 31 Dec 2012 09:07:11 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5001 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32F3xx/adc_lld.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'os/hal') diff --git a/os/hal/platforms/STM32F3xx/adc_lld.c b/os/hal/platforms/STM32F3xx/adc_lld.c index 35960d84d..22b5bfcad 100644 --- a/os/hal/platforms/STM32F3xx/adc_lld.c +++ b/os/hal/platforms/STM32F3xx/adc_lld.c @@ -118,11 +118,11 @@ static void adc_lld_vreg_off(ADCDriver *adcp) { */ static void adc_lld_analog_on(ADCDriver *adcp) { - adcp->adcm->CR = ADC_CR_ADEN; + adcp->adcm->CR |= ADC_CR_ADEN; while ((adcp->adcm->ISR & ADC_ISR_ADRDY) == 0) ; #if STM32_ADC_DUAL_MODE - adcp->adcs->CR = ADC_CR_ADEN; + adcp->adcs->CR |= ADC_CR_ADEN; while ((adcp->adcs->ISR & ADC_ISR_ADRDY) == 0) ; #endif @@ -135,11 +135,11 @@ static void adc_lld_analog_on(ADCDriver *adcp) { */ static void adc_lld_analog_off(ADCDriver *adcp) { - adcp->adcm->CR = ADC_CR_ADDIS; + adcp->adcm->CR |= ADC_CR_ADDIS; while ((adcp->adcm->CR & ADC_CR_ADDIS) != 0) ; #if STM32_ADC_DUAL_MODE - adcp->adcs->CR = ADC_CR_ADDIS; + adcp->adcs->CR |= ADC_CR_ADDIS; while ((adcp->adcs->CR & ADC_CR_ADDIS) != 0) ; #endif @@ -531,10 +531,10 @@ void adc_lld_start_conversion(ADCDriver *adcp) { #endif /* !STM32_ADC_DUAL_MODE */ /* ADC configuration.*/ - adcp->adcm->CFGR = cfgr; + adcp->adcm->CFGR = cfgr; /* Starting conversion.*/ - adcp->adcm->CR |= ADC_CR_ADSTART; + adcp->adcm->CR |= ADC_CR_ADSTART; } /** -- cgit v1.2.3