You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2016/08/11 21:27:13 UTC

[13/50] [abbrv] 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/ab25d849
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ab25d849
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ab25d849

Branch: refs/heads/phyrx_no_mbuf
Commit: ab25d8496b14943d52f0b66aafcabb601221e7e0
Parents: 4b24cca
Author: Christopher Collins <cc...@apache.org>
Authored: Sat Aug 6 14:12:03 2016 -0700
Committer: William San Filippo <wi...@runtime.io>
Committed: Thu Aug 11 14:26:25 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/ab25d849/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)