I have a quick look in USBHost_t36 and could find any callbacks for when a device is claim / disconnected. Does such a thing exist?
I know for something like this, I can simply do the following:
However, if I have several objects, it's wasteful to be continuously checking these boolean values. It would be nice if there was a callback (even just a single one for the entire host port) that could notify my code so I can determine what is connected / has been disconnected in an efficient matter. Does this functionality already exist? If not I'll roll my own.
Code:
MIDIDevice_BigBuffer midi1(myusb);
MIDIDevice_BigBuffer midi2(myusb);
MIDIDevice_BigBuffer midi3(myusb);
MIDIDevice_BigBuffer midi4(myusb);
I know for something like this, I can simply do the following:
Code:
if (midi1) {
// do stuff
}
However, if I have several objects, it's wasteful to be continuously checking these boolean values. It would be nice if there was a callback (even just a single one for the entire host port) that could notify my code so I can determine what is connected / has been disconnected in an efficient matter. Does this functionality already exist? If not I'll roll my own.