summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/btstack
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/btstack')
-rw-r--r--extmod/btstack/modbluetooth_btstack.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/extmod/btstack/modbluetooth_btstack.c b/extmod/btstack/modbluetooth_btstack.c
index 0c15e93431..211214768f 100644
--- a/extmod/btstack/modbluetooth_btstack.c
+++ b/extmod/btstack/modbluetooth_btstack.c
@@ -552,7 +552,7 @@ STATIC void set_random_address(void) {
volatile bool ready = false;
btstack_crypto_random_generate(&sm_crypto_random_request, static_addr, 6, &btstack_static_address_ready, (void *)&ready);
while (!ready) {
- MICROPY_EVENT_POLL_HOOK
+ mp_event_wait_indefinite();
}
#endif // MICROPY_BLUETOOTH_USE_MP_HAL_GET_MAC_STATIC_ADDRESS
@@ -574,7 +574,7 @@ STATIC void set_random_address(void) {
break;
}
- MICROPY_EVENT_POLL_HOOK
+ mp_event_wait_indefinite();
}
DEBUG_printf("set_random_address: Address loaded by controller\n");
}
@@ -654,7 +654,7 @@ int mp_bluetooth_init(void) {
// Either the HCI event will set state to ACTIVE, or the timeout will set it to TIMEOUT.
mp_bluetooth_btstack_port_start();
while (mp_bluetooth_btstack_state == MP_BLUETOOTH_BTSTACK_STATE_STARTING) {
- MICROPY_EVENT_POLL_HOOK
+ mp_event_wait_indefinite();
}
btstack_run_loop_remove_timer(&btstack_init_deinit_timeout);
@@ -727,7 +727,7 @@ void mp_bluetooth_deinit(void) {
// either timeout or clean shutdown.
mp_bluetooth_btstack_port_deinit();
while (mp_bluetooth_btstack_state == MP_BLUETOOTH_BTSTACK_STATE_ACTIVE) {
- MICROPY_EVENT_POLL_HOOK
+ mp_event_wait_indefinite();
}
btstack_run_loop_remove_timer(&btstack_init_deinit_timeout);