Control Surface stm32
MIDI Control Surface library for Arduino
midi-notify.c
Go to the documentation of this file.
1#ifdef ESP32
2
9#include "midi-private.h"
10#include "ble2902.h"
11
12bool midi_notify(const uint8_t *data, size_t length) {
13 if (midi_get_gatts_if() == ESP_GATT_IF_NONE)
14 return false;
16 return false;
17 if (length > midi_get_mtu() - 3)
18 return false;
19 esp_err_t ret = esp_ble_gatts_send_indicate(
21 midi_get_characteristic_handle(), length, (uint8_t *)data, false);
22 return ret == ESP_OK;
23}
24
25#endif
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.
Declarations of internal functions for the MIDI over BLE system, used in the midi-*....
uint16_t midi_get_gatts_if(void)
uint16_t midi_get_descriptor_handle(void)
uint16_t midi_get_characteristic_handle(void)
uint16_t midi_get_connection_id(void)
bool midi_notify(const uint8_t *data, size_t len)
Send a MIDI BLE notification to the client.
uint16_t midi_get_mtu(void)
Get the current MTU (maximum transmission unit) of the link with the BLE client.