42 template <
class SerialPort,
class _Settings = DefaultSerialSettings>
45 typedef _Settings Settings;
60 mSerial.
template open<Settings::BaudRate>();
62 mSerial.begin(Settings::BaudRate);
82 return mSerial.read();
87 return mSerial.available();
99 #define MIDI_CREATE_INSTANCE(Type, SerialPort, Name) \
100 MIDI_NAMESPACE::SerialMIDI<Type> serial##Name(SerialPort);\
101 MIDI_NAMESPACE::MidiInterface<MIDI_NAMESPACE::SerialMIDI<Type>> Name((MIDI_NAMESPACE::SerialMIDI<Type>&)serial##Name);
103 #if defined(ARDUINO_SAM_DUE) || defined(USBCON) || defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MKL26Z64__)
105 #define MIDI_CREATE_DEFAULT_INSTANCE() \
106 MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI);
112 #define MIDI_CREATE_DEFAULT_INSTANCE() \
113 MIDI_CREATE_INSTANCE(HardwareSerial, Serial, MIDI);