Fix for showing vendor/product-id n debug output when device ist recognized at

USB-Serial-Host.
dev
Holger Wirtz 12 months ago
parent ec9489632d
commit 73abbcb75a
  1. 4
      config.h
  2. 18
      midi_devices.hpp

@ -80,10 +80,6 @@
#define USB_HOST_SERIAL_FORMAT USBHOST_SERIAL_8N1
#endif
/*#if defined(MIDI_DEVICE_USB_HOST) && defined(MIDI_DEVICE_USB_HOST_SERIAL)
#error Only MIDI_DEVICE_USB_HOST or MIDI_DEVICE_USB_HOST_SERIAL is possible to enable at the same time!
#endif */
//*************************************************************************************************
//* AUDIO HARDWARE SETTINGS
//*************************************************************************************************

@ -67,9 +67,9 @@ USBHub hub3(usb_host);
#elif NUM_HUBS_MIDI_DEVICE_USB_HOST_SERIAL < 5
USBHub hub4(usb_host);
#endif
USBSerial_BigBuffer userial(usb_host,1);
USBSerial_BigBuffer userial(usb_host, 1);
MIDI_NAMESPACE::SerialMIDI<USBSerial_BigBuffer, CustomBaudRateSettings> serialMIDI(userial);
MIDI_NAMESPACE::MidiInterface<MIDI_NAMESPACE::SerialMIDI<USBSerial_BigBuffer, CustomBaudRateSettings>> usbhost_midi_serial((MIDI_NAMESPACE::SerialMIDI<USBSerial_BigBuffer, CustomBaudRateSettings>&)serialMIDI);
MIDI_NAMESPACE::MidiInterface<MIDI_NAMESPACE::SerialMIDI<USBSerial_BigBuffer, CustomBaudRateSettings>> usbhost_midi_serial((MIDI_NAMESPACE::SerialMIDI<USBSerial_BigBuffer, CustomBaudRateSettings> &)serialMIDI);
#endif
void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity);
@ -1100,12 +1100,20 @@ FLASHMEM void setup_midi_devices(void) {
usbhost_midi_serial.setHandleStop(handleStop_MIDI_DEVICE_USB_HOST_SERIAL);
usbhost_midi_serial.setHandleActiveSensing(handleActiveSensing_MIDI_DEVICE_USB_HOST_SERIAL);
usbhost_midi_serial.setHandleSystemReset(handleSystemReset_MIDI_DEVICE_USB_HOST_SERIAL);
//usbhost_midi_serial.setHandleRealTimeSystem(handleRealTimeSystem_MIDI_DEVICE_USB_HOST_SERIAL);
//usbhost_midi_serial.setHandleRealTimeSystem(handleRealTimeSystem_MIDI_DEVICE_USB_HOST_SERIAL);
usbhost_midi_serial.begin(MIDI_CHANNEL_OMNI);
usbhost_midi_serial.begin(DEFAULT_MIDI_CHANNEL);
#ifdef DEBUG
Serial.println(F("MIDI_DEVICE_USB_HOST_SERIAL enabled."));
Serial.print(F("MIDI_DEVICE_USB_HOST_SERIAL enabled"));
if (userial.idVendor() > 0 && userial.idProduct() > 0) {
Serial.print(F("(0x"));
Serial.print(userial.idVendor());
Serial.print(F("/0x"));
Serial.print(userial.idProduct());
Serial.print(F(")"));
}
Serial.println(F("."));
#endif
#endif

Loading…
Cancel
Save