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