From 36502bdfdcd63b2bc87027380dc63098221e8b04 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Tue, 15 Oct 2019 12:07:29 +1100 Subject: extmod/modbluetooth: Make gap_disconnect not raise when disconnected. Previously it raised OSError(MP_ENOTCONN) if the conn_handle was already disconnected. Now it returns True/False. --- docs/library/bluetooth.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/library') diff --git a/docs/library/bluetooth.rst b/docs/library/bluetooth.rst index 6ef660416..00ced33e5 100644 --- a/docs/library/bluetooth.rst +++ b/docs/library/bluetooth.rst @@ -262,6 +262,9 @@ Central Role (GATT Client) On success, the ``_IRQ_PERIPHERAL_DISCONNECT`` event will be raised. + Returns ``False`` if the connection handle wasn't connected, and ``True`` + otherwise. + .. method:: BLE.gattc_discover_services(conn_handle) Query a connected peripheral for its services. -- cgit v1.2.3