A little more work (but not much progress) on the PIC32 USB device driver

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4440 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-02-29 21:53:28 +00:00
parent fafd67fe82
commit f6004b3260
8 changed files with 113 additions and 18 deletions

View File

@@ -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);