summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/unix/mpbtstackport_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ports/unix/mpbtstackport_common.c b/ports/unix/mpbtstackport_common.c
index 621e661f9..ec40db65b 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.