feat(ble/bluedroid): Optimize address resolution status for interval use

This commit is contained in:
zhanghaipeng 2024-09-26 19:49:40 +08:00
parent d6a0fa813d
commit ab0d3831db
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)