From 92fa94abca72e56d10118754de5c419f392d6d5f Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 17 Dec 2011 00:21:10 +0000 Subject: STM32 ADC update git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4194 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/stm3210e-eval/src/up_adc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'nuttx/configs') diff --git a/nuttx/configs/stm3210e-eval/src/up_adc.c b/nuttx/configs/stm3210e-eval/src/up_adc.c index 92e21a8e5..ee3eee670 100644 --- a/nuttx/configs/stm3210e-eval/src/up_adc.c +++ b/nuttx/configs/stm3210e-eval/src/up_adc.c @@ -74,19 +74,19 @@ /* The number of ADC channels in the conversion list */ -#define ADC_NCHANNELS 2 +#define ADC_NCHANNELS 3 /************************************************************************************ * Private Data ************************************************************************************/ -/* Identifying number of each ADC channel */ +/* Identifying number of each ADC channel: Variable Resistor , BNC_CN5 and BNC_CN3 */ -static const uint8_t g_chanlist[ADC_NCHANNELS] = {14, 10}; +static const uint8_t g_chanlist[ADC_NCHANNELS] = {14, 10, 12}; /* Configurations of pins used byte each ADC channels */ -static const uint32_t g_pinlist[ADC_NCHANNELS] = {GPIO_ADC1_IN14 , GPIO_ADC1_IN10}; +static const uint32_t g_pinlist[ADC_NCHANNELS] = {GPIO_ADC1_IN14 , GPIO_ADC1_IN10, GPIO_ADC1_IN13}; /************************************************************************************ * Private Functions @@ -114,14 +114,14 @@ int adc_devinit(void) avdbg("Entry\n"); - /* Configure the pins as analog inputs for the selected channels */^M + /* Configure the pins as analog inputs for the selected channels */ for(i = 0; i < ADC_NCHANNELS; i++) { stm32_configgpio(chanlist[i]); } - /* Call stm32_adcinitialize() to get an instance of the ADC interface */^M + /* Call stm32_adcinitialize() to get an instance of the ADC interface */ adc = stm32_adcinitialize(1, g_chanlist, ADC_NCHANNELS); -- cgit v1.2.3