Skip to content

Commit

Permalink
unix/mpbtstackport_common: Implement mp_bluetooth_hci_active.
Browse files Browse the repository at this point in the history
So that BTSTACK can be enabled with SYNC_EVENTS.

Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Feb 12, 2021
1 parent df85e48 commit 7815dd2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ports/unix/mpbtstackport_common.c
Expand Up @@ -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.

Expand Down

0 comments on commit 7815dd2

Please sign in to comment.