From 25270695ee87bed9cf8d54a967477fcb9c879128 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 23 Apr 2013 08:47:21 -0600 Subject: [PATCH] LPC17xx ADC: Configure all ADC pins in the set, not just one. From MKannan --- ChangeLog | 3 +++ Documentation/.gitignore | 2 +- arch/arm/src/lpc17xx/lpc17_adc.c | 14 +++++++------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b71d23b67c..a4722d2e159 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4589,3 +4589,6 @@ * Documentation: The NuttX documentation now expects to find an auto-generated version of the configuration variable documentation at Documentation/NuttXConfigVariables.html (2014-4-22). + * arch/arm/src/lpc17xx/lpc17_adc.c: Only one ADC pin was configured. + Need to configure all that are in the ADC0 set. From MKannan + (2014-4-23). diff --git a/Documentation/.gitignore b/Documentation/.gitignore index b74e41a61d1..86d4e4ab8b3 100644 --- a/Documentation/.gitignore +++ b/Documentation/.gitignore @@ -1,3 +1,3 @@ TODO.txt ChangeLog.txt -NuttXConfigVariables.html +NuttXConfigVariables.* diff --git a/arch/arm/src/lpc17xx/lpc17_adc.c b/arch/arm/src/lpc17xx/lpc17_adc.c index ddf5b362f2a..8dbee61fdea 100644 --- a/arch/arm/src/lpc17xx/lpc17_adc.c +++ b/arch/arm/src/lpc17xx/lpc17_adc.c @@ -174,31 +174,31 @@ static void adc_reset(FAR struct adc_dev_s *dev) { lpc17_configgpio(GPIO_AD0p0); } - else if ((priv->mask & 0x02) != 0) + if ((priv->mask & 0x02) != 0) { lpc17_configgpio(GPIO_AD0p1); } - else if ((priv->mask & 0x04) != 0) + if ((priv->mask & 0x04) != 0) { lpc17_configgpio(GPIO_AD0p2); } - else if ((priv->mask & 0x08) != 0) + if ((priv->mask & 0x08) != 0) { lpc17_configgpio(GPIO_AD0p3); } - else if ((priv->mask & 0x10) != 0) + if ((priv->mask & 0x10) != 0) { lpc17_configgpio(GPIO_AD0p4); } - else if ((priv->mask & 0x20) != 0) + if ((priv->mask & 0x20) != 0) { lpc17_configgpio(GPIO_AD0p5); } - else if ((priv->mask & 0x40) != 0) + if ((priv->mask & 0x40) != 0) { lpc17_configgpio(GPIO_AD0p6); } - else if ((priv->mask & 0x80) != 0) + if ((priv->mask & 0x80) != 0) { lpc17_configgpio(GPIO_AD0p7); }