Teensy 4.x - How to set both USB OTG ports to USB devices?

Status
Not open for further replies.

snooppy

Member
Hi,

Is there a way to use the 2nd OTG port as USB device instead of USB Host ?
I need to connect the Teensy to two different devices via USB, I can't install any driver or piece of code on these devices (industrial controllers) but they can recognize several USB devices such as mouse, keyboard, serial, memory, etc.

Can it be done in Arduino, my tweaking some of the usb.c lib files?

We're trying to minimize the cost and reuse a device already using the Teensy 4.0 and we don't want to have to add external USB controllers. Beside there is no room for it.

Thanks.
 
Yes, if you write the code for it.
Means: No, there is no ready to use code :)
But for minimizing cost in industry, it will be worth it. Would be nice if you publish the code, then.
 
I am surprised nobody had though of it.
I would have been nice to be able to be able to select what OTA USB port setting (Host, Serial, Serial+Mouse, Serial+Mouse+Keyboard, ...) in Arduino like it is today for the default wired USB.
I'll try do dig a little bit to see how it's done in Teensyduino. Not that I have the time for it, I have so many other project to finish. Probably something around usb.h, usb.c, etc.
 
Status
Not open for further replies.
Back
Top