mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fix(ble/bluedroid): Delete BLE_HOST_STOP_ADV_UNUSED
This commit is contained in:
@@ -5346,28 +5346,6 @@ void bta_dm_ble_clear_rand_address(tBTA_DM_MSG *p_data)
|
||||
BTM_BleClearRandAddress();
|
||||
}
|
||||
|
||||
#if (BLE_HOST_STOP_ADV_UNUSED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function bta_dm_ble_stop_advertising
|
||||
**
|
||||
** Description This function stop the BLE avdertising for the device.
|
||||
**
|
||||
** Parameters: void
|
||||
** Explanation: This function added by Yulong at 2016/10/19
|
||||
*******************************************************************************/
|
||||
void bta_dm_ble_stop_advertising(tBTA_DM_MSG *p_data)
|
||||
{
|
||||
if (p_data->hdr.event != BTA_DM_API_BLE_STOP_ADV_EVT) {
|
||||
APPL_TRACE_ERROR("Invalid BTA event,can't stop the BLE adverting\n");
|
||||
}
|
||||
#if (BLE_42_ADV_EN == TRUE)
|
||||
btm_ble_stop_adv();
|
||||
#endif // #if (BLE_42_ADV_EN == TRUE)
|
||||
}
|
||||
#endif // #if (BLE_HOST_STOP_ADV_UNUSED == TRUE)
|
||||
|
||||
|
||||
#if BLE_PRIVACY_SPT == TRUE
|
||||
/*******************************************************************************
|
||||
**
|
||||
|
||||
@@ -2636,33 +2636,6 @@ 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
|
||||
**
|
||||
** Description This function set the random address for the APP
|
||||
**
|
||||
** Parameters void
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void BTA_DmBleStopAdvertising(void)
|
||||
{
|
||||
BT_HDR *p_msg;
|
||||
|
||||
APPL_TRACE_API("BTA_DmBleStopAdvertising\n");
|
||||
|
||||
if ((p_msg = (BT_HDR *) osi_malloc(sizeof(BT_HDR))) != NULL) {
|
||||
memset(p_msg, 0, sizeof(BT_HDR));
|
||||
p_msg->event = BTA_DM_API_BLE_STOP_ADV_EVT;
|
||||
bta_sys_sendmsg(p_msg);
|
||||
}
|
||||
}
|
||||
#endif // #if (BLE_HOST_STOP_ADV_UNUSED == TRUE)
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_DmSetRandAddress
|
||||
|
||||
@@ -161,9 +161,6 @@ const tBTA_DM_ACTION bta_dm_action[BTA_DM_MAX_EVT] = {
|
||||
Yulong at 2016/10/19 to support
|
||||
stop the ble advertising setting
|
||||
by the APP */
|
||||
#if (BLE_HOST_STOP_ADV_UNUSED == TRUE)
|
||||
bta_dm_ble_stop_advertising, /* BTA_DM_API_BLE_STOP_ADV_EVT */
|
||||
#endif // #if (BLE_HOST_STOP_ADV_UNUSED == TRUE)
|
||||
#if BLE_PRIVACY_SPT == TRUE
|
||||
bta_dm_ble_config_local_privacy, /* BTA_DM_API_LOCAL_PRIVACY_EVT */
|
||||
#endif
|
||||
|
||||
@@ -144,11 +144,6 @@ enum {
|
||||
support the random address setting for the APP******/
|
||||
BTA_DM_API_SET_RAND_ADDR_EVT,
|
||||
BTA_DM_API_CLEAR_RAND_ADDR_EVT,
|
||||
/*******This event added by Yulong at 2016/10/19 to
|
||||
support stop the ble advertising setting by the APP******/
|
||||
#if (BLE_HOST_STOP_ADV_UNUSED == TRUE)
|
||||
BTA_DM_API_BLE_STOP_ADV_EVT,
|
||||
#endif // #if (BLE_HOST_STOP_ADV_UNUSED == TRUE)
|
||||
#if BLE_PRIVACY_SPT == TRUE
|
||||
BTA_DM_API_LOCAL_PRIVACY_EVT,
|
||||
#endif
|
||||
@@ -2394,9 +2389,6 @@ extern void bta_dm_ble_update_conn_params (tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_disconnect (tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_set_rand_address(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_clear_rand_address(tBTA_DM_MSG *p_data);
|
||||
#if (BLE_HOST_STOP_ADV_UNUSED == TRUE)
|
||||
extern void bta_dm_ble_stop_advertising(tBTA_DM_MSG *p_data);
|
||||
#endif // #if (BLE_HOST_STOP_ADV_UNUSED == TRUE)
|
||||
extern void bta_dm_ble_config_local_privacy (tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_config_local_icon (tBTA_DM_MSG *p_data);
|
||||
#if (BT_GATTS_KEY_MATERIAL_CHAR == TRUE)
|
||||
|
||||
@@ -2865,9 +2865,6 @@ extern void BTA_DmBleScan(BOOLEAN start, UINT32 duration,
|
||||
tBTA_DM_SEARCH_CBACK *p_results_cb,
|
||||
tBTA_START_STOP_SCAN_CMPL_CBACK *p_start_stop_scan_cb);
|
||||
|
||||
#if (BLE_HOST_STOP_ADV_UNUSED == TRUE)
|
||||
extern void BTA_DmBleStopAdvertising(void);
|
||||
#endif // #if (BLE_HOST_STOP_ADV_UNUSED == TRUE)
|
||||
|
||||
extern void BTA_DmSetRandAddress(BD_ADDR rand_addr, tBTA_SET_RAND_ADDR_CBACK *p_set_rand_addr_cback);
|
||||
extern void BTA_DmClearRandAddress(void);
|
||||
|
||||
@@ -1647,10 +1647,6 @@
|
||||
#define BLE_HOST_READ_TX_POWER_EN FALSE
|
||||
#endif
|
||||
|
||||
#ifndef BLE_HOST_STOP_ADV_UNUSED
|
||||
#define BLE_HOST_STOP_ADV_UNUSED FALSE
|
||||
#endif
|
||||
|
||||
#ifndef BLE_HOST_BLE_OBSERVE_EN
|
||||
#define BLE_HOST_BLE_OBSERVE_EN FALSE
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user