Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
midi-write.c
Go to the documentation of this file.
1#ifdef ESP32
2#include <sdkconfig.h>
3#if CONFIG_BT_BLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED
4
12#include "app.h"
13#include "logging.h"
14#include "midi-private.h"
15
16#include <esp_gatt_common_api.h>
17
20 if (param->write.need_rsp) {
21 // MIDI never needs a response, send an error response
23 param->write.trans_id,
25 return;
26 }
27 // Not a prepare event, handle the data immediately
28 midi_ble_instance_handle_data(param->write.conn_id, param->write.value,
29 param->write.len);
30}
31
34 esp_ble_gatts_send_response(gatts_if, param->exec_write.conn_id,
35 param->exec_write.trans_id,
37}
38
39#endif
40#endif
void midi_ble_instance_handle_data(uint16_t conn_handle, const uint8_t *data, uint16_t length)
Array< T, N > copyAs(const Array< U, N > &src)
Copy an Array to an Array of a different type.
Declarations of internal functions for the MIDI over BLE system, used in the midi-*....
void midi_handle_write_event(esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t *param)
void midi_handle_write_exec_event(esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t *param)