Closed KarolPtak closed 3 years ago
Sorry, seems to be explained in https://github.com/FortySevenEffects/arduino_midi_library/issues/165 :)
so in my case:
'global.h' should be:
include
extern MIDI_NAMESPACE::SerialMIDI
serialMIDI; extern MIDI_NAMESPACE::MidiInterface<MIDI_NAMESPACE::SerialMIDI > MIDI;
and 'main.ino':
include "global.h"
MIDI_CREATE_DEFAULT_INSTANCE();
I have 4 classes (each in separate cpp + h files), and I'd like to share the midi instance between them, but I'm stuck :( .
Basicly calling MIDI_CREATE_DEFAULT_INSTANCE(); in the main .ino file makes it unvisible to those classes.
I've tried to create say 'global.h' with
and 'global.cpp' with
but the result is