mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
fix(ble/bluedroid): change tGATT_BG_CONN_DEV to GATT_BG_CONN_DEV
(cherry picked from commit ac7812ef8d)
Co-authored-by: zhiweijian <zhiweijian@espressif.com>
This commit is contained in:
@@ -660,7 +660,7 @@ void btm_ble_initiate_select_conn(BD_ADDR bda)
|
||||
BTM_TRACE_ERROR("btm_ble_initiate_select_conn failed");
|
||||
}
|
||||
}
|
||||
#if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#if (GATT_BG_CONN_DEV == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btm_ble_suspend_bg_conn
|
||||
@@ -685,7 +685,7 @@ BOOLEAN btm_ble_suspend_bg_conn(void)
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
#endif // #if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#endif // #if (GATT_BG_CONN_DEV == TRUE)
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -721,9 +721,9 @@ static void btm_suspend_wl_activity(tBTM_BLE_WL_STATE wl_state)
|
||||
*******************************************************************************/
|
||||
void btm_resume_wl_activity(tBTM_BLE_WL_STATE wl_state)
|
||||
{
|
||||
#if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#if (GATT_BG_CONN_DEV == TRUE)
|
||||
btm_ble_resume_bg_conn();
|
||||
#endif // #if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#endif // #if (GATT_BG_CONN_DEV == TRUE)
|
||||
if (wl_state & BTM_BLE_WL_ADV) {
|
||||
#if (BLE_42_ADV_EN == TRUE)
|
||||
btm_ble_start_adv();
|
||||
@@ -750,7 +750,7 @@ static void btm_wl_update_to_controller(void)
|
||||
btm_execute_wl_dev_operation();
|
||||
|
||||
}
|
||||
#if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#if (GATT_BG_CONN_DEV == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btm_ble_resume_bg_conn
|
||||
@@ -780,7 +780,7 @@ BOOLEAN btm_ble_resume_bg_conn(void)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif // #if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#endif // #if (GATT_BG_CONN_DEV == TRUE)
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
|
||||
@@ -1015,6 +1015,7 @@ BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE bg_conn_type,
|
||||
return started;
|
||||
}
|
||||
|
||||
#if (GATT_BG_CONN_DEV == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTM_BleClearBgConnDev
|
||||
@@ -1032,10 +1033,9 @@ void BTM_BleClearBgConnDev(void)
|
||||
{
|
||||
btm_ble_start_auto_conn(FALSE);
|
||||
btm_ble_clear_white_list(NULL);
|
||||
#if (tGATT_BG_CONN_DEV == TRUE)
|
||||
gatt_reset_bgdev_list();
|
||||
#endif // #if (tGATT_BG_CONN_DEV == TRUE)
|
||||
}
|
||||
#endif // #if (GATT_BG_CONN_DEV == TRUE)
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -3955,9 +3955,9 @@ BOOLEAN btm_ble_update_mode_operation(UINT8 link_role, BD_ADDR bd_addr, UINT8 st
|
||||
now in order */
|
||||
if (btm_ble_get_conn_st() == BLE_CONN_IDLE && status != HCI_ERR_HOST_REJECT_RESOURCES &&
|
||||
!btm_send_pending_direct_conn()) {
|
||||
#if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#if (GATT_BG_CONN_DEV == TRUE)
|
||||
bg_con = btm_ble_resume_bg_conn();
|
||||
#endif // #if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#endif // #if (GATT_BG_CONN_DEV == TRUE)
|
||||
}
|
||||
|
||||
return bg_con;
|
||||
|
||||
@@ -718,11 +718,11 @@ BOOLEAN btm_ble_suspend_resolving_list_activity(void)
|
||||
btm_ble_stop_scan();
|
||||
p_ble_cb->suspended_rl_state |= BTM_BLE_RL_SCAN;
|
||||
}
|
||||
#if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#if (GATT_BG_CONN_DEV == TRUE)
|
||||
if (btm_ble_suspend_bg_conn()) {
|
||||
p_ble_cb->suspended_rl_state |= BTM_BLE_RL_INIT;
|
||||
}
|
||||
#endif // #if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#endif // #if (GATT_BG_CONN_DEV == TRUE)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -750,11 +750,11 @@ void btm_ble_resume_resolving_list_activity(void)
|
||||
btm_ble_start_scan();
|
||||
}
|
||||
#endif // #if (BLE_42_SCAN_EN == TRUE)
|
||||
#if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#if (GATT_BG_CONN_DEV == TRUE)
|
||||
if (p_ble_cb->suspended_rl_state & BTM_BLE_RL_INIT) {
|
||||
btm_ble_resume_bg_conn();
|
||||
}
|
||||
#endif // #if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#endif // #if (GATT_BG_CONN_DEV == TRUE)
|
||||
p_ble_cb->suspended_rl_state = BTM_BLE_RL_IDLE;
|
||||
}
|
||||
|
||||
|
||||
@@ -176,9 +176,9 @@ static void reset_complete(void)
|
||||
btm_cb.ble_ctr_cb.conn_state = BLE_CONN_IDLE;
|
||||
btm_cb.ble_ctr_cb.bg_conn_type = BTM_BLE_CONN_NONE;
|
||||
btm_cb.ble_ctr_cb.p_select_cback = NULL;
|
||||
#if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#if (GATT_BG_CONN_DEV == TRUE)
|
||||
gatt_reset_bgdev_list();
|
||||
#endif // #if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#endif // #if (GATT_BG_CONN_DEV == TRUE)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -464,11 +464,11 @@ void btm_ble_remove_from_white_list_complete(UINT8 *p, UINT16 evt_len);
|
||||
void btm_ble_clear_white_list_complete(UINT8 *p, UINT16 evt_len);
|
||||
void btm_ble_white_list_init(UINT8 white_list_size);
|
||||
|
||||
#if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#if (GATT_BG_CONN_DEV == TRUE)
|
||||
/* background connection function */
|
||||
BOOLEAN btm_ble_suspend_bg_conn(void);
|
||||
BOOLEAN btm_ble_resume_bg_conn(void);
|
||||
#endif // #if (tGATT_BG_CONN_DEV == TRUE)
|
||||
#endif // #if (GATT_BG_CONN_DEV == TRUE)
|
||||
|
||||
void btm_ble_initiate_select_conn(BD_ADDR bda);
|
||||
BOOLEAN btm_ble_start_auto_conn(BOOLEAN start);
|
||||
|
||||
Reference in New Issue
Block a user