mirror of
https://github.com/espressif/esp-idf.git
synced 2026-01-19 08:35:36 +00:00
fix(ble/bluedroid): delete bluedroid unused code
This commit is contained in:
@@ -3446,11 +3446,13 @@ static void bta_dm_bl_change_cback (tBTM_BL_EVENT_DATA *p_data)
|
||||
p_msg->busy_level = p_data->update.busy_level;
|
||||
p_msg->busy_level_flags = p_data->update.busy_level_flags;
|
||||
break;
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
case BTM_BL_ROLE_CHG_EVT:
|
||||
p_msg->new_role = p_data->role_chg.new_role;
|
||||
p_msg->hci_status = p_data->role_chg.hci_status;
|
||||
bdcpy(p_msg->bd_addr, p_data->role_chg.p_bda);
|
||||
break;
|
||||
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||
case BTM_BL_COLLISION_EVT:
|
||||
bdcpy(p_msg->bd_addr, p_data->conn.p_bda);
|
||||
break;
|
||||
|
||||
@@ -135,7 +135,7 @@ const tBTA_DM_ACTION bta_dm_action[BTA_DM_MAX_EVT] = {
|
||||
bta_dm_ble_passkey_reply, /* BTA_DM_API_BLE_PASSKEY_REPLY_EVT */
|
||||
bta_dm_ble_set_static_passkey, /* BTA_DM_API_BLE_SET_STATIC_PASSKEY_EVT */
|
||||
bta_dm_ble_confirm_reply, /* BTA_DM_API_BLE_CONFIRM_REPLY_EVT */
|
||||
bta_dm_security_grant,
|
||||
bta_dm_security_grant, /* BTA_DM_API_BLE_SEC_GRANT_EVT */
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
bta_dm_ble_set_bg_conn_type,
|
||||
bta_dm_ble_set_conn_params, /* BTA_DM_API_BLE_CONN_PARAM_EVT */
|
||||
@@ -146,15 +146,8 @@ const tBTA_DM_ACTION bta_dm_action[BTA_DM_MAX_EVT] = {
|
||||
bta_dm_ble_scan, /* BTA_DM_API_BLE_SCAN_EVT */
|
||||
#endif // #if (BLE_42_SCAN_EN == TRUE)
|
||||
bta_dm_ble_update_conn_params, /* BTA_DM_API_UPDATE_CONN_PARAM_EVT */
|
||||
/* This handler function added by
|
||||
Yulong at 2016/9/9 to support the
|
||||
random address setting for the APP */
|
||||
bta_dm_ble_set_rand_address, /* BTA_DM_API_SET_RAND_ADDR_EVT*/
|
||||
bta_dm_ble_clear_rand_address, /* BTA_DM_API_CLEAR_RAND_ADDR_EVT */
|
||||
/* This handler function added by
|
||||
Yulong at 2016/10/19 to support
|
||||
stop the ble advertising setting
|
||||
by the APP */
|
||||
#if BLE_PRIVACY_SPT == TRUE
|
||||
bta_dm_ble_config_local_privacy, /* BTA_DM_API_LOCAL_PRIVACY_EVT */
|
||||
#endif
|
||||
|
||||
@@ -2049,6 +2049,7 @@ tBTM_STATUS BTM_ReadRSSI (BD_ADDR remote_bda, tBT_TRANSPORT transport, tBTM_CMPL
|
||||
return (BTM_UNKNOWN_ADDR);
|
||||
}
|
||||
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTM_ReadLinkQuality
|
||||
@@ -2132,7 +2133,6 @@ tBTM_STATUS BTM_SetAclPktTypes(BD_ADDR remote_bda, UINT16 pkt_types, tBTM_CMPL_C
|
||||
|
||||
void btm_acl_pkt_types_changed(UINT8 status, UINT16 handle, UINT16 pkt_types)
|
||||
{
|
||||
#if CLASSIC_BT_INCLUDED == TRUE
|
||||
BTM_TRACE_DEBUG ("btm_acl_pkt_types_changed\n");
|
||||
tACL_CONN *conn = NULL;
|
||||
tBTM_SET_ACL_PKT_TYPES_RESULTS results;
|
||||
@@ -2153,8 +2153,8 @@ void btm_acl_pkt_types_changed(UINT8 status, UINT16 handle, UINT16 pkt_types)
|
||||
}
|
||||
btm_cb.devcb.p_set_acl_pkt_types_cmpl_cb = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||
|
||||
#if (BLE_INCLUDED == TRUE)
|
||||
|
||||
@@ -2342,6 +2342,7 @@ err_out:
|
||||
}
|
||||
}
|
||||
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btm_read_link_quality_complete
|
||||
@@ -2388,6 +2389,7 @@ void btm_read_link_quality_complete (UINT8 *p)
|
||||
(*p_cb)(&results);
|
||||
}
|
||||
}
|
||||
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
|
||||
@@ -1482,38 +1482,6 @@ tBTM_STATUS BTM_BleStartAdv(void)
|
||||
return status;
|
||||
}
|
||||
#endif // #if (BLE_42_ADV_EN == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTM_BleReadAdvParams
|
||||
**
|
||||
** Description This function is called to set advertising parameters.
|
||||
**
|
||||
** Parameters adv_int_min: minimum advertising interval
|
||||
** adv_int_max: maximum advertising interval
|
||||
** p_dir_bda: connectable direct initiator's LE device address
|
||||
** chnl_map: advertising channel map.
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
void BTM_BleReadAdvParams (UINT16 *adv_int_min, UINT16 *adv_int_max,
|
||||
tBLE_BD_ADDR *p_dir_bda, tBTM_BLE_ADV_CHNL_MAP *p_chnl_map)
|
||||
{
|
||||
tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var;
|
||||
|
||||
BTM_TRACE_EVENT ("BTM_BleReadAdvParams ");
|
||||
if (!controller_get_interface()->supports_ble()) {
|
||||
return ;
|
||||
}
|
||||
|
||||
*adv_int_min = p_cb->adv_interval_min;
|
||||
*adv_int_max = p_cb->adv_interval_max;
|
||||
*p_chnl_map = p_cb->adv_chnl_map;
|
||||
|
||||
if (p_dir_bda != NULL) {
|
||||
memcpy(p_dir_bda, &p_cb->direct_bda, sizeof(tBLE_BD_ADDR));
|
||||
}
|
||||
}
|
||||
|
||||
#if (BLE_42_SCAN_EN == TRUE)
|
||||
tBTM_STATUS BTM_BleSetScanFilterParams(tGATT_IF client_if, UINT32 scan_interval, UINT32 scan_window,
|
||||
|
||||
@@ -1124,6 +1124,7 @@ tBTM_STATUS BTM_ClearInqDb (BD_ADDR p_bda)
|
||||
return (BTM_SUCCESS);
|
||||
}
|
||||
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTM_ReadInquiryRspTxPower
|
||||
@@ -1154,6 +1155,7 @@ tBTM_STATUS BTM_ReadInquiryRspTxPower (tBTM_CMPL_CB *p_cb)
|
||||
return (BTM_CMD_STARTED);
|
||||
}
|
||||
}
|
||||
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||
|
||||
/*********************************************************************************
|
||||
**********************************************************************************
|
||||
|
||||
@@ -202,12 +202,15 @@ tBTM_CMPL_CB *p_rssi_cmpl_cb; /* Callback function to be called when
|
||||
|
||||
tBTM_CMPL_CB *p_ble_ch_map_cmpl_cb; /* Callback function to be called when */
|
||||
/* read channel map function completes */
|
||||
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
TIMER_LIST_ENT lnk_quality_timer;
|
||||
tBTM_CMPL_CB *p_lnk_qual_cmpl_cb;/* Callback function to be called when */
|
||||
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||
|
||||
/* read link quality function completes */
|
||||
TIMER_LIST_ENT txpwer_timer;
|
||||
tBTM_CMPL_CB *p_txpwer_cmpl_cb; /* Callback function to be called when */
|
||||
|
||||
/* read inq tx power function completes */
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
TIMER_LIST_ENT qossu_timer;
|
||||
|
||||
@@ -1212,7 +1212,9 @@ static void btu_hcif_hdl_command_complete (UINT16 opcode, UINT8 *p, UINT16 evt_l
|
||||
break;
|
||||
|
||||
case HCI_GET_LINK_QUALITY:
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
btm_read_link_quality_complete (p);
|
||||
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||
break;
|
||||
#endif // #if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
case HCI_READ_LOCAL_NAME:
|
||||
|
||||
@@ -2074,24 +2074,6 @@ tBTM_STATUS BTM_BleSetRandAddress(BD_ADDR rand_addr);
|
||||
void BTM_BleClearRandAddress(void);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTM_BleSetAdvParams
|
||||
**
|
||||
** Description This function is called to set advertising parameters.
|
||||
**
|
||||
** Parameters adv_int_min: minimum advertising interval
|
||||
** adv_int_max: maximum advertising interval
|
||||
** p_dir_bda: connectable direct initiator's LE device address
|
||||
** chnl_map: advertising channel map.
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
//extern
|
||||
void BTM_BleReadAdvParams (UINT16 *adv_int_min, UINT16 *adv_int_max,
|
||||
tBLE_BD_ADDR *p_dir_bda, tBTM_BLE_ADV_CHNL_MAP *p_chnl_map);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTM_BleSetScanFilterParams
|
||||
|
||||
Reference in New Issue
Block a user