Adafruit_TinyUSB_Arduino icon indicating copy to clipboard operation
Adafruit_TinyUSB_Arduino copied to clipboard

Switch between USB Host and USB Device modes

Open doctea opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. I am working on an RP2040 project where sometimes it would be useful to use it as a USB MIDI host, other times as a USB MIDI device. The hardware I'm building on doesn't provide for adding the "second" USB port on GPIO, so it'd be great to be able to switch between the two without requiring recompilation.

Describe the solution you'd like Most ideal would be if it were possible to switch between host and device mode on the fly, without rebooting the MCU.

Alternatively, being able to choose which mode to start in without requiring recompilation could work (eg a 'reboot into device mode', 'reboot into host mode' option that sets a flag in flash that chooses which mode the USB starts up in.

I appreciate this might not be a trivial feature, but it would be really useful.

doctea avatar Aug 04 '24 13:08 doctea