diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-03-18 16:33:36 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-03-18 16:33:36 -0600 |
commit | 55501e4557fb75cd52667e3e0cdf19107de2a0d8 (patch) | |
tree | 1dfc06ef47f631fadd211dd3aa282ac3e121341b | |
parent | 7bd5c3fd4cb1811f3207ccf4e1b270db5bb42e48 (diff) | |
download | px4-nuttx-55501e4557fb75cd52667e3e0cdf19107de2a0d8.tar.gz px4-nuttx-55501e4557fb75cd52667e3e0cdf19107de2a0d8.tar.bz2 px4-nuttx-55501e4557fb75cd52667e3e0cdf19107de2a0d8.zip |
SAM4E UDP: Add support for USB monitor
-rw-r--r-- | nuttx/configs/sam4e-ek/README.txt | 6 | ||||
-rw-r--r-- | nuttx/configs/sam4e-ek/src/sam4e-ek.h | 22 | ||||
-rw-r--r-- | nuttx/configs/sam4e-ek/src/sam_nsh.c | 1 |
3 files changed, 23 insertions, 6 deletions
diff --git a/nuttx/configs/sam4e-ek/README.txt b/nuttx/configs/sam4e-ek/README.txt index e77ebfc15..f045c64a2 100644 --- a/nuttx/configs/sam4e-ek/README.txt +++ b/nuttx/configs/sam4e-ek/README.txt @@ -593,7 +593,7 @@ USB Full-Speed Device Basic USB Full-Speed Device Configuration ----------------------------------------- - Support the USB high-speed device (UDPHS) driver can be enabled with these + Support the USB full-speed device (UDP) driver can be enabled with these NuttX configuration settings. Device Drivers -> USB Device Driver Support @@ -611,7 +611,7 @@ USB Full-Speed Device ------------------ The Mass Storage Class (MSC) class driver can be selected for use with - UDPHS. Note: The following assumes that the internal AT24 Serial FLASH + UDP. Note: The following assumes that the internal AT24 Serial FLASH is configured to support a FAT file system through an FTL layer as described about under "AT25 Serial FLASH". @@ -689,7 +689,7 @@ USB Full-Speed Device There is normal console debug output available that can be enabled with CONFIG_DEBUG + CONFIG_DEBUG_USB. However, USB device operation is very time critical and enabling this debug output WILL interfere with the - operation of the UDPHS. USB device tracing is a less invasive way to get + operation of the UDP. USB device tracing is a less invasive way to get debug information: If tracing is enabled, the USB device will save encoded trace output in in-memory buffer; if the USB monitor is also enabled, that trace buffer will be periodically emptied and dumped to the diff --git a/nuttx/configs/sam4e-ek/src/sam4e-ek.h b/nuttx/configs/sam4e-ek/src/sam4e-ek.h index b798182e1..34589592e 100644 --- a/nuttx/configs/sam4e-ek/src/sam4e-ek.h +++ b/nuttx/configs/sam4e-ek/src/sam4e-ek.h @@ -57,6 +57,8 @@ #define HAVE_HSMCI 1 #define HAVE_AT25 1 +#define HAVE_USBDEV 1 +#define HAVE_USBMONITOR 1 /* HSMCI */ /* Can't support MMC/SD if the card interface is not enabled */ @@ -112,10 +114,24 @@ # undef CONFIG_SAM4EEK_AT25_NXFFS #endif -/* Touchscreen controller (TSC) */ +/* USB Device */ +/* CONFIG_SAM34_UDP and CONFIG_USBDEV must be defined, or there is no USB + * device. + */ + +#if !defined(CONFIG_SAM34_UDP) || !defined(CONFIG_USBDEV) +# undef HAVE_USBDEV +#endif + +/* Check if we should enable the USB monitor before starting NSH */ -#define CONFIG_TSC_ADS7843 1 /* ADS7843 present on board */ -#define CONFIG_TSC_SPI 0 /* On SPI0 */ +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#if !defined(CONFIG_SYSTEM_USBMONITOR) && !defined(CONFIG_USBDEV_TRACE) +# undef HAVE_USBMONITOR +#endif /* External Memory Usage ************************************************************/ /* LCD on CS2 */ diff --git a/nuttx/configs/sam4e-ek/src/sam_nsh.c b/nuttx/configs/sam4e-ek/src/sam_nsh.c index 7d47ca334..a103ceaab 100644 --- a/nuttx/configs/sam4e-ek/src/sam_nsh.c +++ b/nuttx/configs/sam4e-ek/src/sam_nsh.c @@ -119,6 +119,7 @@ int nsh_archinitialize(void) if (ret != OK) { message("nsh_archinitialize: Start USB monitor: %d\n", ret); + return ret; } #endif |