extmod/modbluetooth: Add gatts_set_buffer.
- Adds an explicit way to set the size of a value's internal buffer, replacing `ble.gatts_write(handle, bytes(size))` (although that still works). - Add an "append" mode for values, which means that remote writes will append to the buffer.
This commit is contained in:
committed by
Damien George
parent
53f3cbc2c4
commit
d16a27da51
@@ -183,6 +183,10 @@ int mp_bluetooth_gatts_notify_send(uint16_t conn_handle, uint16_t value_handle,
|
||||
// Indicate the central.
|
||||
int mp_bluetooth_gatts_indicate(uint16_t conn_handle, uint16_t value_handle);
|
||||
|
||||
// Resize and enable/disable append-mode on a value.
|
||||
// Append-mode means that remote writes will append and local reads will clear after reading.
|
||||
int mp_bluetooth_gatts_set_buffer(uint16_t value_handle, size_t len, bool append);
|
||||
|
||||
// Disconnect from a central or peripheral.
|
||||
int mp_bluetooth_gap_disconnect(uint16_t conn_handle);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user