42template <
class SerialPort,
class _Settings = DefaultSerialSettings>
45 typedef _Settings Settings;
54 static const bool thruActivated =
true;
60 mSerial.
template open<Settings::BaudRate>();
62 mSerial.begin(Settings::BaudRate);
71 void write(
byte value)
76 void endTransmission()
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);
121#define MIDI_CREATE_CUSTOM_INSTANCE(Type, SerialPort, Name, Settings) \
122 MIDI_NAMESPACE::SerialMIDI<Type, Settings> serial##Name(SerialPort);\
123 MIDI_NAMESPACE::MidiInterface<MIDI_NAMESPACE::SerialMIDI<Type, Settings>> Name((MIDI_NAMESPACE::SerialMIDI<Type, Settings>&)serial##Name);
MIDI Library for the Arduino - Namespace declaration.
static const long BaudRate