I am currently working on porting https://github.com/rppicomidi/midi2usbhost to support USB host and device mode without providing different firmware and noticed that TinyUSB currently doesn't support compiling with USB host and device support at the same time.
Describe the solution you'd like
I would like to be able to deal with USB host and device switching in software. It would be great if the tuh* and tud functions would be available and could be either controlled in software or a GPIO. This would significantly reduce the workflow when dealing with my USB Type-C Host + Device.
It is either powered by the Type-C connector to be used as a MIDI Device or for providing VUSB for the Type-A connector (I am using a USB Mux to switch the data lines from Type-C to Type-A via a GPIO and a MOSFET to control VUSB supply to Type-A via software.
I have checked existing issues, dicussion and documentation
[X] I confirm I have checked existing issues, dicussion and documentation.
Related area
host + device stack
Hardware specification
rp2040
Is your feature request related to a problem?
I am currently working on porting https://github.com/rppicomidi/midi2usbhost to support USB host and device mode without providing different firmware and noticed that TinyUSB currently doesn't support compiling with USB host and device support at the same time.
Describe the solution you'd like
I would like to be able to deal with USB host and device switching in software. It would be great if the tuh* and tud functions would be available and could be either controlled in software or a GPIO. This would significantly reduce the workflow when dealing with my USB Type-C Host + Device.
ser-images.githubusercontent.com/6614616/199957627-fc01223d-1d22-4788-84da-074136017c9b.png)
It is either powered by the Type-C connector to be used as a MIDI Device or for providing VUSB for the Type-A connector (I am using a USB Mux to switch the data lines from Type-C to Type-A via a GPIO and a MOSFET to control VUSB supply to Type-A via software.
I have checked existing issues, dicussion and documentation