Holger Wirtz 12 months ago
parent 73abbcb75a
commit dac0c88362
  1. 6
      config.h
  2. 5
      midi_devices.hpp

@ -71,7 +71,7 @@
//*************************************************************************************************
#define MIDI_DEVICE_DIN Serial1
#define MIDI_DEVICE_USB 1
#define MIDI_DEVICE_USB_HOST 1
//#define MIDI_DEVICE_USB_HOST 1
#define MIDI_DEVICE_USB_HOST_SERIAL 1
#ifdef MIDI_DEVICE_USB_HOST_SERIAL
@ -80,6 +80,10 @@
#define USB_HOST_SERIAL_FORMAT USBHOST_SERIAL_8N1
#endif
#if defined(MIDI_DEVICE_USB_HOST) && defined(MIDI_DEVICE_USB_HOST_SERIAL)
#error Enabling MIDI_DEVICE_USB_HOST and MIDI_DEVICE_USB_HOST_SERIAL at the same time is not allowed!
#endif
//*************************************************************************************************
//* AUDIO HARDWARE SETTINGS
//*************************************************************************************************

@ -1080,8 +1080,11 @@ FLASHMEM void setup_midi_devices(void) {
#endif
#ifdef MIDI_DEVICE_USB_HOST_SERIAL
Serial.println("1");
usb_host.begin();
Serial.println("2");
userial.begin(USB_HOST_SERIAL_BAUD, USB_HOST_SERIAL_FORMAT);
Serial.println("3");
usbhost_midi_serial.setHandleNoteOn(handleNoteOn_MIDI_DEVICE_USB_HOST_SERIAL);
usbhost_midi_serial.setHandleNoteOff(handleNoteOff_MIDI_DEVICE_USB_HOST_SERIAL);
usbhost_midi_serial.setHandleControlChange(handleControlChange_MIDI_DEVICE_USB_HOST_SERIAL);
@ -1101,7 +1104,7 @@ FLASHMEM void setup_midi_devices(void) {
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);
Serial.println("4");
usbhost_midi_serial.begin(DEFAULT_MIDI_CHANNEL);
#ifdef DEBUG

Loading…
Cancel
Save