diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-10-08 14:59:10 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-10-08 14:59:10 -0600 |
commit | 14306ef863a31b5983c13e276837a55f9c834a2c (patch) | |
tree | 4c9ed2b57125c6890005fb6166926b3847e47cb6 /nuttx/configs/lpcxpresso-lpc1768 | |
parent | ea13b6e3d0dc0770d4c493ee7a6d1d9f9b884a45 (diff) | |
download | px4-nuttx-14306ef863a31b5983c13e276837a55f9c834a2c.tar.gz px4-nuttx-14306ef863a31b5983c13e276837a55f9c834a2c.tar.bz2 px4-nuttx-14306ef863a31b5983c13e276837a55f9c834a2c.zip |
All USB MSC-related files under nuttx/configs changed to use the corrected syslog interfaces
Diffstat (limited to 'nuttx/configs/lpcxpresso-lpc1768')
-rw-r--r-- | nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c | 47 |
1 files changed, 13 insertions, 34 deletions
diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c index 291f244d9..6ece90204 100644 --- a/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c +++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c @@ -42,7 +42,7 @@ #include <nuttx/config.h> #include <stdio.h> -#include <debug.h> +#include <syslog.h> #include <errno.h> #include <nuttx/spi/spi.h> @@ -70,27 +70,6 @@ # error "Unrecognized LPC17xx 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,34 +89,34 @@ int usbmsc_archinitialize(void) /* Get the SPI port */ - message("usbmsc_archinitialize: Initializing SPI port %d\n", - LPC17XX_MMCSDSPIPORTNO); + syslog(LOG_INFO, "Initializing SPI port %d\n", LPC17XX_MMCSDSPIPORTNO); spi = lpc17_sspinitialize(LPC17XX_MMCSDSPIPORTNO); if (!spi) { - message("usbmsc_archinitialize: Failed to initialize SPI port %d\n", - LPC17XX_MMCSDSPIPORTNO); + syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n", + LPC17XX_MMCSDSPIPORTNO); return -ENODEV; } - message("usbmsc_archinitialize: Successfully initialized SPI port %d\n", - LPC17XX_MMCSDSPIPORTNO); + syslog(LOG_INFO, "Successfully initialized SPI port %d\n", + LPC17XX_MMCSDSPIPORTNO); /* Bind the SPI port to the slot */ - message("usbmsc_archinitialize: Binding SPI port %d to MMC/SD slot %d\n", - LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); + syslog(LOG_INFO, "Binding SPI port %d to MMC/SD slot %d\n", + LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); ret = mmcsd_spislotinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi); if (ret < 0) { - message("usbmsc_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", - LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO, ret); + syslog(LOG_ERR, + "ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", + LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO, ret); return ret; } - message("usbmsc_archinitialize: Successfuly bound SPI port %d to MMC/SD slot %d\n", - LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); + syslog(LOG_INFO, "Successfully bound SPI port %d to MMC/SD slot %d\n", + LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); return OK; } |