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/08/06 23:10:52 UTC

[4/8] incubator-mynewt-core git commit: BLE Host - doxy comments for ble_gatts_count_cfg()

BLE Host - doxy comments for ble_gatts_count_cfg()


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/a590ce07
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/a590ce07
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/a590ce07

Branch: refs/heads/develop
Commit: a590ce0774f26f2da84a7942140a094eb6b53289
Parents: 409c067
Author: Christopher Collins <cc...@apache.org>
Authored: Sat Aug 6 14:12:03 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Sat Aug 6 14:15:59 2016 -0700

----------------------------------------------------------------------
 net/nimble/host/src/ble_gatts.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a590ce07/net/nimble/host/src/ble_gatts.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_gatts.c b/net/nimble/host/src/ble_gatts.c
index 31f3a6f..4bdc6c7 100644
--- a/net/nimble/host/src/ble_gatts.c
+++ b/net/nimble/host/src/ble_gatts.c
@@ -1979,6 +1979,23 @@ ble_gatts_count_resources(const struct ble_gatt_svc_def *svcs,
     return 0;
 }
 
+/**
+ * Adjusts a host configuration object's settings to accommodate the specified
+ * service definition array.  This function adds the counts to the appropriate
+ * fields in the supplied configuration object without clearing them first, so
+ * it can be called repeatedly with different inputs to calculate totals.  Be
+ * sure to zero the GATT server settings prior to the first call to this
+ * function.
+ *
+ * @param defs                  The service array containing the resource
+ *                                  definitions to be counted.
+ * @param cfg                   The resource counts are accumulated in this
+ *                                  configuration object.
+ *
+ * @return                      0 on success;
+ *                              BLE_HS_EINVAL if the svcs array contains an
+ *                                  invalid resource definition.
+ */
 int
 ble_gatts_count_cfg(const struct ble_gatt_svc_def *defs,
                     struct ble_hs_cfg *cfg)