summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-07-03 01:35:53 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-07-03 01:35:53 +0000
commitd7e965833f00661022a5c19bc9c338a5681e15ad (patch)
treee7da888c5e9e355a426b72104197037e22991e80
parente7113063077b6eed6deed299e69e1c7f71f715aa (diff)
downloadnuttx-d7e965833f00661022a5c19bc9c338a5681e15ad.tar.gz
nuttx-d7e965833f00661022a5c19bc9c338a5681e15ad.tar.bz2
nuttx-d7e965833f00661022a5c19bc9c338a5681e15ad.zip
GPIO debug-related fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2767 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/Documentation/NuttXBanner.html4
-rwxr-xr-xnuttx/arch/arm/src/lpc17xx/Make.defs6
-rwxr-xr-xnuttx/arch/arm/src/lpc17xx/lpc17_gpio.c2
-rwxr-xr-xnuttx/arch/arm/src/lpc17xx/lpc17_gpiodbg.c10
-rwxr-xr-xnuttx/configs/nucleus2g/src/up_leds.c36
5 files changed, 47 insertions, 11 deletions
diff --git a/nuttx/Documentation/NuttXBanner.html b/nuttx/Documentation/NuttXBanner.html
index f9f7b2612..35d44bfa5 100644
--- a/nuttx/Documentation/NuttXBanner.html
+++ b/nuttx/Documentation/NuttXBanner.html
@@ -20,6 +20,10 @@
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=189573&type=8" width="80" height="15" border="0" alt="Get NuttX at SourceForge.net. Fast, secure and Free Open Source software downloads" />
</a>
</td>
+ <td width="100" height="100" rowspan="2">
+ <a href="http://download.famouswhy.com/nuttx/" target="_blank">
+ <img src="http://download.famouswhy.com/awards/Famous_Software_Award_Logo.png" alt="NuttX" style="border:0" width="100"></a>
+ </td>
</tr>
<tr>
<td align="left" valign="bottom">
diff --git a/nuttx/arch/arm/src/lpc17xx/Make.defs b/nuttx/arch/arm/src/lpc17xx/Make.defs
index 718bbfe7b..c5d38b15c 100755
--- a/nuttx/arch/arm/src/lpc17xx/Make.defs
+++ b/nuttx/arch/arm/src/lpc17xx/Make.defs
@@ -52,8 +52,8 @@ CMN_CSRCS = up_assert.c up_blocktask.c up_copystate.c up_createstack.c \
CHIP_ASRCS =
CHIP_CSRCS = lpc17_allocateheap.c lpc17_clockconfig.c lpc17_gpio.c \
- lpc17_gpioint.c lpc17_irq.c lpc17_lowputc.c lpc17_serial.c \
- lpc17_spi.c lpc17_ssp.c lpc17_start.c lpc17_timerisr.c
+ lpc17_irq.c lpc17_lowputc.c lpc17_serial.c lpc17_spi.c \
+ lpc17_ssp.c lpc17_start.c lpc17_timerisr.c
# Configuration-dependent LPC17xx files
@@ -61,7 +61,7 @@ ifeq ($(CONFIG_GPIO_IRQ),y)
CHIP_CSRCS += lpc17_gpioint.c
endif
-ifeq ($(CONFIG_DEBUG),y)
+ifeq ($(CONFIG_DEBUG_GPIO),y)
CHIP_CSRCS += lpc17_gpiodbg.c
endif
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c b/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c
index aaa8fc15e..84fd5b4e6 100755
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_gpio.c
@@ -611,8 +611,8 @@ void lpc17_gpiowrite(uint16_t pinset, bool value)
offset = LPC17_FIO_SET_OFFSET;
}
else
- offset = LPC17_FIO_CLR_OFFSET;
{
+ offset = LPC17_FIO_CLR_OFFSET;
}
putreg32((1 << pin), fiobase + offset);
}
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_gpiodbg.c b/nuttx/arch/arm/src/lpc17xx/lpc17_gpiodbg.c
index aa2e855f5..6fe777de1 100755
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_gpiodbg.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_gpiodbg.c
@@ -156,12 +156,12 @@ int lpc17_dumpgpio(uint16_t pinset, const char *msg)
base = g_intbase[port];
lldbg(" IOINTSTATUS[%08x]: %08x INTSTATR[%08x]: %08x INSTATF[%08x]: %08x\n",
- base+LPC17_GPIOINT_IOINTSTATUS_OFFSET, getreg32(base+LPC17_GPIOINT_IOINTSTATUS_OFFSET),
- base+LPC17_GPIOINT_INTSTATR_OFFSET, getreg32(base+LPC17_GPIOINT_INTSTATR_OFFSET),
- base+LPC17_GPIOINT_INTSTATF_OFFSET, getreg32(base+LPC17_GPIOINT_INTSTATF_OFFSET));
+ LPC17_GPIOINT_IOINTSTATUS, getreg32(LPC17_GPIOINT_IOINTSTATUS),
+ base+LPC17_GPIOINT_INTSTATR_OFFSET, getreg32(base+LPC17_GPIOINT_INTSTATR_OFFSET),
+ base+LPC17_GPIOINT_INTSTATF_OFFSET, getreg32(base+LPC17_GPIOINT_INTSTATF_OFFSET));
lldbg(" INTENR[%08x]: %08x INTENF[%08x]: %08x\n",
- base+LPC17_GPIOINT_INTENR_OFFSET, getreg32(base+LPC17_GPIOINT_INTENR_OFFSET),
- base+LPC17_GPIOINT_INTENF_OFFSET, getreg32(base+LPC17_GPIOINT_INTENF_OFFSET));
+ base+LPC17_GPIOINT_INTENR_OFFSET, getreg32(base+LPC17_GPIOINT_INTENR_OFFSET),
+ base+LPC17_GPIOINT_INTENF_OFFSET, getreg32(base+LPC17_GPIOINT_INTENF_OFFSET));
irqrestore(flags);
return OK;
}
diff --git a/nuttx/configs/nucleus2g/src/up_leds.c b/nuttx/configs/nucleus2g/src/up_leds.c
index 2d91b52b8..cac3f89f6 100755
--- a/nuttx/configs/nucleus2g/src/up_leds.c
+++ b/nuttx/configs/nucleus2g/src/up_leds.c
@@ -75,16 +75,30 @@
* CONFIG_DEBUG_VERBOSE too)
*/
-#undef LED_DEBUG /* Define to enable debug */
+#undef LED_DEBUG /* Define to enable debug */
+#undef LED_VERBOSE /* Define to enable verbose debug */
#ifdef LED_DEBUG
# define leddbg lldbg
-# define ledvdbg llvdbg
+# ifdef LED_VERBOSE
+# define ledvdbg lldbg
+# else
+# define ledvdbg(x...)
+# endif
#else
+# undef LED_VERBOSE
# define leddbg(x...)
# define ledvdbg(x...)
#endif
+/* Dump GPIO registers */
+
+#ifdef LED_VERBOSE
+# define led_dumpgpio(m) lpc17_dumpgpio(NUCLEUS2G_LED1_A, m)
+#else
+# define led_dumpgpio(m)
+#endif
+
/****************************************************************************
* Private Data
****************************************************************************/
@@ -301,12 +315,16 @@ void up_ledinit(void)
{
/* Configure all LED GPIO lines */
+ led_dumpgpio("up_ledinit() Entry)");
+
lpc17_configgpio(NUCLEUS2G_LED1_A);
lpc17_configgpio(NUCLEUS2G_LED1_B);
lpc17_configgpio(NUCLEUS2G_LED2_A);
lpc17_configgpio(NUCLEUS2G_LED2_B);
lpc17_configgpio(NUCLEUS2G_HEARTBEAT);
lpc17_configgpio(NUCLEUS2G_EXTRA_LED);
+
+ led_dumpgpio("up_ledinit() Exit");
}
/****************************************************************************
@@ -318,6 +336,13 @@ void up_ledon(int led)
up_led1(g_led1on[led]);
up_led2(g_led2on[led]);
up_ledhb(g_ledhbon[led]);
+
+#ifdef LED_VERBOSE
+ if (led != LED_INIRQ)
+ {
+ led_dumpgpio("up_ledon() Exit");
+ }
+#endif
}
/****************************************************************************
@@ -329,6 +354,13 @@ void up_ledoff(int led)
up_led1(g_led1off[led]);
up_led2(g_led2off[led]);
up_ledhb(g_ledhboff[led]);
+
+#ifdef LED_VERBOSE
+ if (led != LED_INIRQ)
+ {
+ led_dumpgpio("up_ledoff() Exit");
+ }
+#endif
}
#endif /* CONFIG_ARCH_LEDS */