8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac20d04 commit 3a4c672Copy full SHA for 3a4c672
extmod/btstack/modbluetooth_btstack.c
@@ -705,12 +705,12 @@ int mp_bluetooth_init(void) {
705
return 0;
706
}
707
708
-void mp_bluetooth_deinit(void) {
+int mp_bluetooth_deinit(void) {
709
DEBUG_printf("mp_bluetooth_deinit\n");
710
711
// Nothing to do if not initialised.
712
if (!MP_STATE_PORT(bluetooth_btstack_root_pointers)) {
713
- return;
+ return 0;
714
715
716
mp_bluetooth_gap_advertise_stop();
@@ -737,6 +737,9 @@ void mp_bluetooth_deinit(void) {
737
deinit_stack();
738
739
DEBUG_printf("mp_bluetooth_deinit: complete\n");
740
+
741
+ bool timeout = mp_bluetooth_btstack_state == MP_BLUETOOTH_BTSTACK_STATE_TIMEOUT;
742
+ return timeout ? MP_ETIMEDOUT : 0;
743
744
745
bool mp_bluetooth_is_active(void) {
0 commit comments