summaryrefslogtreecommitdiff
path: root/nuttx/examples
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-10-27 13:13:09 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-10-27 13:13:09 +0000
commit5fdf0f2cfb0ef7e7a15a7d67e7819c23244723ff (patch)
treef78b0e7fbf760398ae6b7c8d5453f81fedd8ac80 /nuttx/examples
parentcbe7ddd5cdb08d885e022679fff5dd0918ce6215 (diff)
downloadpx4-nuttx-5fdf0f2cfb0ef7e7a15a7d67e7819c23244723ff.tar.gz
px4-nuttx-5fdf0f2cfb0ef7e7a15a7d67e7819c23244723ff.tar.bz2
px4-nuttx-5fdf0f2cfb0ef7e7a15a7d67e7819c23244723ff.zip
Make trace data enable-able by id
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1080 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples')
-rw-r--r--nuttx/examples/usbstorage/usbstrg_main.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/nuttx/examples/usbstorage/usbstrg_main.c b/nuttx/examples/usbstorage/usbstrg_main.c
index a0db2aa5d..a581d356d 100644
--- a/nuttx/examples/usbstorage/usbstrg_main.c
+++ b/nuttx/examples/usbstorage/usbstrg_main.c
@@ -45,6 +45,7 @@
#include <debug.h>
#include <nuttx/usbdev.h>
+#include <nuttx/usbdev_trace.h>
#include "usbstrg.h"
@@ -82,6 +83,24 @@ int user_start(int argc, char *argv[])
void *handle;
int ret;
+ /* Initialize USB trace output IDs */
+
+ usbtrace_enable(
+ TRACE_INIT_BIT| /* Initialization events */
+ TRACE_EP_BIT| /* Endpoint API calls */
+ TRACE_DEV_BIT| /* USB device API calls */
+ TRACE_CLASS_BIT| /* USB class driver API calls */
+ TRACE_CLASSAPI_BIT| /* Other class driver system API calls */
+ TRACE_CLASSSTATE_BIT| /* Track class driver state changes */
+ TRACE_OUTREQQUEUED_BIT| /* Request queued for OUT endpoint */
+ TRACE_INREQQUEUED_BIT| /* Request queued for IN endpoint */
+ TRACE_READ_BIT| /* Read (OUT) action */
+ TRACE_WRITE_BIT| /* Write (IN) action */
+ TRACE_COMPLETE_BIT| /* Request completed */
+ TRACE_DEVERROR_BIT| /* USB controller driver error event */
+ TRACE_CLSERROR_BIT /* USB class driver error event */
+ );
+
/* Register block drivers (architecture-specific) */
message("user_start: Creating block drivers\n");