hci: provide hci_classic_supported and hci_le_supported

This commit is contained in:
Matthias Ringwald 2023-12-13 13:55:58 +01:00
parent 57514786e5
commit ad58a3851e
2 changed files with 18 additions and 3 deletions

View File

@ -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;

View File

@ -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 */