removed typedef
when instanciating multiple instances of SerialMIDI, a redefinition error accors because of typing of the serial##Name. Fix: removed the typdef, a bit harder to read, but avoided complex #ifdef
This commit is contained in:
parent
28e9a8cb97
commit
a707548fd3
|
|
@ -95,10 +95,8 @@ private:
|
||||||
Then call midi2.begin(), midi2.read() etc..
|
Then call midi2.begin(), midi2.read() etc..
|
||||||
*/
|
*/
|
||||||
#define MIDI_CREATE_INSTANCE(Type, SerialPort, Name) \
|
#define MIDI_CREATE_INSTANCE(Type, SerialPort, Name) \
|
||||||
typedef MIDI_NAMESPACE::SerialMIDI<Type> __smt;\
|
MIDI_NAMESPACE::SerialMIDI<Type> serial##Name(SerialPort);\
|
||||||
typedef MIDI_NAMESPACE::MidiInterface<__smt> TypedMidiInterface;\
|
MIDI_NAMESPACE::MidiInterface<MIDI_NAMESPACE::SerialMIDI<Type>> Name((MIDI_NAMESPACE::SerialMIDI<Type>&)serial##Name);
|
||||||
__smt serialMidi(SerialPort);\
|
|
||||||
TypedMidiInterface Name((__smt&)serialMidi);
|
|
||||||
|
|
||||||
#if defined(ARDUINO_SAM_DUE) || defined(USBCON) || defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MKL26Z64__)
|
#if defined(ARDUINO_SAM_DUE) || defined(USBCON) || defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MKL26Z64__)
|
||||||
// Leonardo, Due and other USB boards use Serial1 by default.
|
// Leonardo, Due and other USB boards use Serial1 by default.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue