Directories where the same source files are used to build different objects need to keep those objects in separate directories; LPC17xx updates from Chris Taglia

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5762 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2013-03-19 23:40:07 +00:00
parent 289c59cdf7
commit b9bb22d564
3 changed files with 6 additions and 7 deletions

View File

@ -395,7 +395,7 @@ config ADC0_SPS
config ADC_CHANLIST config ADC_CHANLIST
bool "Use ADC channel list" bool "Use ADC channel list"
default n default n
---help-- ---help---
The errata that states: "A/D Global Data register should not be used The errata that states: "A/D Global Data register should not be used
with burst mode or hardware triggering". If this option is selected, with burst mode or hardware triggering". If this option is selected,
then the ADC driver will grab from the individual channel registers then the ADC driver will grab from the individual channel registers
@ -415,7 +415,7 @@ config ADC_NCHANNELS
int "ADC0 number of channels" int "ADC0 number of channels"
depends on LPC17_ADC depends on LPC17_ADC
default 0 default 0
---help-- ---help---
If CONFIG_ADC_CHANLIST is enabled, then the platform specific code If CONFIG_ADC_CHANLIST is enabled, then the platform specific code
must do two things: (1) define ADC_NCHANNELS in the configuration must do two things: (1) define ADC_NCHANNELS in the configuration
file and (2) provide an array g_adc_chanlist[] with the channel file and (2) provide an array g_adc_chanlist[] with the channel

View File

@ -329,12 +329,12 @@ static int adc_interrupt(int irq, void *context)
int i; int i;
regval = getreg32(LPC17_ADC_GDR); regval = getreg32(LPC17_ADC_GDR);
for(i = 0; i < CONFIG_ADC_NCHANNELS; i++ for (i = 0; i < CONFIG_ADC_NCHANNELS; i++)
{ {
ch = g_adc_chanlist[i]; ch = g_adc_chanlist[i];
regval = getreg32(LPC17_ADC_DR(ch)); regval = getreg32(LPC17_ADC_DR(ch));
if(regval&ADC_DR_DONE) if (regval&ADC_DR_DONE)
{ {
priv->count[ch]++; priv->count[ch]++;
priv->buf[ch] += regval & 0xfff0; priv->buf[ch] += regval & 0xfff0;

View File

@ -94,7 +94,7 @@ extern "C"
#ifdef CONFIG_ADC_CHANLIST #ifdef CONFIG_ADC_CHANLIST
EXTERN uint8_t g_adc_chanlist[CONFIG_ADC_NCHANNELS]; EXTERN uint8_t g_adc_chanlist[CONFIG_ADC_NCHANNELS];
#endiff #endif
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
@ -119,6 +119,5 @@ FAR struct adc_dev_s *lpc17_adcinitialize(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_ADC_H */ #endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_ADC_H */