From 7815dd2cc5306b72c84dbbc27638d9d3f6b32ac9 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 10 Feb 2021 21:37:10 +1100 Subject: [PATCH] unix/mpbtstackport_common: Implement mp_bluetooth_hci_active. So that BTSTACK can be enabled with SYNC_EVENTS. Signed-off-by: Damien George --- ports/unix/mpbtstackport_common.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/unix/mpbtstackport_common.c b/ports/unix/mpbtstackport_common.c index 621e661f9e..ec40db65bc 100644 --- a/ports/unix/mpbtstackport_common.c +++ b/ports/unix/mpbtstackport_common.c @@ -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.