summaryrefslogtreecommitdiff
path: root/docs/library
diff options
context:
space:
mode:
authorJonathan Hogg <me@jonathanhogg.com>2021-07-12 08:46:29 +0100
committerDamien George <damien@micropython.org>2021-12-01 11:56:37 +1100
commit851ecb2da178fff0b60aefdb5af502f28787a7ec (patch)
tree16eafbe443a7c34a791ed4a06d17469da1d597ef /docs/library
parentde7e3cd792d1d4cf6c4b3895d431fc8bc516b51b (diff)
extmod/modbluetooth: Support gap_connect(None) to cancel a connection.
Allow cancellation of in-progress peripheral connections.
Diffstat (limited to 'docs/library')
-rw-r--r--docs/library/bluetooth.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/library/bluetooth.rst b/docs/library/bluetooth.rst
index cfec804ea..7663199e9 100644
--- a/docs/library/bluetooth.rst
+++ b/docs/library/bluetooth.rst
@@ -365,7 +365,12 @@ A central device can connect to peripherals that it has discovered using the obs
See :meth:`gap_scan <BLE.gap_scan>` for details about address types.
- On success, the ``_IRQ_PERIPHERAL_CONNECT`` event will be raised.
+ To cancel an outstanding connection attempt early, call
+ ``gap_connect(None)``.
+
+ On success, the ``_IRQ_PERIPHERAL_CONNECT`` event will be raised. If
+ cancelling a connection attempt, the ``_IRQ_PERIPHERAL_DISCONNECT`` event
+ will be raised.
The device will wait up to *scan_duration_ms* to receive an advertising
payload from the device.