From ec111c8bcd550ae475c52a257931975d3e0e73da Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Tue, 4 Jul 2017 17:30:27 +0200 Subject: [PATCH] hci: added hci_get_state() --- src/hci.c | 6 ++++++ src/hci.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/hci.c b/src/hci.c index 6bc1c38a0..893f842d3 100644 --- a/src/hci.c +++ b/src/hci.c @@ -4367,6 +4367,12 @@ int hci_get_sco_packet_length(void){ } #endif + +HCI_STATE hci_get_state(void){ + return hci_stack->state; +} + + /** * @brief Set callback for Bluetooth Hardware Error */ diff --git a/src/hci.h b/src/hci.h index 88dae1f05..64557dbb7 100644 --- a/src/hci.h +++ b/src/hci.h @@ -1109,6 +1109,11 @@ uint16_t hci_get_manufacturer(void); */ void hci_disable_l2cap_timeout_check(void); +/** + * Get state + */ +HCI_STATE hci_get_state(void); + #if defined __cplusplus } #endif