Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
midi-notify.c
Go to the documentation of this file.
1#ifdef ESP32
2#include <sdkconfig.h>
3#if CONFIG_BT_BLE_ENABLED
4
11#include "ble2902.h"
12#include "midi-private.h"
13
14bool midi_notify(uint16_t conn_handle, uint16_t char_handle,
15 const uint8_t *data, size_t length) {
16 if (midi_get_gatts_if() == ESP_GATT_IF_NONE)
17 return false;
18 esp_err_t ret = esp_ble_gatts_send_indicate(midi_get_gatts_if(),
19 conn_handle, char_handle,
20 length, (uint8_t *)data, false);
21 return ret == ESP_OK;
22}
23
24#endif
25#endif
Handling the Client Characteristic Configuration Descriptor (UUID 0x2902) for MIDI over Bluetooth Low...
Declarations of internal functions for the MIDI over BLE system, used in the midi-*....
uint16_t midi_get_gatts_if(void)
bool midi_notify(uint16_t conn_handle, uint16_t char_handle, const uint8_t *data, size_t len)
Send a MIDI BLE notification to the client.