diff options
Diffstat (limited to 'apps/examples/cdcacm/cdcacm_main.c')
-rw-r--r-- | apps/examples/cdcacm/cdcacm_main.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/apps/examples/cdcacm/cdcacm_main.c b/apps/examples/cdcacm/cdcacm_main.c index 94afe3a58..aeb7a9e74 100644 --- a/apps/examples/cdcacm/cdcacm_main.c +++ b/apps/examples/cdcacm/cdcacm_main.c @@ -81,7 +81,6 @@ struct cdcacm_state_s g_cdcacm; int sercon_main(int argc, char *argv[]) { - FAR void *handle; int ret; /* Check if there is a non-NULL USB mass storage device handle (meaning that the @@ -94,7 +93,13 @@ int sercon_main(int argc, char *argv[]) return EXIT_FAILURE; } - /* Initialize the USB serial driver */ + /* Then, in any event, enable trace data collection as configured BEFORE + * enabling the CDC/ACM device. + */ + + usbtrace_enable(TRACE_BITSET); + + /* Initialize the USB CDC/ACM serial driver */ message("sercon: Registering CDC/ACM serial driver\n"); ret = cdcacm_initialize(CONFIG_EXAMPLES_CDCACM_DEVMINOR, &g_cdcacm.handle); @@ -127,6 +132,12 @@ int serdis_main(int argc, char *argv[]) return EXIT_FAILURE; } + /* Then, in any event, disable trace data collection as configured BEFORE + * enabling the CDC/ACM device. + */ + + usbtrace_enable(0); + /* Then disconnect the device and uninitialize the USB mass storage driver */ cdcacm_uninitialize(g_cdcacm.handle); |