diff options
| author | Jonathan Hogg <me@jonathanhogg.com> | 2021-07-12 08:46:29 +0100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-12-01 11:56:37 +1100 |
| commit | 851ecb2da178fff0b60aefdb5af502f28787a7ec (patch) | |
| tree | 16eafbe443a7c34a791ed4a06d17469da1d597ef /extmod/modbluetooth.h | |
| parent | de7e3cd792d1d4cf6c4b3895d431fc8bc516b51b (diff) | |
extmod/modbluetooth: Support gap_connect(None) to cancel a connection.
Allow cancellation of in-progress peripheral connections.
Diffstat (limited to 'extmod/modbluetooth.h')
| -rw-r--r-- | extmod/modbluetooth.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/extmod/modbluetooth.h b/extmod/modbluetooth.h index fe41fd514..e52232c41 100644 --- a/extmod/modbluetooth.h +++ b/extmod/modbluetooth.h @@ -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); |
