extmod/modbluetooth: Add discover complete events for svc/char/desc.

Without this it's difficult to implement a state machine correctly if the
desired services are not found.
This commit is contained in:
Jim Mussared
2020-05-11 21:46:56 +10:00
committed by Damien George
parent e6881f0829
commit 6a3c89d584
5 changed files with 100 additions and 28 deletions

View File

@@ -266,6 +266,9 @@ void mp_bluetooth_gattc_on_characteristic_result(uint16_t conn_handle, uint16_t
// Notify modbluetooth that a descriptor was found.
void mp_bluetooth_gattc_on_descriptor_result(uint16_t conn_handle, uint16_t handle, mp_obj_bluetooth_uuid_t *descriptor_uuid);
// Notify modbluetooth that service, characteristic or descriptor discovery has finished.
void mp_bluetooth_gattc_on_discover_complete(uint8_t event, uint16_t conn_handle, uint16_t status);
// Notify modbluetooth that a read has completed with data (or notify/indicate data available, use `event` to disambiguate).
// Note: these functions are to be called in a group protected by MICROPY_PY_BLUETOOTH_ENTER/EXIT.
// _start returns the number of bytes to submit to the calls to _chunk, followed by a call to _end.