mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 04:00:28 +01:00
extmod/modbluetooth: Add timeout to deinit.
If the BLE radio stops responding before deinit is called the function can get stuck waiting for an event that is never received, particularly if the radio is external or on a separate core. This commit adds a timeout, similar to the timeout already used in the init function. Updated for nimble, btstack, esp32 and zephyr bindings. Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
This commit is contained in:
committed by
Damien George
parent
17898f8607
commit
d5f2fc239a
@@ -295,7 +295,7 @@ extern const mp_obj_type_t mp_type_bluetooth_uuid;
|
||||
int mp_bluetooth_init(void);
|
||||
|
||||
// Disables the Bluetooth stack. Is a no-op when not enabled.
|
||||
void mp_bluetooth_deinit(void);
|
||||
int mp_bluetooth_deinit(void);
|
||||
|
||||
// Returns true when the Bluetooth stack is active.
|
||||
bool mp_bluetooth_is_active(void);
|
||||
|
||||
Reference in New Issue
Block a user