• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/bt


Commit MetaInfo

Revision5f9c140d094ebf4a269cdc6ae083900bf25f7fae (tree)
Zeit2013-08-14 11:13:09
AutorAndre Eisenbach <andre@broa...>
CommiterMatthew Xie

Log Message

LE: Add instance ID to descriptors (2/4)

If a remote devices offers multiple descriptors with the same UUID, the
instance ID is used to differentiate between them.

Change-Id: I1f3c284d714719fe9fb9cbb297c70a061c62a96d

Ändern Zusammenfassung

Diff

--- a/btif/include/btif_gatt_util.h
+++ b/btif/include/btif_gatt_util.h
@@ -21,13 +21,13 @@
2121 #define BTIF_GATT_UTIL_H
2222
2323 void btif_to_bta_uuid(tBT_UUID *p_dest, bt_uuid_t *p_src);
24-void btif_to_bta_char_id(tBTA_GATT_ID *p_dest, btgatt_char_id_t *p_src);
24+void btif_to_bta_gatt_id(tBTA_GATT_ID *p_dest, btgatt_gatt_id_t *p_src);
2525 void btif_to_bta_srvc_id(tBTA_GATT_SRVC_ID *p_dest, btgatt_srvc_id_t *p_src);
2626 void btif_to_bta_response(tBTA_GATTS_RSP *p_dest, btgatt_response_t* p_src);
2727
2828 void bta_to_btif_uuid(bt_uuid_t *p_dest, tBT_UUID *p_src);
2929 void bta_to_btif_srvc_id(btgatt_srvc_id_t *p_dest, tBTA_GATT_SRVC_ID *p_src);
30-void bta_to_btif_char_id(btgatt_char_id_t *p_dest, tBTA_GATT_ID *p_src);
30+void bta_to_btif_gatt_id(btgatt_gatt_id_t *p_dest, tBTA_GATT_ID *p_src);
3131
3232 uint16_t set_read_value(btgatt_read_params_t *p_dest, tBTA_GATTC_READ *p_src);
3333 uint16_t get_uuid16(tBT_UUID *p_uuid);
--- a/btif/src/btif_gatt_client.c
+++ b/btif/src/btif_gatt_client.c
@@ -104,7 +104,8 @@ typedef struct
104104 bt_bdaddr_t bd_addr;
105105 btgatt_srvc_id_t srvc_id;
106106 btgatt_srvc_id_t incl_srvc_id;
107- btgatt_char_id_t char_id;
107+ btgatt_gatt_id_t char_id;
108+ btgatt_gatt_id_t descr_id;
108109 bt_uuid_t uuid;
109110 uint16_t conn_id;
110111 uint16_t len;
@@ -339,7 +340,7 @@ static void btif_gattc_upstreams_evt(uint16_t event, char* p_param)
339340 {
340341 btgatt_write_params_t data;
341342 bta_to_btif_srvc_id(&data.srvc_id, &p_data->write.srvc_id);
342- bta_to_btif_char_id(&data.char_id, &p_data->write.char_id);
343+ bta_to_btif_gatt_id(&data.char_id, &p_data->write.char_id);
343344
344345 HAL_CBACK(bt_gatt_callbacks, client->write_characteristic_cb
345346 , p_data->write.conn_id, p_data->write.status, &data
@@ -385,8 +386,8 @@ static void btif_gattc_upstreams_evt(uint16_t event, char* p_param)
385386 {
386387 btgatt_write_params_t data;
387388 bta_to_btif_srvc_id(&data.srvc_id, &p_data->write.srvc_id);
388- bta_to_btif_char_id(&data.char_id, &p_data->write.char_id);
389- bta_to_btif_uuid(&data.descr_id, &p_data->write.descr_type.uuid);
389+ bta_to_btif_gatt_id(&data.char_id, &p_data->write.char_id);
390+ bta_to_btif_gatt_id(&data.descr_id, &p_data->write.descr_type);
390391
391392 HAL_CBACK(bt_gatt_callbacks, client->write_descriptor_cb
392393 , p_data->write.conn_id, p_data->write.status, &data);
@@ -400,7 +401,7 @@ static void btif_gattc_upstreams_evt(uint16_t event, char* p_param)
400401 bdcpy(data.bda.address, p_data->notify.bda);
401402
402403 bta_to_btif_srvc_id(&data.srvc_id, &p_data->notify.char_id.srvc_id);
403- bta_to_btif_char_id(&data.char_id, &p_data->notify.char_id.char_id);
404+ bta_to_btif_gatt_id(&data.char_id, &p_data->notify.char_id.char_id);
404405 memcpy(data.value, p_data->notify.value, p_data->notify.len);
405406
406407 data.is_notify = p_data->notify.is_notify;
@@ -552,7 +553,6 @@ static void btgattc_handle_event(uint16_t event, char* p_param)
552553 tBTA_GATTC_INCL_SVC_ID in_incl_svc_id;
553554 tBTA_GATTC_INCL_SVC_ID out_incl_svc_id;
554555 tBTA_GATT_UNFMT descr_val;
555- static UINT8 descr_inst = 0;
556556
557557 btif_gattc_cb_t* p_cb = (btif_gattc_cb_t*)p_param;
558558 if (!p_cb) return;
@@ -611,13 +611,13 @@ static void btgattc_handle_event(uint16_t event, char* p_param)
611611
612612 case BTIF_GATTC_GET_FIRST_CHAR:
613613 {
614- btgatt_char_id_t char_id;
614+ btgatt_gatt_id_t char_id;
615615 btif_to_bta_srvc_id(&srvc_id, &p_cb->srvc_id);
616616 status = BTA_GATTC_GetFirstChar(p_cb->conn_id, &srvc_id, NULL,
617617 &out_char_id, &out_char_prop);
618618
619619 if (status == 0)
620- bta_to_btif_char_id(&char_id, &out_char_id.char_id);
620+ bta_to_btif_gatt_id(&char_id, &out_char_id.char_id);
621621
622622 HAL_CBACK(bt_gatt_callbacks, client->get_characteristic_cb,
623623 p_cb->conn_id, status, &p_cb->srvc_id,
@@ -627,15 +627,15 @@ static void btgattc_handle_event(uint16_t event, char* p_param)
627627
628628 case BTIF_GATTC_GET_NEXT_CHAR:
629629 {
630- btgatt_char_id_t char_id;
630+ btgatt_gatt_id_t char_id;
631631 btif_to_bta_srvc_id(&in_char_id.srvc_id, &p_cb->srvc_id);
632- btif_to_bta_char_id(&in_char_id.char_id, &p_cb->char_id);
632+ btif_to_bta_gatt_id(&in_char_id.char_id, &p_cb->char_id);
633633
634634 status = BTA_GATTC_GetNextChar(p_cb->conn_id, &in_char_id, NULL,
635635 &out_char_id, &out_char_prop);
636636
637637 if (status == 0)
638- bta_to_btif_char_id(&char_id, &out_char_id.char_id);
638+ bta_to_btif_gatt_id(&char_id, &out_char_id.char_id);
639639
640640 HAL_CBACK(bt_gatt_callbacks, client->get_characteristic_cb,
641641 p_cb->conn_id, status, &p_cb->srvc_id,
@@ -645,16 +645,15 @@ static void btgattc_handle_event(uint16_t event, char* p_param)
645645
646646 case BTIF_GATTC_GET_FIRST_CHAR_DESCR:
647647 {
648- bt_uuid_t descr_id;
648+ btgatt_gatt_id_t descr_id;
649649 btif_to_bta_srvc_id(&in_char_id.srvc_id, &p_cb->srvc_id);
650- btif_to_bta_char_id(&in_char_id.char_id, &p_cb->char_id);
651- descr_inst = 0;
650+ btif_to_bta_gatt_id(&in_char_id.char_id, &p_cb->char_id);
652651
653652 status = BTA_GATTC_GetFirstCharDescr(p_cb->conn_id, &in_char_id, NULL,
654653 &out_char_descr_id);
655654
656655 if (status == 0)
657- bta_to_btif_uuid(&descr_id, &out_char_descr_id.descr_id.uuid);
656+ bta_to_btif_gatt_id(&descr_id, &out_char_descr_id.descr_id);
658657
659658 HAL_CBACK(bt_gatt_callbacks, client->get_descriptor_cb,
660659 p_cb->conn_id, status, &p_cb->srvc_id,
@@ -664,18 +663,16 @@ static void btgattc_handle_event(uint16_t event, char* p_param)
664663
665664 case BTIF_GATTC_GET_NEXT_CHAR_DESCR:
666665 {
667- bt_uuid_t descr_id;
666+ btgatt_gatt_id_t descr_id;
668667 btif_to_bta_srvc_id(&in_char_descr_id.char_id.srvc_id, &p_cb->srvc_id);
669- btif_to_bta_char_id(&in_char_descr_id.char_id.char_id, &p_cb->char_id);
670- btif_to_bta_uuid(&in_char_descr_id.descr_id.uuid, &p_cb->uuid);
671- in_char_descr_id.descr_id.inst_id = descr_inst; /* TODO: need app layer input */
672- descr_inst ++;
668+ btif_to_bta_gatt_id(&in_char_descr_id.char_id.char_id, &p_cb->char_id);
669+ btif_to_bta_gatt_id(&in_char_descr_id.descr_id, &p_cb->descr_id);
673670
674671 status = BTA_GATTC_GetNextCharDescr(p_cb->conn_id, &in_char_descr_id
675672 , NULL, &out_char_descr_id);
676673
677674 if (status == 0)
678- bta_to_btif_uuid(&descr_id, &out_char_descr_id.descr_id.uuid);
675+ bta_to_btif_gatt_id(&descr_id, &out_char_descr_id.descr_id);
679676
680677 HAL_CBACK(bt_gatt_callbacks, client->get_descriptor_cb,
681678 p_cb->conn_id, status, &p_cb->srvc_id,
@@ -718,23 +715,22 @@ static void btgattc_handle_event(uint16_t event, char* p_param)
718715
719716 case BTIF_GATTC_READ_CHAR:
720717 btif_to_bta_srvc_id(&in_char_id.srvc_id, &p_cb->srvc_id);
721- btif_to_bta_char_id(&in_char_id.char_id, &p_cb->char_id);
718+ btif_to_bta_gatt_id(&in_char_id.char_id, &p_cb->char_id);
722719
723720 BTA_GATTC_ReadCharacteristic(p_cb->conn_id, &in_char_id, p_cb->auth_req);
724721 break;
725722
726723 case BTIF_GATTC_READ_CHAR_DESCR:
727724 btif_to_bta_srvc_id(&in_char_descr_id.char_id.srvc_id, &p_cb->srvc_id);
728- btif_to_bta_char_id(&in_char_descr_id.char_id.char_id, &p_cb->char_id);
729- btif_to_bta_uuid(&in_char_descr_id.descr_id.uuid, &p_cb->uuid);
730- in_char_descr_id.descr_id.inst_id = 0; /* TODO: need app layer input */
725+ btif_to_bta_gatt_id(&in_char_descr_id.char_id.char_id, &p_cb->char_id);
726+ btif_to_bta_gatt_id(&in_char_descr_id.descr_id, &p_cb->descr_id);
731727
732728 BTA_GATTC_ReadCharDescr(p_cb->conn_id, &in_char_descr_id, p_cb->auth_req);
733729 break;
734730
735731 case BTIF_GATTC_WRITE_CHAR:
736732 btif_to_bta_srvc_id(&in_char_id.srvc_id, &p_cb->srvc_id);
737- btif_to_bta_char_id(&in_char_id.char_id, &p_cb->char_id);
733+ btif_to_bta_gatt_id(&in_char_id.char_id, &p_cb->char_id);
738734
739735 BTA_GATTC_WriteCharValue(p_cb->conn_id, &in_char_id,
740736 p_cb->write_type,
@@ -745,9 +741,8 @@ static void btgattc_handle_event(uint16_t event, char* p_param)
745741
746742 case BTIF_GATTC_WRITE_CHAR_DESCR:
747743 btif_to_bta_srvc_id(&in_char_descr_id.char_id.srvc_id, &p_cb->srvc_id);
748- btif_to_bta_char_id(&in_char_descr_id.char_id.char_id, &p_cb->char_id);
749- btif_to_bta_uuid(&in_char_descr_id.descr_id.uuid, &p_cb->uuid);
750- in_char_descr_id.descr_id.inst_id = 0; /* TODO: need app layer input */
744+ btif_to_bta_gatt_id(&in_char_descr_id.char_id.char_id, &p_cb->char_id);
745+ btif_to_bta_gatt_id(&in_char_descr_id.descr_id, &p_cb->descr_id);
751746
752747 descr_val.len = p_cb->len;
753748 descr_val.p_value = p_cb->value;
@@ -763,7 +758,7 @@ static void btgattc_handle_event(uint16_t event, char* p_param)
763758
764759 case BTIF_GATTC_REG_FOR_NOTIFICATION:
765760 btif_to_bta_srvc_id(&in_char_id.srvc_id, &p_cb->srvc_id);
766- btif_to_bta_char_id(&in_char_id.char_id, &p_cb->char_id);
761+ btif_to_bta_gatt_id(&in_char_id.char_id, &p_cb->char_id);
767762
768763 status = BTA_GATTC_RegisterForNotifications(p_cb->client_if,
769764 p_cb->bd_addr.address, &in_char_id);
@@ -775,7 +770,7 @@ static void btgattc_handle_event(uint16_t event, char* p_param)
775770
776771 case BTIF_GATTC_DEREG_FOR_NOTIFICATION:
777772 btif_to_bta_srvc_id(&in_char_id.srvc_id, &p_cb->srvc_id);
778- btif_to_bta_char_id(&in_char_id.char_id, &p_cb->char_id);
773+ btif_to_bta_gatt_id(&in_char_id.char_id, &p_cb->char_id);
779774
780775 status = BTA_GATTC_DeregisterForNotifications(p_cb->client_if,
781776 p_cb->bd_addr.address, &in_char_id);
@@ -876,7 +871,7 @@ static bt_status_t btif_gattc_search_service(int conn_id, bt_uuid_t *filter_uuid
876871 }
877872
878873 static bt_status_t btif_gattc_get_characteristic( int conn_id
879- , btgatt_srvc_id_t *srvc_id, btgatt_char_id_t *start_char_id)
874+ , btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *start_char_id)
880875 {
881876 CHECK_BTGATT_INIT();
882877 btif_gattc_cb_t btif_cb;
@@ -884,7 +879,7 @@ static bt_status_t btif_gattc_get_characteristic( int conn_id
884879 memcpy(&btif_cb.srvc_id, srvc_id, sizeof(btgatt_srvc_id_t));
885880 if (start_char_id)
886881 {
887- memcpy(&btif_cb.char_id, start_char_id, sizeof(btgatt_char_id_t));
882+ memcpy(&btif_cb.char_id, start_char_id, sizeof(btgatt_gatt_id_t));
888883 return btif_transfer_context(btgattc_handle_event, BTIF_GATTC_GET_NEXT_CHAR,
889884 (char*) &btif_cb, sizeof(btif_gattc_cb_t), NULL);
890885 }
@@ -893,17 +888,17 @@ static bt_status_t btif_gattc_get_characteristic( int conn_id
893888 }
894889
895890 static bt_status_t btif_gattc_get_descriptor( int conn_id
896- , btgatt_srvc_id_t *srvc_id, btgatt_char_id_t *char_id
897- , bt_uuid_t *start_descr_id)
891+ , btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *char_id
892+ , btgatt_gatt_id_t *start_descr_id)
898893 {
899894 CHECK_BTGATT_INIT();
900895 btif_gattc_cb_t btif_cb;
901896 btif_cb.conn_id = (uint16_t) conn_id;
902897 memcpy(&btif_cb.srvc_id, srvc_id, sizeof(btgatt_srvc_id_t));
903- memcpy(&btif_cb.char_id, char_id, sizeof(btgatt_char_id_t));
898+ memcpy(&btif_cb.char_id, char_id, sizeof(btgatt_gatt_id_t));
904899 if (start_descr_id)
905900 {
906- memcpy(&btif_cb.uuid, start_descr_id, sizeof(bt_uuid_t));
901+ memcpy(&btif_cb.descr_id, start_descr_id, sizeof(btgatt_gatt_id_t));
907902 return btif_transfer_context(btgattc_handle_event, BTIF_GATTC_GET_NEXT_CHAR_DESCR,
908903 (char*) &btif_cb, sizeof(btif_gattc_cb_t), NULL);
909904 }
@@ -930,20 +925,21 @@ static bt_status_t btif_gattc_get_included_service(int conn_id, btgatt_srvc_id_t
930925 }
931926
932927 static bt_status_t btif_gattc_read_char(int conn_id, btgatt_srvc_id_t* srvc_id,
933- btgatt_char_id_t* char_id, int auth_req )
928+ btgatt_gatt_id_t* char_id, int auth_req )
934929 {
935930 CHECK_BTGATT_INIT();
936931 btif_gattc_cb_t btif_cb;
937932 btif_cb.conn_id = (uint16_t) conn_id;
938933 btif_cb.auth_req = (uint8_t) auth_req;
939934 memcpy(&btif_cb.srvc_id, srvc_id, sizeof(btgatt_srvc_id_t));
940- memcpy(&btif_cb.char_id, char_id, sizeof(btgatt_char_id_t));
935+ memcpy(&btif_cb.char_id, char_id, sizeof(btgatt_gatt_id_t));
941936 return btif_transfer_context(btgattc_handle_event, BTIF_GATTC_READ_CHAR,
942937 (char*) &btif_cb, sizeof(btif_gattc_cb_t), NULL);
943938 }
944939
945940 static bt_status_t btif_gattc_read_char_descr(int conn_id, btgatt_srvc_id_t* srvc_id,
946- btgatt_char_id_t* char_id, bt_uuid_t* descr_id,
941+ btgatt_gatt_id_t* char_id,
942+ btgatt_gatt_id_t* descr_id,
947943 int auth_req )
948944 {
949945 CHECK_BTGATT_INIT();
@@ -951,14 +947,14 @@ static bt_status_t btif_gattc_read_char_descr(int conn_id, btgatt_srvc_id_t* srv
951947 btif_cb.conn_id = (uint16_t) conn_id;
952948 btif_cb.auth_req = (uint8_t) auth_req;
953949 memcpy(&btif_cb.srvc_id, srvc_id, sizeof(btgatt_srvc_id_t));
954- memcpy(&btif_cb.char_id, char_id, sizeof(btgatt_char_id_t));
955- memcpy(&btif_cb.uuid, descr_id, sizeof(bt_uuid_t));
950+ memcpy(&btif_cb.char_id, char_id, sizeof(btgatt_gatt_id_t));
951+ memcpy(&btif_cb.descr_id, descr_id, sizeof(btgatt_gatt_id_t));
956952 return btif_transfer_context(btgattc_handle_event, BTIF_GATTC_READ_CHAR_DESCR,
957953 (char*) &btif_cb, sizeof(btif_gattc_cb_t), NULL);
958954 }
959955
960956 static bt_status_t btif_gattc_write_char(int conn_id, btgatt_srvc_id_t* srvc_id,
961- btgatt_char_id_t* char_id, int write_type,
957+ btgatt_gatt_id_t* char_id, int write_type,
962958 int len, int auth_req, char* p_value)
963959 {
964960 CHECK_BTGATT_INIT();
@@ -968,14 +964,15 @@ static bt_status_t btif_gattc_write_char(int conn_id, btgatt_srvc_id_t* srvc_id,
968964 btif_cb.write_type = (uint8_t) write_type;
969965 btif_cb.len = len > BTGATT_MAX_ATTR_LEN ? BTGATT_MAX_ATTR_LEN : len;
970966 memcpy(&btif_cb.srvc_id, srvc_id, sizeof(btgatt_srvc_id_t));
971- memcpy(&btif_cb.char_id, char_id, sizeof(btgatt_char_id_t));
967+ memcpy(&btif_cb.char_id, char_id, sizeof(btgatt_gatt_id_t));
972968 memcpy(btif_cb.value, p_value, btif_cb.len);
973969 return btif_transfer_context(btgattc_handle_event, BTIF_GATTC_WRITE_CHAR,
974970 (char*) &btif_cb, sizeof(btif_gattc_cb_t), NULL);
975971 }
976972
977973 static bt_status_t btif_gattc_write_char_descr(int conn_id, btgatt_srvc_id_t* srvc_id,
978- btgatt_char_id_t* char_id, bt_uuid_t* descr_id,
974+ btgatt_gatt_id_t* char_id,
975+ btgatt_gatt_id_t* descr_id,
979976 int write_type, int len, int auth_req,
980977 char* p_value)
981978 {
@@ -986,8 +983,8 @@ static bt_status_t btif_gattc_write_char_descr(int conn_id, btgatt_srvc_id_t* sr
986983 btif_cb.write_type = (uint8_t) write_type;
987984 btif_cb.len = len > BTGATT_MAX_ATTR_LEN ? BTGATT_MAX_ATTR_LEN : len;
988985 memcpy(&btif_cb.srvc_id, srvc_id, sizeof(btgatt_srvc_id_t));
989- memcpy(&btif_cb.char_id, char_id, sizeof(btgatt_char_id_t));
990- memcpy(&btif_cb.uuid, descr_id, sizeof(bt_uuid_t));
986+ memcpy(&btif_cb.char_id, char_id, sizeof(btgatt_gatt_id_t));
987+ memcpy(&btif_cb.descr_id, descr_id, sizeof(btgatt_gatt_id_t));
991988 memcpy(btif_cb.value, p_value, btif_cb.len);
992989 return btif_transfer_context(btgattc_handle_event, BTIF_GATTC_WRITE_CHAR_DESCR,
993990 (char*) &btif_cb, sizeof(btif_gattc_cb_t), NULL);
@@ -1005,28 +1002,28 @@ static bt_status_t btif_gattc_execute_write(int conn_id, int execute)
10051002
10061003 static bt_status_t btif_gattc_reg_for_notification(int client_if, const bt_bdaddr_t *bd_addr,
10071004 btgatt_srvc_id_t* srvc_id,
1008- btgatt_char_id_t* char_id)
1005+ btgatt_gatt_id_t* char_id)
10091006 {
10101007 CHECK_BTGATT_INIT();
10111008 btif_gattc_cb_t btif_cb;
10121009 btif_cb.client_if = (uint8_t) client_if;
10131010 bdcpy(btif_cb.bd_addr.address, bd_addr->address);
10141011 memcpy(&btif_cb.srvc_id, srvc_id, sizeof(btgatt_srvc_id_t));
1015- memcpy(&btif_cb.char_id, char_id, sizeof(btgatt_char_id_t));
1012+ memcpy(&btif_cb.char_id, char_id, sizeof(btgatt_gatt_id_t));
10161013 return btif_transfer_context(btgattc_handle_event, BTIF_GATTC_REG_FOR_NOTIFICATION,
10171014 (char*) &btif_cb, sizeof(btif_gattc_cb_t), NULL);
10181015 }
10191016
10201017 static bt_status_t btif_gattc_dereg_for_notification(int client_if, const bt_bdaddr_t *bd_addr,
10211018 btgatt_srvc_id_t* srvc_id,
1022- btgatt_char_id_t* char_id)
1019+ btgatt_gatt_id_t* char_id)
10231020 {
10241021 CHECK_BTGATT_INIT();
10251022 btif_gattc_cb_t btif_cb;
10261023 btif_cb.client_if = (uint8_t) client_if;
10271024 bdcpy(btif_cb.bd_addr.address, bd_addr->address);
10281025 memcpy(&btif_cb.srvc_id, srvc_id, sizeof(btgatt_srvc_id_t));
1029- memcpy(&btif_cb.char_id, char_id, sizeof(btgatt_char_id_t));
1026+ memcpy(&btif_cb.char_id, char_id, sizeof(btgatt_gatt_id_t));
10301027 return btif_transfer_context(btgattc_handle_event, BTIF_GATTC_DEREG_FOR_NOTIFICATION,
10311028 (char*) &btif_cb, sizeof(btif_gattc_cb_t), NULL);
10321029 }
--- a/btif/src/btif_gatt_util.c
+++ b/btif/src/btif_gatt_util.c
@@ -117,7 +117,7 @@ void btif_to_bta_uuid(tBT_UUID *p_dest, bt_uuid_t *p_src)
117117 }
118118 }
119119
120-void btif_to_bta_char_id(tBTA_GATT_ID *p_dest, btgatt_char_id_t *p_src)
120+void btif_to_bta_gatt_id(tBTA_GATT_ID *p_dest, btgatt_gatt_id_t *p_src)
121121 {
122122 p_dest->inst_id = p_src->inst_id;
123123 btif_to_bta_uuid(&p_dest->uuid, &p_src->uuid);
@@ -182,7 +182,7 @@ void bta_to_btif_uuid(bt_uuid_t *p_dest, tBT_UUID *p_src)
182182 }
183183
184184
185-void bta_to_btif_char_id(btgatt_char_id_t *p_dest, tBTA_GATT_ID *p_src)
185+void bta_to_btif_gatt_id(btgatt_gatt_id_t *p_dest, tBTA_GATT_ID *p_src)
186186 {
187187 p_dest->inst_id = p_src->inst_id;
188188 bta_to_btif_uuid(&p_dest->uuid, &p_src->uuid);
@@ -227,8 +227,8 @@ uint16_t set_read_value(btgatt_read_params_t *p_dest, tBTA_GATTC_READ *p_src)
227227
228228 p_dest->status = p_src->status;
229229 bta_to_btif_srvc_id(&p_dest->srvc_id, &p_src->srvc_id);
230- bta_to_btif_char_id(&p_dest->char_id, &p_src->char_id);
231- bta_to_btif_uuid(&p_dest->descr_id, &p_src->descr_type.uuid);
230+ bta_to_btif_gatt_id(&p_dest->char_id, &p_src->char_id);
231+ bta_to_btif_gatt_id(&p_dest->descr_id, &p_src->descr_type);
232232
233233 descr_type = get_uuid16(&p_src->descr_type.uuid);
234234