diff options
author | Angus Gratton <angus@redyak.com.au> | 2023-11-30 14:32:41 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2023-12-08 12:48:50 +1100 |
commit | df3948d3c23e3572c49d18ede03bf3ac97ee601c (patch) | |
tree | 7435061520a222a0ef859535a6c814d9eaffb486 /extmod/btstack | |
parent | f5be0128e4da1417136495c20888f8291cd22386 (diff) | |
download | micropython-df3948d3c23e3572c49d18ede03bf3ac97ee601c.tar.gz micropython-df3948d3c23e3572c49d18ede03bf3ac97ee601c.zip |
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 <angus@redyak.com.au>
Diffstat (limited to 'extmod/btstack')
-rw-r--r-- | extmod/btstack/modbluetooth_btstack.c | 8 |
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); |