Fix crash/reboot: remove conflicting TinyUSB core sources from Adafruit lib instead of allow-multiple-definition
This commit is contained in:
+2
-14
@@ -13,27 +13,15 @@ UsbMidiTransport::~UsbMidiTransport() {
|
||||
bool UsbMidiTransport::begin() {
|
||||
Serial.println("[MIDI] Setting up USB MIDI device...");
|
||||
|
||||
if (!TinyUSBDevice.isInitialized()) {
|
||||
TinyUSBDevice.begin(0);
|
||||
}
|
||||
|
||||
TinyUSBDevice.setManufacturerDescriptor("Ashley Strahle");
|
||||
TinyUSBDevice.setProductDescriptor("Loopy Foot Controller");
|
||||
TinyUSBDevice.setSerialDescriptor("LFMIDI001");
|
||||
|
||||
if (!usb_midi.begin()) {
|
||||
Serial.println("[MIDI] ERROR: USB MIDI init failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (TinyUSBDevice.mounted()) {
|
||||
TinyUSBDevice.detach();
|
||||
delay(10);
|
||||
TinyUSBDevice.attach();
|
||||
}
|
||||
Serial.printf("[MIDI] USB VID:PID=%04X:%04X\r\n",
|
||||
TinyUSBDevice.idVendor(), TinyUSBDevice.idProduct());
|
||||
|
||||
initialized = true;
|
||||
Serial.println("[MIDI] USB MIDI ready - enumerating...");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user