From b5a5ba0335a35555f062f7604377339552454886 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 27 Feb 2013 15:16:46 +0000 Subject: Fix NuTiny-SDK-NUC120 LEDs git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5679 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/nutiny-nuc120/src/nuc_led.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'nuttx/configs/nutiny-nuc120') diff --git a/nuttx/configs/nutiny-nuc120/src/nuc_led.c b/nuttx/configs/nutiny-nuc120/src/nuc_led.c index 2482e7da0..64c34ad2b 100644 --- a/nuttx/configs/nutiny-nuc120/src/nuc_led.c +++ b/nuttx/configs/nutiny-nuc120/src/nuc_led.c @@ -76,20 +76,30 @@ * Definitions ****************************************************************************/ -/* Enables debug output from this file (needs CONFIG_DEBUG with - * CONFIG_DEBUG_VERBOSE too) +/* CONFIG_DEBUG_LEDS enables debug output from this file (needs CONFIG_DEBUG + * with CONFIG_DEBUG_VERBOSE too) */ -#undef LED_DEBUG /* Define to enable debug */ - -#ifdef LED_DEBUG +#ifdef CONFIG_DEBUG_LEDS # define leddbg lldbg -# define ledvdbg llvdbg +# ifdef CONFIG_DEBUG_VERBOSE +# define ledvdbg lldbg +# else +# define ledvdbg(x...) +# endif #else # define leddbg(x...) # define ledvdbg(x...) #endif +/* Dump GPIO registers */ + +#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_LEDS) +# define led_dumpgpio(m) nuc_dumpgpio(GPIO_LED, m) +#else +# define led_dumpgpio(m) +#endif + /**************************************************************************** * Private Data ****************************************************************************/ @@ -112,7 +122,9 @@ void nuc_ledinit(void) { + led_dumpgpio("Before configuration"); nuc_configgpio(GPIO_LED); + led_dumpgpio("After configuration"); } /**************************************************************************** -- cgit v1.2.3