Selecting USB Host / Device on boot #3282
PinkPandaKatie
started this conversation in
General
Replies: 1 comment
|
I don't think what you want can be done in a straightforward manner. Changing between host and device mode is done through a It may be possible to do some very hacky bits by making a duplicate of the Adafruit_TinyUSB library and place everything there in another namespace, but I don't think it would be very pleasant to work with (if even really possible...) For the definitive answer, I would suggest checking the upstream library repo and posting something there... |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I would like to be able to switch between USB host mode and device mode on startup, but I have to either select usb=tinyusb or usb=tinyusb_host as a parameter. I thought maybe I could select host mode by not doing
Serial.beginand instead usingUSBHost.begin(whereUSBHostis an instance ofAdafruit_USBH_Host), but regardless, it still comes up as a CDC ACM device.If I select usb=tinyusb_host, then it never shows up as a device.
Any ideas on how to select this at runtime without hacking the SDK?
All reactions