bool midi_deinit()
Cleanup the MIDI BLE application and de-initialize the Bluetooth stack.
bool midi_init()
Initialize the Bluetooth stack and register the MIDI BLE application with the Bluedroid driver.
void midi_set_write_callback(midi_write_callback_t cb)
Set the callback that is to be called when the client writes (sends) a MIDI packet.
void(* midi_write_callback_t)(const uint8_t *, size_t)
Type for the BLE MIDI write callback.
void midi_set_mtu_callback(midi_mtu_callback_t cb)
Set the callback that is to be called when the MTU negotiation with the BLE client is finished.
bool midi_notify(const uint8_t *data, size_t len)
Send a MIDI BLE notification to the client.
void(* midi_mtu_callback_t)(uint16_t)
Type for the MTU negotiation callback.
uint16_t midi_get_mtu(void)
Get the current MTU (maximum transmission unit) of the link with the BLE client.
void set_midi_ble_name(const char *name)
Set the name of the BLE device. Must be set before calling midi_init().