summaryrefslogtreecommitdiff
path: root/nuttx/configs/sam3u-ek
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-10-08 14:59:10 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-10-08 14:59:10 -0600
commit14306ef863a31b5983c13e276837a55f9c834a2c (patch)
tree4c9ed2b57125c6890005fb6166926b3847e47cb6 /nuttx/configs/sam3u-ek
parentea13b6e3d0dc0770d4c493ee7a6d1d9f9b884a45 (diff)
downloadpx4-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/sam3u-ek')
-rw-r--r--nuttx/configs/sam3u-ek/src/up_usbmsc.c45
1 files changed, 12 insertions, 33 deletions
diff --git a/nuttx/configs/sam3u-ek/src/up_usbmsc.c b/nuttx/configs/sam3u-ek/src/up_usbmsc.c
index 99a8f365d..8c9262020 100644
--- a/nuttx/configs/sam3u-ek/src/up_usbmsc.c
+++ b/nuttx/configs/sam3u-ek/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/sdio.h>
@@ -67,26 +67,6 @@
#undef SAM_MMCSDSLOTNO
#define SAM_MMCSDSLOTNO 0
-/* 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
****************************************************************************/
@@ -106,34 +86,33 @@ int usbmsc_archinitialize(void)
/* First, get an instance of the SDIO interface */
- message("usbmsc_archinitialize: "
- "Initializing SDIO slot %d\n",
+ syslg(LOG_INFO, "Initializing SDIO slot %d\n",
SAM_MMCSDSLOTNO);
sdio = sdio_initialize(SAM_MMCSDSLOTNO);
if (!sdio)
{
- message("usbmsc_archinitialize: Failed to initialize SDIO slot %d\n",
- SAM_MMCSDSLOTNO);
+ syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n",
+ SAM_MMCSDSLOTNO);
return -ENODEV;
}
/* Now bind the SPI interface to the MMC/SD driver */
- message("usbmsc_archinitialize: "
- "Bind SDIO to the MMC/SD driver, minor=%d\n",
- CONFIG_SYSTEM_USBMSC_DEVMINOR1);
+ syslog(LOG_INFO, ""
+ "Bind SDIO to the MMC/SD driver, minor=%d\n",
+ CONFIG_SYSTEM_USBMSC_DEVMINOR1);
ret = mmcsd_slotinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1, sdio);
if (ret != OK)
{
- message("usbmsc_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("usbmsc_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 SAM3U10E-EVAL board supports a GPIO to detect if there is a card in