feat(ble/bluedroid): Support BLE add device to resolving list

This commit is contained in:
zhanghaipeng
2024-04-12 17:02:03 +08:00
committed by chenjianhua
parent ed37f99e8a
commit 4eba8c2828
17 changed files with 213 additions and 6 deletions

View File

@@ -678,6 +678,11 @@ typedef void (BT_LOG_FUNC) (int trace_type, const char *fmt_str, ...);
typedef uint8_t BD_ADDR[BD_ADDR_LEN];
#endif
/* peer irk */
#ifndef PEER_IRK_LEN
#define PEER_IRK_LEN 16
typedef uint8_t PEER_IRK[PEER_IRK_LEN];
#endif
// From bd.c
/*****************************************************************************

View File

@@ -198,6 +198,8 @@ typedef void (tBTM_UPDATE_WHITELIST_CBACK) (UINT8 status, tBTM_WL_OPERATION wl_o
typedef void (tBTM_SET_LOCAL_PRIVACY_CBACK) (UINT8 status);
typedef void (tBTM_SET_RPA_TIMEOUT_CMPL_CBACK) (UINT8 status);
typedef void (tBTM_ADD_DEV_TO_RESOLVING_LIST_CMPL_CBACK) (UINT8 status);
/*******************************
** Device Coexist status
********************************/

View File

@@ -2668,6 +2668,27 @@ BOOLEAN BTM_BleClearAdv(tBTM_CLEAR_ADV_CMPL_CBACK *p_clear_adv_cback);
*******************************************************************************/
BOOLEAN BTM_BleSetRpaTimeout(uint16_t rpa_timeout, tBTM_SET_RPA_TIMEOUT_CMPL_CBACK *p_set_rpa_timeout_cback);
/*******************************************************************************
**
** Function BTM_BleAddDevToResolvingList
**
** Description This function is called to add a device to the resolving list
** used to generate and resolve Resolvable Private Addresses (RPAs)
** in the Bluetooth Controller.
**
** Parameters addr - The address of the device to be added to the resolving list.
** addr_type - The address type of the device (public or random).
** irk - The Identity Resolving Key (IRK) of the device.
** p_add_dev_to_resolving_list_callback - Callback function to be called when the operation is completed.
**
** Returns TRUE if the operation was successful, otherwise FALSE.
**
*******************************************************************************/
BOOLEAN BTM_BleAddDevToResolvingList(BD_ADDR addr,
uint8_t addr_type,
uint8_t irk[],
tBTM_ADD_DEV_TO_RESOLVING_LIST_CMPL_CBACK *p_add_dev_to_resolving_list_callback);
/*
#ifdef __cplusplus
}

View File

@@ -621,7 +621,7 @@ BOOLEAN btsnd_hcic_write_voice_settings(UINT16 flags); /* Write Voice
BOOLEAN btsnd_hcic_write_auto_flush_tout(UINT16 handle,
UINT16 timeout); /* Write Retransmit Timout */
UINT16 timeout); /* Write Retransmit Timeout */
#define HCIC_PARAM_SIZE_WRITE_AUTO_FLUSH_TOUT 4