Public MIDI over Bluetooth Low Energy API.
Definition in file midi.h.
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
Go to the source code of this file.
◆ midi_mtu_callback_t
typedef void(* midi_mtu_callback_t) (uint16_t) |
Type for the MTU negotiation callback.
- Warning
- Used in C code, use C calling convention (use
extern "C"
to declare this function in C++ code).
Definition at line 20 of file midi.h.
◆ midi_write_callback_t
typedef void(* midi_write_callback_t) (const uint8_t *, size_t) |
Type for the BLE MIDI write callback.
- Warning
- Used in C code, use C calling convention (use
extern "C"
to declare this function in C++ code).
Definition at line 31 of file midi.h.
◆ midi_set_mtu_callback()
Set the callback that is to be called when the MTU negotiation with the BLE client is finished.
◆ midi_get_mtu()
uint16_t midi_get_mtu |
( |
void |
| ) |
|
Get the current MTU (maximum transmission unit) of the link with the BLE client.
◆ midi_set_write_callback()
Set the callback that is to be called when the client writes (sends) a MIDI packet.
◆ midi_notify()
bool midi_notify |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
Send a MIDI BLE notification to the client.
◆ set_midi_ble_name()
void set_midi_ble_name |
( |
const char * |
name | ) |
|
Set the name of the BLE device. Must be set before calling midi_init().
◆ midi_init()
Initialize the Bluetooth stack and register the MIDI BLE application with the Bluedroid driver.
◆ midi_deinit()
Cleanup the MIDI BLE application and de-initialize the Bluetooth stack.