adafruit / Adafruit_nRF52_Arduino

Adafruit code for the Nordic nRF52 BLE SoC on Arduino
Other
623 stars 497 forks source link

Fix build with MIDI Library v5 #528

Closed hathach closed 3 years ago

hathach commented 4 years ago

Is your feature request related to a problem? Please describe. Current blemidi example failed to build with MIDI Library v5 due to its API change. We should fix it

Additional context

In file included from /home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.h:307,
                 from /home/hathach/.arduino15/packages/adafruit/hardware/nrf52/0.20.5/libraries/Bluefruit52Lib/src/services/BLEMidi.cpp:42:
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp: In instantiation of 'void midi::MidiInterface<Transport, _Settings, _Platform>::sendRealTime(midi::MidiType) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform]':
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.h:118:39:   required from 'void midi::MidiInterface<Transport, _Settings, _Platform>::sendActiveSensing() [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform]'
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:725:9:   required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read(midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:706:30:   required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read() [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform]'
/home/hathach/.arduino15/packages/adafruit/hardware/nrf52/0.20.5/libraries/Bluefruit52Lib/src/services/BLEMidi.cpp:210:64:   required from here
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:505:28: error: 'class BLEMidi' has no member named 'beginTransmission'
  505 |             if (mTransport.beginTransmission(inType))
      |                 ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:508:28: error: 'class BLEMidi' has no member named 'endTransmission'
  508 |                 mTransport.endTransmission();
      |                 ~~~~~~~~~~~^~~~~~~~~~~~~~~
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp: In instantiation of 'void midi::MidiInterface<Transport, _Settings, _Platform>::send(midi::MidiType, midi::DataByte, midi::DataByte, midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::DataByte = unsigned char; midi::Channel = unsigned char]':
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:1416:17:   required from 'void midi::MidiInterface<Transport, _Settings, _Platform>::thruFilter(midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:774:5:   required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read(midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:706:30:   required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read() [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform]'
/home/hathach/.arduino15/packages/adafruit/hardware/nrf52/0.20.5/libraries/Bluefruit52Lib/src/services/BLEMidi.cpp:210:64:   required from here
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:180:24: error: 'class BLEMidi' has no member named 'beginTransmission'
  180 |         if (mTransport.beginTransmission(inType))
      |             ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:204:24: error: 'class BLEMidi' has no member named 'endTransmission'
  204 |             mTransport.endTransmission();
      |             ~~~~~~~~~~~^~~~~~~~~~~~~~~
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp: In instantiation of 'void midi::MidiInterface<Transport, _Settings, _Platform>::sendSysEx(unsigned int, const byte*, bool) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; byte = unsigned char]':
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:1464:17:   required from 'void midi::MidiInterface<Transport, _Settings, _Platform>::thruFilter(midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:774:5:   required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read(midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:706:30:   required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read() [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform]'
/home/hathach/.arduino15/packages/adafruit/hardware/nrf52/0.20.5/libraries/Bluefruit52Lib/src/services/BLEMidi.cpp:210:64:   required from here
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:363:20: error: 'class BLEMidi' has no member named 'beginTransmission'
  363 |     if (mTransport.beginTransmission(MidiType::SystemExclusiveStart))
      |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:374:20: error: 'class BLEMidi' has no member named 'endTransmission'
  374 |         mTransport.endTransmission();
      |         ~~~~~~~~~~~^~~~~~~~~~~~~~~
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp: In instantiation of 'void midi::MidiInterface<Transport, _Settings, _Platform>::sendCommon(midi::MidiType, unsigned int) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform]':
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:432:5:   required from 'void midi::MidiInterface<Transport, _Settings, _Platform>::sendSongSelect(midi::DataByte) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::DataByte = unsigned char]'
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:1468:17:   required from 'void midi::MidiInterface<Transport, _Settings, _Platform>::thruFilter(midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:774:5:   required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read(midi::Channel) [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::Channel = unsigned char]'
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:706:30:   required from 'bool midi::MidiInterface<Transport, _Settings, _Platform>::read() [with Transport = BLEMidi; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform]'
/home/hathach/.arduino15/packages/adafruit/hardware/nrf52/0.20.5/libraries/Bluefruit52Lib/src/services/BLEMidi.cpp:210:64:   required from here
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:457:20: error: 'class BLEMidi' has no member named 'beginTransmission'
  457 |     if (mTransport.beginTransmission(inType))
      |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/hathach/Arduino/libraries/MIDI_Library/src/MIDI.hpp:477:20: error: 'class BLEMidi' has no member named 'endTransmission'
  477 |         mTransport.endTransmission();
      |         ~~~~~~~~~~~^~~~~~~~~~~~~~~