]> granicus.if.org Git - esp-idf/commitdiff
Component/bt: get end_handle when get include services
authorzhiweijian <zhiweijian@espressif.com>
Thu, 26 Apr 2018 09:17:35 +0000 (17:17 +0800)
committerzhiweijian <zhiweijian@espressif.com>
Sat, 28 Apr 2018 08:27:25 +0000 (16:27 +0800)
components/bt/bluedroid/api/include/api/esp_gatt_defs.h
components/bt/bluedroid/btc/profile/std/gatt/btc_gattc.c

index 5383f70e0eb2e6ec7f186aae020bef6d2002eb61..77cdcd6526d2658a8f687c915cdee1cd1927fe2e 100644 (file)
@@ -450,7 +450,8 @@ typedef struct {
   */
 typedef struct {
     uint16_t                   handle;                      /*!< The include service current attribute handle */
-    uint16_t                   incl_srvc_s_handle;          /*!< The start hanlde of the service which has been included */
+    uint16_t                   incl_srvc_s_handle;          /*!< The start handle of the service which has been included */
+    uint16_t                   incl_srvc_e_handle;          /*!< The end handle of the service which has been included */
     esp_bt_uuid_t              uuid;                        /*!< The include service uuid */
 } esp_gattc_incl_svc_elem_t;                                /*!< The gattc inclue service element */
 
index a6273d14bb6668f8e49a621861706a9df053fee3..ea86459fc311319756820c285e5b70bbf718f0be 100644 (file)
@@ -284,6 +284,7 @@ static void btc_gattc_fill_gatt_db_conversion(uint16_t count, uint16_t num, esp_
             for (int i = 0; i < db_size; i++) {
                 incl_result->handle = db[offset + i].attribute_handle;
                 incl_result->incl_srvc_s_handle = db[offset + i].start_handle;
+                incl_result->incl_srvc_e_handle = db[offset + i].end_handle;
                 btc128_to_bta_uuid(&bta_uuid, db[offset + i].uuid.uu);
                 bta_to_btc_uuid(&incl_result->uuid, &bta_uuid);
                 incl_result++;