From df3948d3c23e3572c49d18ede03bf3ac97ee601c Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 30 Nov 2023 14:32:41 +1100 Subject: extmod: Switch to use new event functions. See previous commit for details of these functions. As of this commit, these still call the old hook macros on all ports. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton --- extmod/btstack/modbluetooth_btstack.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'extmod/btstack/modbluetooth_btstack.c') diff --git a/extmod/btstack/modbluetooth_btstack.c b/extmod/btstack/modbluetooth_btstack.c index 0c15e9343..211214768 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); -- cgit v1.2.3