All USB Composite-related files under nuttx/configs changed to use the corrected syslog interfaces

This commit is contained in:
Gregory Nutt
2014-10-08 15:13:00 -06:00
parent a9fa023ae1
commit 2199c2b1fc
6 changed files with 49 additions and 171 deletions
+10 -28
View File
@@ -116,22 +116,6 @@
# undef HAVE_USBMONITOR
#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
/****************************************************************************
* Private Functions
****************************************************************************/
@@ -155,33 +139,31 @@ static int do_composite_archinitialize(void)
/* Get the SPI port */
message("nsh_archinitialize: Initializing SPI port %d\n",
CONFIG_SPARK_FLASH_SPI);
fvdbg("Initializing SPI port %d\n", CONFIG_SPARK_FLASH_SPI);
spi = up_spiinitialize(CONFIG_SPARK_FLASH_SPI);
if (!spi)
{
message("nsh_archinitialize: ERROR: Failed to initialize SPI port %d\n",
CONFIG_SPARK_FLASH_SPI);
fdbg("ERROR: Failed to initialize SPI port %d\n",
CONFIG_SPARK_FLASH_SPI);
return -ENODEV;
}
message("nsh_archinitialize: Successfully initialized SPI port %d\n",
CONFIG_SPARK_FLASH_SPI);
fvdbg("Successfully initialized SPI port %d\n", CONFIG_SPARK_FLASH_SPI);
/* Now bind the SPI interface to the SST25 SPI FLASH driver */
message("nsh_archinitialize: Bind SPI to the SPI flash driver\n");
fvdbg("Bind SPI to the SPI flash driver\n");
mtd = sst25_initialize(spi);
if (!mtd)
{
message("nsh_archinitialize: Failed to bind SPI port %d to the SPI FLASH driver\n",
CONFIG_SPARK_FLASH_SPI);
fdbg("ERROR: Failed to bind SPI port %d to the SPI FLASH driver\n",
CONFIG_SPARK_FLASH_SPI);
}
else
{
message("nsh_archinitialize: Successfully bound SPI port %d to the SPI FLASH driver\n",
CONFIG_SPARK_FLASH_SPI);
fvdbg("Successfully bound SPI port %d to the SPI FLASH driver\n",
CONFIG_SPARK_FLASH_SPI);
}
#ifndef CONFIG_SPARK_FLASH_PART
@@ -289,7 +271,7 @@ static int do_composite_archinitialize(void)
ret = usbmonitor_start(0, NULL);
if (ret != OK)
{
message("nsh_archinitialize: Start USB monitor: %d\n", ret);
fdbg("ERROR: Failed to start USB monitor: %d\n", ret);
}
#endif