From b6e73875860268919771d97fd6f55cb6db3b2d8a Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 20 Dec 2011 00:30:12 +0000 Subject: [PATCH] ADC driver update git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4203 42af7a65-404d-4744-a932-0658087f49c3 --- configs/stm3210e-eval/src/up_adc.c | 10 ++++++---- configs/stm3240g-eval/src/up_adc.c | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/configs/stm3210e-eval/src/up_adc.c b/configs/stm3210e-eval/src/up_adc.c index ee3eee6701a..8f2cfbd38bd 100644 --- a/configs/stm3210e-eval/src/up_adc.c +++ b/configs/stm3210e-eval/src/up_adc.c @@ -47,6 +47,8 @@ #include "chip.h" #include "up_arch.h" + +#include "stm32_pwm.h" #include "stm3210e-internal.h" #ifdef CONFIG_ADC @@ -74,7 +76,7 @@ /* The number of ADC channels in the conversion list */ -#define ADC_NCHANNELS 3 +#define ADC_NCHANNELS 2 /************************************************************************************ * Private Data @@ -82,11 +84,11 @@ /* Identifying number of each ADC channel: Variable Resistor , BNC_CN5 and BNC_CN3 */ -static const uint8_t g_chanlist[ADC_NCHANNELS] = {14, 10, 12}; +static const uint8_t g_chanlist[ADC_NCHANNELS] = {14, 10}; /* Configurations of pins used byte each ADC channels */ -static const uint32_t g_pinlist[ADC_NCHANNELS] = {GPIO_ADC1_IN14 , GPIO_ADC1_IN10, GPIO_ADC1_IN13}; +static const uint32_t g_pinlist[ADC_NCHANNELS] = {GPIO_ADC1_IN14 , GPIO_ADC1_IN10}; /************************************************************************************ * Private Functions @@ -118,7 +120,7 @@ int adc_devinit(void) for(i = 0; i < ADC_NCHANNELS; i++) { - stm32_configgpio(chanlist[i]); + stm32_configgpio(g_chanlist[i]); } /* Call stm32_adcinitialize() to get an instance of the ADC interface */ diff --git a/configs/stm3240g-eval/src/up_adc.c b/configs/stm3240g-eval/src/up_adc.c index 7abad065307..c96c2b6063c 100644 --- a/configs/stm3240g-eval/src/up_adc.c +++ b/configs/stm3240g-eval/src/up_adc.c @@ -47,6 +47,8 @@ #include "chip.h" #include "up_arch.h" + +#include "stm32_pwm.h" #include "stm3240g-internal.h" #ifdef CONFIG_ADC