summaryrefslogtreecommitdiff
path: root/nuttx/configs/stm3210e-eval
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-12-20 00:30:12 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-12-20 00:30:12 +0000
commitc4080df06cc977a0801794b83a51f6739e347379 (patch)
tree69a06e4f9b24ba1b220778fc23922e7ed1bb5b05 /nuttx/configs/stm3210e-eval
parent5fb7939d769fb3f1f84721cb0056d0cc621f05e2 (diff)
downloadpx4-nuttx-c4080df06cc977a0801794b83a51f6739e347379.tar.gz
px4-nuttx-c4080df06cc977a0801794b83a51f6739e347379.tar.bz2
px4-nuttx-c4080df06cc977a0801794b83a51f6739e347379.zip
ADC driver update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4203 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/stm3210e-eval')
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_adc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/nuttx/configs/stm3210e-eval/src/up_adc.c b/nuttx/configs/stm3210e-eval/src/up_adc.c
index ee3eee670..8f2cfbd38 100644
--- a/nuttx/configs/stm3210e-eval/src/up_adc.c
+++ b/nuttx/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 */