feat(ble/bluedroid): disable bluedroid host unused functions

This commit is contained in:
zhiweijian
2025-01-22 10:17:12 +08:00
parent fb08e4eafe
commit d2d4d1518d
23 changed files with 406 additions and 67 deletions
@@ -110,7 +110,7 @@ tBTA_STATUS BTA_DisableBluetooth(void)
return BTA_SUCCESS;
}
#if (BLE_HOST_ENABLE_TEST_MODE_EN == TRUE)
/*******************************************************************************
**
** Function BTA_EnableTestMode
@@ -156,6 +156,7 @@ void BTA_DisableTestMode(void)
bta_sys_sendmsg(p_msg);
}
}
#endif // #if (BLE_HOST_ENABLE_TEST_MODE_EN == TRUE)
/*******************************************************************************
**
@@ -487,6 +488,7 @@ void BTA_DmClearWhiteList(tBTA_UPDATE_WHITELIST_CBACK *update_wl_cb)
}
}
#if (BLE_HOST_READ_TX_POWER_EN == TRUE)
void BTA_DmBleReadAdvTxPower(tBTA_CMPL_CB *cmpl_cb)
{
tBTA_DM_API_READ_ADV_TX_POWER *p_msg;
@@ -496,6 +498,8 @@ void BTA_DmBleReadAdvTxPower(tBTA_CMPL_CB *cmpl_cb)
bta_sys_sendmsg(p_msg);
}
}
#endif // BLE_HOST_READ_TX_POWER_EN
#endif ///BLE_INCLUDED == TRUE
void BTA_DmReadRSSI(BD_ADDR remote_addr, tBTA_TRANSPORT transport, tBTA_CMPL_CB *cmpl_cb)
@@ -510,6 +514,7 @@ void BTA_DmReadRSSI(BD_ADDR remote_addr, tBTA_TRANSPORT transport, tBTA_CMPL_CB
}
}
#if (CLASSIC_BT_INCLUDED == TRUE)
/*******************************************************************************
**
** Function BTA_DmSetVisibility
@@ -539,6 +544,7 @@ void BTA_DmSetVisibility(tBTA_DM_DISC disc_mode, tBTA_DM_CONN conn_mode, UINT8 p
}
#endif // #if (CLASSIC_BT_INCLUDED == TRUE)
/*******************************************************************************
**
@@ -1149,6 +1155,8 @@ tBTA_STATUS BTA_DmRemoveLocalDiRecord(UINT32 handle)
return status;
}
#endif ///SDP_INCLUDED == TRUE
#if (BLE_HOST_EXECUTE_CBACK_EN == TRUE)
/*******************************************************************************
**
** Function bta_dmexecutecallback
@@ -1171,6 +1179,7 @@ void bta_dmexecutecallback (tBTA_DM_EXEC_CBACK *p_callback, void *p_param)
bta_sys_sendmsg(p_msg);
}
}
#endif // #if (BLE_HOST_EXECUTE_CBACK_EN == TRUE)
/*******************************************************************************
**
@@ -1381,6 +1390,7 @@ void BTA_DmSetBlePrefConnParams(BD_ADDR bd_addr,
#endif
}
#if (BLE_HOST_CONN_SCAN_PARAM_EN == TRUE)
/*******************************************************************************
**
** Function BTA_DmSetBleConnScanParams
@@ -1405,7 +1415,9 @@ void BTA_DmSetBleConnScanParams(UINT32 scan_interval, UINT32 scan_window)
bta_sys_sendmsg(p_msg);
}
}
#endif // #if (BLE_HOST_CONN_SCAN_PARAM_EN == TRUE)
#if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
/*******************************************************************************
**
** Function BTA_DmSetBleScanParams
@@ -1439,6 +1451,7 @@ void BTA_DmSetBleScanParams(tGATT_IF client_if, UINT32 scan_interval,
bta_sys_sendmsg(p_msg);
}
}
#endif // #if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
#if (BLE_42_SCAN_EN == TRUE)
/*******************************************************************************
@@ -1673,7 +1686,7 @@ void BTA_DmUpdateDuplicateExceptionalList(UINT8 subcode, UINT32 type, BD_ADDR de
bta_sys_sendmsg(p_msg);
}
}
#if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
/*******************************************************************************
**
** Function BTA_DmBleSetStorageParams
@@ -1714,7 +1727,9 @@ extern void BTA_DmBleSetStorageParams(UINT8 batch_scan_full_max,
bta_sys_sendmsg(p_msg);
}
}
#endif // #if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
#if (BLE_HOST_BATCH_SCAN_EN == TRUE)
/*******************************************************************************
**
** Function BTA_DmBleEnableBatchScan
@@ -1773,7 +1788,9 @@ extern void BTA_DmBleDisableBatchScan(tBTA_DM_BLE_REF_VALUE ref_value)
bta_sys_sendmsg(p_msg);
}
}
#endif // #if (BLE_HOST_BATCH_SCAN_EN == TRUE)
#if (BLE_HOST_READ_SCAN_REPORTS_EN == TRUE)
/*******************************************************************************
**
** Function BTA_DmBleReadScanReports
@@ -1799,7 +1816,9 @@ extern void BTA_DmBleReadScanReports(tBTA_BLE_BATCH_SCAN_MODE scan_type,
bta_sys_sendmsg(p_msg);
}
}
#endif // #if (BLE_HOST_READ_SCAN_REPORTS_EN == TRUE)
#if (BLE_HOST_TRACK_ADVERTISER_EN == TRUE)
/*******************************************************************************
**
** Function BTA_DmBleTrackAdvertiser
@@ -1825,6 +1844,7 @@ extern void BTA_DmBleTrackAdvertiser(tBTA_DM_BLE_REF_VALUE ref_value,
bta_sys_sendmsg(p_msg);
}
}
#endif // #if (BLE_HOST_TRACK_ADVERTISER_EN == TRUE)
#endif
@@ -2161,6 +2181,7 @@ void BTA_DmBleConfigLocalIcon(uint16_t icon)
}
}
#if (BLE_HOST_BLE_MULTI_ADV_EN == TRUE)
/*******************************************************************************
**
** Function BTA_BleEnableAdvInstance
@@ -2294,6 +2315,7 @@ void BTA_BleDisableAdvInstance (UINT8 inst_id) //this function just used fo
bta_sys_sendmsg(p_msg);
}
}
#endif // #if (BLE_HOST_BLE_MULTI_ADV_EN == TRUE)
/*******************************************************************************
**
@@ -2476,6 +2498,7 @@ void BTA_DmBleScanFilterSetup(UINT8 action, tBTA_DM_BLE_PF_FILT_INDEX filt_index
#endif
}
#if (BLE_HOST_ENERGY_INFO_EN == TRUE)
/*******************************************************************************
**
** Function BTA_DmBleGetEnergyInfo
@@ -2501,6 +2524,7 @@ void BTA_DmBleGetEnergyInfo(tBTA_BLE_ENERGY_INFO_CBACK *p_cmpl_cback)
bta_sys_sendmsg(p_msg);
}
}
#endif // #if (BLE_HOST_ENERGY_INFO_EN == TRUE)
/*******************************************************************************
**
@@ -2730,6 +2754,7 @@ void BTA_DmSetEncryption(BD_ADDR bd_addr, tBTA_TRANSPORT transport, tBTA_DM_ENCR
}
#endif ///SMP_INCLUDED == TRUE
#if (BLE_HOST_REMOVE_AN_ACL_EN == TRUE)
/*******************************************************************************
**
** Function BTA_DmCloseACL
@@ -2761,8 +2786,10 @@ void BTA_DmCloseACL(BD_ADDR bd_addr, BOOLEAN remove_dev, tBTA_TRANSPORT transpor
bta_sys_sendmsg(p_msg);
}
}
#endif // #if (BLE_HOST_REMOVE_AN_ACL_EN == TRUE)
#if BLE_INCLUDED == TRUE
#if (BLE_HOST_BLE_OBSERVE_EN == TRUE)
/*******************************************************************************
**
** Function BTA_DmBleObserve
@@ -2803,6 +2830,8 @@ extern void BTA_DmBleObserve(BOOLEAN start, UINT32 duration,
bta_sys_sendmsg(p_msg);
}
}
#endif // #if (BLE_HOST_BLE_OBSERVE_EN == TRUE)
#if (BLE_42_SCAN_EN == TRUE)
/*******************************************************************************
**
@@ -2846,6 +2875,7 @@ extern void BTA_DmBleScan(BOOLEAN start, UINT32 duration,
}
#endif // #if (BLE_42_SCAN_EN == TRUE)
#if (BLE_HOST_STOP_ADV_UNUSED == TRUE)
/*******************************************************************************
**
** Function BTA_DmBleStopAdvertising
@@ -2870,7 +2900,7 @@ extern void BTA_DmBleStopAdvertising(void)
bta_sys_sendmsg(p_msg);
}
}
#endif // #if (BLE_HOST_STOP_ADV_UNUSED == TRUE)
/*******************************************************************************
**