9 esp_ble_gatts_cb_param_t *param) {
12 uint16_t handle = param->write.handle;
14 ESP_LOGI(
"MIDIBLE",
"notify enable");
16 ESP_LOGI(
"MIDIBLE",
"indicate enable");
18 ESP_LOGI(
"MIDIBLE",
"notify & indicate enable");
20 ESP_LOGI(
"MIDIBLE",
"notify/indicate disable ");
22 ESP_LOGE(
"MIDIBLE",
"Unknown descriptor value %04x",
30 esp_ble_gatts_get_attr_value(handle, &length, &data);
32 ESP_LOGE(
"MIDIBLE",
"Unexpected descriptor value length (%d)", length);
36 memcpy(&ret, data, length);
Handling the Client Characteristic Configuration Descriptor (UUID 0x2902) for MIDI over Bluetooth Low...
bool ble2902_notifications_enabled(uint16_t handle)
Check if notifications are enabled by the client.
bool ble2902_indications_enabled(uint16_t handle)
Check if indications are enabled by the client.
void ble2902_handle_write(esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t *param)
Callback when the client writes to the descriptor.
uint16_t ble2902_get_value(uint16_t handle)
Get the value of the descriptor.