Component/bt: get end_handle when get include services

This commit is contained in:
zhiweijian 2018-04-26 17:17:35 +08:00
parent 051d8d6900
commit e236ffd91f
2 changed files with 3 additions and 1 deletions

View File

@ -450,7 +450,8 @@ typedef struct {
*/ */
typedef struct { typedef struct {
uint16_t handle; /*!< The include service current attribute handle */ 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_bt_uuid_t uuid; /*!< The include service uuid */
} esp_gattc_incl_svc_elem_t; /*!< The gattc inclue service element */ } esp_gattc_incl_svc_elem_t; /*!< The gattc inclue service element */

View 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++) { for (int i = 0; i < db_size; i++) {
incl_result->handle = db[offset + i].attribute_handle; incl_result->handle = db[offset + i].attribute_handle;
incl_result->incl_srvc_s_handle = db[offset + i].start_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); btc128_to_bta_uuid(&bta_uuid, db[offset + i].uuid.uu);
bta_to_btc_uuid(&incl_result->uuid, &bta_uuid); bta_to_btc_uuid(&incl_result->uuid, &bta_uuid);
incl_result++; incl_result++;