diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-10-08 14:28:55 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-10-08 14:28:55 -0600 |
commit | ea13b6e3d0dc0770d4c493ee7a6d1d9f9b884a45 (patch) | |
tree | 03e459590b0f781d06f0f23fa6d84c1c31433a82 /nuttx/configs/stm3220g-eval | |
parent | fe77b16ab68a41379e4d9f84e5a29d6bd9fd1323 (diff) | |
download | nuttx-ea13b6e3d0dc0770d4c493ee7a6d1d9f9b884a45.tar.gz nuttx-ea13b6e3d0dc0770d4c493ee7a6d1d9f9b884a45.tar.bz2 nuttx-ea13b6e3d0dc0770d4c493ee7a6d1d9f9b884a45.zip |
All NSH-related files under nuttx/configs changed to use the corrected syslog interfaces
Diffstat (limited to 'nuttx/configs/stm3220g-eval')
-rw-r--r-- | nuttx/configs/stm3220g-eval/src/up_nsh.c | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/nuttx/configs/stm3220g-eval/src/up_nsh.c b/nuttx/configs/stm3220g-eval/src/up_nsh.c index c0f74edbd..5a4e588e2 100644 --- a/nuttx/configs/stm3220g-eval/src/up_nsh.c +++ b/nuttx/configs/stm3220g-eval/src/up_nsh.c @@ -42,7 +42,7 @@ #include <stdbool.h> #include <stdio.h> -#include <debug.h> +#include <syslog.h> #include <errno.h> #ifdef CONFIG_STM32_SPI1 @@ -118,22 +118,6 @@ # undef HAVE_USBHOST #endif -/* Debug ********************************************************************/ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG -# define message(...) lowsyslog(__VA_ARGS__) -# else -# define message(...) printf(__VA_ARGS__) -# endif -#else -# ifdef CONFIG_DEBUG -# define message lowsyslog -# else -# define message printf -# endif -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -167,7 +151,7 @@ int nsh_archinitialize(void) spi = up_spiinitialize(1); if (!spi) { - message("nsh_archinitialize: Failed to initialize SPI port 0\n"); + syslog(LOG_ERR, "ERROR: Failed to initialize SPI port 0\n"); return -ENODEV; } @@ -176,7 +160,7 @@ int nsh_archinitialize(void) mtd = m25p_initialize(spi); if (!mtd) { - message("nsh_archinitialize: Failed to bind SPI port 0 to the SPI FLASH driver\n"); + syslog(LOG_ERR, "ERROR: Failed to bind SPI port 0 to the SPI FLASH driver\n"); return -ENODEV; } @@ -188,13 +172,11 @@ int nsh_archinitialize(void) #ifdef HAVE_MMCSD /* First, get an instance of the SDIO interface */ - message("nsh_archinitialize: Initializing SDIO slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); sdio = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); if (!sdio) { - message("nsh_archinitialize: Failed to initialize SDIO slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); + syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", + CONFIG_NSH_MMCSDSLOTNO); return -ENODEV; } @@ -203,7 +185,7 @@ int nsh_archinitialize(void) ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, sdio); if (ret != OK) { - message("nsh_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; } @@ -223,7 +205,7 @@ int nsh_archinitialize(void) ret = stm32_usbhost_initialize(); if (ret != OK) { - message("nsh_archinitialize: Failed to initialize USB host: %d\n", ret); + syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); return ret; } #endif |