mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
component/bt:separate the smp_br_connect_callback from the BLE only mode
This commit is contained in:
parent
b5989a6b26
commit
1016ab1c2a
@ -320,7 +320,7 @@ typedef struct {
|
|||||||
} tBTA_GATTC_SERV;
|
} tBTA_GATTC_SERV;
|
||||||
|
|
||||||
#ifndef BTA_GATTC_NOTIF_REG_MAX
|
#ifndef BTA_GATTC_NOTIF_REG_MAX
|
||||||
#define BTA_GATTC_NOTIF_REG_MAX 15
|
#define BTA_GATTC_NOTIF_REG_MAX 7//15
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -112,7 +112,8 @@
|
|||||||
#endif /* CONFIG_GATTC_ENABLE */
|
#endif /* CONFIG_GATTC_ENABLE */
|
||||||
|
|
||||||
#if (CONFIG_BT_ACL_CONNECTIONS)
|
#if (CONFIG_BT_ACL_CONNECTIONS)
|
||||||
#define MAX_ACL_CONNECTIONS CONFIG_BT_ACL_CONNECTIONS
|
#define MAX_ACL_CONNECTIONS CONFIG_BT_ACL_CONNECTIONS
|
||||||
|
#define GATT_MAX_PHY_CHANNEL CONFIG_BT_ACL_CONNECTIONS
|
||||||
#endif /* CONFIG_BT_ACL_CONNECTIONS */
|
#endif /* CONFIG_BT_ACL_CONNECTIONS */
|
||||||
|
|
||||||
//------------------Added from bdroid_buildcfg.h---------------------
|
//------------------Added from bdroid_buildcfg.h---------------------
|
||||||
@ -724,7 +725,7 @@
|
|||||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||||
#define MAX_L2CAP_CHANNELS 8
|
#define MAX_L2CAP_CHANNELS 8
|
||||||
#else
|
#else
|
||||||
#define MAX_L2CAP_CHANNELS 1 //Not support to create l2cap channels in the BLE only mode in this bluedroid version(6.0)
|
#define MAX_L2CAP_CHANNELS 2 //Not support to create l2cap channels in the BLE only mode in this bluedroid version(6.0)
|
||||||
#endif ///CLASSIC_BT_INCLUDED == TRUE
|
#endif ///CLASSIC_BT_INCLUDED == TRUE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -983,7 +984,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GATT_MAX_PHY_CHANNEL
|
#ifndef GATT_MAX_PHY_CHANNEL
|
||||||
#define GATT_MAX_PHY_CHANNEL 1
|
#define GATT_MAX_PHY_CHANNEL 7
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Used for conformance testing ONLY */
|
/* Used for conformance testing ONLY */
|
||||||
|
@ -2654,7 +2654,7 @@ void l2cu_no_dynamic_ccbs (tL2C_LCB *p_lcb)
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
void l2cu_process_fixed_chnl_resp (tL2C_LCB *p_lcb)
|
void l2cu_process_fixed_chnl_resp (tL2C_LCB *p_lcb)
|
||||||
{
|
{
|
||||||
L2CAP_TRACE_ERROR("%s",__func__);
|
L2CAP_TRACE_DEBUG("%s",__func__);
|
||||||
#if (BLE_INCLUDED == TRUE)
|
#if (BLE_INCLUDED == TRUE)
|
||||||
if (p_lcb->transport == BT_TRANSPORT_BR_EDR) {
|
if (p_lcb->transport == BT_TRANSPORT_BR_EDR) {
|
||||||
/* ignore all not assigned BR/EDR channels */
|
/* ignore all not assigned BR/EDR channels */
|
||||||
|
@ -38,10 +38,11 @@ static void smp_tx_complete_callback(UINT16 cid, UINT16 num_pkt);
|
|||||||
static void smp_connect_callback(UINT16 channel, BD_ADDR bd_addr, BOOLEAN connected, UINT16 reason,
|
static void smp_connect_callback(UINT16 channel, BD_ADDR bd_addr, BOOLEAN connected, UINT16 reason,
|
||||||
tBT_TRANSPORT transport);
|
tBT_TRANSPORT transport);
|
||||||
static void smp_data_received(UINT16 channel, BD_ADDR bd_addr, BT_HDR *p_buf);
|
static void smp_data_received(UINT16 channel, BD_ADDR bd_addr, BT_HDR *p_buf);
|
||||||
|
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||||
static void smp_br_connect_callback(UINT16 channel, BD_ADDR bd_addr, BOOLEAN connected, UINT16 reason,
|
static void smp_br_connect_callback(UINT16 channel, BD_ADDR bd_addr, BOOLEAN connected, UINT16 reason,
|
||||||
tBT_TRANSPORT transport);
|
tBT_TRANSPORT transport);
|
||||||
static void smp_br_data_received(UINT16 channel, BD_ADDR bd_addr, BT_HDR *p_buf);
|
static void smp_br_data_received(UINT16 channel, BD_ADDR bd_addr, BT_HDR *p_buf);
|
||||||
|
#endif ///CLASSIC_BT_INCLUDED == TRUE
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
**
|
**
|
||||||
@ -70,11 +71,12 @@ void smp_l2cap_if_init (void)
|
|||||||
fixed_reg.default_idle_tout = 60; /* set 60 seconds timeout, 0xffff default idle timeout */
|
fixed_reg.default_idle_tout = 60; /* set 60 seconds timeout, 0xffff default idle timeout */
|
||||||
|
|
||||||
L2CA_RegisterFixedChannel (L2CAP_SMP_CID, &fixed_reg);
|
L2CA_RegisterFixedChannel (L2CAP_SMP_CID, &fixed_reg);
|
||||||
|
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||||
fixed_reg.pL2CA_FixedConn_Cb = smp_br_connect_callback;
|
fixed_reg.pL2CA_FixedConn_Cb = smp_br_connect_callback;
|
||||||
fixed_reg.pL2CA_FixedData_Cb = smp_br_data_received;
|
fixed_reg.pL2CA_FixedData_Cb = smp_br_data_received;
|
||||||
|
|
||||||
L2CA_RegisterFixedChannel (L2CAP_SMP_BR_CID, &fixed_reg);
|
L2CA_RegisterFixedChannel (L2CAP_SMP_BR_CID, &fixed_reg);
|
||||||
|
#endif ///CLASSIC_BT_INCLUDED == TRUE
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
@ -227,6 +229,7 @@ static void smp_tx_complete_callback (UINT16 cid, UINT16 num_pkt)
|
|||||||
** connected (conn = TRUE)/disconnected (conn = FALSE).
|
** connected (conn = TRUE)/disconnected (conn = FALSE).
|
||||||
**
|
**
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||||
static void smp_br_connect_callback(UINT16 channel, BD_ADDR bd_addr, BOOLEAN connected,
|
static void smp_br_connect_callback(UINT16 channel, BD_ADDR bd_addr, BOOLEAN connected,
|
||||||
UINT16 reason, tBT_TRANSPORT transport)
|
UINT16 reason, tBT_TRANSPORT transport)
|
||||||
{
|
{
|
||||||
@ -319,4 +322,6 @@ static void smp_br_data_received(UINT16 channel, BD_ADDR bd_addr, BT_HDR *p_buf)
|
|||||||
|
|
||||||
GKI_freebuf (p_buf);
|
GKI_freebuf (p_buf);
|
||||||
}
|
}
|
||||||
|
#endif /* CLASSIC_BT_INCLUDED == TRUE */
|
||||||
|
|
||||||
#endif /* SMP_INCLUDED == TRUE */
|
#endif /* SMP_INCLUDED == TRUE */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user