From: Tian Hao Date: Fri, 25 Nov 2016 07:54:18 +0000 (+0800) Subject: component/bt : close sdp to free dram X-Git-Tag: v1.0~2^2~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac87ddfb0561ee5c141453c6dc3b6c205d10b11b;p=esp-idf component/bt : close sdp to free dram 1. free 15K --- diff --git a/components/bt/bluedroid/bta/include/bta_api.h b/components/bt/bluedroid/bta/include/bta_api.h index f9c6c154f5..338fb96891 100644 --- a/components/bt/bluedroid/bta/include/bta_api.h +++ b/components/bt/bluedroid/bta/include/bta_api.h @@ -29,6 +29,7 @@ #include "bt_types.h" #include "btm_api.h" // #include "uipc_msg.h" +#include "sdp_api.h" #if BLE_INCLUDED == TRUE #include "btm_ble_api.h" diff --git a/components/bt/bluedroid/include/bt_target.h b/components/bt/bluedroid/include/bt_target.h index 5f894a5d61..e9a1625e01 100644 --- a/components/bt/bluedroid/include/bt_target.h +++ b/components/bt/bluedroid/include/bt_target.h @@ -978,7 +978,7 @@ ******************************************************************************/ #ifndef SDP_INCLUDED -#define SDP_INCLUDED TRUE +#define SDP_INCLUDED FALSE //TRUE #endif /* This is set to enable SDP server functionality. */ diff --git a/components/bt/bluedroid/stack/btm/btm_ble_gap.c b/components/bt/bluedroid/stack/btm/btm_ble_gap.c index 0e484d9526..906300a8a8 100644 --- a/components/bt/bluedroid/stack/btm/btm_ble_gap.c +++ b/components/bt/bluedroid/stack/btm/btm_ble_gap.c @@ -2615,13 +2615,15 @@ BOOLEAN btm_ble_update_inq_result(tINQ_DB_ENT *p_i, UINT8 addr_type, UINT8 evt_t BTM_BLE_AD_TYPE_16SRV_CMPL, &len)) != NULL) { UINT8 i; for (i = 0; i + 2 <= len; i = i + 2) { - /* if this BLE device support HID over LE, set HID Major in class of device */ +#if BTA_HH_LE_INCLUDED == TRUE + /* if this BLE device support HID over LE, set HID Major in class of device */ if ((p_uuid16[i] | (p_uuid16[i + 1] << 8)) == UUID_SERVCLASS_LE_HID) { p_cur->dev_class[0] = 0; p_cur->dev_class[1] = BTM_COD_MAJOR_PERIPHERAL; p_cur->dev_class[2] = 0; break; } +#endif /* BTA_HH_LE_INCLUDED */ } } } diff --git a/components/bt/bluedroid/stack/gap/gap_ble.c b/components/bt/bluedroid/stack/gap/gap_ble.c index 70c4a22f69..b560fad651 100644 --- a/components/bt/bluedroid/stack/gap/gap_ble.c +++ b/components/bt/bluedroid/stack/gap/gap_ble.c @@ -28,6 +28,7 @@ #include "gatt_int.h" #include "btm_int.h" #include "hcimsgs.h" +#include "sdpdefs.h" #define GAP_CHAR_ICON_SIZE 2 #define GAP_CHAR_DEV_NAME_SIZE 248 diff --git a/components/bt/bluedroid/stack/gatt/gatt_api.c b/components/bt/bluedroid/stack/gatt/gatt_api.c index 1a61d60b14..c464508da9 100644 --- a/components/bt/bluedroid/stack/gatt/gatt_api.c +++ b/components/bt/bluedroid/stack/gatt/gatt_api.c @@ -33,7 +33,8 @@ #include "gatt_int.h" #include "l2c_api.h" #include "btm_int.h" - +#include "sdpdefs.h" +#include "sdp_api.h" /******************************************************************************* ** diff --git a/components/bt/bluedroid/stack/gatt/gatt_attr.c b/components/bt/bluedroid/stack/gatt/gatt_attr.c index b7a87192b4..b0aa3f71d1 100644 --- a/components/bt/bluedroid/stack/gatt/gatt_attr.c +++ b/components/bt/bluedroid/stack/gatt/gatt_attr.c @@ -28,6 +28,7 @@ #include "gatt_api.h" #include "gatt_int.h" +#include "sdpdefs.h" #if BLE_INCLUDED == TRUE diff --git a/components/bt/bluedroid/stack/include/dyn_mem.h b/components/bt/bluedroid/stack/include/dyn_mem.h index 2693ae6362..9a95fb9565 100755 --- a/components/bt/bluedroid/stack/include/dyn_mem.h +++ b/components/bt/bluedroid/stack/include/dyn_mem.h @@ -31,7 +31,8 @@ #endif #ifndef SDP_DYNAMIC_MEMORY -#define SDP_DYNAMIC_MEMORY FALSE +//#define SDP_DYNAMIC_MEMORY FALSE +#define SDP_DYNAMIC_MEMORY TRUE #endif #ifndef L2C_DYNAMIC_MEMORY diff --git a/components/bt/bluedroid/stack/include/gap_api.h b/components/bt/bluedroid/stack/include/gap_api.h index 2dc9836a88..1f22db008d 100644 --- a/components/bt/bluedroid/stack/include/gap_api.h +++ b/components/bt/bluedroid/stack/include/gap_api.h @@ -19,6 +19,7 @@ #ifndef GAP_API_H #define GAP_API_H +#include "sdpdefs.h" #include "profiles_api.h" #include "btm_api.h" #include "l2c_api.h"