Repository: incubator-mynewt-site
Updated Branches:
  refs/heads/develop 51a84f3d2 -> 9ea0f2dcb


NimBLE host API - Remove double-indirection for tx


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/008d5820
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/008d5820
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/008d5820

Branch: refs/heads/develop
Commit: 008d58202743c64be0f155c010550fad93023290
Parents: 51a84f3
Author: Christopher Collins <[email protected]>
Authored: Wed Jul 27 19:48:47 2016 -0700
Committer: Christopher Collins <[email protected]>
Committed: Wed Jul 27 19:48:47 2016 -0700

----------------------------------------------------------------------
 .../functions/ble_att_svr_write_local.md        |  6 ++---
 .../functions/ble_gattc_notify_custom.md        |  8 +++----
 .../ble_gattc/functions/ble_gattc_write.md      | 12 +++++-----
 .../ble_gattc/functions/ble_gattc_write_long.md | 12 +++++-----
 .../functions/ble_gattc_write_no_rsp.md         |  8 +++----
 docs/network/ble/ble_hs/ble_gatts/ble_gatts.md  |  1 +
 .../ble_gatts/functions/ble_gatts_add_svcs.md   | 23 ++++++++++++++++++++
 .../ble/ble_hs/init/definitions/init_defs.md    | 12 ++++++++++
 .../ble/ble_hs/init/functions/ble_hs_rx_data.md | 23 --------------------
 docs/network/ble/ble_hs/init/init.md            |  1 -
 mkdocs.yml                                      |  2 +-
 11 files changed, 60 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/008d5820/docs/network/ble/ble_hs/ble_att/functions/ble_att_svr_write_local.md
----------------------------------------------------------------------
diff --git 
a/docs/network/ble/ble_hs/ble_att/functions/ble_att_svr_write_local.md 
b/docs/network/ble/ble_hs/ble_att/functions/ble_att_svr_write_local.md
index 7a03892..c4ee452 100644
--- a/docs/network/ble/ble_hs/ble_att/functions/ble_att_svr_write_local.md
+++ b/docs/network/ble/ble_hs/ble_att/functions/ble_att_svr_write_local.md
@@ -3,8 +3,8 @@
 ```c
 int
 ble_att_svr_write_local(
-          uint16_t   attr_handle,
-    struct os_mbuf **om
+          uint16_t  attr_handle,
+    struct os_mbuf *om
 )
 ```
 
@@ -17,7 +17,7 @@ Writes a locally registered attribute.  This function 
consumes the supplied mbuf
 | *Parameter* | *Description* |
 |-------------|---------------|
 | attr\_handle | The 16-bit handle of the attribute to write. |
-| om | The value to write to the attribute.  Double indirection is used to 
effect a transfer of ownership from the caller. |
+| om | The value to write to the attribute. |
 
 ### Returned values
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/008d5820/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_notify_custom.md
----------------------------------------------------------------------
diff --git 
a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_notify_custom.md 
b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_notify_custom.md
index 9f9ae62..ad80b53 100644
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_notify_custom.md
+++ b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_notify_custom.md
@@ -3,9 +3,9 @@
 ```c
 int
 ble_gattc_notify_custom(
-          uint16_t   conn_handle,
-          uint16_t   chr_val_handle,
-    struct os_mbuf **txom
+          uint16_t  conn_handle,
+          uint16_t  chr_val_handle,
+    struct os_mbuf *txom
 )
 ```
 
@@ -19,7 +19,7 @@ Sends a "free-form" characteristic notification.  This 
function consumes the sup
 |-------------|---------------|
 | conn\_handle | The connection over which to execute the procedure. |
 | chr\_val\_handle | The attribute handle to indicate in the outgoing 
notification. |
-| txom | The value to write to the characteristic. Double indirection is used 
to effect a transfer of ownership from the caller. |
+| txom | The value to write to the characteristic. |
 
 ### Returned values
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/008d5820/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write.md 
b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write.md
index d6ffab1..03a8bac 100644
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write.md
+++ b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write.md
@@ -3,11 +3,11 @@
 ```c
 int
 ble_gattc_write(
-            uint16_t   conn_handle,
-            uint16_t   attr_handle,
-      struct os_mbuf **txom,
-    ble_gatt_attr_fn  *cb,
-                void  *cb_arg
+            uint16_t  conn_handle,
+            uint16_t  attr_handle,
+      struct os_mbuf *txom,
+    ble_gatt_attr_fn *cb,
+                void *cb_arg
 )
 ```
 
@@ -21,7 +21,7 @@ Initiates GATT procedure: Write Characteristic Value.  This 
function consumes th
 |-------------|---------------|
 | conn\_handle | The connection over which to execute the procedure. |
 | attr\_handle | The handle of the characteristic value to write to. |
-| txom | The value to write to the characteristic. Double indirection is used 
to effect a transfer of ownership from the caller. |
+| txom | The value to write to the characteristic. |
 | cb | The function to call to report procedure status updates; null for no 
callback. |
 | cb\_arg | The optional argument to pass to the callback function. |
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/008d5820/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_long.md
----------------------------------------------------------------------
diff --git 
a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_long.md 
b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_long.md
index 77806e0..430e081 100644
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_long.md
+++ b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_long.md
@@ -3,11 +3,11 @@
 ```c
 int
 ble_gattc_write_long(
-            uint16_t   conn_handle,
-            uint16_t   attr_handle,
-      struct os_mbuf **txom,
-    ble_gatt_attr_fn  *cb,
-                void  *cb_arg
+            uint16_t  conn_handle,
+            uint16_t  attr_handle,
+      struct os_mbuf *txom,
+    ble_gatt_attr_fn *cb,
+                void *cb_arg
 )
 ```
 
@@ -21,7 +21,7 @@ Initiates GATT procedure: Write Long Characteristic Values.  
This function consu
 |-------------|---------------|
 | conn\_handle | The connection over which to execute the procedure. |
 | attr\_handle | The handle of the characteristic value to write to. |
-| txom | The value to write to the characteristic. Double indirection is used 
to effect a transfer of ownership from the caller. |
+| txom | The value to write to the characteristic. |
 | cb | The function to call to report procedure status updates; null for no 
callback. |
 | cb\_arg | The optional argument to pass to the callback function. |
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/008d5820/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_no_rsp.md
----------------------------------------------------------------------
diff --git 
a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_no_rsp.md 
b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_no_rsp.md
index c091b9a..227ccf1 100644
--- a/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_no_rsp.md
+++ b/docs/network/ble/ble_hs/ble_gattc/functions/ble_gattc_write_no_rsp.md
@@ -3,9 +3,9 @@
 ```c
 int
 ble_gattc_write_no_rsp(
-          uint16_t   conn_handle,
-          uint16_t   attr_handle,
-    struct os_mbuf **txom
+          uint16_t  conn_handle,
+          uint16_t  attr_handle,
+    struct os_mbuf *txom
 )
 ```
 
@@ -19,7 +19,7 @@ Initiates GATT procedure: Write Without Response.  This 
function consumes the su
 |-------------|---------------|
 | conn\_handle | The connection over which to execute the procedure. |
 | attr\_handle | The handle of the characteristic value to write to. |
-| txom | The value to write to the characteristic. Double indirection is used 
to effect a transfer of ownership from the caller. |
+| txom | The value to write to the characteristic. |
 
 ### Returned values
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/008d5820/docs/network/ble/ble_hs/ble_gatts/ble_gatts.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/ble_gatts/ble_gatts.md 
b/docs/network/ble/ble_hs/ble_gatts/ble_gatts.md
index 6981f74..8007666 100644
--- a/docs/network/ble/ble_hs/ble_gatts/ble_gatts.md
+++ b/docs/network/ble/ble_hs/ble_gatts/ble_gatts.md
@@ -18,6 +18,7 @@ The Generic Attribute Profile (GATT) manages all activities 
involving services,
 
 | Function | Description |
 |----------|-------------|
+| [ble_gatts_add_svcs](functions/ble_gatts_add_svcs.md) | Queues a set of 
service definitions for registration. |
 | [ble_gatts_count_resources](functions/ble_gatts_count_resources.md) | 
Accumulates counts of each resource type required by the specified service 
definition array. |
 | [ble_gatts_find_chr](functions/ble_gatts_find_chr.md) | Retrieves the pair 
of attribute handles associated with a local GATT characteristic. |
 | [ble_gatts_find_dsc](functions/ble_gatts_find_dsc.md) | Retrieves the 
attribute handle associated with a local GATT descriptor. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/008d5820/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_add_svcs.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_add_svcs.md 
b/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_add_svcs.md
new file mode 100644
index 0000000..d0ed070
--- /dev/null
+++ b/docs/network/ble/ble_hs/ble_gatts/functions/ble_gatts_add_svcs.md
@@ -0,0 +1,23 @@
+## <font color="#F2853F" style="font-size:24pt">ble\_gatts\_add\_svcs</font>
+
+```c
+int
+ble_gatts_add_svcs(const struct ble_gatt_svc_def *svcs)
+```
+
+### Description
+
+Queues a set of service definitions for registration.  All services queued in 
this manner get registered when ble\_hs\_init() is called.
+
+### Parameters
+
+| *Parameter* | *Description* |
+|-------------|---------------|
+| svcs | An array of service definitions to queue for registration.  This 
array must be terminated with an entry whose 'type' equals 0. |
+
+### Returned values
+
+| *Value* | *Condition* |
+|---------|-------------|
+| 0 | Success. |
+| BLE\_HS\_ENOMEM | Heap exhaustion. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/008d5820/docs/network/ble/ble_hs/init/definitions/init_defs.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/init/definitions/init_defs.md 
b/docs/network/ble/ble_hs/init/definitions/init_defs.md
index 99c4be8..ecede57 100644
--- a/docs/network/ble/ble_hs/init/definitions/init_defs.md
+++ b/docs/network/ble/ble_hs/init/definitions/init_defs.md
@@ -59,6 +59,18 @@ struct ble_hs_cfg {
      */
     uint16_t max_client_configs;
 
+    /**
+     * An optional callback that gets executed upon registration of each GATT
+     * resource (service, characteristic, or descriptor).
+     */
+    ble_gatt_register_fn *gatts_register_cb;
+
+    /**
+     * An optional argument that gets passed to the GATT registration
+     * callback.
+     */
+    void *gatts_register_arg;
+
     /*** GATT client settings. */
     /**
      * The maximum number of concurrent GATT client procedures.  When you

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/008d5820/docs/network/ble/ble_hs/init/functions/ble_hs_rx_data.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/init/functions/ble_hs_rx_data.md 
b/docs/network/ble/ble_hs/init/functions/ble_hs_rx_data.md
deleted file mode 100644
index 090443a..0000000
--- a/docs/network/ble/ble_hs/init/functions/ble_hs_rx_data.md
+++ /dev/null
@@ -1,23 +0,0 @@
-## <font color="#F2853F" style="font-size:24pt">ble\_hs\_rx\_data</font>
-
-```c
-int
-ble_hs_rx_data(struct os_mbuf **om)
-```
-
-### Description
-
-Called when a data packet is received from the controller.  This function 
consumes the supplied mbuf, regardless of the outcome.
-
-### Parameters
-
-| *Parameter* | *Description* |
-|-------------|---------------|
-| om | The incoming data packet, beginning with the HCI ACL data header. |
-
-### Returned values
-
-| *Value* | *Condition* |
-|---------|-------------|
-| 0 | Success. |
-| [Core return code](../../ble_hs_return_codes/#return-codes-core) | 
Unexpected error. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/008d5820/docs/network/ble/ble_hs/init/init.md
----------------------------------------------------------------------
diff --git a/docs/network/ble/ble_hs/init/init.md 
b/docs/network/ble/ble_hs/init/init.md
index c59cba3..7fbe6bc 100644
--- a/docs/network/ble/ble_hs/init/init.md
+++ b/docs/network/ble/ble_hs/init/init.md
@@ -19,5 +19,4 @@ This section is a reference on initializing and configuring 
the NimBLE host.
 | Function | Description |
 |----------|-------------|
 | [ble_hs_init](functions/ble_hs_init.md) | Initializes the NimBLE host. |
-| [ble_hs_rx_data](functions/ble_hs_rx_data.md) | Called when a data packet is 
received from the controller. |
 | [ble_hs_start](functions/ble_hs_start.md) | Synchronizes the host with the 
controller by sending a sequence of HCI commands. |

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/008d5820/mkdocs.yml
----------------------------------------------------------------------
diff --git a/mkdocs.yml b/mkdocs.yml
index a02275a..1539902 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -360,7 +360,6 @@ pages:
 
                 - 'Functions':
                     - 'ble_hs_init': 
'network/ble/ble_hs/init/functions/ble_hs_init.md'
-                    - 'ble_hs_rx_data': 
'network/ble/ble_hs/init/functions/ble_hs_rx_data.md'
                     - 'ble_hs_start': 
'network/ble/ble_hs/init/functions/ble_hs_start.md'
 
             - 'GAP':
@@ -417,6 +416,7 @@ pages:
                 - 'Definitions':
                     - 'GATT server definitions': 
'network/ble/ble_hs/ble_gatts/definitions/ble_gatts_defs.md'
                 - 'Functions':
+                    - 'ble_gatts_add_svcs': 
'network/ble/ble_hs/ble_gatts/functions/ble_gatts_add_svcs.md'
                     - 'ble_gatts_count_resources': 
'network/ble/ble_hs/ble_gatts/functions/ble_gatts_count_resources.md'
                     - 'ble_gatts_find_chr': 
'network/ble/ble_hs/ble_gatts/functions/ble_gatts_find_chr.md'
                     - 'ble_gatts_find_dsc': 
'network/ble/ble_hs/ble_gatts/functions/ble_gatts_find_dsc.md'

Reply via email to