rp2/mpbthciport: Rework HCI polling timer to use soft_timer.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2023-11-14 13:23:46 +11:00
parent c9a9b2e682
commit 633c604722
2 changed files with 18 additions and 20 deletions

View File

@@ -69,9 +69,8 @@ void mp_bluetooth_hci_poll(void) {
// --- Port-specific helpers for the generic NimBLE bindings. -----------------
void mp_bluetooth_nimble_hci_uart_wfi(void) {
#if defined(__WFI)
__WFI();
#endif
best_effort_wfe_or_timeout(make_timeout_time_ms(1));
// This is called while NimBLE is waiting in ble_npl_sem_pend, i.e. waiting for an HCI ACK.
// Do not need to run events here (it must not invoke Python code), only processing incoming HCI data.
mp_bluetooth_nimble_hci_uart_process(false);