Add detach/attach re-enumeration after MIDI interface added
This commit is contained in:
1 parent
5fdf45aa14
commit
9ebd568b9c
1 file changed
+7
@@ -18,6 +18,13 @@ bool UsbMidiTransport::begin() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (TinyUSBDevice.mounted()) {
|
||||
Serial.println("[MIDI] Re-enumerating with MIDI interface...");
|
||||
TinyUSBDevice.detach();
|
||||
delay(10);
|
||||
TinyUSBDevice.attach();
|
||||
}
|
||||
|
||||
initialized = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user