diff --git a/src/serialMIDI.h b/src/serialMIDI.h index c7176c40..da782715 100644 --- a/src/serialMIDI.h +++ b/src/serialMIDI.h @@ -113,5 +113,13 @@ class SerialMIDI MIDI_CREATE_INSTANCE(HardwareSerial, Serial, MIDI); #endif +/*! \brief Create an instance of the library attached to a serial port with + custom settings. + @see DefaultSettings + @see MIDI_CREATE_INSTANCE + */ +#define MIDI_CREATE_CUSTOM_INSTANCE(Type, SerialPort, Name, Settings) \ + MIDI_NAMESPACE::SerialMIDI serial##Name(SerialPort);\ + MIDI_NAMESPACE::MidiInterface> Name((MIDI_NAMESPACE::SerialMIDI&)serial##Name); END_MIDI_NAMESPACE