diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-10-08 15:13:00 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-10-08 15:13:00 -0600 |
commit | b74e55965aa195b0c4a646bfcb06e523e3651c66 (patch) | |
tree | 5838606d0010327637c0f0d20a5e03b53764899f /nuttx/configs/stm3210e-eval | |
parent | 14306ef863a31b5983c13e276837a55f9c834a2c (diff) | |
download | nuttx-b74e55965aa195b0c4a646bfcb06e523e3651c66.tar.gz nuttx-b74e55965aa195b0c4a646bfcb06e523e3651c66.tar.bz2 nuttx-b74e55965aa195b0c4a646bfcb06e523e3651c66.zip |
All USB Composite-related files under nuttx/configs changed to use the corrected syslog interfaces
Diffstat (limited to 'nuttx/configs/stm3210e-eval')
-rw-r--r-- | nuttx/configs/stm3210e-eval/src/up_composite.c | 41 |
1 files changed, 11 insertions, 30 deletions
diff --git a/nuttx/configs/stm3210e-eval/src/up_composite.c b/nuttx/configs/stm3210e-eval/src/up_composite.c index daed11e70..2581d8213 100644 --- a/nuttx/configs/stm3210e-eval/src/up_composite.c +++ b/nuttx/configs/stm3210e-eval/src/up_composite.c @@ -75,26 +75,6 @@ # error "Unrecognized STM32 board" #endif -/* Debug ********************************************************************/ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG -# define message(...) lowsyslog(__VA_ARGS__) -# define msgflush() -# else -# define message(...) printf(__VA_ARGS__) -# define msgflush() fflush(stdout) -# endif -#else -# ifdef CONFIG_DEBUG -# define message lowsyslog -# define msgflush() -# else -# define message printf -# define msgflush() fflush(stdout) -# endif -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -110,7 +90,7 @@ int composite_archinitialize(void) { /* If system/composite is built as an NSH command, then SD slot should - * already have been initized in nsh_archinitialize() (see up_nsh.c). In + * already have been initialized in nsh_archinitialize() (see up_nsh.c). In * this case, there is nothing further to be done here. * * NOTE: CONFIG_NSH_BUILTIN_APPS is not a fool-proof indication that NSH @@ -123,30 +103,31 @@ int composite_archinitialize(void) /* First, get an instance of the SDIO interface */ - message("composite_archinitialize: Initializing SDIO slot %d\n", - STM32_MMCSDSLOTNO); + syslog(LOG_INFO, "Initializing SDIO slot %d\n", STM32_MMCSDSLOTNO); sdio = sdio_initialize(STM32_MMCSDSLOTNO); if (!sdio) { - message("composite_archinitialize: Failed to initialize SDIO slot %d\n", - STM32_MMCSDSLOTNO); + syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", + STM32_MMCSDSLOTNO); return -ENODEV; } /* Now bind the SDIO interface to the MMC/SD driver */ - message("composite_archinitialize: Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_SYSTEM_COMPOSITE_DEVMINOR1); + syslog(LOG_INFO, "Bind SDIO to the MMC/SD driver, minor=%d\n", + CONFIG_SYSTEM_COMPOSITE_DEVMINOR1); ret = mmcsd_slotinitialize(CONFIG_SYSTEM_COMPOSITE_DEVMINOR1, sdio); if (ret != OK) { - message("composite_archinitialize: Failed to bind SDIO to the MMC/SD driver: %d\n", - ret); + syslog(LOG_ERR, + "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", + ret); return ret; } - message("composite_archinitialize: Successfully bound SDIO to the MMC/SD driver\n"); + + syslog(LOG_INFO, "Successfully bound SDIO to the MMC/SD driver\n"); /* Then let's guess and say that there is a card in the slot. I need to check to * see if the STM3210E-EVAL board supports a GPIO to detect if there is a card in |