USBHost_t36 callbacks for device connected / disconnected etc?

Status
Not open for further replies.

Tenebrous

Member
Hi!

I've had a lot of success using USBHost_t36 and using a Teensy 3.6 to copy USB Midi data between devices.

However, I was wondering if there were any callbacks available from USBHost to let me know when a device had been connected or disconnected? Or if there are other approaches that people are using to do this?

At the moment I just loop through my list of MIDIDevice and check if any weren't connected which now are and vice versa.

Thanks!
T
 
Thanks for your reply - that's what I'm currently doing. It doesn't tell you if the device just connected of course, or if there was one that is now disconnected, but I'm handling that in my code anyway.

I was hoping for something like
Code:
USBHost usbHost;

void setup()
{
  usbHost.setDeviceConnected( myFunctionToHandleThis );
  usbHost.setDeviceDisconnected( myFunctionToHandleThisToo );
}
 
Ok i misunderstood your question, for what i see there's none, the way you are doing it is the right way
 
Status
Not open for further replies.
Back
Top