feat(ble/bluedroid): Support resolve BLE address for interval usage

(cherry picked from commit b88b511362)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
This commit is contained in:
Zhang Hai Peng 2024-09-25 12:13:13 +08:00
parent e0945a06c8
commit d6a0fa813d
3 changed files with 14 additions and 2 deletions

View File

@ -141,6 +141,12 @@ uint32_t btc_get_ble_status(void)
status |= BIT(BTC_BLE_STATUS_CONN); status |= BIT(BTC_BLE_STATUS_CONN);
} }
// 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);
}
#if (SMP_INCLUDED == TRUE) #if (SMP_INCLUDED == TRUE)
// Number of recorded devices // Number of recorded devices
extern uint8_t btm_ble_sec_dev_active_count(void); extern uint8_t btm_ble_sec_dev_active_count(void);

View File

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

View File

@ -134,10 +134,15 @@ uint8_t btm_acl_active_count(void)
return count; return count;
} }
#if (BLE_INCLUDED == TRUE)
// address resolution status
uint8_t btm_get_ble_addr_resolve_status(void)
{
return (uint8_t) btm_cb.addr_res_en;
}
void btm_ble_addr_resolve_enable(bool enable) void btm_ble_addr_resolve_enable(bool enable)
{ {
#if (BLE_INCLUDED == TRUE)
btm_cb.addr_res_en = enable; btm_cb.addr_res_en = enable;
#endif
} }
#endif /*BLE_INCLUDED*/