mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
All USB Composite-related files under nuttx/configs changed to use the corrected syslog interfaces
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user