3#if CONFIG_BT_BLE_ENABLED
13 esp_ble_gatts_cb_param_t *param) {
16 uint16_t handle = param->write.handle;
18 if (value == 0x0001) {
19 ESP_LOGI(
"MIDIBLE",
"notify enable");
20 }
else if (value == 0x0002) {
21 ESP_LOGI(
"MIDIBLE",
"indicate enable");
22 }
else if (value == 0x0003) {
23 ESP_LOGI(
"MIDIBLE",
"notify & indicate enable");
24 }
else if (value == 0x0000) {
25 ESP_LOGI(
"MIDIBLE",
"notify/indicate disable ");
27 ESP_LOGE(
"MIDIBLE",
"Unknown descriptor value %04x", value);
36 esp_ble_gatts_get_attr_value(handle, &length, &data);
38 ESP_LOGE(
"MIDIBLE",
"Unexpected descriptor value length (%d)", length);
42 memcpy(&ret, data, length);
void midi_ble_instance_handle_subscribe(uint16_t conn_handle, uint16_t char_handle, bool notify)
Handling the Client Characteristic Configuration Descriptor (UUID 0x2902) for MIDI over Bluetooth Low...
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.
Declarations of internal functions for the MIDI over BLE system, used in the midi-*....
uint16_t midi_get_characteristic_handle(void)