]> granicus.if.org Git - esp-idf/commitdiff
component/bt:separate the smp_br_connect_callback from the BLE only mode
authorYulong <huangyulong@espressif.com>
Sun, 23 Apr 2017 04:48:23 +0000 (00:48 -0400)
committerYulong <huangyulong@espressif.com>
Sun, 23 Apr 2017 04:48:23 +0000 (00:48 -0400)
components/bt/bluedroid/bta/include/bta_gattc_int.h
components/bt/bluedroid/include/bt_target.h
components/bt/bluedroid/stack/l2cap/l2c_utils.c
components/bt/bluedroid/stack/smp/smp_l2c.c

index 95268608764e2800eae1459b1afa9bd966b309e8..d04097b71e5ff837d04f5fbe0fcd86047126b6bb 100644 (file)
@@ -320,7 +320,7 @@ typedef struct {
 } tBTA_GATTC_SERV;
 
 #ifndef BTA_GATTC_NOTIF_REG_MAX
-#define BTA_GATTC_NOTIF_REG_MAX     15
+#define BTA_GATTC_NOTIF_REG_MAX     7//15
 #endif
 
 typedef struct {
index e1a898aabc7718e990fdc764e631ec952b5d7dbb..ce59d6c833ab04d94f213219b5b7432b00ddd5cb 100644 (file)
 #endif  /* CONFIG_GATTC_ENABLE */
 
 #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 */
 
 //------------------Added from bdroid_buildcfg.h---------------------
 #if (CLASSIC_BT_INCLUDED == TRUE)
 #define MAX_L2CAP_CHANNELS          8
 #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
 
 #endif
 
 #ifndef GATT_MAX_PHY_CHANNEL
-#define GATT_MAX_PHY_CHANNEL        1
+#define GATT_MAX_PHY_CHANNEL        7
 #endif
 
 /* Used for conformance testing ONLY */
index 46123af177298aef5a66e15c27b59161fb720d10..2021f064c451bbe4dae056402bce18e07ab01f4f 100644 (file)
@@ -2654,7 +2654,7 @@ void l2cu_no_dynamic_ccbs (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 (p_lcb->transport == BT_TRANSPORT_BR_EDR) {
         /* ignore all not assigned BR/EDR channels */
index de0c1d0f0e8ccb536a1d920f72dbdc65a2bb2328..007c9ccb7b685d39c5c3fea73ad37140184ac600 100644 (file)
@@ -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,
                                  tBT_TRANSPORT transport);
 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,
                                     tBT_TRANSPORT transport);
 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 */
 
     L2CA_RegisterFixedChannel (L2CAP_SMP_CID, &fixed_reg);
-
+#if (CLASSIC_BT_INCLUDED == TRUE)
     fixed_reg.pL2CA_FixedConn_Cb = smp_br_connect_callback;
     fixed_reg.pL2CA_FixedData_Cb = smp_br_data_received;
 
     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).
 **
 *******************************************************************************/
+#if (CLASSIC_BT_INCLUDED == TRUE)
 static void smp_br_connect_callback(UINT16 channel, BD_ADDR bd_addr, BOOLEAN connected,
                                     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);
 }
+#endif  /* CLASSIC_BT_INCLUDED == TRUE */
+
 #endif /* SMP_INCLUDED == TRUE */