mirror of
https://github.com/espressif/esp-idf.git
synced 2026-01-20 00:08:44 +00:00
fix(ble/bluedroid): Delete BLE_HOST_SETUP_STORAGE_EN
This commit is contained in:
@@ -6125,79 +6125,6 @@ void bta_dm_api_cs_procedure_enable(tBTA_DM_MSG *p_data)
|
||||
}
|
||||
#endif // (BT_BLE_FEAT_CHANNEL_SOUNDING == TRUE)
|
||||
|
||||
#if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function bta_dm_ble_setup_storage
|
||||
**
|
||||
** Description This function configures up the storage parameters for ADV batch scanning
|
||||
**
|
||||
** Parameters:
|
||||
**
|
||||
*******************************************************************************/
|
||||
void bta_dm_ble_setup_storage (tBTA_DM_MSG *p_data)
|
||||
{
|
||||
tBTM_STATUS btm_status = 0;
|
||||
tBTM_BLE_VSC_CB cmn_ble_vsc_cb;
|
||||
|
||||
BTM_BleGetVendorCapabilities(&cmn_ble_vsc_cb);
|
||||
|
||||
if (0 != cmn_ble_vsc_cb.tot_scan_results_strg) {
|
||||
btm_status = BTM_BleSetStorageConfig(p_data->ble_set_storage.batch_scan_full_max,
|
||||
p_data->ble_set_storage.batch_scan_trunc_max,
|
||||
p_data->ble_set_storage.batch_scan_notify_threshold,
|
||||
p_data->ble_set_storage.p_setup_cback,
|
||||
p_data->ble_set_storage.p_thres_cback,
|
||||
p_data->ble_set_storage.p_read_rep_cback,
|
||||
p_data->ble_set_storage.ref_value);
|
||||
}
|
||||
|
||||
if (BTM_CMD_STARTED != btm_status) {
|
||||
bta_ble_scan_setup_cb(BTM_BLE_BATCH_SCAN_CFG_STRG_EVT, p_data->ble_set_storage.ref_value,
|
||||
btm_status);
|
||||
}
|
||||
}
|
||||
#endif // #if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function bta_ble_scan_setup_cb
|
||||
**
|
||||
** Description Handle the setup callback from BTM layer and forward it to app layer
|
||||
**
|
||||
** Parameters:
|
||||
**
|
||||
*******************************************************************************/
|
||||
void bta_ble_scan_setup_cb(tBTM_BLE_BATCH_SCAN_EVT evt, tBTM_BLE_REF_VALUE ref_value,
|
||||
tBTM_STATUS status)
|
||||
{
|
||||
tBTA_BLE_BATCH_SCAN_EVT bta_evt = 0;
|
||||
|
||||
APPL_TRACE_DEBUG("bta_ble_scan_setup_cb : evt: %d, ref_value: %d, status:%d", evt,
|
||||
ref_value, status);
|
||||
|
||||
switch (evt) {
|
||||
case BTM_BLE_BATCH_SCAN_ENABLE_EVT:
|
||||
bta_evt = BTA_BLE_BATCH_SCAN_ENB_EVT;
|
||||
break;
|
||||
case BTM_BLE_BATCH_SCAN_CFG_STRG_EVT:
|
||||
bta_evt = BTA_BLE_BATCH_SCAN_CFG_STRG_EVT;
|
||||
break;
|
||||
case BTM_BLE_BATCH_SCAN_DISABLE_EVT:
|
||||
bta_evt = BTA_BLE_BATCH_SCAN_DIS_EVT;
|
||||
break;
|
||||
case BTM_BLE_BATCH_SCAN_PARAM_EVT:
|
||||
bta_evt = BTA_BLE_BATCH_SCAN_PARAM_EVT;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (NULL != bta_dm_cb.p_setup_cback) {
|
||||
bta_dm_cb.p_setup_cback(bta_evt, ref_value, status);
|
||||
}
|
||||
}
|
||||
|
||||
#if ((defined BTA_GATT_INCLUDED) && (BTA_GATT_INCLUDED == TRUE) && SDP_INCLUDED == TRUE)
|
||||
#ifndef BTA_DM_GATT_CLOSE_DELAY_TOUT
|
||||
#define BTA_DM_GATT_CLOSE_DELAY_TOUT 1000
|
||||
|
||||
@@ -1605,48 +1605,6 @@ 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
|
||||
**
|
||||
** Description This function is called to override the BTA scan response.
|
||||
**
|
||||
** Parameters batch_scan_full_max -Max storage space (in %) allocated to full scanning
|
||||
** batch_scan_trunc_max -Max storage space (in %) allocated to truncated scanning
|
||||
** batch_scan_notify_threshold -Setup notification level based on total space
|
||||
** p_setup_cback - Setup callback pointer
|
||||
** p_thres_cback - Threshold callback pointer
|
||||
** p_rep_cback - Reports callback pointer
|
||||
** ref_value - Ref value
|
||||
**
|
||||
** Returns None
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void BTA_DmBleSetStorageParams(UINT8 batch_scan_full_max,
|
||||
UINT8 batch_scan_trunc_max,
|
||||
UINT8 batch_scan_notify_threshold,
|
||||
tBTA_BLE_SCAN_SETUP_CBACK *p_setup_cback,
|
||||
tBTA_BLE_SCAN_THRESHOLD_CBACK *p_thres_cback,
|
||||
tBTA_BLE_SCAN_REP_CBACK *p_rep_cback,
|
||||
tBTA_DM_BLE_REF_VALUE ref_value)
|
||||
{
|
||||
tBTA_DM_API_SET_STORAGE_CONFIG *p_msg;
|
||||
bta_dm_cb.p_setup_cback = p_setup_cback;
|
||||
if ((p_msg = (tBTA_DM_API_SET_STORAGE_CONFIG *)
|
||||
osi_malloc(sizeof(tBTA_DM_API_SET_STORAGE_CONFIG))) != NULL) {
|
||||
p_msg->hdr.event = BTA_DM_API_BLE_SETUP_STORAGE_EVT;
|
||||
p_msg->p_setup_cback = bta_ble_scan_setup_cb;
|
||||
p_msg->p_thres_cback = p_thres_cback;
|
||||
p_msg->p_read_rep_cback = p_rep_cback;
|
||||
p_msg->ref_value = ref_value;
|
||||
p_msg->batch_scan_full_max = batch_scan_full_max;
|
||||
p_msg->batch_scan_trunc_max = batch_scan_trunc_max;
|
||||
p_msg->batch_scan_notify_threshold = batch_scan_notify_threshold;
|
||||
bta_sys_sendmsg(p_msg);
|
||||
}
|
||||
}
|
||||
#endif // #if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -175,9 +175,6 @@ const tBTA_DM_ACTION bta_dm_action[BTA_DM_MAX_EVT] = {
|
||||
bta_dm_ble_broadcast, /* BTA_DM_API_BLE_BROADCAST_EVT */
|
||||
#endif // #if (BLE_42_ADV_EN == TRUE)
|
||||
bta_dm_ble_set_data_length, /* BTA_DM_API_SET_DATA_LENGTH_EVT */
|
||||
#if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
bta_dm_ble_setup_storage, /* BTA_DM_API_BLE_SETUP_STORAGE_EVT */
|
||||
#endif // #if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
bta_dm_ble_disconnect, /* BTA_DM_API_BLE_DISCONNECT_EVT */
|
||||
#endif
|
||||
bta_dm_remove_device, /* BTA_DM_API_REMOVE_DEVICE_EVT */
|
||||
|
||||
@@ -159,9 +159,6 @@ enum {
|
||||
BTA_DM_API_BLE_BROADCAST_EVT,
|
||||
#endif // #if (BLE_42_ADV_EN == TRUE)
|
||||
BTA_DM_API_SET_DATA_LENGTH_EVT,
|
||||
#if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
BTA_DM_API_BLE_SETUP_STORAGE_EVT,
|
||||
#endif // #if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
|
||||
BTA_DM_API_BLE_DISCONNECT_EVT,
|
||||
|
||||
@@ -909,19 +906,6 @@ typedef struct {
|
||||
tBTA_SET_ADV_DATA_CMPL_CBACK *p_adv_data_cback;
|
||||
} tBTA_DM_API_SET_ADV_CONFIG_RAW;
|
||||
|
||||
#if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
typedef struct {
|
||||
BT_HDR hdr;
|
||||
UINT8 batch_scan_full_max;
|
||||
UINT8 batch_scan_trunc_max;
|
||||
UINT8 batch_scan_notify_threshold;
|
||||
tBTA_BLE_SCAN_SETUP_CBACK *p_setup_cback;
|
||||
tBTA_BLE_SCAN_THRESHOLD_CBACK *p_thres_cback;
|
||||
tBTA_BLE_SCAN_REP_CBACK *p_read_rep_cback;
|
||||
tBTA_DM_BLE_REF_VALUE ref_value;
|
||||
} tBTA_DM_API_SET_STORAGE_CONFIG;
|
||||
#endif // #if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
|
||||
typedef struct {
|
||||
BT_HDR hdr;
|
||||
BD_ADDR remote_bda;
|
||||
@@ -1715,9 +1699,6 @@ typedef union {
|
||||
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;
|
||||
#if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
tBTA_DM_API_SET_STORAGE_CONFIG ble_set_storage;
|
||||
#endif // #if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
tBTA_DM_API_BLE_DISCONNECT ble_disconnect;
|
||||
tBTA_DM_API_UPDATE_DUPLICATE_EXCEPTIONAL_LIST ble_duplicate_exceptional_list;
|
||||
#if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
@@ -1955,9 +1936,6 @@ typedef struct {
|
||||
BOOLEAN is_bta_dm_active;
|
||||
tBTA_DM_ACTIVE_LINK device_list;
|
||||
tBTA_DM_SEC_CBACK *p_sec_cback;
|
||||
#if ((defined BLE_INCLUDED) && (BLE_INCLUDED == TRUE))
|
||||
tBTA_BLE_SCAN_SETUP_CBACK *p_setup_cback;
|
||||
#endif
|
||||
UINT16 state;
|
||||
BOOLEAN disabling;
|
||||
TIMER_LIST_ENT disable_timer;
|
||||
@@ -2308,9 +2286,6 @@ extern void bta_dm_ble_gap_set_ext_scan_params(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_gap_ext_scan(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_gap_set_prefer_ext_conn_params(tBTA_DM_MSG *p_data);
|
||||
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
#if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
extern void bta_dm_ble_setup_storage(tBTA_DM_MSG *p_data);
|
||||
#endif // #if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
extern void bta_dm_ble_enable_batch_scan(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_disable_batch_scan(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_read_scan_reports(tBTA_DM_MSG *p_data);
|
||||
|
||||
@@ -530,16 +530,6 @@ enum {
|
||||
};
|
||||
typedef UINT8 tBTA_BLE_ADV_CHANGE_REASON;
|
||||
|
||||
enum {
|
||||
BTA_BLE_BATCH_SCAN_ENB_EVT = 1,
|
||||
BTA_BLE_BATCH_SCAN_CFG_STRG_EVT = 2,
|
||||
BTA_BLE_BATCH_SCAN_DATA_EVT = 3,
|
||||
BTA_BLE_BATCH_SCAN_THRES_EVT = 4,
|
||||
BTA_BLE_BATCH_SCAN_PARAM_EVT = 5,
|
||||
BTA_BLE_BATCH_SCAN_DIS_EVT = 6
|
||||
};
|
||||
typedef tBTM_BLE_BATCH_SCAN_EVT tBTA_BLE_BATCH_SCAN_EVT;
|
||||
|
||||
// #endif
|
||||
|
||||
/* BLE customer specific feature function type definitions */
|
||||
@@ -1218,10 +1208,6 @@ typedef void (tBTA_BLE_SCAN_REP_CBACK) (tBTA_DM_BLE_REF_VALUE ref_value, UINT8 r
|
||||
UINT8 num_records, UINT16 data_len,
|
||||
UINT8 *p_rep_data, tBTA_STATUS status);
|
||||
|
||||
typedef void (tBTA_BLE_SCAN_SETUP_CBACK) (tBTA_BLE_BATCH_SCAN_EVT evt,
|
||||
tBTA_DM_BLE_REF_VALUE ref_value,
|
||||
tBTA_STATUS status);
|
||||
|
||||
typedef void (tBTA_START_STOP_SCAN_CMPL_CBACK) (tBTA_STATUS status);
|
||||
|
||||
typedef void (tBTA_START_STOP_ADV_CMPL_CBACK) (tBTA_STATUS status);
|
||||
@@ -3033,54 +3019,6 @@ void BTA_DmBleGapCsSetProcPatams(tBTA_DM_CS_SET_PROC_PARAMS *set_proc_params);
|
||||
void BTA_DmBleGapCsProcEnable(uint16_t conn_handle, uint8_t config_id, uint8_t enable);
|
||||
#endif // (BT_BLE_FEAT_CHANNEL_SOUNDING == TRUE)
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_DmBleSetStorageParams
|
||||
**
|
||||
** Description This function is called to set the storage parameters
|
||||
**
|
||||
** Parameters batch_scan_full_max -Max storage space (in %) allocated to full scanning
|
||||
** batch_scan_trunc_max -Max storage space (in %) allocated to truncated scanning
|
||||
** batch_scan_notify_threshold - Setup notification level based on total space
|
||||
** consumed by both pools. Setting it to 0 will disable threshold notification
|
||||
** p_setup_cback - Setup callback
|
||||
** p_thres_cback - Threshold callback
|
||||
** p_rep_cback - Reports callback
|
||||
** ref_value - Reference value
|
||||
**
|
||||
** Returns None
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void BTA_DmBleSetStorageParams(UINT8 batch_scan_full_max,
|
||||
UINT8 batch_scan_trunc_max,
|
||||
UINT8 batch_scan_notify_threshold,
|
||||
tBTA_BLE_SCAN_SETUP_CBACK *p_setup_cback,
|
||||
tBTA_BLE_SCAN_THRESHOLD_CBACK *p_thres_cback,
|
||||
tBTA_BLE_SCAN_REP_CBACK *p_rep_cback,
|
||||
tBTA_DM_BLE_REF_VALUE ref_value);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_DmBleEnableBatchScan
|
||||
**
|
||||
** Description This function is called to enable the batch scan
|
||||
**
|
||||
** Parameters scan_mode -Batch scan mode
|
||||
** scan_interval - Scan interval
|
||||
** scan_window - Scan window
|
||||
** discard_rule -Discard rules
|
||||
** addr_type - Address type
|
||||
** ref_value - Reference value
|
||||
**
|
||||
** Returns None
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void BTA_DmBleEnableBatchScan(tBTA_BLE_BATCH_SCAN_MODE scan_mode,
|
||||
UINT32 scan_interval, UINT32 scan_window,
|
||||
tBTA_BLE_DISCARD_RULE discard_rule,
|
||||
tBLE_ADDR_TYPE addr_type,
|
||||
tBTA_DM_BLE_REF_VALUE ref_value);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_DmBleReadScanReports
|
||||
|
||||
@@ -1618,10 +1618,6 @@
|
||||
#define BLE_INCLUDED FALSE
|
||||
#endif
|
||||
|
||||
#ifndef BLE_HOST_SETUP_STORAGE_EN
|
||||
#define BLE_HOST_SETUP_STORAGE_EN FALSE
|
||||
#endif
|
||||
|
||||
#ifndef BLE_HOST_BG_CONNECT_EN
|
||||
#define BLE_HOST_BG_CONNECT_EN FALSE
|
||||
#endif
|
||||
|
||||
@@ -913,18 +913,6 @@ typedef UINT8 tBTM_BLE_CONN_TYPE;
|
||||
#define ADV_INFO_PRESENT 0x00
|
||||
#define NO_ADV_INFO_PRESENT 0x01
|
||||
|
||||
#define BTM_BLE_MULTI_ADV_INVALID 0
|
||||
|
||||
#define BTM_BLE_BATCH_SCAN_ENABLE_EVT 1
|
||||
#define BTM_BLE_BATCH_SCAN_CFG_STRG_EVT 2
|
||||
#define BTM_BLE_BATCH_SCAN_READ_REPTS_EVT 3
|
||||
#define BTM_BLE_BATCH_SCAN_THR_EVT 4
|
||||
#define BTM_BLE_BATCH_SCAN_PARAM_EVT 5
|
||||
#define BTM_BLE_BATCH_SCAN_DISABLE_EVT 6
|
||||
|
||||
typedef UINT8 tBTM_BLE_BATCH_SCAN_EVT;
|
||||
|
||||
|
||||
typedef BOOLEAN (tBTM_BLE_SEL_CBACK)(BD_ADDR random_bda, UINT8 *p_remote_name);
|
||||
|
||||
/* callback function for SMP signing algorithm, signed data in little endian order with tlen bits long */
|
||||
@@ -936,8 +924,6 @@ typedef void (tBTM_BLE_RANDOM_SET_CBACK) (BD_ADDR random_bda);
|
||||
typedef void (tBTM_BLE_SCAN_REQ_CBACK)(BD_ADDR remote_bda, tBLE_ADDR_TYPE addr_type, UINT8 adv_evt);
|
||||
typedef void (*tBLE_SCAN_PARAM_SETUP_CBACK)(tGATT_IF client_if, tBTM_STATUS status);
|
||||
|
||||
tBTM_BLE_SCAN_SETUP_CBACK bta_ble_scan_setup_cb;
|
||||
|
||||
typedef void (tBTM_START_ADV_CMPL_CBACK) (UINT8 status);
|
||||
typedef void (tBTM_START_STOP_ADV_CMPL_CBACK) (UINT8 status);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user