Skip to content

Conversation

@paulober
Copy link
Contributor

@paulober paulober commented Oct 9, 2024

It demonstrates how to use TinyUSB with a CDC
interface while using the Pico SDK stdio USB.

It demonstrates how to use TinyUSB with a CDC
interface while using the Pico SDK stdio USB.

Signed-off-by: paulober <[email protected]>
@lurch
Copy link
Contributor

lurch commented Oct 10, 2024

I know this PR is still in draft, so you may already be planning this, but a brief README.md explaining what this example does, and how to use it (e.g. does it appear on the host as two separate /dev/ttyACM devices?) would be really useful.

@paulober
Copy link
Contributor Author

I know this PR is still in draft, so you may already be planning this, but a brief README.md explaining what this example does, and how to use it (e.g. does it appear on the host as two separate /dev/ttyACM devices?) would be really useful.

Thanks for the reminder. I added a section to the README.

@paulober paulober marked this pull request as ready for review October 15, 2024 13:35
@paulober
Copy link
Contributor Author

paulober commented Oct 15, 2024

Not sure if we would also expose the RESET interface?
I have some WIP on this but I doesn't get detected correctly at the moment.
WorkInProgressResetInterface.patch

@kilograham
Copy link
Contributor

can you please add license to c/h source files:

/**
 * Copyright (c) 2023 Raspberry Pi (Trading) Ltd.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

You can add your name too.

@paulober
Copy link
Contributor Author

can you please add license to c/h source files

Sure, added.

@kilograham kilograham merged commit b87dabf into raspberrypi:develop Feb 13, 2025
@kilograham kilograham added this to the 2.1.1 milestone Feb 13, 2025
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
Copy link
Contributor

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
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants