extmod/modbluetooth: Support gap_connect(None) to cancel a connection.

Allow cancellation of in-progress peripheral connections.
This commit is contained in:
Jonathan Hogg
2021-07-12 08:46:29 +01:00
committed by Damien George
parent de7e3cd792
commit 851ecb2da1
5 changed files with 32 additions and 2 deletions

View File

@@ -374,6 +374,10 @@ int mp_bluetooth_gap_peripheral_connect(uint8_t addr_type, const uint8_t *addr,
#endif
#if MICROPY_PY_BLUETOOTH_ENABLE_GATT_CLIENT
// Cancel in-progress connection to a peripheral.
int mp_bluetooth_gap_peripheral_connect_cancel(void);
// Find all primary services on the connected peripheral.
int mp_bluetooth_gattc_discover_primary_services(uint16_t conn_handle, const mp_obj_bluetooth_uuid_t *uuid);