You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/06/06 14:30:16 UTC
[08/13] incubator-mynewt-core git commit: BLE Host - Fix inconsistent
GATT identifier names.
BLE Host - Fix inconsistent GATT identifier names.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/baa7a027
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/baa7a027
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/baa7a027
Branch: refs/heads/upf54
Commit: baa7a027f55b357fc9de733ddd5fa8b322c8d3f4
Parents: 2ee63ed
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Jun 6 19:16:14 2016 +0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Jun 6 19:16:14 2016 +0800
----------------------------------------------------------------------
apps/bletiny/src/bletiny.h | 2 +-
apps/bletiny/src/cmd.c | 2 +-
apps/bletiny/src/main.c | 16 +-
apps/bletiny/src/misc.c | 4 +-
net/nimble/host/include/host/ble_gatt.h | 8 +-
net/nimble/host/src/ble_gattc.c | 22 +-
net/nimble/host/src/test/ble_gatt_conn_test.c | 6 +-
net/nimble/host/src/test/ble_gatt_disc_c_test.c | 210 +++++++++----------
net/nimble/host/src/test/ble_gatt_disc_s_test.c | 4 +-
net/nimble/host/src/test/ble_gatt_find_s_test.c | 6 +-
10 files changed, 140 insertions(+), 140 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/baa7a027/apps/bletiny/src/bletiny.h
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/bletiny.h b/apps/bletiny/src/bletiny.h
index 88f9dc5..c5c5921 100644
--- a/apps/bletiny/src/bletiny.h
+++ b/apps/bletiny/src/bletiny.h
@@ -64,7 +64,7 @@ SLIST_HEAD(bletiny_chr_list, bletiny_chr);
struct bletiny_svc {
SLIST_ENTRY(bletiny_svc) next;
- struct ble_gatt_service svc;
+ struct ble_gatt_svc svc;
struct bletiny_chr_list chrs;
};
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/baa7a027/apps/bletiny/src/cmd.c
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/cmd.c b/apps/bletiny/src/cmd.c
index ec9e34b..b4ad2d7 100644
--- a/apps/bletiny/src/cmd.c
+++ b/apps/bletiny/src/cmd.c
@@ -86,7 +86,7 @@ cmd_print_chr(struct bletiny_chr *chr)
struct bletiny_dsc *dsc;
console_printf(" def_handle=%d val_handle=%d properties=0x%02x "
- "uuid=", chr->chr.decl_handle, chr->chr.value_handle,
+ "uuid=", chr->chr.def_handle, chr->chr.val_handle,
chr->chr.properties);
print_uuid(chr->chr.uuid128);
console_printf("\n");
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/baa7a027/apps/bletiny/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/main.c b/apps/bletiny/src/main.c
index ef60cd6..98ea6ab 100755
--- a/apps/bletiny/src/main.c
+++ b/apps/bletiny/src/main.c
@@ -434,7 +434,7 @@ bletiny_svc_delete(struct bletiny_svc *svc)
}
static struct bletiny_svc *
-bletiny_svc_add(uint16_t conn_handle, struct ble_gatt_service *gatt_svc)
+bletiny_svc_add(uint16_t conn_handle, struct ble_gatt_svc *gatt_svc)
{
struct bletiny_conn *conn;
struct bletiny_svc *prev;
@@ -481,7 +481,7 @@ bletiny_chr_find_prev(struct bletiny_svc *svc, uint16_t chr_def_handle)
prev = NULL;
SLIST_FOREACH(chr, &svc->chrs, next) {
- if (chr->chr.decl_handle >= chr_def_handle) {
+ if (chr->chr.def_handle >= chr_def_handle) {
break;
}
@@ -505,7 +505,7 @@ bletiny_chr_find(struct bletiny_svc *svc, uint16_t chr_def_handle,
chr = SLIST_NEXT(prev, next);
}
- if (chr != NULL && chr->chr.decl_handle != chr_def_handle) {
+ if (chr != NULL && chr->chr.def_handle != chr_def_handle) {
chr = NULL;
}
@@ -540,7 +540,7 @@ bletiny_chr_add(uint16_t conn_handle, uint16_t svc_start_handle,
return NULL;
}
- chr = bletiny_chr_find(svc, gatt_chr->decl_handle, &prev);
+ chr = bletiny_chr_find(svc, gatt_chr->def_handle, &prev);
if (chr != NULL) {
/* Characteristic already discovered. */
return chr;
@@ -749,16 +749,16 @@ bletiny_disc_full_dscs(uint16_t conn_handle)
SLIST_FOREACH(chr, &svc->chrs, next) {
if (!chr_is_empty(svc, chr) &&
SLIST_EMPTY(&chr->dscs) &&
- bletiny_full_disc_prev_chr_def <= chr->chr.decl_handle) {
+ bletiny_full_disc_prev_chr_def <= chr->chr.def_handle) {
rc = bletiny_disc_all_dscs(conn_handle,
- chr->chr.decl_handle,
+ chr->chr.def_handle,
chr_end_handle(svc, chr));
if (rc != 0) {
bletiny_full_disc_complete(rc);
}
- bletiny_full_disc_prev_chr_def = chr->chr.value_handle;
+ bletiny_full_disc_prev_chr_def = chr->chr.val_handle;
return;
}
}
@@ -800,7 +800,7 @@ bletiny_disc_full_chrs(uint16_t conn_handle)
static int
bletiny_on_disc_s(uint16_t conn_handle, struct ble_gatt_error *error,
- struct ble_gatt_service *service, void *arg)
+ struct ble_gatt_svc *service, void *arg)
{
if (error != NULL) {
bletiny_print_error(NULL, conn_handle, error);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/baa7a027/apps/bletiny/src/misc.c
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/misc.c b/apps/bletiny/src/misc.c
index 934d9cd..179c9a7 100644
--- a/apps/bletiny/src/misc.c
+++ b/apps/bletiny/src/misc.c
@@ -80,7 +80,7 @@ chr_end_handle(struct bletiny_svc *svc, struct bletiny_chr *chr)
next_chr = SLIST_NEXT(chr, next);
if (next_chr != NULL) {
- return next_chr->chr.decl_handle - 1;
+ return next_chr->chr.def_handle - 1;
} else {
return svc->svc.end_handle;
}
@@ -89,5 +89,5 @@ chr_end_handle(struct bletiny_svc *svc, struct bletiny_chr *chr)
int
chr_is_empty(struct bletiny_svc *svc, struct bletiny_chr *chr)
{
- return chr_end_handle(svc, chr) <= chr->chr.value_handle;
+ return chr_end_handle(svc, chr) <= chr->chr.val_handle;
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/baa7a027/net/nimble/host/include/host/ble_gatt.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_gatt.h b/net/nimble/host/include/host/ble_gatt.h
index 7112210..194ebf3 100644
--- a/net/nimble/host/include/host/ble_gatt.h
+++ b/net/nimble/host/include/host/ble_gatt.h
@@ -34,7 +34,7 @@ struct ble_gatt_error {
uint16_t att_handle;
};
-struct ble_gatt_service {
+struct ble_gatt_svc {
uint16_t start_handle;
uint16_t end_handle;
uint8_t uuid128[16];
@@ -48,8 +48,8 @@ struct ble_gatt_attr {
};
struct ble_gatt_chr {
- uint16_t decl_handle;
- uint16_t value_handle;
+ uint16_t def_handle;
+ uint16_t val_handle;
uint8_t properties;
uint8_t uuid128[16];
};
@@ -63,7 +63,7 @@ typedef int ble_gatt_mtu_fn(uint16_t conn_handle, struct ble_gatt_error *error,
uint16_t mtu, void *arg);
typedef int ble_gatt_disc_svc_fn(uint16_t conn_handle,
struct ble_gatt_error *error,
- struct ble_gatt_service *service,
+ struct ble_gatt_svc *service,
void *arg);
typedef int ble_gatt_attr_fn(uint16_t conn_handle,
struct ble_gatt_error *error,
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/baa7a027/net/nimble/host/src/ble_gattc.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_gattc.c b/net/nimble/host/src/ble_gattc.c
index de828a9..876abf5 100644
--- a/net/nimble/host/src/ble_gattc.c
+++ b/net/nimble/host/src/ble_gattc.c
@@ -1011,7 +1011,7 @@ done:
static int
ble_gattc_disc_all_svcs_cb(struct ble_gattc_proc *proc,
uint16_t status, uint16_t att_handle,
- struct ble_gatt_service *service)
+ struct ble_gatt_svc *service)
{
int rc;
@@ -1088,7 +1088,7 @@ static int
ble_gattc_disc_all_svcs_rx_adata(struct ble_gattc_proc *proc,
struct ble_att_read_group_type_adata *adata)
{
- struct ble_gatt_service service;
+ struct ble_gatt_svc service;
uint16_t uuid16;
int cbrc;
int rc;
@@ -1225,7 +1225,7 @@ done:
static int
ble_gattc_disc_svc_uuid_cb(struct ble_gattc_proc *proc, int status,
uint16_t att_handle,
- struct ble_gatt_service *service)
+ struct ble_gatt_svc *service)
{
int rc;
@@ -1300,7 +1300,7 @@ static int
ble_gattc_disc_svc_uuid_rx_hinfo(struct ble_gattc_proc *proc,
struct ble_att_find_type_value_hinfo *hinfo)
{
- struct ble_gatt_service service;
+ struct ble_gatt_svc service;
int cbrc;
int rc;
@@ -1420,7 +1420,7 @@ done:
static int
ble_gattc_find_inc_svcs_cb(struct ble_gattc_proc *proc, int status,
uint16_t att_handle,
- struct ble_gatt_service *service)
+ struct ble_gatt_svc *service)
{
int rc;
@@ -1510,7 +1510,7 @@ static int
ble_gattc_find_inc_svcs_rx_read_rsp(struct ble_gattc_proc *proc, int status,
void *value, int value_len)
{
- struct ble_gatt_service service;
+ struct ble_gatt_svc service;
int cbrc;
int rc;
@@ -1564,7 +1564,7 @@ static int
ble_gattc_find_inc_svcs_rx_adata(struct ble_gattc_proc *proc,
struct ble_att_read_type_adata *adata)
{
- struct ble_gatt_service service;
+ struct ble_gatt_svc service;
uint16_t uuid16;
int call_cb;
int cbrc;
@@ -1813,7 +1813,7 @@ ble_gattc_disc_all_chrs_rx_adata(struct ble_gattc_proc *proc,
ble_gattc_dbg_assert_proc_not_inserted(proc);
memset(&chr, 0, sizeof chr);
- chr.decl_handle = adata->att_handle;
+ chr.def_handle = adata->att_handle;
switch (adata->value_len) {
case BLE_GATT_CHR_DECL_SZ_16:
@@ -1835,7 +1835,7 @@ ble_gattc_disc_all_chrs_rx_adata(struct ble_gattc_proc *proc,
}
chr.properties = adata->value[0];
- chr.value_handle = le16toh(adata->value + 1);
+ chr.val_handle = le16toh(adata->value + 1);
if (adata->att_handle <= proc->disc_all_chrs.prev_handle) {
/* Peer sent characteristics out of order; terminate procedure. */
@@ -2038,7 +2038,7 @@ ble_gattc_disc_chr_uuid_rx_adata(struct ble_gattc_proc *proc,
ble_gattc_dbg_assert_proc_not_inserted(proc);
memset(&chr, 0, sizeof chr);
- chr.decl_handle = adata->att_handle;
+ chr.def_handle = adata->att_handle;
switch (adata->value_len) {
case BLE_GATT_CHR_DECL_SZ_16:
@@ -2060,7 +2060,7 @@ ble_gattc_disc_chr_uuid_rx_adata(struct ble_gattc_proc *proc,
}
chr.properties = adata->value[0];
- chr.value_handle = le16toh(adata->value + 1);
+ chr.val_handle = le16toh(adata->value + 1);
if (adata->att_handle <= proc->disc_chr_uuid.prev_handle) {
/* Peer sent characteristics out of order; terminate procedure. */
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/baa7a027/net/nimble/host/src/test/ble_gatt_conn_test.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/test/ble_gatt_conn_test.c b/net/nimble/host/src/test/ble_gatt_conn_test.c
index 7b6628f..6f3a4a5 100644
--- a/net/nimble/host/src/test/ble_gatt_conn_test.c
+++ b/net/nimble/host/src/test/ble_gatt_conn_test.c
@@ -75,7 +75,7 @@ ble_gatt_conn_test_mtu_cb(uint16_t conn_handle, struct ble_gatt_error *error,
static int
ble_gatt_conn_test_disc_all_svcs_cb(uint16_t conn_handle,
struct ble_gatt_error *error,
- struct ble_gatt_service *service,
+ struct ble_gatt_svc *service,
void *arg)
{
struct ble_gatt_conn_test_cb_arg *cb_arg;
@@ -96,7 +96,7 @@ ble_gatt_conn_test_disc_all_svcs_cb(uint16_t conn_handle,
static int
ble_gatt_conn_test_disc_svc_uuid_cb(uint16_t conn_handle,
struct ble_gatt_error *error,
- struct ble_gatt_service *service,
+ struct ble_gatt_svc *service,
void *arg)
{
struct ble_gatt_conn_test_cb_arg *cb_arg;
@@ -117,7 +117,7 @@ ble_gatt_conn_test_disc_svc_uuid_cb(uint16_t conn_handle,
static int
ble_gatt_conn_test_find_inc_svcs_cb(uint16_t conn_handle,
struct ble_gatt_error *error,
- struct ble_gatt_service *service,
+ struct ble_gatt_svc *service,
void *arg)
{
struct ble_gatt_conn_test_cb_arg *cb_arg;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/baa7a027/net/nimble/host/src/test/ble_gatt_disc_c_test.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/test/ble_gatt_disc_c_test.c b/net/nimble/host/src/test/ble_gatt_disc_c_test.c
index afffeef..6325926 100644
--- a/net/nimble/host/src/test/ble_gatt_disc_c_test.c
+++ b/net/nimble/host/src/test/ble_gatt_disc_c_test.c
@@ -28,8 +28,8 @@
#include "ble_hs_test_util.h"
struct ble_gatt_disc_c_test_char {
- uint16_t decl_handle;
- uint16_t value_handle;
+ uint16_t def_handle;
+ uint16_t val_handle;
uint16_t uuid16; /* 0 if not present. */
uint8_t properties;
uint8_t uuid128[16];
@@ -75,7 +75,7 @@ ble_gatt_disc_c_test_misc_rx_rsp_once(
off = BLE_ATT_READ_TYPE_RSP_BASE_SZ;
for (i = 0; ; i++) {
- if (chars[i].decl_handle == 0) {
+ if (chars[i].def_handle == 0) {
/* No more services. */
break;
}
@@ -85,13 +85,13 @@ ble_gatt_disc_c_test_misc_rx_rsp_once(
break;
}
- htole16(buf + off, chars[i].decl_handle);
+ htole16(buf + off, chars[i].def_handle);
off += 2;
buf[off] = chars[i].properties;
off++;
- htole16(buf + off, chars[i].value_handle);
+ htole16(buf + off, chars[i].val_handle);
off += 2;
if (chars[i].uuid16 != 0) {
@@ -119,7 +119,7 @@ ble_gatt_disc_c_test_misc_rx_rsp(uint16_t conn_handle,
int idx;
idx = 0;
- while (chars[idx].decl_handle != 0) {
+ while (chars[idx].def_handle != 0) {
count = ble_gatt_disc_c_test_misc_rx_rsp_once(conn_handle,
chars + idx);
if (count == 0) {
@@ -128,12 +128,12 @@ ble_gatt_disc_c_test_misc_rx_rsp(uint16_t conn_handle,
idx += count;
}
- if (chars[idx - 1].decl_handle != end_handle) {
+ if (chars[idx - 1].def_handle != end_handle) {
/* Send the pending ATT Request. */
ble_hs_test_util_tx_all();
ble_hs_test_util_rx_att_err_rsp(conn_handle, BLE_ATT_OP_READ_TYPE_REQ,
BLE_ATT_ERR_ATTR_NOT_FOUND,
- chars[idx - 1].decl_handle);
+ chars[idx - 1].def_handle);
}
}
@@ -148,11 +148,11 @@ ble_gatt_disc_c_test_misc_verify_chars(struct ble_gatt_disc_c_test_char *chars,
stop_after = INT_MAX;
}
- for (i = 0; i < stop_after && chars[i].decl_handle != 0; i++) {
- TEST_ASSERT(chars[i].decl_handle ==
- ble_gatt_disc_c_test_chars[i].decl_handle);
- TEST_ASSERT(chars[i].value_handle ==
- ble_gatt_disc_c_test_chars[i].value_handle);
+ for (i = 0; i < stop_after && chars[i].def_handle != 0; i++) {
+ TEST_ASSERT(chars[i].def_handle ==
+ ble_gatt_disc_c_test_chars[i].def_handle);
+ TEST_ASSERT(chars[i].val_handle ==
+ ble_gatt_disc_c_test_chars[i].val_handle);
if (chars[i].uuid16 != 0) {
uuid16 = ble_uuid_128_to_16(ble_gatt_disc_c_test_chars[i].uuid128);
TEST_ASSERT(chars[i].uuid16 == uuid16);
@@ -252,8 +252,8 @@ TEST_CASE(ble_gatt_disc_c_test_disc_all)
ble_gatt_disc_c_test_misc_all(50, 100, 0,
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 55,
- .value_handle = 56,
+ .def_handle = 55,
+ .val_handle = 56,
.uuid16 = 0x2010,
}, { 0 }
});
@@ -262,12 +262,12 @@ TEST_CASE(ble_gatt_disc_c_test_disc_all)
ble_gatt_disc_c_test_misc_all(50, 100, 0,
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 55,
- .value_handle = 56,
+ .def_handle = 55,
+ .val_handle = 56,
.uuid16 = 0x2010,
}, {
- .decl_handle = 57,
- .value_handle = 58,
+ .def_handle = 57,
+ .val_handle = 58,
.uuid16 = 0x64ba,
}, { 0 }
});
@@ -276,24 +276,24 @@ TEST_CASE(ble_gatt_disc_c_test_disc_all)
ble_gatt_disc_c_test_misc_all(50, 100, 0,
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 55,
- .value_handle = 56,
+ .def_handle = 55,
+ .val_handle = 56,
.uuid16 = 0x2010,
}, {
- .decl_handle = 57,
- .value_handle = 58,
+ .def_handle = 57,
+ .val_handle = 58,
.uuid16 = 0x64ba,
}, {
- .decl_handle = 59,
- .value_handle = 60,
+ .def_handle = 59,
+ .val_handle = 60,
.uuid16 = 0x5372,
}, {
- .decl_handle = 61,
- .value_handle = 62,
+ .def_handle = 61,
+ .val_handle = 62,
.uuid16 = 0xab93,
}, {
- .decl_handle = 63,
- .value_handle = 64,
+ .def_handle = 63,
+ .val_handle = 64,
.uuid16 = 0x0023,
}, { 0 }
});
@@ -302,24 +302,24 @@ TEST_CASE(ble_gatt_disc_c_test_disc_all)
ble_gatt_disc_c_test_misc_all(50, 100, 0,
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 83,
- .value_handle = 84,
+ .def_handle = 83,
+ .val_handle = 84,
.uuid16 = 0x2010,
}, {
- .decl_handle = 87,
- .value_handle = 88,
+ .def_handle = 87,
+ .val_handle = 88,
.uuid128 = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 },
}, {
- .decl_handle = 91,
- .value_handle = 92,
+ .def_handle = 91,
+ .val_handle = 92,
.uuid16 = 0x0003,
}, {
- .decl_handle = 93,
- .value_handle = 94,
+ .def_handle = 93,
+ .val_handle = 94,
.uuid128 = { 1,0,4,0,6,9,17,7,8,43,7,4,12,43,19,35 },
}, {
- .decl_handle = 98,
- .value_handle = 99,
+ .def_handle = 98,
+ .val_handle = 99,
.uuid16 = 0xabfa,
}, { 0 }
});
@@ -328,12 +328,12 @@ TEST_CASE(ble_gatt_disc_c_test_disc_all)
ble_gatt_disc_c_test_misc_all(50, 100, 0,
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 55,
- .value_handle = 56,
+ .def_handle = 55,
+ .val_handle = 56,
.uuid16 = 0x2010,
}, {
- .decl_handle = 99,
- .value_handle = 100,
+ .def_handle = 99,
+ .val_handle = 100,
.uuid16 = 0x64ba,
}, { 0 }
});
@@ -342,24 +342,24 @@ TEST_CASE(ble_gatt_disc_c_test_disc_all)
ble_gatt_disc_c_test_misc_all(50, 100, 2,
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 55,
- .value_handle = 56,
+ .def_handle = 55,
+ .val_handle = 56,
.uuid16 = 0x2010,
}, {
- .decl_handle = 57,
- .value_handle = 58,
+ .def_handle = 57,
+ .val_handle = 58,
.uuid16 = 0x64ba,
}, {
- .decl_handle = 59,
- .value_handle = 60,
+ .def_handle = 59,
+ .val_handle = 60,
.uuid16 = 0x5372,
}, {
- .decl_handle = 61,
- .value_handle = 62,
+ .def_handle = 61,
+ .val_handle = 62,
.uuid16 = 0xab93,
}, {
- .decl_handle = 63,
- .value_handle = 64,
+ .def_handle = 63,
+ .val_handle = 64,
.uuid16 = 0x0023,
}, { 0 }
});
@@ -371,14 +371,14 @@ TEST_CASE(ble_gatt_disc_c_test_disc_uuid)
ble_gatt_disc_c_test_misc_uuid(50, 100, 0, BLE_UUID16(0x2010),
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 55,
- .value_handle = 56,
+ .def_handle = 55,
+ .val_handle = 56,
.uuid16 = 0x2010,
}, { 0 } },
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 55,
- .value_handle = 56,
+ .def_handle = 55,
+ .val_handle = 56,
.uuid16 = 0x2010,
}, { 0 } }
);
@@ -387,8 +387,8 @@ TEST_CASE(ble_gatt_disc_c_test_disc_uuid)
ble_gatt_disc_c_test_misc_uuid(50, 100, 0, BLE_UUID16(0x2010),
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 55,
- .value_handle = 56,
+ .def_handle = 55,
+ .val_handle = 56,
.uuid16 = 0x1234,
}, { 0 } },
(struct ble_gatt_disc_c_test_char[]) {
@@ -399,34 +399,34 @@ TEST_CASE(ble_gatt_disc_c_test_disc_uuid)
ble_gatt_disc_c_test_misc_uuid(50, 100, 0, BLE_UUID16(0x2010),
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 55,
- .value_handle = 56,
+ .def_handle = 55,
+ .val_handle = 56,
.uuid16 = 0x2010,
}, {
- .decl_handle = 57,
- .value_handle = 58,
+ .def_handle = 57,
+ .val_handle = 58,
.uuid16 = 0x64ba,
}, {
- .decl_handle = 59,
- .value_handle = 60,
+ .def_handle = 59,
+ .val_handle = 60,
.uuid16 = 0x5372,
}, {
- .decl_handle = 61,
- .value_handle = 62,
+ .def_handle = 61,
+ .val_handle = 62,
.uuid16 = 0x2010,
}, {
- .decl_handle = 63,
- .value_handle = 64,
+ .def_handle = 63,
+ .val_handle = 64,
.uuid16 = 0x0023,
}, { 0 } },
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 55,
- .value_handle = 56,
+ .def_handle = 55,
+ .val_handle = 56,
.uuid16 = 0x2010,
}, {
- .decl_handle = 61,
- .value_handle = 62,
+ .def_handle = 61,
+ .val_handle = 62,
.uuid16 = 0x2010,
}, { 0 } }
);
@@ -437,34 +437,34 @@ TEST_CASE(ble_gatt_disc_c_test_disc_uuid)
((uint8_t[]){ 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }),
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 83,
- .value_handle = 84,
+ .def_handle = 83,
+ .val_handle = 84,
.uuid16 = 0x2010,
}, {
- .decl_handle = 87,
- .value_handle = 88,
+ .def_handle = 87,
+ .val_handle = 88,
.uuid128 = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 },
}, {
- .decl_handle = 91,
- .value_handle = 92,
+ .def_handle = 91,
+ .val_handle = 92,
.uuid16 = 0x0003,
}, {
- .decl_handle = 93,
- .value_handle = 94,
+ .def_handle = 93,
+ .val_handle = 94,
.uuid128 = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 },
}, {
- .decl_handle = 98,
- .value_handle = 99,
+ .def_handle = 98,
+ .val_handle = 99,
.uuid16 = 0xabfa,
}, { 0 } },
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 87,
- .value_handle = 88,
+ .def_handle = 87,
+ .val_handle = 88,
.uuid128 = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 },
}, {
- .decl_handle = 93,
- .value_handle = 94,
+ .def_handle = 93,
+ .val_handle = 94,
.uuid128 = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 },
}, { 0 } }
);
@@ -473,18 +473,18 @@ TEST_CASE(ble_gatt_disc_c_test_disc_uuid)
ble_gatt_disc_c_test_misc_uuid(50, 100, 0, BLE_UUID16(0x64ba),
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 55,
- .value_handle = 56,
+ .def_handle = 55,
+ .val_handle = 56,
.uuid16 = 0x2010,
}, {
- .decl_handle = 99,
- .value_handle = 100,
+ .def_handle = 99,
+ .val_handle = 100,
.uuid16 = 0x64ba,
}, { 0 } },
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 99,
- .value_handle = 100,
+ .def_handle = 99,
+ .val_handle = 100,
.uuid16 = 0x64ba,
}, { 0 } }
);
@@ -493,30 +493,30 @@ TEST_CASE(ble_gatt_disc_c_test_disc_uuid)
ble_gatt_disc_c_test_misc_uuid(50, 100, 1, BLE_UUID16(0x2010),
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 55,
- .value_handle = 56,
+ .def_handle = 55,
+ .val_handle = 56,
.uuid16 = 0x2010,
}, {
- .decl_handle = 57,
- .value_handle = 58,
+ .def_handle = 57,
+ .val_handle = 58,
.uuid16 = 0x64ba,
}, {
- .decl_handle = 59,
- .value_handle = 60,
+ .def_handle = 59,
+ .val_handle = 60,
.uuid16 = 0x5372,
}, {
- .decl_handle = 61,
- .value_handle = 62,
+ .def_handle = 61,
+ .val_handle = 62,
.uuid16 = 0x2010,
}, {
- .decl_handle = 63,
- .value_handle = 64,
+ .def_handle = 63,
+ .val_handle = 64,
.uuid16 = 0x0023,
}, { 0 } },
(struct ble_gatt_disc_c_test_char[]) {
{
- .decl_handle = 55,
- .value_handle = 56,
+ .def_handle = 55,
+ .val_handle = 56,
.uuid16 = 0x2010,
}, { 0 } }
);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/baa7a027/net/nimble/host/src/test/ble_gatt_disc_s_test.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/test/ble_gatt_disc_s_test.c b/net/nimble/host/src/test/ble_gatt_disc_s_test.c
index c59e578..d7572b2 100644
--- a/net/nimble/host/src/test/ble_gatt_disc_s_test.c
+++ b/net/nimble/host/src/test/ble_gatt_disc_s_test.c
@@ -33,7 +33,7 @@ struct ble_gatt_disc_s_test_svc {
};
#define BLE_GATT_DISC_S_TEST_MAX_SERVICES 256
-static struct ble_gatt_service
+static struct ble_gatt_svc
ble_gatt_disc_s_test_svcs[BLE_GATT_DISC_S_TEST_MAX_SERVICES];
static int ble_gatt_disc_s_test_num_svcs;
static int ble_gatt_disc_s_test_rx_complete;
@@ -220,7 +220,7 @@ ble_gatt_disc_s_test_misc_verify_services(
static int
ble_gatt_disc_s_test_misc_disc_cb(uint16_t conn_handle,
struct ble_gatt_error *error,
- struct ble_gatt_service *service, void *arg)
+ struct ble_gatt_svc *service, void *arg)
{
TEST_ASSERT(error == NULL);
TEST_ASSERT(!ble_gatt_disc_s_test_rx_complete);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/baa7a027/net/nimble/host/src/test/ble_gatt_find_s_test.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/test/ble_gatt_find_s_test.c b/net/nimble/host/src/test/ble_gatt_find_s_test.c
index 9db15ff..dca1f36 100644
--- a/net/nimble/host/src/test/ble_gatt_find_s_test.c
+++ b/net/nimble/host/src/test/ble_gatt_find_s_test.c
@@ -25,7 +25,7 @@
#include "host/ble_uuid.h"
#include "ble_hs_test_util.h"
-static struct ble_gatt_service ble_gatt_find_s_test_svcs[256];
+static struct ble_gatt_svc ble_gatt_find_s_test_svcs[256];
static int ble_gatt_find_s_test_num_svcs;
static int ble_gatt_find_s_test_proc_complete;
@@ -47,7 +47,7 @@ ble_gatt_find_s_test_misc_init(void)
static int
ble_gatt_find_s_test_misc_cb(uint16_t conn_handle,
struct ble_gatt_error *error,
- struct ble_gatt_service *service,
+ struct ble_gatt_svc *service,
void *arg)
{
TEST_ASSERT(!ble_gatt_find_s_test_proc_complete);
@@ -180,7 +180,7 @@ ble_gatt_find_s_test_misc_find_inc(uint16_t conn_handle,
uint16_t start_handle, uint16_t end_handle,
struct ble_gatt_find_s_test_entry *entries)
{
- struct ble_gatt_service service;
+ struct ble_gatt_svc service;
int cur_start;
int num_found;
int idx;