Merge branch 'feat/get_ble_resolve_address_status_opt' into 'master'

feat(ble/bluedroid): Optimized address resolution status for internal usage

Closes BLERP-1054

See merge request espressif/esp-idf!33851
This commit is contained in:
Wang Meng Yang 2024-09-27 16:17:53 +08:00
commit 4d48965267
3 changed files with 8 additions and 7 deletions

View File

@ -142,9 +142,9 @@ uint32_t btc_get_ble_status(void)
}
// Address resolve status
extern uint8_t btm_get_ble_addr_resolve_status(void);
if (btm_get_ble_addr_resolve_status()) {
status |= BIT(BTC_BLE_STATUS_ADDR_RESOLVE);
extern uint8_t btm_get_ble_addr_resolve_disable_status(void);
if (btm_get_ble_addr_resolve_disable_status()) {
status |= BIT(BTC_BLE_STATUS_ADDR_RESOLVE_DISABLE);
}
#if (SMP_INCLUDED == TRUE)

View File

@ -40,7 +40,7 @@ typedef enum {
BTC_BLE_STATUS_GATTC_APP, // GATTC application exist
BTC_BLE_STATUS_GATTS_SRVC, // GATTS service exist
BTC_BLE_STATUS_PRIVACY, // Privacy enabled
BTC_BLE_STATUS_ADDR_RESOLVE,// Address resolution status
BTC_BLE_STATUS_ADDR_RESOLVE_DISABLE,// Address resolution disable status
} tBTC_BLE_STATUS;
future_t **btc_main_get_future_p(btc_main_future_type_t type);

View File

@ -135,10 +135,11 @@ uint8_t btm_acl_active_count(void)
return count;
}
#if (BLE_INCLUDED == TRUE)
// address resolution status
uint8_t btm_get_ble_addr_resolve_status(void)
// Address resolution status
uint8_t btm_get_ble_addr_resolve_disable_status(void)
{
return (uint8_t) btm_cb.addr_res_en;
// Returns false if address resolution is enabled, true if disabled
return (btm_cb.addr_res_en) ? 0 : 1;
}
void btm_ble_addr_resolve_enable(bool enable)