1#if defined(ARDUINO_RASPBERRY_PI_PICO_W) && ENABLE_BLE
3#define BTSTACK_FILE__ "gatt_midi.cpp"
62 "Connection update: status="
64 <<
", connection interval="
66 <<
", connection latency="
68 <<
", supervision timeout="
76 "Connection parameter request: interval min="
109 << hex << type << dec <<
")");
204 auto data_gen = [data {data}]()
mutable {
return std::exchange(data, {}); };
264 cs::midi_ble_btstack::instance = &instance;
265 cs::midi_ble_btstack::settings = settings;
289 notify_done.store(
true, std::memory_order_release);
Type definitions and callback interfaces for communication between the low-level BLE stacks and highe...
@ ConsumeImmediately
Buffer is valid only during the callback. Do not keep any pointers to it.
Callable that returns the next chunk of data from a BLE packet when called.
Defines the interface for callback functions registered by the low-level BLE code.
virtual void handleData(BLEConnectionHandle conn_handle, BLEDataGenerator &&data, BLEDataLifetime lifetime)=0
Called by the BLE stack when the central writes data to the MIDI GATT characteristic.
virtual void handleConnect(BLEConnectionHandle conn_handle)=0
Called by the BLE stack when a connection is established.
virtual void handleSubscribe(BLEConnectionHandle conn_handle, BLECharacteristicHandle char_handle, bool notify)=0
Called by the BLE stack when the central subscribes to receive notifications for the MIDI GATT charac...
virtual void handleDisconnect(BLEConnectionHandle conn_handle)=0
Called by the BLE stack when a connection is terminated.
virtual void handleMTU(BLEConnectionHandle conn_handle, uint16_t mtu)=0
Called by the BLE stack when the maximum transmission unit for the connection changes.
const uint8_t profile_data[]
#define ATT_CHARACTERISTIC_7772E5DB_3868_4112_A1A9_F2669D106BF3_01_CLIENT_CONFIGURATION_HANDLE
#define ATT_CHARACTERISTIC_7772E5DB_3868_4112_A1A9_F2669D106BF3_01_VALUE_HANDLE
Array< T, N > copyAs(const Array< U, N > &src)
Copy an Array to an Array of a different type.
#define DEBUGREF(x)
Print an expression and its location (file and line number) to the debug output if debugging is enabl...
static in_place_t in_place
bool init(MIDIBLEInstance &instance, BLESettings settings)
constexpr const char * gattservice_event_names[114]
void notify(BLEConnectionHandle conn_handle, BLECharacteristicHandle char_handle, BLEDataView data)
void le_midi_setup_adv(const BLESettings &ble_settings)
constexpr const char * hci_event_names[256]
constexpr const char * le_event_names[42]
Represents a handle to a local GATT characteristic.
Represents a handle to the connection to another device.
Non-owning, std::span-style read-only view of BLE data.
Configuration options for the low-level BLE code.
struct BLESettings::@4 connection_interval
Connection intervals as multiples of 1.25 milliseconds (e.g.0x000C = 15 ms).
bool initiate_security
Set to true if you want the Arduino to always initiate the Bluetooth bonding or secure connection.