-
Notifications
You must be signed in to change notification settings - Fork 921
Added dev_cdc example #561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It demonstrates how to use TinyUSB with a CDC interface while using the Pico SDK stdio USB. Signed-off-by: paulober <[email protected]>
I know this PR is still in draft, so you may already be planning this, but a brief |
Signed-off-by: paulober <[email protected]>
Thanks for the reminder. I added a section to the README. |
Not sure if we would also expose the RESET interface? |
can you please add license to c/h source files:
You can add your name too. |
Signed-off-by: paulober <[email protected]>
Sure, added. |
if (tud_cdc_n_connected(0)) { | ||
// print on CDC 0 some debug message | ||
printf("Connected to CDC 0\n"); | ||
sleep_ms(5000); // wait for 5 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that custom_cdc_task
is called from within the main loop, does this sleep
here mean that once CDC 0 is connected, tud_task
will only get called once every 5 seconds? 🤔 (and doesn't tud_task
need to get called more often than that in order to keep the USB connection alive?)
NULL, // 3: Serials (null so it uses unique ID if available) | ||
"Pico SDK stdio" // 4: CDC Interface 0 | ||
"Custom CDC", // 5: CDC Interface 1, | ||
"RPiReset" // 6: Reset Interface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this "RPiReset" isn't used anywhere?
It demonstrates how to use TinyUSB with a CDC
interface while using the Pico SDK stdio USB.