Skip to content

Commit 77bb518

Browse files
author
Francois Best
committed
Using recommended default HW serial port.
Relates to #65.
1 parent ce65911 commit 77bb518

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/midi_Defs.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,10 @@ struct RPN
215215
#define MIDI_CREATE_INSTANCE(Type, SerialPort, Name) \
216216
midi::MidiInterface<Type> Name((Type&)SerialPort);
217217

218-
#if defined(ARDUINO_SAM_DUE) || defined(USBCON)
219-
// Leonardo, Due and other USB boards use Serial1 by default.
218+
#if defined(SERIAL_PORT_HARDWARE_OPEN)
219+
// Use recommended default external serial port.
220220
#define MIDI_CREATE_DEFAULT_INSTANCE() \
221-
MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI);
221+
MIDI_CREATE_INSTANCE(HardwareSerial, SERIAL_PORT_HARDWARE_OPEN, MIDI);
222222
#else
223223
/*! \brief Create an instance of the library with default name, serial port
224224
and settings, for compatibility with sketches written with pre-v4.2 MIDI Lib,

0 commit comments

Comments
 (0)