add dual-host-device-cdc-sdio-example #195
Open
+761
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds an example which implements a device which uses the USB peripheral in device mode offering two CDC interfaces and usb_sdio support including the picoloader reset interface as well as a usb host on the PIO-USB peripheral which supports a hub and connecting multiple CDC devices.
The example program will dump data seen on the first host CDC device to the first CDC device interface, and transparently transfers data between the second host CDC device and the second CDC device interface.
Confusing? :-)
tinyusb-device side (USB peripheral) - implements CDC0 and CDC1, and the picoloader reset interface. usb_sdio is attached to CDC0 so printf() and friends work.
tinyusb-host side (using PIO-USB via Pico-PIO-USB) supports a hub and up to two CDC devices (call them hCDC0 and hCDC1)
The example program will dump any data received from hCDC0 to CDC0, and will transparently transfer data between CDC1 and hCDC1.
Will require pico-sdk PR #2764 to work (raspberrypi/pico-sdk#2764)