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/01/20 23:24:54 UTC
[2/4] incubator-mynewt-larva git commit: Change GATT
discover-descriptors interface.
Change GATT discover-descriptors interface.
It used to expect the characgteristic value handle; not it takes the
characteristic definition handle.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/471a6c8b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/471a6c8b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/471a6c8b
Branch: refs/heads/master
Commit: 471a6c8b5b508f41e47503aa1dda142b94e80f65
Parents: fe47564
Author: Christopher Collins <cc...@gmail.com>
Authored: Wed Jan 20 14:21:21 2016 -0800
Committer: Christopher Collins <cc...@gmail.com>
Committed: Wed Jan 20 14:24:44 2016 -0800
----------------------------------------------------------------------
net/nimble/host/include/host/ble_gatt.h | 2 +-
net/nimble/host/src/ble_gattc.c | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/471a6c8b/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 57fc6ef..818273e 100644
--- a/net/nimble/host/include/host/ble_gatt.h
+++ b/net/nimble/host/include/host/ble_gatt.h
@@ -73,7 +73,7 @@ typedef int ble_gatt_chr_fn(uint16_t conn_handle, struct ble_gatt_error *error,
struct ble_gatt_chr *chr, void *arg);
typedef int ble_gatt_dsc_fn(uint16_t conn_handle, struct ble_gatt_error *error,
- uint16_t chr_val_handle, struct ble_gatt_dsc *dsc,
+ uint16_t chr_def_handle, struct ble_gatt_dsc *dsc,
void *arg);
int ble_gattc_exchange_mtu(uint16_t conn_handle,
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/471a6c8b/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 728545c..0311ec4 100644
--- a/net/nimble/host/src/ble_gattc.c
+++ b/net/nimble/host/src/ble_gattc.c
@@ -109,7 +109,7 @@ struct ble_gattc_proc {
} disc_chr_uuid;
struct {
- uint16_t chr_val_handle;
+ uint16_t chr_def_handle;
uint16_t prev_handle;
uint16_t end_handle;
ble_gatt_dsc_fn *cb;
@@ -1963,7 +1963,7 @@ ble_gattc_disc_all_dscs_cb(struct ble_gattc_proc *proc, int status,
} else {
rc = proc->disc_all_dscs.cb(proc->conn_handle,
ble_gattc_error(status, att_handle),
- proc->disc_all_dscs.chr_val_handle,
+ proc->disc_all_dscs.chr_def_handle,
dsc, proc->disc_all_dscs.cb_arg);
}
@@ -2080,7 +2080,7 @@ ble_gattc_disc_all_dscs_rx_complete(struct ble_gattc_proc *proc,
*
* @param conn_handle The connection over which to execute the
* procedure.
- * @param chr_val_handle The handle of the characteristic value
+ * @param chr_def_handle The handle of the characteristic definition
* attribute.
* @param chr_end_handle The last handle in the characteristic
* definition.
@@ -2089,7 +2089,7 @@ ble_gattc_disc_all_dscs_rx_complete(struct ble_gattc_proc *proc,
* @param cb_arg The argument to pass to the callback function.
*/
int
-ble_gattc_disc_all_dscs(uint16_t conn_handle, uint16_t chr_val_handle,
+ble_gattc_disc_all_dscs(uint16_t conn_handle, uint16_t chr_def_handle,
uint16_t chr_end_handle,
ble_gatt_dsc_fn *cb, void *cb_arg)
{
@@ -2100,8 +2100,8 @@ ble_gattc_disc_all_dscs(uint16_t conn_handle, uint16_t chr_val_handle,
if (rc != 0) {
return rc;
}
- proc->disc_all_dscs.chr_val_handle = chr_val_handle;
- proc->disc_all_dscs.prev_handle = chr_val_handle;
+ proc->disc_all_dscs.chr_def_handle = chr_def_handle;
+ proc->disc_all_dscs.prev_handle = chr_def_handle + 1;
proc->disc_all_dscs.end_handle = chr_end_handle;
proc->disc_all_dscs.cb = cb;
proc->disc_all_dscs.cb_arg = cb_arg;