unix/mpbtstackport_common: Implement mp_bluetooth_hci_active.

So that BTSTACK can be enabled with SYNC_EVENTS.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2021-02-10 21:37:10 +11:00
parent df85e48813
commit 7815dd2cc5

View File

@ -57,6 +57,11 @@ bool mp_bluetooth_hci_poll(void) {
return false;
}
bool mp_bluetooth_hci_active(void) {
return mp_bluetooth_btstack_state != MP_BLUETOOTH_BTSTACK_STATE_OFF
&& mp_bluetooth_btstack_state != MP_BLUETOOTH_BTSTACK_STATE_TIMEOUT;
}
// The IRQ functionality in btstack_run_loop_embedded.c is not used, so the
// following three functions are empty.