Update bt fork to be based on v5.3

This commit is contained in:
jacqueline
2024-08-13 06:02:54 +00:00
committed by cooljqln
parent be9725c1c7
commit 5a02f34ed9
508 changed files with 42429 additions and 5168 deletions
+71 -17
View File
@@ -615,6 +615,11 @@ void bta_dm_disable (tBTA_DM_MSG *p_data)
btm_ble_resolving_list_cleanup (); //by TH, because cmn_ble_vsc_cb.max_filter has something mistake as btm_ble_adv_filter_cleanup
#endif
#if BLE_INCLUDED == TRUE
// btm_ble_multi_adv_init is called when the host is enabled, so btm_ble_multi_adv_cleanup is called when the host is disabled.
btm_ble_multi_adv_cleanup();
#endif
}
/*******************************************************************************
@@ -649,7 +654,7 @@ static void bta_dm_disable_timer_cback (TIMER_LIST_ENT *p_tle)
}
/* Retrigger disable timer in case ACL disconnect failed, DISABLE_EVT still need
to be sent out to avoid jave layer disable timeout */
to be sent out to avoid the layer disable timeout */
if (trigger_disc) {
bta_dm_cb.disable_timer.p_cback = (TIMER_CBACK *)&bta_dm_disable_timer_cback;
bta_dm_cb.disable_timer.param = 1;
@@ -678,9 +683,11 @@ static void bta_dm_disable_timer_cback (TIMER_LIST_ENT *p_tle)
*******************************************************************************/
void bta_dm_set_dev_name (tBTA_DM_MSG *p_data)
{
BTM_SetLocalDeviceName((char *)p_data->set_name.name);
BTM_SetLocalDeviceName((char *)p_data->set_name.name, p_data->set_name.name_type);
#if CLASSIC_BT_INCLUDED
bta_dm_set_eir ((char *)p_data->set_name.name);
if (p_data->set_name.name_type & BT_DEVICE_TYPE_BREDR) {
bta_dm_set_eir ((char *)p_data->set_name.name);
}
#endif /// CLASSIC_BT_INCLUDED
}
@@ -699,7 +706,7 @@ void bta_dm_get_dev_name (tBTA_DM_MSG *p_data)
tBTM_STATUS status;
char *name = NULL;
status = BTM_ReadLocalDeviceName(&name);
status = BTM_ReadLocalDeviceName(&name, p_data->get_name.name_type);
if (p_data->get_name.p_cback) {
(*p_data->get_name.p_cback)(status, name);
}
@@ -709,7 +716,7 @@ void bta_dm_get_dev_name (tBTA_DM_MSG *p_data)
**
** Function bta_dm_cfg_coex_status
**
** Description config coexistance status
** Description config coexistence status
**
**
** Returns void
@@ -724,6 +731,14 @@ void bta_dm_cfg_coex_status (tBTA_DM_MSG *p_data)
}
#endif
void bta_dm_send_vendor_hci(tBTA_DM_MSG *p_data)
{
BTM_VendorSpecificCommand(p_data->vendor_hci_cmd.opcode,
p_data->vendor_hci_cmd.param_len,
p_data->vendor_hci_cmd.p_param_buf,
p_data->vendor_hci_cmd.vendor_hci_cb);
}
/*******************************************************************************
**
** Function bta_dm_set_afh_channels
@@ -772,7 +787,7 @@ static BOOLEAN bta_dm_read_remote_device_name (BD_ADDR bd_addr, tBT_TRANSPORT tr
APPL_TRACE_DEBUG("bta_dm_read_remote_device_name: BTM_ReadRemoteDeviceName is busy");
/* Remote name discovery is on going now so BTM cannot notify through "bta_dm_remname_cback" */
/* adding callback to get notified that current reading remore name done */
/* adding callback to get notified that current reading remote name done */
BTM_SecAddRmtNameNotifyCallback(&bta_dm_service_search_remname_cback);
return (TRUE);
@@ -907,6 +922,23 @@ void bta_dm_set_acl_pkt_types (tBTA_DM_MSG *p_data)
}
}
/*******************************************************************************
**
** Function bta_dm_set_min_enc_key_size
**
** Description Sets the minimal size of encryption key
**
**
** Returns void
**
*******************************************************************************/
#if (ENC_KEY_SIZE_CTRL_MODE != ENC_KEY_SIZE_CTRL_MODE_NONE)
void bta_dm_set_min_enc_key_size (tBTA_DM_MSG *p_data)
{
BTM_SetMinEncKeySize(p_data->set_min_enc_key_size.key_size, p_data->set_min_enc_key_size.set_min_enc_key_size_cb);
}
#endif
#endif
/*******************************************************************************
**
@@ -1156,7 +1188,7 @@ void bta_dm_add_device (tBTA_DM_MSG *p_data)
}
if (p_dev->is_trusted) {
/* covert BTA service mask to BTM mask */
/* convert BTA service mask to BTM mask */
while (p_dev->tm && (index < BTA_MAX_SERVICE_ID)) {
if (p_dev->tm & (UINT32)(1 << index)) {
@@ -1184,7 +1216,7 @@ void bta_dm_add_device (tBTA_DM_MSG *p_data)
** Function bta_dm_close_acl
**
** Description This function forces to close the connection to a remote device
** and optionaly remove the device from security database if
** and optionally remove the device from security database if
** required.
****
*******************************************************************************/
@@ -2707,7 +2739,7 @@ static void bta_dm_discover_device(BD_ADDR remote_bd_addr)
&bta_dm_search_cb.services_found );
}
/* if seaching with EIR is not completed */
/* if searching with EIR is not completed */
if (bta_dm_search_cb.services_to_search) {
/* check whether connection already exists to the device
if connection exists, we don't have to wait for ACL
@@ -3794,7 +3826,7 @@ static void bta_dm_disable_conn_down_timer_cback (TIMER_LIST_ENT *p_tle)
tBTA_SYS_HW_MSG *sys_enable_event;
#if (BTA_DM_PM_INCLUDED == TRUE)
/* disable the power managment module */
/* disable the power management module */
bta_dm_disable_pm();
#endif /* #if (BTA_DM_PM_INCLUDED == TRUE) */
@@ -4138,7 +4170,7 @@ static void bta_dm_set_eir (char *local_name)
if (p_bta_dm_eir_cfg->bta_dm_eir_included_name) {
/* if local name is not provided, get it from controller */
if ( local_name == NULL ) {
if ( BTM_ReadLocalDeviceName( &local_name ) != BTM_SUCCESS ) {
if ( BTM_ReadLocalDeviceName( &local_name, BT_DEVICE_TYPE_BREDR) != BTM_SUCCESS ) {
APPL_TRACE_ERROR("Fail to read local device name for EIR");
}
}
@@ -4181,7 +4213,7 @@ static void bta_dm_set_eir (char *local_name)
p = (UINT8 *)p_buf + BTM_HCI_EIR_OFFSET; /* reset p */
#endif // BTA_EIR_CANNED_UUID_LIST
/* if UUID doesn't fit remaing space, shorten local name */
/* if UUID doesn't fit remaining space, shorten local name */
if ( local_name_len > (free_eir_length - 4 - num_uuid * LEN_UUID_16)) {
APPL_TRACE_WARNING("BTA EIR: local name is shortened");
local_name_len = p_bta_dm_eir_cfg->bta_dm_eir_min_name_len;
@@ -5234,14 +5266,14 @@ void bta_dm_ble_disconnect (tBTA_DM_MSG *p_data)
**
** Description This function set the LE random address for the device.
**
** Parameters: rand_addr:the random address whitch should be setting
** Parameters: rand_addr:the random address which should be setting
** Explanation: This function added by Yulong at 2016/9/9
*******************************************************************************/
void bta_dm_ble_set_rand_address(tBTA_DM_MSG *p_data)
{
tBTM_STATUS status = BTM_SET_STATIC_RAND_ADDR_FAIL;
if (p_data->set_addr.addr_type != BLE_ADDR_RANDOM) {
APPL_TRACE_ERROR("Invalid random adress type = %d\n", p_data->set_addr.addr_type);
APPL_TRACE_ERROR("Invalid random address type = %d\n", p_data->set_addr.addr_type);
if(p_data->set_addr.p_set_rand_addr_cback) {
(*p_data->set_addr.p_set_rand_addr_cback)(status);
}
@@ -5596,7 +5628,7 @@ void bta_dm_ble_set_data_length(tBTA_DM_MSG *p_data)
}
p_acl_cb->p_set_pkt_data_cback = p_data->ble_set_data_length.p_set_pkt_data_cback;
// if the value of the data length is same, triger callback directly
// if the value of the data length is same, trigger callback directly
if(p_data->ble_set_data_length.tx_data_length == p_acl_cb->data_length_params.tx_len) {
if(p_data->ble_set_data_length.p_set_pkt_data_cback) {
(*p_data->ble_set_data_length.p_set_pkt_data_cback)(status, &p_acl_cb->data_length_params);
@@ -5605,7 +5637,7 @@ void bta_dm_ble_set_data_length(tBTA_DM_MSG *p_data)
}
if(p_acl_cb->data_len_updating) {
// aleady have one cmd
// already have one cmd
if(p_acl_cb->data_len_waiting) {
status = BTM_ILLEGAL_ACTION;
} else {
@@ -5791,6 +5823,28 @@ void bta_dm_ble_gap_clear_adv(tBTA_DM_MSG *p_data)
}
}
void bta_dm_ble_gap_set_rpa_timeout(tBTA_DM_MSG *p_data)
{
APPL_TRACE_API("%s, rpa_timeout = %d", __func__, p_data->set_rpa_timeout.rpa_timeout);
BTM_BleSetRpaTimeout(p_data->set_rpa_timeout.rpa_timeout,p_data->set_rpa_timeout.p_set_rpa_timeout_cback);
}
void bta_dm_ble_gap_add_dev_to_resolving_list(tBTA_DM_MSG *p_data)
{
APPL_TRACE_API("%s", __func__);
BTM_BleAddDevToResolvingList(p_data->add_dev_to_resolving_list.addr,
p_data->add_dev_to_resolving_list.addr_type,
p_data->add_dev_to_resolving_list.irk,
p_data->add_dev_to_resolving_list.p_add_dev_to_resolving_list_callback);
}
void bta_dm_ble_gap_set_privacy_mode(tBTA_DM_MSG *p_data)
{
APPL_TRACE_API("%s, privacy_mode = %d", __func__, p_data->ble_set_privacy_mode.privacy_mode);
BTM_BleSetPrivacyMode(p_data->ble_set_privacy_mode.addr_type, p_data->ble_set_privacy_mode.addr,
p_data->ble_set_privacy_mode.privacy_mode, p_data->ble_set_privacy_mode.p_cback);
}
#if (BLE_50_FEATURE_SUPPORT == TRUE)
void bta_dm_ble_gap_dtm_enhance_tx_start(tBTA_DM_MSG *p_data)
{
@@ -6472,7 +6526,7 @@ static void bta_dm_gatt_disc_result(tBTA_GATT_ID service_id)
}
} else {
APPL_TRACE_ERROR("%s out of room to accomodate more service ids ble_raw_size = %d ble_raw_used = %d", __FUNCTION__, bta_dm_search_cb.ble_raw_size, bta_dm_search_cb.ble_raw_used );
APPL_TRACE_ERROR("%s out of room to accommodate more service ids ble_raw_size = %d ble_raw_used = %d", __FUNCTION__, bta_dm_search_cb.ble_raw_size, bta_dm_search_cb.ble_raw_used );
}
APPL_TRACE_API("%s service_id_uuid_len=%d ", __func__, service_id.uuid.len);
+158 -41
View File
@@ -166,7 +166,7 @@ void BTA_DisableTestMode(void)
** Returns void
**
*******************************************************************************/
void BTA_DmSetDeviceName(const char *p_name)
void BTA_DmSetDeviceName(const char *p_name, tBT_DEVICE_TYPE name_type)
{
tBTA_DM_API_SET_NAME *p_msg;
@@ -176,6 +176,7 @@ void BTA_DmSetDeviceName(const char *p_name)
/* truncate the name if needed */
BCM_STRNCPY_S((char *)p_msg->name, p_name, BD_NAME_LEN);
p_msg->name[BD_NAME_LEN] = '\0';
p_msg->name_type = name_type;
bta_sys_sendmsg(p_msg);
}
@@ -191,13 +192,14 @@ void BTA_DmSetDeviceName(const char *p_name)
** Returns void
**
*******************************************************************************/
void BTA_DmGetDeviceName(tBTA_GET_DEV_NAME_CBACK *p_cback)
void BTA_DmGetDeviceName(tBTA_GET_DEV_NAME_CBACK *p_cback, tBT_DEVICE_TYPE name_type)
{
tBTA_DM_API_GET_NAME *p_msg;
if ((p_msg = (tBTA_DM_API_GET_NAME *) osi_malloc(sizeof(tBTA_DM_API_GET_NAME))) != NULL) {
p_msg->hdr.event = BTA_DM_API_GET_NAME_EVT;
p_msg->p_cback = p_cback;
p_msg->name_type = name_type;
bta_sys_sendmsg(p_msg);
}
}
@@ -227,6 +229,21 @@ void BTA_DmCfgCoexStatus(UINT8 op, UINT8 type, UINT8 status)
}
#endif
void BTA_DmsendVendorHciCmd(UINT16 opcode, UINT8 param_len, UINT8 *p_param_buf, tBTA_SEND_VENDOR_HCI_CMPL_CBACK p_vendor_cmd_complete_cback)
{
tBTA_DM_API_SEND_VENDOR_HCI_CMD *p_msg;
if ((p_msg = (tBTA_DM_API_SEND_VENDOR_HCI_CMD *)osi_malloc(sizeof(tBTA_DM_API_SEND_VENDOR_HCI_CMD) + param_len)) != NULL) {
p_msg->hdr.event = BTA_DM_API_SEND_VENDOR_HCI_CMD_EVT;
p_msg->opcode = opcode;
p_msg->param_len = param_len;
p_msg->p_param_buf = (UINT8 *)(p_msg + 1);
memcpy(p_msg->p_param_buf, p_param_buf, param_len);
p_msg->vendor_hci_cb = p_vendor_cmd_complete_cback;
bta_sys_sendmsg(p_msg);
}
}
#if (CLASSIC_BT_INCLUDED == TRUE)
void BTA_DmConfigEir(tBTA_DM_EIR_CONF *eir_config)
@@ -365,6 +382,31 @@ void BTA_DmSetAclPktTypes(BD_ADDR remote_addr, UINT16 pkt_types, tBTM_CMPL_CB *p
bta_sys_sendmsg(p_msg);
}
}
/*******************************************************************************
**
** Function BTA_DmSetMinEncKeySize
**
** Description This function sets the minimal size of encryption key.
**
**
** Returns void
**
*******************************************************************************/
#if (ENC_KEY_SIZE_CTRL_MODE != ENC_KEY_SIZE_CTRL_MODE_NONE)
void BTA_DmSetMinEncKeySize(UINT8 key_size, tBTM_CMPL_CB *p_cb)
{
tBTA_DM_API_SET_MIN_ENC_KEY_SIZE *p_msg;
if ((p_msg = (tBTA_DM_API_SET_MIN_ENC_KEY_SIZE *) osi_malloc(sizeof(tBTA_DM_API_SET_MIN_ENC_KEY_SIZE))) != NULL) {
p_msg->hdr.event = BTA_DM_API_SET_MIN_ENC_KEY_SIZE_EVT;
p_msg->key_size = key_size;
p_msg->set_min_enc_key_size_cb = p_cb;
bta_sys_sendmsg(p_msg);
}
}
#endif
#endif /// CLASSIC_BT_INCLUDED == TRUE
#if (SDP_INCLUDED == TRUE)
@@ -940,7 +982,7 @@ void BTA_DmAddDevice(BD_ADDR bd_addr, DEV_CLASS dev_class, LINK_KEY link_key,
**
** Function BTA_DmRemoveDevice
**
** Description This function removes a device fromthe security database list of
** Description This function removes a device from the security database list of
** peer device. It manages unpairing even while connected.
**
**
@@ -1158,7 +1200,7 @@ void BTA_DmAddBleDevice(BD_ADDR bd_addr, tBLE_ADDR_TYPE addr_type, int auth_mode
** Description Send BLE SMP passkey reply.
**
** Parameters: bd_addr - BD address of the peer
** accept - passkey entry sucessful or declined.
** accept - passkey entry successful or declined.
** passkey - passkey value, must be a 6 digit number,
** can be lead by 0.
**
@@ -1997,7 +2039,7 @@ void BTA_DmDiscoverExt(BD_ADDR bd_addr, tBTA_SERVICE_MASK_EXT *p_services,
** p_services: if service is not empty, service discovery will be done.
** for all GATT based service condition, put num_uuid, and
** p_uuid is the pointer to the list of UUID values.
** p_cback: callback functino when search is completed.
** p_cback: callback function when search is completed.
**
**
**
@@ -2085,7 +2127,7 @@ void BTA_DmBleUpdateConnectionParam(BD_ADDR bd_addr, UINT16 min_int,
**
** Description Enable/disable privacy on the local device
**
** Parameters: privacy_enable - enable/disabe privacy on remote device.
** Parameters: privacy_enable - enable/disable privacy on remote device.
**
** Returns void
**
@@ -2137,7 +2179,7 @@ void BTA_DmBleConfigLocalIcon(uint16_t icon)
**
** Function BTA_BleEnableAdvInstance
**
** Description This function enable a Multi-ADV instance with the specififed
** Description This function enable a Multi-ADV instance with the specified
** adv parameters
**
** Parameters p_params: pointer to the adv parameter structure.
@@ -2176,7 +2218,7 @@ void BTA_BleEnableAdvInstance (tBTA_BLE_ADV_PARAMS *p_params,
**
** Function BTA_BleUpdateAdvInstParam
**
** Description This function update a Multi-ADV instance with the specififed
** Description This function update a Multi-ADV instance with the specified
** adv parameters.
**
** Parameters inst_id: Adv instance to update the parameter.
@@ -2207,7 +2249,7 @@ void BTA_BleUpdateAdvInstParam (UINT8 inst_id, tBTA_BLE_ADV_PARAMS *p_params)
**
** Function BTA_BleCfgAdvInstData
**
** Description This function configure a Multi-ADV instance with the specififed
** Description This function configure a Multi-ADV instance with the specified
** adv data or scan response data.
**
** Parameter inst_id: Adv instance to configure the adv data or scan response.
@@ -2637,6 +2679,21 @@ void BTA_DmBleDtmStop(tBTA_DTM_CMD_CMPL_CBACK *p_dtm_cmpl_cback)
}
}
void BTA_DmBleSetPrivacyMode(uint8_t addr_type, BD_ADDR addr, uint8_t privacy_mode, tBTA_SET_PRIVACY_MODE_CMPL_CBACK *p_cback)
{
tBTA_DM_API_SET_PRIVACY_MODE *p_msg;
if ((p_msg = (tBTA_DM_API_SET_PRIVACY_MODE *)osi_malloc(sizeof(tBTA_DM_API_SET_PRIVACY_MODE)))
!= NULL) {
p_msg->hdr.event = BTA_DM_API_SET_PRIVACY_MODE_EVT;
p_msg->addr_type = addr_type;
memcpy(p_msg->addr, addr, sizeof(BD_ADDR));
p_msg->privacy_mode = privacy_mode;
p_msg->p_cback = p_cback;
bta_sys_sendmsg(p_msg);
}
}
#endif
/*******************************************************************************
@@ -2650,7 +2707,7 @@ void BTA_DmBleDtmStop(tBTA_DTM_CMD_CMPL_CBACK *p_dtm_cmpl_cback)
**
** Parameters: bd_addr - Address of the peer device
** transport - transport of the link to be encruypted
** p_callback - Pointer to callback function to indicat the
** p_callback - Pointer to callback function to indicate the
** link encryption status
** sec_act - This is the security action to indicate
** what kind of BLE security level is required for
@@ -2830,7 +2887,7 @@ extern void BTA_DmBleStopAdvertising(void)
**
** Description This function set the random address for the APP
**
** Parameters rand_addr: the random address whith should be setting
** Parameters rand_addr: the random address with should be setting
** p_set_rand_addr_cback: complete callback
** Returns void
**
@@ -2846,7 +2903,68 @@ extern void BTA_DmSetRandAddress(BD_ADDR rand_addr, tBTA_SET_RAND_ADDR_CBACK *p_
p_msg->hdr.event = BTA_DM_API_SET_RAND_ADDR_EVT;
p_msg->addr_type = BLE_ADDR_RANDOM;
p_msg->p_set_rand_addr_cback = p_set_rand_addr_cback;
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
}
}
/*******************************************************************************
**
** Function BTA_DmBleSetRpaTimeout
**
** Description This function sets the Resolvable Private Address (RPA) timeout
** for the Bluetooth device. The RPA timeout defines how long an RPA
** remains in use before a new one is generated.
**
** Parameters rpa_timeout: The timeout in seconds within the range of 1s to 1 hour
** as defined by the Bluetooth specification. This duration
** specifies how long the controller uses an RPA before
** generating a new one.
** Returns void
**
**
*******************************************************************************/
void BTA_DmBleSetRpaTimeout(uint16_t rpa_timeout,tBTA_SET_RPA_TIMEOUT_CMPL_CBACK *p_set_rpa_timeout_cback)
{
tBTA_DM_API_SET_RPA_TIMEOUT *p_msg;
if ((p_msg = (tBTA_DM_API_SET_RPA_TIMEOUT *) osi_malloc(sizeof(tBTA_DM_API_SET_RPA_TIMEOUT))) != NULL) {
memset(p_msg, 0, sizeof(tBTA_DM_API_SET_RPA_TIMEOUT));
p_msg->hdr.event = BTA_DM_API_SET_RPA_TIMEOUT_EVT;
p_msg->rpa_timeout = rpa_timeout; // Assign the RPA timeout value to the message
p_msg->p_set_rpa_timeout_cback = p_set_rpa_timeout_cback;
bta_sys_sendmsg(p_msg);
}
}
/*******************************************************************************
**
** Function BTA_DmBleAddDevToResolvingList
**
** Description This function adds a device to the resolving list of the
** Bluetooth controller. The resolving list is used for resolving
** the identity of devices using resolvable private addresses (RPAs).
**
** Parameters addr: Bluetooth device address to be added to the resolving list
** addr_type: Type of the address (public or random)
** irk: Identity Resolving Key (IRK) of the device
** add_dev_to_resolving_list_callback: Callback function to be invoked
** upon completion of the operation
**
** Returns void
**
*******************************************************************************/
void BTA_DmBleAddDevToResolvingList(BD_ADDR addr,
uint8_t addr_type,
PEER_IRK irk,
tBTA_ADD_DEV_TO_RESOLVING_LIST_CMPL_CBACK *add_dev_to_resolving_list_callback)
{
tBTA_DM_API_ADD_DEV_TO_RESOLVING_LIST *p_msg;
if ((p_msg = (tBTA_DM_API_ADD_DEV_TO_RESOLVING_LIST *) osi_malloc(sizeof(tBTA_DM_API_ADD_DEV_TO_RESOLVING_LIST))) != NULL) {
memset(p_msg, 0, sizeof(tBTA_DM_API_ADD_DEV_TO_RESOLVING_LIST));
p_msg->hdr.event = BTA_DM_API_ADD_DEV_TO_RESOLVING_LIST_EVT;
memcpy(p_msg->addr, addr, BD_ADDR_LEN); // Copy the device address to the message
p_msg->addr_type = addr_type; // Assign the address type to the message
memcpy(p_msg->irk, irk, PEER_IRK_LEN); // Copy the IRK to the message
p_msg->p_add_dev_to_resolving_list_callback = add_dev_to_resolving_list_callback;
bta_sys_sendmsg(p_msg);
}
}
@@ -2906,7 +3024,6 @@ void BTA_VendorCleanup (void)
}
#endif
btm_ble_multi_adv_cleanup();
}
#if (BLE_50_FEATURE_SUPPORT == TRUE)
void BTA_DmBleGapReadPHY(BD_ADDR addr)
@@ -2917,7 +3034,7 @@ void BTA_DmBleGapReadPHY(BD_ADDR addr)
memset(p_msg, 0, sizeof(tBTA_DM_API_READ_PHY));
p_msg->hdr.event = BTA_DM_API_READ_PHY_EVT;
memcpy(p_msg->bd_addr, addr, BD_ADDR_LEN);
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -2929,13 +3046,13 @@ void BTA_DmBleGapSetPreferedDefaultPHY(tBTA_DM_BLE_GAP_PHY_MASK tx_phy_mask,
tBTA_DM_BLE_GAP_PHY_MASK rx_phy_mask)
{
tBTA_DM_API_SET_PER_DEF_PHY *p_msg;
APPL_TRACE_API("%s, Set prefered default phy.", __func__);
APPL_TRACE_API("%s, Set preferred default phy.", __func__);
if ((p_msg = (tBTA_DM_API_SET_PER_DEF_PHY *) osi_malloc(sizeof(tBTA_DM_API_SET_PER_DEF_PHY))) != NULL) {
memset(p_msg, 0, sizeof(tBTA_DM_API_SET_PER_DEF_PHY));
p_msg->hdr.event = BTA_DM_API_SET_PER_DEF_PHY_EVT;
p_msg->tx_phy_mask = tx_phy_mask;
p_msg->rx_phy_mask = rx_phy_mask;
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -2950,7 +3067,7 @@ void BTA_DmBleGapSetPreferedPHY(BD_ADDR addr,
UINT16 phy_options)
{
tBTA_DM_API_SET_PER_PHY *p_msg;
APPL_TRACE_API("%s, Set prefered phy.", __func__);
APPL_TRACE_API("%s, Set preferred phy.", __func__);
if ((p_msg = (tBTA_DM_API_SET_PER_PHY *) osi_malloc(sizeof(tBTA_DM_API_SET_PER_PHY))) != NULL) {
memset(p_msg, 0, sizeof(tBTA_DM_API_SET_PER_PHY));
p_msg->hdr.event = BTA_DM_API_SET_PER_PHY_EVT;
@@ -2959,7 +3076,7 @@ void BTA_DmBleGapSetPreferedPHY(BD_ADDR addr,
p_msg->tx_phy_mask = tx_phy_mask;
p_msg->rx_phy_mask = rx_phy_mask;
p_msg->phy_options = phy_options;
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -2975,7 +3092,7 @@ void BTA_DmBleGapExtAdvSetRandaddr(UINT16 instance, BD_ADDR addr)
p_msg->hdr.event = BTA_DM_API_SET_EXT_ADV_RAND_ADDR_EVT;
p_msg->instance = instance;
memcpy(&p_msg->rand_addr, addr, BD_ADDR_LEN);
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -2993,7 +3110,7 @@ void BTA_DmBleGapExtAdvSetParams(UINT16 instance,
p_msg->hdr.event = BTA_DM_API_SET_EXT_ADV_PARAMS_EVT;
p_msg->instance = instance;
memcpy(&p_msg->params, params, sizeof(tBTA_DM_BLE_GAP_EXT_ADV_PARAMS));
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3016,7 +3133,7 @@ void BTA_DmBleGapConfigExtAdvDataRaw(BOOLEAN is_scan_rsp, UINT8 instance, UINT16
if (data) {
memcpy(p_msg->data, data, length);
}
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3036,7 +3153,7 @@ void BTA_DmBleGapExtAdvEnable(BOOLEAN enable, UINT8 num, tBTA_DM_BLE_EXT_ADV *ex
if (ext_adv) {
memcpy(p_msg->ext_adv, ext_adv, sizeof(tBTA_DM_BLE_EXT_ADV)*num);
}
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3051,7 +3168,7 @@ void BTA_DmBleGapExtAdvSetRemove(UINT8 instance)
memset(p_msg, 0, sizeof(tBTA_DM_API_BLE_EXT_ADV_SET_REMOVE));
p_msg->hdr.event = BTA_DM_API_EXT_ADV_SET_REMOVE_EVT;
p_msg->instance = instance;
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3065,7 +3182,7 @@ void BTA_DmBleGapExtAdvSetClear(void)
if ((p_msg = (tBTA_DM_API_BLE_EXT_ADV_SET_CLEAR *) osi_malloc(sizeof(tBTA_DM_API_BLE_EXT_ADV_SET_CLEAR))) != NULL) {
memset(p_msg, 0, sizeof(tBTA_DM_API_BLE_EXT_ADV_SET_CLEAR));
p_msg->hdr.event = BTA_DM_API_EXT_ADV_SET_CLEAR_EVT;
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3082,7 +3199,7 @@ void BTA_DmBleGapPeriodicAdvSetParams(UINT8 instance,
p_msg->hdr.event = BTA_DM_API_PERIODIC_ADV_SET_PARAMS_EVT;
p_msg->instance = instance;
memcpy(&p_msg->params, params, sizeof(tBTA_DM_BLE_Periodic_Adv_Params));
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3104,7 +3221,7 @@ void BTA_DmBleGapPeriodicAdvCfgDataRaw(UINT8 instance, UINT16 length,
memcpy(p_msg->data, data, length);
p_msg->data = length != 0 ? (UINT8 *)(p_msg + 1) : NULL;
p_msg->only_update_did = only_update_did;
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3121,7 +3238,7 @@ void BTA_DmBleGapPeriodicAdvEnable(UINT8 enable, UINT8 instance)
p_msg->hdr.event = BTA_DM_API_PERIODIC_ADV_ENABLE_EVT;
p_msg->instance = instance;
p_msg->enable = enable;
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3137,7 +3254,7 @@ void BTA_DmBleGapPeriodicAdvCreateSync(tBTA_DM_BLE_Periodic_Sync_Params *params)
memset(p_msg, 0, sizeof(tBTA_DM_API_PERIODIC_ADV_SYNC));
p_msg->hdr.event = BTA_DM_API_PERIODIC_ADV_SYNC_EVT;
memcpy(&p_msg->params, params, sizeof(tBTA_DM_BLE_Periodic_Sync_Params));
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3152,7 +3269,7 @@ void BTA_DmBleGapPeriodicAdvSyncCancel(void)
if ((p_msg = (tBTA_DM_API_PERIODIC_ADV_SYNC_CANCEL *) osi_malloc(sizeof(tBTA_DM_API_PERIODIC_ADV_SYNC_CANCEL))) != NULL) {
memset(p_msg, 0, sizeof(tBTA_DM_API_PERIODIC_ADV_SYNC_CANCEL));
p_msg->hdr.event = BTA_DM_API_PERIODIC_ADV_SYNC_CANCEL_EVT;
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3168,7 +3285,7 @@ void BTA_DmBleGapPeriodicAdvSyncTerm(UINT16 sync_handle)
memset(p_msg, 0, sizeof(tBTA_DM_API_PERIODIC_ADV_SYNC_TERM));
p_msg->hdr.event = BTA_DM_API_PERIODIC_ADV_SYNC_TERMINATE_EVT;
p_msg->sync_handle = sync_handle;
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3188,7 +3305,7 @@ void BTA_DmBleGapPeriodicAdvAddDevToList(tBLE_ADDR_TYPE addr_type,
p_msg->addr_type = addr_type;
p_msg->sid = sid;
memcpy(p_msg->addr, addr, sizeof(BD_ADDR));
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3208,7 +3325,7 @@ void BTA_DmBleGapPeriodicAdvRemoveDevFromList(tBLE_ADDR_TYPE addr_type,
p_msg->addr_type = addr_type;
p_msg->sid = sid;
memcpy(p_msg->addr, addr, sizeof(BD_ADDR));
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3223,7 +3340,7 @@ void BTA_DmBleGapPeriodicAdvClearDev(void)
if ((p_msg = (tBTA_DM_API_PERIODIC_ADV_DEV_CLEAR *) osi_malloc(sizeof(tBTA_DM_API_PERIODIC_ADV_DEV_CLEAR))) != NULL) {
memset(p_msg, 0, sizeof(tBTA_DM_API_PERIODIC_ADV_DEV_CLEAR));
p_msg->hdr.event = BTA_DM_API_PERIODIC_ADV_CLEAR_DEV_EVT;
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3239,7 +3356,7 @@ void BTA_DmBleGapSetExtScanParams(tBTA_DM_BLE_EXT_SCAN_PARAMS *params)
memset(p_msg, 0, sizeof(tBTA_DM_API_SET_EXT_SCAN_PARAMS));
p_msg->hdr.event = BTA_DM_API_SET_EXT_SCAN_PARAMS_EVT;
memcpy(&p_msg->params, params, sizeof(tBTA_DM_BLE_EXT_SCAN_PARAMS));
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3257,7 +3374,7 @@ void BTA_DmBleGapExtScan(BOOLEAN start, UINT32 duration, UINT16 period)
p_msg->start = start;
p_msg->duration = duration;
p_msg->period = period;
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3291,7 +3408,7 @@ void BTA_DmBleGapPreferExtConnectParamsSet(BD_ADDR bd_addr,
if (phy_coded_conn_params) {
memcpy(&p_msg->phy_coded_conn_params, phy_coded_conn_params, sizeof(tBTA_DM_BLE_CONN_PARAMS));
}
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3310,7 +3427,7 @@ void BTA_DmBleGapExtConnect(tBLE_ADDR_TYPE own_addr_type, const BD_ADDR peer_add
p_msg->hdr.event = BTA_DM_API_EXT_CONN_EVT;
p_msg->own_addr_type = own_addr_type;
memcpy(p_msg->peer_addr, peer_addr, sizeof(BD_ADDR));
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3363,7 +3480,7 @@ void BTA_DmBleGapPeriodicAdvRecvEnable(UINT16 sync_handle, UINT8 enable)
p_msg->hdr.event = BTA_DM_API_PERIODIC_ADV_RECV_ENABLE_EVT;
p_msg->sync_handle = sync_handle;
p_msg->enable = enable;
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3380,7 +3497,7 @@ void BTA_DmBleGapPeriodicAdvSyncTrans(BD_ADDR peer_addr, UINT16 service_data, UI
memcpy(p_msg->addr, peer_addr, sizeof(BD_ADDR));
p_msg->service_data = service_data;
p_msg->sync_handle = sync_handle;
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3397,7 +3514,7 @@ void BTA_DmBleGapPeriodicAdvSetInfoTrans(BD_ADDR peer_addr, UINT16 service_data,
memcpy(p_msg->addr, peer_addr, sizeof(BD_ADDR));
p_msg->service_data = service_data;
p_msg->adv_hanlde = adv_handle;
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
@@ -3413,7 +3530,7 @@ void BTA_DmBleGapSetPeriodicAdvSyncTransParams(BD_ADDR peer_addr, tBTA_DM_BLE_PA
p_msg->hdr.event = BTA_DM_API_SET_PERIODIC_ADV_SYNC_TRANS_PARAMS_EVT;
memcpy(p_msg->addr, peer_addr, sizeof(BD_ADDR));
memcpy(&p_msg->params, params, sizeof(tBTA_DM_BLE_PAST_PARAMS));
//start sent the msg to the bta system control moudle
//start sent the msg to the bta system control module
bta_sys_sendmsg(p_msg);
} else {
APPL_TRACE_ERROR("%s malloc failed", __func__);
+10 -1
View File
@@ -31,7 +31,9 @@
#include "osi/allocator.h"
#include <string.h>
#ifdef CONFIG_ESP_COEX_ENABLED
#include "esp_coexist.h"
#endif
/*****************************************************************************
** Constants and types
@@ -65,11 +67,15 @@ const tBTA_DM_ACTION bta_dm_action[BTA_DM_MAX_EVT] = {
#if (ESP_COEX_VSC_INCLUDED == TRUE)
bta_dm_cfg_coex_status, /* BTA_DM_API_CFG_COEX_ST_EVT */
#endif
bta_dm_send_vendor_hci, /* BTA_DM_API_SEND_VENDOR_HCI_CMD_EVT */
#if (CLASSIC_BT_INCLUDED == TRUE)
bta_dm_config_eir, /* BTA_DM_API_CONFIG_EIR_EVT */
bta_dm_set_page_timeout, /* BTA_DM_API_PAGE_TO_SET_EVT */
bta_dm_get_page_timeout, /* BTA_DM_API_PAGE_TO_GET_EVT */
bta_dm_set_acl_pkt_types, /* BTA_DM_API_SET_ACL_PKT_TYPES_EVT */
#if (ENC_KEY_SIZE_CTRL_MODE != ENC_KEY_SIZE_CTRL_MODE_NONE)
bta_dm_set_min_enc_key_size, /* BTA_DM_API_SET_MIN_ENC_KEY_SIZE_EVT */
#endif
#endif
bta_dm_set_afh_channels, /* BTA_DM_API_SET_AFH_CHANNELS_EVT */
#if (SDP_INCLUDED == TRUE)
@@ -87,7 +93,7 @@ const tBTA_DM_ACTION bta_dm_action[BTA_DM_MAX_EVT] = {
bta_dm_pin_reply, /* BTA_DM_API_PIN_REPLY_EVT */
#endif ///SMP_INCLUDED == TRUE
#if (BTA_DM_PM_INCLUDED == TRUE)
/* power manger events */
/* power manager events */
bta_dm_pm_btm_status, /* BTA_DM_PM_BTM_STATUS_EVT */
bta_dm_pm_timer, /* BTA_DM_PM_TIMER_EVT */
#endif /* #if (BTA_DM_PM_INCLUDED == TRUE) */
@@ -226,6 +232,9 @@ const tBTA_DM_ACTION bta_dm_action[BTA_DM_MAX_EVT] = {
bta_dm_ble_gap_dtm_rx_start, /* BTA_DM_API_DTM_RX_START_EVT */
bta_dm_ble_gap_dtm_stop, /* BTA_DM_API_DTM_STOP_EVT */
bta_dm_ble_gap_clear_adv, /* BTA_DM_API_BLE_CLEAR_ADV_EVT */
bta_dm_ble_gap_set_rpa_timeout, /* BTA_DM_API_SET_RPA_TIMEOUT_EVT */
bta_dm_ble_gap_add_dev_to_resolving_list, /* BTA_DM_API_ADD_DEV_TO_RESOLVING_LIST_EVT */
bta_dm_ble_gap_set_privacy_mode, /* BTA_DM_API_SET_PRIVACY_MODE_EVT */
#endif
};
@@ -57,11 +57,15 @@ enum {
#if (ESP_COEX_VSC_INCLUDED == TRUE)
BTA_DM_API_CFG_COEX_ST_EVT,
#endif
BTA_DM_API_SEND_VENDOR_HCI_CMD_EVT,
#if (CLASSIC_BT_INCLUDED == TRUE)
BTA_DM_API_CONFIG_EIR_EVT,
BTA_DM_API_PAGE_TO_SET_EVT,
BTA_DM_API_PAGE_TO_GET_EVT,
BTA_DM_API_SET_ACL_PKT_TYPES_EVT,
#if (ENC_KEY_SIZE_CTRL_MODE != ENC_KEY_SIZE_CTRL_MODE_NONE)
BTA_DM_API_SET_MIN_ENC_KEY_SIZE_EVT,
#endif
#endif
BTA_DM_API_SET_AFH_CHANNELS_EVT,
#if (SDP_INCLUDED == TRUE)
@@ -80,7 +84,7 @@ enum {
BTA_DM_API_PIN_REPLY_EVT,
#endif ///SMP_INCLUDED == TRUE
#if (BTA_DM_PM_INCLUDED == TRUE)
/* power manger events */
/* power manager events */
BTA_DM_PM_BTM_STATUS_EVT,
BTA_DM_PM_TIMER_EVT,
#endif /* #if (BTA_DM_PM_INCLUDED == TRUE) */
@@ -219,6 +223,9 @@ enum {
BTA_DM_API_DTM_RX_START_EVT,
BTA_DM_API_DTM_STOP_EVT,
BTA_DM_API_BLE_CLEAR_ADV_EVT,
BTA_DM_API_SET_RPA_TIMEOUT_EVT,
BTA_DM_API_ADD_DEV_TO_RESOLVING_LIST_EVT,
BTA_DM_API_SET_PRIVACY_MODE_EVT,
#endif
BTA_DM_MAX_EVT
};
@@ -249,11 +256,13 @@ typedef struct {
typedef struct {
BT_HDR hdr;
BD_NAME name; /* max 248 bytes name, plus must be Null terminated */
tBT_DEVICE_TYPE name_type; /* name for BLE, name for BT or name for BTDM */
} tBTA_DM_API_SET_NAME;
typedef struct {
BT_HDR hdr;
BT_HDR hdr;
tBTA_GET_DEV_NAME_CBACK *p_cback;
tBT_DEVICE_TYPE name_type;
} tBTA_DM_API_GET_NAME;
#if (ESP_COEX_VSC_INCLUDED == TRUE)
@@ -265,6 +274,14 @@ typedef struct {
} tBTA_DM_API_CFG_COEX_STATUS;
#endif
typedef struct {
BT_HDR hdr;
UINT16 opcode;
UINT8 param_len;
UINT8 *p_param_buf;
tBTA_SEND_VENDOR_HCI_CMPL_CBACK *vendor_hci_cb;
}tBTA_DM_API_SEND_VENDOR_HCI_CMD;
/* data type for BTA_DM_API_CONFIG_EIR_EVT */
typedef struct {
BT_HDR hdr;
@@ -308,6 +325,15 @@ typedef struct {
tBTM_CMPL_CB *set_acl_pkt_types_cb;
} tBTA_DM_API_SET_ACL_PKT_TYPES;
#if (ENC_KEY_SIZE_CTRL_MODE != ENC_KEY_SIZE_CTRL_MODE_NONE)
/* data type for BTA_DM_API_SET_MIN_ENC_KEY_SIZE_EVT */
typedef struct {
BT_HDR hdr;
UINT8 key_size;
tBTM_CMPL_CB *set_min_enc_key_size_cb;
} tBTA_DM_API_SET_MIN_ENC_KEY_SIZE;
#endif
/* data type for BTA_DM_API_GET_REMOTE_NAME_EVT */
typedef struct {
BT_HDR hdr;
@@ -660,7 +686,7 @@ typedef struct {
tBTA_DM_BLE_SEL_CBACK *p_select_cback;
} tBTA_DM_API_BLE_SET_BG_CONN_TYPE;
/* set prefered BLE connection parameters for a device */
/* set preferred BLE connection parameters for a device */
typedef struct {
BT_HDR hdr;
BD_ADDR peer_bda;
@@ -761,6 +787,20 @@ typedef struct {
BT_HDR hdr;
} tBTA_DM_APT_CLEAR_ADDR;
typedef struct {
BT_HDR hdr;
UINT16 rpa_timeout;
tBTA_SET_RPA_TIMEOUT_CMPL_CBACK *p_set_rpa_timeout_cback;
} tBTA_DM_API_SET_RPA_TIMEOUT;
typedef struct {
BT_HDR hdr; // Event header
esp_bd_addr_t addr; // Bluetooth device address
UINT8 addr_type; // Type of the address
UINT8 irk[PEER_IRK_LEN]; // Identity Resolving Key (IRK)
tBTA_ADD_DEV_TO_RESOLVING_LIST_CMPL_CBACK *p_add_dev_to_resolving_list_callback; // Callback function pointer
} tBTA_DM_API_ADD_DEV_TO_RESOLVING_LIST;
/* set adv parameter for BLE advertising */
typedef struct {
BT_HDR hdr;
@@ -911,6 +951,14 @@ typedef struct {
tBTA_CLEAR_ADV_CMPL_CBACK *p_clear_adv_cback;
} tBTA_DM_API_CLEAR_ADV;
typedef struct {
BT_HDR hdr;
tBLE_ADDR_TYPE addr_type;
BD_ADDR addr;
UINT8 privacy_mode;
tBTA_SET_PRIVACY_MODE_CMPL_CBACK *p_cback;
} tBTA_DM_API_SET_PRIVACY_MODE;
#endif /* BLE_INCLUDED */
/* data type for BTA_DM_API_REMOVE_ACL_EVT */
@@ -1162,12 +1210,16 @@ typedef union {
#if (ESP_COEX_VSC_INCLUDED == TRUE)
tBTA_DM_API_CFG_COEX_STATUS cfg_coex_status;
#endif
tBTA_DM_API_SEND_VENDOR_HCI_CMD vendor_hci_cmd;
tBTA_DM_API_CONFIG_EIR config_eir;
tBTA_DM_API_SET_AFH_CHANNELS set_afh_channels;
tBTA_DM_API_PAGE_TO_SET set_page_timeout;
tBTA_DM_API_PAGE_TO_GET get_page_timeout;
tBTA_DM_API_SET_ACL_PKT_TYPES set_acl_pkt_types;
#if (ENC_KEY_SIZE_CTRL_MODE != ENC_KEY_SIZE_CTRL_MODE_NONE)
tBTA_DM_API_SET_MIN_ENC_KEY_SIZE set_min_enc_key_size;
#endif
#if (SDP_INCLUDED == TRUE)
tBTA_DM_API_GET_REMOTE_NAME get_rmt_name;
#endif
@@ -1261,6 +1313,8 @@ typedef union {
tBTA_DM_API_BLE_SET_DATA_LENGTH ble_set_data_length;
tBTA_DM_APT_SET_DEV_ADDR set_addr;
tBTA_DM_APT_CLEAR_ADDR clear_addr;
tBTA_DM_API_SET_RPA_TIMEOUT set_rpa_timeout;
tBTA_DM_API_ADD_DEV_TO_RESOLVING_LIST add_dev_to_resolving_list;
tBTA_DM_API_BLE_MULTI_ADV_ENB ble_multi_adv_enb;
tBTA_DM_API_BLE_MULTI_ADV_PARAM ble_multi_adv_param;
tBTA_DM_API_BLE_MULTI_ADV_DATA ble_multi_adv_data;
@@ -1310,6 +1364,7 @@ typedef union {
tBTA_DM_API_BLE_DTM_RX_START dtm_rx_start;
tBTA_DM_API_BLE_DTM_STOP dtm_stop;
tBTA_DM_API_CLEAR_ADV ble_clear_adv;
tBTA_DM_API_SET_PRIVACY_MODE ble_set_privacy_mode;
#endif
tBTA_DM_API_REMOVE_ACL remove_acl;
@@ -1444,7 +1499,7 @@ typedef struct {
UINT32 role_policy_mask; /* the bits set indicates the modules that wants to remove role switch from the default link policy */
UINT16 cur_policy; /* current default link policy */
UINT16 rs_event; /* the event waiting for role switch */
UINT8 cur_av_count; /* current AV connecions */
UINT8 cur_av_count; /* current AV connections */
BOOLEAN disable_pair_mode; /* disable pair mode or not */
BOOLEAN conn_paired_only; /* allow connectable to paired device only or not */
tBTA_DM_API_SEARCH search_msg;
@@ -1676,11 +1731,15 @@ extern void bta_dm_get_dev_name (tBTA_DM_MSG *p_data);
#if (ESP_COEX_VSC_INCLUDED == TRUE)
extern void bta_dm_cfg_coex_status(tBTA_DM_MSG *p_data);
#endif
extern void bta_dm_send_vendor_hci(tBTA_DM_MSG *p_data);
#if (CLASSIC_BT_INCLUDED == TRUE)
extern void bta_dm_config_eir (tBTA_DM_MSG *p_data);
extern void bta_dm_set_page_timeout (tBTA_DM_MSG *p_data);
extern void bta_dm_get_page_timeout (tBTA_DM_MSG *p_data);
extern void bta_dm_set_acl_pkt_types (tBTA_DM_MSG *p_data);
#if (ENC_KEY_SIZE_CTRL_MODE != ENC_KEY_SIZE_CTRL_MODE_NONE)
extern void bta_dm_set_min_enc_key_size (tBTA_DM_MSG *p_data);
#endif
#endif
extern void bta_dm_set_afh_channels (tBTA_DM_MSG *p_data);
extern void bta_dm_read_rmt_name(tBTA_DM_MSG *p_data);
@@ -1751,7 +1810,9 @@ extern void bta_dm_ble_gap_dtm_tx_start(tBTA_DM_MSG *p_data);
extern void bta_dm_ble_gap_dtm_rx_start(tBTA_DM_MSG *p_data);
extern void bta_dm_ble_gap_dtm_stop(tBTA_DM_MSG *p_data);
extern void bta_dm_ble_gap_clear_adv(tBTA_DM_MSG *p_data);
extern void bta_dm_ble_gap_set_rpa_timeout(tBTA_DM_MSG *p_data);
extern void bta_dm_ble_gap_add_dev_to_resolving_list(tBTA_DM_MSG *p_data);
extern void bta_dm_ble_gap_set_privacy_mode(tBTA_DM_MSG *p_data);
#if (BLE_50_FEATURE_SUPPORT == TRUE)
extern void bta_dm_ble_gap_dtm_enhance_tx_start(tBTA_DM_MSG *p_data);
extern void bta_dm_ble_gap_dtm_enhance_rx_start(tBTA_DM_MSG *p_data);