diff options
author | Damien George <damien@micropython.org> | 2021-02-10 21:37:10 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-02-12 12:07:05 +1100 |
commit | 7815dd2cc5306b72c84dbbc27638d9d3f6b32ac9 (patch) | |
tree | ad9e0e7012ad5aa4648c24e9b34f1c06541c4222 | |
parent | df85e4881396d0ebb5942a111fba974ea5c80b77 (diff) |
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>
-rw-r--r-- | ports/unix/mpbtstackport_common.c | 5 |
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. |