Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
midi-read.c
Go to the documentation of this file.
1#ifdef ESP32
2#include <sdkconfig.h>
3#if CONFIG_BT_BLE_ENABLED
4
14#include "midi-private.h"
15
16#include <string.h> // memset
17
18void midi_handle_read_event(esp_gatt_if_t gatts_if,
19 esp_ble_gatts_cb_param_t *param) {
20 // MIDI should respond with no data
21 // TODO: over 600 bytes, do we want this on the stack?
22 esp_gatt_rsp_t rsp;
23 memset(&rsp, 0, sizeof(esp_gatt_rsp_t));
24 rsp.attr_value.handle = param->read.handle;
25 // Respond without data
26 rsp.attr_value.len = 0;
27 esp_ble_gatts_send_response(gatts_if, param->read.conn_id,
28 param->read.trans_id, ESP_GATT_OK, &rsp);
29}
30
31#endif
32#endif
Declarations of internal functions for the MIDI over BLE system, used in the midi-*....
void midi_handle_read_event(esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t *param)