From 3a94137eb38857d9780a5ef65be30736804dea46 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 16 Sep 2011 17:38:22 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3320 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32F1xx/adc_lld.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'os/hal/platforms/STM32F1xx/adc_lld.c') diff --git a/os/hal/platforms/STM32F1xx/adc_lld.c b/os/hal/platforms/STM32F1xx/adc_lld.c index cc4d25ea1..ac74251f8 100644 --- a/os/hal/platforms/STM32F1xx/adc_lld.c +++ b/os/hal/platforms/STM32F1xx/adc_lld.c @@ -100,7 +100,7 @@ void adc_lld_init(void) { STM32_DMA_CR_TEIE | STM32_DMA_CR_EN; /* Temporary activation.*/ - RCC->APB2ENR |= RCC_APB2ENR_ADC1EN; + rccEnableADC1(FALSE); ADC1->CR1 = 0; ADC1->CR2 = ADC_CR2_ADON; @@ -116,7 +116,7 @@ void adc_lld_init(void) { /* Return the ADC in low power mode.*/ ADC1->CR2 = 0; - RCC->APB2ENR &= ~RCC_APB2ENR_ADC1EN; + rccDisableADC1(FALSE); #endif } @@ -140,7 +140,7 @@ void adc_lld_start(ADCDriver *adcp) { (void *)adcp); chDbgAssert(!b, "adc_lld_start(), #1", "stream already allocated"); dmaStreamSetPeripheral(adcp->dmastp, &ADC1->DR); - RCC->APB2ENR |= RCC_APB2ENR_ADC1EN; + rccEnableADC1(FALSE); } #endif @@ -167,7 +167,7 @@ void adc_lld_stop(ADCDriver *adcp) { ADC1->CR1 = 0; ADC1->CR2 = 0; dmaStreamRelease(adcp->dmastp); - RCC->APB2ENR &= ~RCC_APB2ENR_ADC1EN; + rccDisableADC1(FALSE); } #endif } -- cgit v1.2.3