nimble/gatt: unify discovery api

This patch unifies api to make it consistent across all discovery
methods. Always pass true range of attributes to search (start-handle,
end-handle).

X-Original-Commit: fecfe796b0bc9d4759253f068d4c497290c4cec1
This commit is contained in:
Michał Narajowski
2017-01-24 12:04:08 +01:00
parent 7bb512623a
commit bc726319e3
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -155,8 +155,8 @@ int ble_gattc_disc_all_chrs(uint16_t conn_handle, uint16_t start_handle,
int ble_gattc_disc_chrs_by_uuid(uint16_t conn_handle, uint16_t start_handle,
uint16_t end_handle, const ble_uuid_t *uuid,
ble_gatt_chr_fn *cb, void *cb_arg);
int ble_gattc_disc_all_dscs(uint16_t conn_handle, uint16_t chr_val_handle,
uint16_t chr_end_handle,
int ble_gattc_disc_all_dscs(uint16_t conn_handle, uint16_t start_handle,
uint16_t end_handle,
ble_gatt_dsc_fn *cb, void *cb_arg);
int ble_gattc_read(uint16_t conn_handle, uint16_t attr_handle,
ble_gatt_attr_fn *cb, void *cb_arg);
+2 -2
View File
@@ -51,8 +51,8 @@ GATT/CL/GAD/BV-05-C PASS b conn peer_addr=<addr>
<repeat>
GATT/CL/GAD/BV-06-C PASS b conn peer_addr=<addr>
b disc svc conn=<handle>
b disc chr conn=<handle> start=<svc-start-hdl> end=<svc-end-hdl>
b disc dsc conn=<handle> start=<start hdl> end=<end hdl>
b disc chr conn=<handle> start=<start-hdl> end=<end-hdl>
b disc dsc conn=<handle> start=<start-hdl> end=<end-hdl>
<answer YES>
b term conn=<handle>
<repeat>
+5 -5
View File
@@ -2818,8 +2818,8 @@ ble_gattc_disc_all_dscs_rx_complete(struct ble_gattc_proc *proc, int status)
* @return 0 on success; nonzero on failure.
*/
int
ble_gattc_disc_all_dscs(uint16_t conn_handle, uint16_t chr_val_handle,
uint16_t chr_end_handle,
ble_gattc_disc_all_dscs(uint16_t conn_handle, uint16_t start_handle,
uint16_t end_handle,
ble_gatt_dsc_fn *cb, void *cb_arg)
{
#if !MYNEWT_VAL(BLE_GATT_DISC_ALL_DSCS)
@@ -2839,9 +2839,9 @@ ble_gattc_disc_all_dscs(uint16_t conn_handle, uint16_t chr_val_handle,
proc->op = BLE_GATT_OP_DISC_ALL_DSCS;
proc->conn_handle = conn_handle;
proc->disc_all_dscs.chr_val_handle = chr_val_handle;
proc->disc_all_dscs.prev_handle = chr_val_handle;
proc->disc_all_dscs.end_handle = chr_end_handle;
proc->disc_all_dscs.chr_val_handle = start_handle;
proc->disc_all_dscs.prev_handle = start_handle;
proc->disc_all_dscs.end_handle = end_handle;
proc->disc_all_dscs.cb = cb;
proc->disc_all_dscs.cb_arg = cb_arg;