mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-01 01:13:23 +00:00
hci: provide hci_classic_supported and hci_le_supported
This commit is contained in:
parent
57514786e5
commit
ad58a3851e
@ -1458,7 +1458,7 @@ static bool gap_ssp_supported(void){
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool hci_classic_supported(void){
|
||||
bool hci_classic_supported(void){
|
||||
#ifdef ENABLE_CLASSIC
|
||||
// No. 37, byte 4, bit 5, = No BR/EDR Support
|
||||
return (hci_stack->local_supported_features[4] & (1 << 5)) == 0;
|
||||
@ -1467,7 +1467,7 @@ static bool hci_classic_supported(void){
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool hci_le_supported(void){
|
||||
bool hci_le_supported(void){
|
||||
#ifdef ENABLE_BLE
|
||||
// No. 37, byte 4, bit 6 = LE Supported (Controller)
|
||||
return (hci_stack->local_supported_features[4u] & (1u << 6u)) != 0u;
|
||||
|
17
src/hci.h
17
src/hci.h
@ -1537,7 +1537,7 @@ uint8_t* hci_get_outgoing_packet_buffer(void);
|
||||
|
||||
/**
|
||||
* Release outgoing packet buffer\
|
||||
* @note only called instead of hci_send_preparared
|
||||
* @note only called instead of hci_send_prepared
|
||||
*/
|
||||
void hci_release_packet_buffer(void);
|
||||
|
||||
@ -1547,6 +1547,21 @@ void hci_release_packet_buffer(void);
|
||||
*/
|
||||
void hci_set_master_slave_policy(uint8_t policy);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Check if Controller supports BR/EDR (Bluetooth Classic)
|
||||
* @return true if supported
|
||||
* @note only valid in working state
|
||||
*/
|
||||
bool hci_classic_supported(void);
|
||||
|
||||
/**
|
||||
* @brief Check if Controller supports LE (Bluetooth Low Energy)
|
||||
* @return true if supported
|
||||
* @note only valid in working state
|
||||
*/
|
||||
bool hci_le_supported(void);
|
||||
|
||||
/* API_END */
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user