fixed compile error for boards that have no Serial
This commit is contained in:
parent
596a1b0721
commit
70b9e26d45
|
|
@ -7,7 +7,12 @@ struct CustomBaudRate : public MIDI_NAMESPACE::DefaultSettings {
|
||||||
static const long BaudRate = 115200;
|
static const long BaudRate = 115200;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(ARDUINO_SAM_DUE) || defined(USBCON) || defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MKL26Z64__)
|
||||||
|
// Leonardo, Due and other USB boards use Serial1 by default.
|
||||||
|
MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial1, MIDI, CustomBaudRate);
|
||||||
|
#else
|
||||||
MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial, MIDI, CustomBaudRate);
|
MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial, MIDI, CustomBaudRate);
|
||||||
|
#endif
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
pinMode(LED_BUILTIN, OUTPUT);
|
pinMode(LED_BUILTIN, OUTPUT);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue