summaryrefslogtreecommitdiff
path: root/nuttx/configs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-12-17 00:21:10 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-12-17 00:21:10 +0000
commit92fa94abca72e56d10118754de5c419f392d6d5f (patch)
treeeb43fad1ef29effb3c92d57325fb5b5b550ef898 /nuttx/configs
parentca08ac22269b1fe54d9d959d5facf27e6ca322b5 (diff)
downloadpx4-nuttx-92fa94abca72e56d10118754de5c419f392d6d5f.tar.gz
px4-nuttx-92fa94abca72e56d10118754de5c419f392d6d5f.tar.bz2
px4-nuttx-92fa94abca72e56d10118754de5c419f392d6d5f.zip
STM32 ADC update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4194 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs')
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_adc.c12
1 files changed, 6 insertions, 6 deletions
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);