You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ad...@apache.org on 2017/02/01 06:44:02 UTC

[3/5] incubator-mynewt-site git commit: Updated air-quality sensor tutorial. This closes #147. Updated system initialization docs and newtmgr doc. This closes #146.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/7dc2cb54/develop/os/modules/sysinitconfig/sysconfig_error/index.html
----------------------------------------------------------------------
diff --git a/develop/os/modules/sysinitconfig/sysconfig_error/index.html b/develop/os/modules/sysinitconfig/sysconfig_error/index.html
index 9446767..b5467e6 100644
--- a/develop/os/modules/sysinitconfig/sysconfig_error/index.html
+++ b/develop/os/modules/sysinitconfig/sysconfig_error/index.html
@@ -574,25 +574,25 @@ override violations:</p>
 <li>Ambiguity Violation - Two packages of the same priority override a setting with 
 different values. And no higher priority package overrides the setting.</li>
 <li>Priority Violation - A package overrides a setting defined by a package with higher or 
-equal priority (TODO: Change error message to indicate a more general priority violation instead of only lateral overrides)</li>
+equal priority. </li>
 </ul>
 <h4 id="example-ambiguity-violation-error-message">Example: Ambiguity Violation Error Message</h4>
 <p>The following example shows the error message that newt outputs for an ambiguity violation:</p>
 <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">Error: Syscfg ambiguities detected:
     Setting: LOG_NEWTMGR, Packages: [apps/slinky, apps/splitty]
 Setting history (newest -&gt; oldest):
-    LOG_NEWTMGR: [apps/splitty:0, apps/slinky:1, sys/log:0]
+    LOG_NEWTMGR: [apps/splitty:0, apps/slinky:1, sys/log/full:0]
 </pre></div>
 
 
 <p>The above error occurs because the <code>apps/slinky</code> and <code>apps/splitty</code> packages 
 in the split image target both override the same setting with different 
-values.  The <code>apps/slinky</code> package sets the <code>sys/log</code> package <code>LOG_NEWTMGR</code> 
+values.  The <code>apps/slinky</code> package sets the <code>sys/log/full</code> package <code>LOG_NEWTMGR</code> 
 setting to 1, and the <code>apps/splitty</code> package sets the setting to 0. The 
 overrides are ambiguous because both are <code>app</code> packages and 
 have the same priority.  The following are excerpts of the defintion 
 and the two overrides from the <code>syscfg.yml</code> files that cause the error:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">#Package: sys/log/
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">#Package: sys/log/full
 syscfg.defs:
     LOG_NEWTMGR:
         description: &#39;Enables or disables newtmgr command tool logging&#39;
@@ -609,20 +609,22 @@ syscfg.vals:
 
 
 <h4 id="example-priority-violation-error-message">Example: Priority Violation Error Message</h4>
-<p>The following example shows the error message that newt outputs for a lateral violation where a package tries to change the setting that was defined by another package at the same priority level:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">Error: Lateral overrides detected (bottom-priority packages cannot override settings):
-    Package: mgmt/newtmgr, Setting: LOG_NEWTMGR
+<p>The following example shows the error message that newt outputs for a priority violation 
+where a package tries to change the setting that was defined by another package at 
+the same priority level:</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">Error: Priority violations detected (Packages can only override settings defined by packages of lower priority):
+    Package: mgmt/newtmgr overriding setting: LOG_NEWTMGR defined by sys/log/full
 
 Setting history (newest -&gt; oldest):
-    LOG_NEWTMGR: [sys/log:0]
+    LOG_NEWTMGR: [sys/log/full:0]
 </pre></div>
 
 
 <p>The above error occurs because the <code>mgmt/newtmgr</code> lib package 
-overrides the <code>LOG_NEWTMGR</code> setting that the <code>sys/log</code> lib package 
+overrides the <code>LOG_NEWTMGR</code> setting that the <code>sys/log/full</code> lib package 
 defines. The following are excerpts of the definition and the override from the 
 <code>syscfg.yml</code> files that cause this error: </p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">#Package: sys/log
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">#Package: sys/log/full
 syscfg.defs:
      LOG_NEWTMGR:
         description: &#39;Enables or disables newtmgr command tool logging&#39;

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/7dc2cb54/develop/os/modules/sysinitconfig/sysinitconfig/index.html
----------------------------------------------------------------------
diff --git a/develop/os/modules/sysinitconfig/sysinitconfig/index.html b/develop/os/modules/sysinitconfig/sysinitconfig/index.html
index cfd7327..87ba2ae 100644
--- a/develop/os/modules/sysinitconfig/sysinitconfig/index.html
+++ b/develop/os/modules/sysinitconfig/sysinitconfig/index.html
@@ -561,7 +561,7 @@ package dependencies for your target build.</li>
 </ul>
 <p>Mynewt defines several configuration parameters in the <code>pkg.yml</code> and <code>syscfg.yml</code> files. The newt tool uses this information to: </p>
 <ul>
-<li>Generate a system initialization function that calls all the package-specific system initialization functions. </li>
+<li>Generate a system initialization function that calls all the package-specific ystem initialization functions. </li>
 <li>Generate a system configuration header file that contains all the package configuration settings and values.</li>
 <li>Display the system configuration settings and values in the <code>newt target config</code> command.</li>
 </ul>
@@ -655,7 +655,7 @@ defined in the BSP flash map for your target board.
 
 <p><br></p>
 <h4 id="examples-of-configuration-settings">Examples of Configuration Settings</h4>
-<p><strong>Example 1:</strong> The following example is an excerpt from the <code>sys/log</code> package <code>syscfg.yml</code> file. It defines the 
+<p><strong>Example 1:</strong> The following example is an excerpt from the <code>sys/log/full</code> package <code>syscfg.yml</code> file. It defines the 
 <code>LOG_LEVEL</code> configuration setting to specify the log level and the <code>LOG_NEWTMGR</code> configuration setting to specify whether
 to enable or disable the newtmgr logging feature.</p>
 <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">syscfg.defs:
@@ -758,7 +758,7 @@ package <code>syscfg.yml</code> files.</p>
 <p><br></p>
 <h4 id="examples-of-overrides">Examples of Overrides</h4>
 <p><strong>Example 4:</strong> The following example is an excerpt from the <code>apps/slinky</code> package <code>syscfg.yml</code> file.  The application package overrides, 
-in addition to other packages, the <code>sys/log</code> package system configuration settings defined in <strong>Example 1</strong>. It changes the LOG_NEWTMGR system configuration setting value from <code>0</code> to <code>1</code>.</p>
+in addition to other packages, the <code>sys/log/full</code> package system configuration settings defined in <strong>Example 1</strong>. It changes the LOG_NEWTMGR system configuration setting value from <code>0</code> to <code>1</code>.</p>
 <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">syscfg.vals:
     # Enable the shell task.
     SHELL_TASK: 1
@@ -820,8 +820,8 @@ For example, to reference the <code>my-config-name</code> setting name,  you use
 <p><strong>Note:</strong> You only need to include <code>syscfg/syscfg.h</code> in your source files to access the <code>syscfg.h</code> file.  The newt tool sets the correct include path to build your target. </p>
 <h4 id="example-of-syscfgh-and-how-to-reference-a-setting-name">Example of syscfg.h and How to Reference a Setting Name</h4>
 <p><strong>Example 6</strong>: The following example are excerpts from a sample <code>syscfg.h</code> file generated for an app/slinky target and 
-from the <code>sys/log</code> package <code>log.c</code> file that shows how to reference a setting name.</p>
-<p>The <code>syscfg.h</code> file shows the <code>sys/log</code> package definitions and also indicates that <code>app/slinky</code> 
+from the <code>sys/log/full</code> package <code>log.c</code> file that shows how to reference a setting name.</p>
+<p>The <code>syscfg.h</code> file shows the <code>sys/log/full</code> package definitions and also indicates that <code>app/slinky</code> 
 changed the value for the <code>LOG_NEWTMGR</code> settings. </p>
 <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">/**
  * This file was generated by Apache Newt (incubating) version: 1.0.0-dev
@@ -853,7 +853,7 @@ changed the value for the <code>LOG_NEWTMGR</code> settings. </p>
 
      ...
 
-/*** sys/log */
+/*** sys/log/full */
 
 #ifndef MYNEWT_VAL_LOG_LEVEL
 #define MYNEWT_VAL_LOG_LEVEL (0)
@@ -861,7 +861,7 @@ changed the value for the <code>LOG_NEWTMGR</code> settings. </p>
 
      ...
 
-/* Overridden by apps/slinky (defined by sys/log) */
+/* Overridden by apps/slinky (defined by sys/log/full) */
 #ifndef MYNEWT_VAL_LOG_NEWTMGR
 #define MYNEWT_VAL_LOG_NEWTMGR (1)
 #endif
@@ -870,7 +870,7 @@ changed the value for the <code>LOG_NEWTMGR</code> settings. </p>
 </pre></div>
 
 
-<p>The <code>log_init()</code> function in the <code>sys/log/src/log.c</code> file initializes the <code>sys/log</code> package. It checks the 
+<p>The <code>log_init()</code> function in the <code>sys/log/full/src/log.c</code> file initializes the <code>sys/log/full</code> package. It checks the 
 <code>LOG_NEWTMGR</code> setting value, using <code>MYNEWT_VAL(LOG_NEWTMGR)</code>, to determine whether the target application
 has enabled the <code>newtmgr log</code> functionality. It only registers the the callbacks to process the
 <code>newtmgr log</code> commands when the setting value is non-zero.</p>
@@ -900,94 +900,141 @@ log_init(void)
 
 <p><br></p>
 <h3 id="system-initialization">System Initialization</h3>
-<p>An application's <code>main()</code> function must first call the Mynewt <code>sysinit()</code> function to 
-initialize the software before it performs any other processing.
-<code>sysinit()</code> calls the <code>sysinit_app()</code> function to perform system 
-initialization for the packages in the target.  You can, optionally, specify an 
-initialization function that <code>sysinit_app()</code> calls to initialize a package. </p>
-<p>A package init function must have the following prototype:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">void init_func_name(void)
+<p>During system startup, Mynewt creates a default event queue and a main task to process events from this queue. 
+You can override the <code>OS_MAIN_TASK_PRIO</code> and <code>OS_MAIN_TASK_STACK_SIZE</code> setting values defined by the 
+<code>kernel/os</code> package to specify different task priority and stack size values.</p>
+<p>Your application's <code>main()</code> function executes in the context of the main task and must perform the following:</p>
+<ul>
+<li>At the start of <code>main()</code>, call the Mynewt <code>sysinit()</code> function to initialize 
+the packages before performing any other processing.</li>
+<li>At the end of <code>main()</code>, wait for and dispatch events from the default event queue in a forever loop. </li>
+</ul>
+<p><strong>Note:</strong> You must include the <code>sysinit/sysinit.h</code> header file to access the <code>sysinit()</code> function.</p>
+<p>Here is an example of a <code>main()</code> function:</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">int
+main(int argc, char **argv)
+{
+    /* First, call sysinit() to perform the system and package initialization */
+    sysinit();
+
+      ... other application initialization processing....
+
+
+    /*  Last, process events from the default event queue.  */
+    while (1) {
+       os_eventq_run(os_eventq_dflt_get());
+    }
+    /* main never returns */   
+}
 </pre></div>
 
 
-<p>Package init functions are called in stages to ensure that lower priority packages 
-are initialized before higher priority packages.</p>
-<p>You specify an init function in the <code>pkg.yml</code> file for a package as follows:</p>
-<ul>
-<li>
-<p>Use the <code>init_function</code> parameter to specify an init function name. </p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">   pkg.init_function: pkg_init_func_name
+<p><br></p>
+<h4 id="specifying-package-initialization-functions">Specifying Package Initialization Functions</h4>
+<p>The <code>sysinit()</code> function calls the <code>sysinit_app()</code> function to perform system 
+initialization for the packages in the target.   You can, optionally, 
+specify one or more package initialization functions 
+that <code>sysinit_app()</code> calls to initialize a package. </p>
+<p>A package initialization function must have the following prototype:</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">void init_func_name(void)
 </pre></div>
 
 
-<p>where <code>pkg_init_func_name</code> is the C function name of package init function. </p>
-</li>
-<li>
-<p>Use the <code>init_stage</code> parameter to specify when to call the package init function.</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">   pkg.init_stage: stage_number
+<p>Package initialization functions are called in stages to ensure that lower priority
+packages are initialized before higher priority packages.  A stage is an 
+integer value, 0 or higher, that specifies when an initialization function is 
+called.  Mynewt calls the package initialization functions 
+in increasing stage number order.  The call order for initialization functions with the 
+same stage number depends on the order the packages are processed,
+and you cannot rely on a specific call order for these functions.  </p>
+<p>You use the <code>pkg.init</code> parameter in the 
+<code>pkg.yml</code> file to specify an initialization function and the stage number to call the function.
+You can specify multiple initialization functions, with a different stage number for each function,
+for the parameter values.  This feature allows packages with interdependencies to
+perform initialization in multiple stages.  </p>
+<p>The <code>pkg.init</code> parameter has the following syntax in the <code>pkg.yml</code> file: </p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">pkg.init: 
+    pkg_init_func1_name: pkg_init_func1_stage 
+    pkg_init_func2_name: pkg_init_func2_stage 
+
+              ...
+
+    pkg_init_funcN_name: pkg_init_funcN_stage
 </pre></div>
 
 
-<p>where <code>stage_number</code> is a number that indicates when this init function is called relative to the other 
-   package init functions.  Mynewt calls the package init functions in increasing stage number order
-   and in alphabetic order of init function names for functions in the same stage.
-   <strong>Note:</strong> The init function will be called at stage 0 if <code>pkg.init_stage</code> is not specified.</p>
-</li>
-</ul>
-<p><strong>Note:</strong> You must include the <code>sysinit/sysinit.h</code> header file to access the <code>sysinit()</code> function.</p>
+<p>where <code>pkg_init_func#_name</code> is the C function name of an initialization function, and <code>pkg_init_func#_stage</code> 
+is an integer value, 0 or higher, that indicates the stage when the <code>pkg_init_func#_name</code> function is called.  </p>
+<p><strong>Note:</strong> The <code>pkg.init_function</code> and <code>pkg.init_stage</code> parameters introduced in a previous release for 
+specifying a package initialization function and a stage number are deprecated and have been 
+retained to support the legacy format.  They will not 
+be maintained for future releases and we recommend that you migrate to use the <code>pkg.init</code> parameter.</p>
 <p><br></p>
 <h4 id="generated-sysinit_app-function">Generated sysinit_app() Function</h4>
-<p>The newt tool processes the <code>init_function</code> and <code>init_stage</code> parameters in all the pkg.yml files for a target,
+<p>The newt tool processes the <code>pkg.init</code> parameters in all the <code>pkg.yml</code> files for a target,
 generates the <code>sysinit_app()</code> function in the <code>&lt;target-path&gt;/generated/src/&lt;target-name&gt;-sysinit_app.c</code> file, and 
 includes the file in the build. Here is an example <code>sysinit_app()</code> function:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">/**
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">**
  * This file was generated by Apache Newt (incubating) version: 1.0.0-dev
  */
 
 #if !SPLIT_LOADER
 
-void os_init(void);
 void split_app_init(void);
 void os_pkg_init(void);
 void imgmgr_module_init(void);
-void nmgr_pkg_init(void);
 
       ...
 
-void console_pkg_init(void);
-void log_init(void);
-
-      ...
+void stats_module_init(void);
 
 void
 sysinit_app(void)
 {
-    os_init();
 
     /*** Stage 0 */
     /* 0.0: kernel/os */
     os_pkg_init();
-    /* 0.1: sys/console/full */
-    console_pkg_init();
 
-        ...
+    /*** Stage 2 */
+    /* 2.0: sys/flash_map */
+    flash_map_init();
 
-    /*** Stage 1 */
-    /* 1.0: sys/log */
+    /*** Stage 10 */
+    /* 10.0: sys/stats/full */
+    stats_module_init();
+
+    /*** Stage 20 */
+    /* 20.0: sys/console/full */
+    console_pkg_init();
+
+    /*** Stage 100 */
+    /* 100.0: sys/log/full */
     log_init();
+    /* 100.1: sys/mfg */
+    mfg_init();
 
-        ...
+         ....
+
+    /*** Stage 300 */
+    /* 300.0: sys/config */    
+    config_pkg_init();
+
+    /*** Stage 500 */
+    /* 500.0: sys/id */
+    id_init();
+    /* 500.1: sys/shell */
+    shell_init();
 
-    /*** Stage 5 */
-    /* 5.0: boot/split */
-    split_app_init();
-    /* 5.1: mgmt/imgmgr */
+          ...
+
+    /* 500.4: mgmt/imgmgr */
     imgmgr_module_init();
-    /* 5.2: mgmt/newtmgr */
-    nmgr_pkg_init();
-        ...
-}
 
+    /*** Stage 501 */
+    /* 501.0: mgmt/newtmgr/transport/nmgr_shell */
+    nmgr_shell_pkg_init();
+}
 #endif
 </pre></div>
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/7dc2cb54/develop/os/tutorials/add_newtmgr/index.html
----------------------------------------------------------------------
diff --git a/develop/os/tutorials/add_newtmgr/index.html b/develop/os/tutorials/add_newtmgr/index.html
index 5f79a91..fb34282 100644
--- a/develop/os/tutorials/add_newtmgr/index.html
+++ b/develop/os/tutorials/add_newtmgr/index.html
@@ -535,26 +535,28 @@ package functionality.</p>
 <p><br></p>
 <h3 id="modify-the-source">Modify the Source</h3>
 <p>Your application must designate an event queue that the <code>mgmt</code> package uses to receive request events from 
-the newtmgr tool.  It must also initialize a task and implement the task handler to
-dispatch events from this queue.  The <code>mgmt</code> package executes and processes newtmgr 
-request events in the context of this task.  Your application, however, does 
-not need to create a dedicated event queue and task for this purpose and can use its default 
-event queue.  This example uses the application's default event queue.  </p>
-<p>The <code>mgmt</code> package exports the <code>void mgmt_evq_set(struct os_eventq *evq)</code> function that an application must call 
-to designate the event queue. Modify <code>main.c</code> to add this call as follows:</p>
+the newtmgr tool.  The <code>mgmt</code> package executes and handles newtmgr request events in the context of the task that
+processes events from this event queue.  You can designate the default event queue that Mynewt 
+creates.  If you choose to create and use a dedicated event queue, you must also 
+initialize a task and implement the task handler to dispatch events from this queue.  This example 
+uses the default event queue that Mynewt creates. </p>
+<p>The <code>mgmt</code> package exports the <code>void mgmt_evq_set(struct os_eventq *evq)</code> 
+function that an application must call to designate the event queue.
+Modify <code>main.c</code> to add this call as follows:</p>
 <p>Add the <code>mgmt/mgmt.h</code> header file: </p>
 <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">#include &lt;mgmt/mgmt.h&gt;
 </pre></div>
 
 
 <p>Add the call to designate the event queue. In the <code>main()</code> function,<br />
-scroll down to the <code>os_eventq_dflt_set(&amp;ble_tiny_evq)</code> function call and add the 
-following statement below it:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">mgmt_eventq_set(&amp;ble_tiny_evq)
+scroll down to the  <code>while (1)</code> loop and add the 
+following statement above the loop: </p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">mgmt_evq_set(os_eventq_dflt_get())
 </pre></div>
 
 
-<p>The <code>mgmt_eventq_set()</code> function must be called after your application has initialized the event queue and task.</p>
+<p><strong>Note:</strong> If you choose to create and use a dedicated event queue, you must initialize the event queue and 
+the task before calling the <code>mgmt_evq_set()</code> function. </p>
 <h3 id="build-the-targets">Build the Targets</h3>
 <p>Build the two targets as follows:</p>
 <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">$ newt build nrf52_boot

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/7dc2cb54/develop/os/tutorials/air_quality_ble/index.html
----------------------------------------------------------------------
diff --git a/develop/os/tutorials/air_quality_ble/index.html b/develop/os/tutorials/air_quality_ble/index.html
index 6e4e65f..da68c8f 100644
--- a/develop/os/tutorials/air_quality_ble/index.html
+++ b/develop/os/tutorials/air_quality_ble/index.html
@@ -492,12 +492,12 @@ other devices can get those values.</p>
 <p>First, we'll define the GATT Services in <code>apps/air_quality/src/bleprph.h</code>.</p>
 <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #177500">/* Sensor Data */</span>
 <span style="color: #177500">/* e761d2af-1c15-4fa7-af80-b5729002b340 */</span>
-<span style="color: #A90D91">static</span> <span style="color: #A90D91">const</span> <span style="color: #A90D91">uint8_t</span> <span style="color: #000000">gatt_svr_svc_co2_uuid</span>[<span style="color: #1C01CE">16</span>] <span style="color: #000000">=</span> {
-    <span style="color: #1C01CE">0x40</span>, <span style="color: #1C01CE">0xb3</span>, <span style="color: #1C01CE">0x20</span>, <span style="color: #1C01CE">0x90</span>, <span style="color: #1C01CE">0x72</span>, <span style="color: #1C01CE">0xb5</span>, <span style="color: #1C01CE">0x80</span>, <span style="color: #1C01CE">0xaf</span>,
-    <span style="color: #1C01CE">0xa7</span>, <span style="color: #1C01CE">0x4f</span>, <span style="color: #1C01CE">0x15</span>, <span style="color: #1C01CE">0x1c</span>, <span style="color: #1C01CE">0xaf</span>, <span style="color: #1C01CE">0xd2</span>, <span style="color: #1C01CE">0x61</span>, <span style="color: #1C01CE">0xe7</span> };
+<span style="color: #A90D91">static</span> <span style="color: #A90D91">const</span> <span style="color: #A90D91">ble_uuid128_t</span> <span style="color: #000000">gatt_svr_svc_co2_uuid</span> <span style="color: #000000">=</span>
+    <span style="color: #000000">BLE_UUID128_INIT</span>(<span style="color: #1C01CE">0x40</span>, <span style="color: #1C01CE">0xb3</span>, <span style="color: #1C01CE">0x20</span>, <span style="color: #1C01CE">0x90</span>, <span style="color: #1C01CE">0x72</span>, <span style="color: #1C01CE">0xb5</span>, <span style="color: #1C01CE">0x80</span>, <span style="color: #1C01CE">0xaf</span>,
+                     <span style="color: #1C01CE">0xa7</span>, <span style="color: #1C01CE">0x4f</span>, <span style="color: #1C01CE">0x15</span>, <span style="color: #1C01CE">0x1c</span>, <span style="color: #1C01CE">0xaf</span>, <span style="color: #1C01CE">0xd2</span>, <span style="color: #1C01CE">0x61</span>, <span style="color: #1C01CE">0xe7</span>);
 <span style="color: #633820">#define CO2_SNS_TYPE          0xDEAD</span>
 <span style="color: #633820">#define CO2_SNS_STRING &quot;SenseAir K30 CO2 Sensor&quot;</span>
-<span style="color: #633820">#define CO2_SNS_VAL               0xBEAD</span>
+<span style="color: #633820">#define CO2_SNS_VAL           0xBEAD</span>
 
 <span style="color: #A90D91">uint16_t</span> <span style="color: #000000">gatt_co2_val</span>; 
 </pre></div>
@@ -505,7 +505,7 @@ other devices can get those values.</p>
 
 <p>You can use any hex values you choose for the sensor type and sensor values, and you can 
 even forget the sensor type and sensor string definitions altogether but they make
-the results look nice in our Bleutooth App.</p>
+the results look nice in our Bluetooth App for Mac OS X and iOS.</p>
 <p>Next we'll add those services to <code>apps/air_quality/src/gatt_svr.c</code>.</p>
 <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">static</span> <span style="color: #A90D91">int</span>
 <span style="color: #000000">gatt_svr_sns_access</span>(<span style="color: #A90D91">uint16_t</span> <span style="color: #000000">conn_handle</span>, <span style="color: #A90D91">uint16_t</span> <span style="color: #000000">attr_handle</span>,
@@ -521,15 +521,15 @@ the results look nice in our Bleutooth App.</p>
     {
         <span style="color: #177500">/*** Service: Security test. */</span>
         .<span style="color: #000000">type</span> <span style="color: #000000">=</span> <span style="color: #000000">BLE_GATT_SVC_TYPE_PRIMARY</span>,
-        .<span style="color: #000000">uuid128</span> <span style="color: #000000">=</span> <span style="color: #000000">gatt_svr_svc_sec_test_uuid</span>,
+        .<span style="color: #000000">uuid</span> <span style="color: #000000">=</span> <span style="color: #000000">&amp;gatt_svr_svc_sec_test_uuid</span>.<span style="color: #000000">u</span>,
         .<span style="color: #000000">characteristics</span> <span style="color: #000000">=</span> (<span style="color: #A90D91">struct</span> <span style="color: #000000">ble_gatt_chr_def</span>[]) { {
             <span style="color: #177500">/*** Characteristic: Random number generator. */</span>
-            .<span style="color: #000000">uuid128</span> <span style="color: #000000">=</span> <span style="color: #000000">gatt_svr_chr_sec_test_rand_uuid</span>,
+            .<span style="color: #000000">uuid</span> <span style="color: #000000">=</span> <span style="color: #000000">&amp;gatt_svr_chr_sec_test_rand_uuid</span>.<span style="color: #000000">u</span>,
             .<span style="color: #000000">access_cb</span> <span style="color: #000000">=</span> <span style="color: #000000">gatt_svr_chr_access_sec_test</span>,
             .<span style="color: #000000">flags</span> <span style="color: #000000">=</span> <span style="color: #000000">BLE_GATT_CHR_F_READ</span> <span style="color: #000000">|</span> <span style="color: #000000">BLE_GATT_CHR_F_READ_ENC</span>,
         }, {
             <span style="color: #177500">/*** Characteristic: Static value. */</span>
-            .<span style="color: #000000">uuid128</span> <span style="color: #000000">=</span> <span style="color: #000000">gatt_svr_chr_sec_test_static_uuid</span>,
+            .<span style="color: #000000">uuid</span> <span style="color: #000000">=</span> <span style="color: #000000">&amp;gatt_svr_chr_sec_test_static_uuid</span>,.<span style="color: #000000">u</span>
             .<span style="color: #000000">access_cb</span> <span style="color: #000000">=</span> <span style="color: #000000">gatt_svr_chr_access_sec_test</span>,
             .<span style="color: #000000">flags</span> <span style="color: #000000">=</span> <span style="color: #000000">BLE_GATT_CHR_F_READ</span> <span style="color: #000000">|</span>
                      <span style="color: #000000">BLE_GATT_CHR_F_WRITE</span> <span style="color: #000000">|</span> <span style="color: #000000">BLE_GATT_CHR_F_WRITE_ENC</span>,
@@ -540,28 +540,29 @@ the results look nice in our Bleutooth App.</p>
         {
             <span style="color: #177500">/*** CO2 Level Notification Service. */</span>
             .<span style="color: #000000">type</span> <span style="color: #000000">=</span> <span style="color: #000000">BLE_GATT_SVC_TYPE_PRIMARY</span>,
-            .<span style="color: #000000">uuid128</span> <span style="color: #000000">=</span> <span style="color: #000000">gatt_svr_svc_co2_uuid</span>,
+            .<span style="color: #000000">uuid</span> <span style="color: #000000">=</span> <span style="color: #000000">&amp;gatt_svr_svc_co2_uuid</span>.<span style="color: #000000">u</span>,
             .<span style="color: #000000">characteristics</span> <span style="color: #000000">=</span> (<span style="color: #A90D91">struct</span> <span style="color: #000000">ble_gatt_chr_def</span>[]) { {
-                .<span style="color: #000000">uuid128</span> <span style="color: #000000">=</span> <span style="color: #000000">BLE_UUID16</span>(<span style="color: #000000">CO2_SNS_TYPE</span>),
+                .<span style="color: #000000">uuid</span> <span style="color: #000000">=</span> <span style="color: #000000">BLE_UUID16_DECLARE</span>(<span style="color: #000000">CO2_SNS_TYPE</span>),
                 .<span style="color: #000000">access_cb</span> <span style="color: #000000">=</span> <span style="color: #000000">gatt_svr_sns_access</span>,
                 .<span style="color: #000000">flags</span> <span style="color: #000000">=</span> <span style="color: #000000">BLE_GATT_CHR_F_READ</span>,
             }, {
-                .<span style="color: #000000">uuid128</span> <span style="color: #000000">=</span> <span style="color: #000000">BLE_UUID16</span>(<span style="color: #000000">CO2_SNS_VAL</span>),
+                .<span style="color: #000000">uuid</span> <span style="color: #000000">=</span> <span style="color: #000000">BLE_UUID16_DECLARE</span>(<span style="color: #000000">CO2_SNS_VAL</span>),
                 .<span style="color: #000000">access_cb</span> <span style="color: #000000">=</span> <span style="color: #000000">gatt_svr_sns_access</span>,
                 .<span style="color: #000000">flags</span> <span style="color: #000000">=</span> <span style="color: #000000">BLE_GATT_CHR_F_NOTIFY</span>,
             }, {
                 <span style="color: #1C01CE">0</span>, <span style="color: #177500">/* No more characteristics in this service. */</span>
             } },
         },
-    {
-        <span style="color: #1C01CE">0</span>, <span style="color: #177500">/* No more services. */</span>
-    },
-};
+
+        {
+            <span style="color: #1C01CE">0</span>, <span style="color: #177500">/* No more services. */</span>
+        },
+    };
 </pre></div>
 
 
 <p>Next we need to tell the GATT Server how to handle requests for CO<sub>2</sub> readings :</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">static</span> <span style="color: #A90D91">int</span>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">sstatic</span> <span style="color: #A90D91">int</span>
 <span style="color: #000000">gatt_svr_sns_access</span>(<span style="color: #A90D91">uint16_t</span> <span style="color: #000000">conn_handle</span>, <span style="color: #A90D91">uint16_t</span> <span style="color: #000000">attr_handle</span>,
                           <span style="color: #A90D91">struct</span> <span style="color: #000000">ble_gatt_access_ctxt</span> <span style="color: #000000">*ctxt</span>,
                           <span style="color: #A90D91">void</span> <span style="color: #000000">*arg</span>)
@@ -569,8 +570,7 @@ the results look nice in our Bleutooth App.</p>
     <span style="color: #A90D91">uint16_t</span> <span style="color: #000000">uuid16</span>;
     <span style="color: #A90D91">int</span> <span style="color: #000000">rc</span>;
 
-    <span style="color: #000000">uuid16</span> <span style="color: #000000">=</span> <span style="color: #000000">ble_uuid_128_to_16</span>(<span style="color: #000000">ctxt-&gt;chr-&gt;uuid128</span>);
-    <span style="color: #000000">assert</span>(<span style="color: #000000">uuid16</span> <span style="color: #000000">!=</span> <span style="color: #1C01CE">0</span>);
+    <span style="color: #000000">uuid16</span> <span style="color: #000000">=</span> <span style="color: #000000">ble_uuid_u16</span>(<span style="color: #000000">ctxt-&gt;chr-&gt;uuid</span>);
 
     <span style="color: #A90D91">switch</span> (<span style="color: #000000">uuid16</span>) {
     <span style="color: #A90D91">case</span> <span style="color: #000000">CO2_SNS_TYPE</span>:
@@ -595,7 +595,7 @@ the results look nice in our Bleutooth App.</p>
     <span style="color: #A90D91">default</span><span style="color: #000000">:</span>
         <span style="color: #000000">assert</span>(<span style="color: #1C01CE">0</span>);
         <span style="color: #A90D91">return</span> <span style="color: #000000">BLE_ATT_ERR_UNLIKELY</span>;
-    }                              
+    }
 }
 </pre></div>
 
@@ -660,7 +660,7 @@ normally do by adding the following. Again, remember to delete all the shell eve
         <span style="color: #A90D91">goto</span> <span style="color: #000000">err</span>;
     }
     <span style="color: #000000">gatt_co2_val</span> <span style="color: #000000">=</span> <span style="color: #000000">value</span>;
-    <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">ble_gatts_find_chr</span>(<span style="color: #000000">gatt_svr_svc_co2_uuid</span>, <span style="color: #000000">BLE_UUID16</span>(<span style="color: #000000">CO2_SNS_VAL</span>), <span style="color: #A90D91">NULL</span>, <span style="color: #000000">&amp;chr_val_handle</span>);
+    <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">ble_gatts_find_chr</span>(<span style="color: #000000">&amp;gatt_svr_svc_co2_uuid</span>.<span style="color: #000000">u</span>, <span style="color: #000000">BLE_UUID16_DECLARE</span>(<span style="color: #000000">CO2_SNS_VAL</span>), <span style="color: #A90D91">NULL</span>, <span style="color: #000000">&amp;chr_val_handle</span>);
     <span style="color: #000000">assert</span>(<span style="color: #000000">rc</span> <span style="color: #000000">==</span> <span style="color: #1C01CE">0</span>);
     <span style="color: #000000">ble_gatts_chr_updated</span>(<span style="color: #000000">chr_val_handle</span>);
     <span style="color: #A90D91">return</span> (<span style="color: #1C01CE">0</span>);

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/7dc2cb54/develop/os/tutorials/air_quality_sensor/index.html
----------------------------------------------------------------------
diff --git a/develop/os/tutorials/air_quality_sensor/index.html b/develop/os/tutorials/air_quality_sensor/index.html
index 6bf3abb..f3473ba 100644
--- a/develop/os/tutorials/air_quality_sensor/index.html
+++ b/develop/os/tutorials/air_quality_sensor/index.html
@@ -634,9 +634,11 @@ pkg.author: &quot;Apache Mynewt &lt;dev@mynewt.incubator.apache.org&gt;&quot;
 pkg.homepage: &quot;http://mynewt.apache.org/&quot;
 pkg.keywords:
 
-pkg.deps:
+pkg.deps: 
     - &quot;@apache-mynewt-core/kernel/os&quot;
-    - &quot;@apache-mynewt-core/sys/log&quot;
+    - &quot;@apache-mynewt-core/sys/shell&quot;
+    - &quot;@apache-mynewt-core/sys/stats/full&quot;
+    - &quot;@apache-mynewt-core/sys/log/full&quot;
     - &quot;@apache-mynewt-core/mgmt/newtmgr&quot;
     - &quot;@apache-mynewt-core/mgmt/newtmgr/transport/ble&quot;
     - &quot;@apache-mynewt-core/net/nimble/controller&quot;
@@ -647,7 +649,6 @@ pkg.deps:
     - &quot;@apache-mynewt-core/net/nimble/host/store/ram&quot;
     - &quot;@apache-mynewt-core/net/nimble/transport/ram&quot;
     - &quot;@apache-mynewt-core/sys/console/full&quot;
-    - &quot;@apache-mynewt-core/libc/baselibc&quot;
     - &quot;@apache-mynewt-core/sys/sysinit&quot;
     - &quot;@apache-mynewt-core/sys/id&quot;
 </pre></div>
@@ -702,8 +703,15 @@ To start development of the driver, you first need to create a package descripti
 <span style="color: #633820"># under the License.</span>
 <span style="color: #633820">#</span>
 <span style="color: #000000">pkg</span>.<span style="color: #000000">name</span>: <span style="color: #000000">libs/my_drivers/senseair</span>
+<span style="color: #000000">pkg</span>.<span style="color: #000000">description</span>: <span style="color: #000000">Host</span> <span style="color: #000000">side</span> <span style="color: #000000">of</span> <span style="color: #000000">the</span> <span style="color: #000000">nimble</span> <span style="color: #000000">Bluetooth</span> <span style="color: #000000">Smart</span> <span style="color: #000000">stack</span>.
+<span style="color: #000000">pkg</span>.<span style="color: #000000">author</span>: <span style="color: #C41A16">&quot;Apache Mynewt &lt;dev@mynewt.incubator.apache.org&gt;&quot;</span>
+<span style="color: #000000">pkg</span>.<span style="color: #000000">homepage</span>: <span style="color: #C41A16">&quot;http://mynewt.apache.org/&quot;</span>
+<span style="color: #000000">pkg</span>.<span style="color: #000000">keywords</span>:
+    <span style="color: #000000">-</span> <span style="color: #000000">ble</span>
+    <span style="color: #000000">-</span> <span style="color: #000000">bluetooth</span>
+
 <span style="color: #000000">pkg</span>.<span style="color: #000000">deps</span>:
-    <span style="color: #000000">-</span> <span style="color: #C41A16">&quot;@apache-mynewt-core/hw/hal&quot;</span>
+    <span style="color: #000000">-</span> <span style="color: #C41A16">&quot;@apache-mynewt-core/kernel/os&quot;</span>
 </pre></div>
 
 
@@ -781,8 +789,8 @@ pkg.deps:
     - &quot;@apache-mynewt-core/libs/os&quot;
     - &quot;@apache-mynewt-core/libs/shell&quot;
     - &quot;@apache-mynewt-core/sys/config&quot;
-    - &quot;@apache-mynewt-core/sys/log&quot;
-    - &quot;@apache-mynewt-core/sys/stats&quot;
+    - &quot;@apache-mynewt-core/sys/log/full&quot;
+    - &quot;@apache-mynewt-core/sys/stats/full&quot;
     - &quot;@apache-mynewt-core/libs/baselibc&quot;
     - libs/my_drivers/senseair
 </pre></div>
@@ -938,7 +946,7 @@ You can connect the hardware to your board and start developing code for the dri
 <p>The sensor has a serial port connection, and that's how you are going to connect to it. Your original BSP, hw/bsp/arduino_primo_nrf52, has two UARTs set up.
 We're using one for our shell/console. It also has a second UART set up as a 'bit-bang' UART but since the SenseAir only needs to
 communicate at 9600 baud, this bit-banged uart is plenty fast enough.</p>
-<p>You'll have to make a small change to the <code>syscfg.yml</code> file in your project's target directory to chang the pin definitions 
+<p>You'll have to make a small change to the <code>syscfg.yml</code> file in your project's target directory to change  the pin definitions 
 for this second UART. Those changes are as follows:</p>
 <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">    UART_0_PIN_TX: 23
     UART_0_PIN_RX: 24
@@ -1211,7 +1219,7 @@ which is a blocking read. If you were making a commercial product, you would pro
 </pre></div>
 
 
-<p>And your modified your main() for senseair driver init.</p>
+<p>And your modified main() for senseair driver init.</p>
 <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">int</span>
 <span style="color: #000000">main</span>(<span style="color: #A90D91">int</span> <span style="color: #000000">argc</span>, <span style="color: #A90D91">char</span> <span style="color: #000000">**argv</span>)
 {
@@ -1234,8 +1242,8 @@ straight to the board if you prefer.</p>
 <p><img alt="SenseAir Wiring" src="../pics/Senseair1.png" /></p>
 <p>Now that you have that wired up, let's get the Arduino Primo wired up. A couple of things to note:</p>
 <ul>
-<li>The Arduino Primo's 'console' UART is actually UART1. The secondary (bit-banged) UART is 
-UART0, so that's where we'll have to hook up the SenseAir.</li>
+<li>The Arduino Primo's 'console' UART is actually UART1. </li>
+<li>The secondary (bit-banged) UART is UART0, so that's where we'll have to hook up the SenseAir.</li>
 </ul>
 <p>Here's what your Arduino Primo should now look like with everything wired in:</p>
 <p><img alt="SenseAir and Arduino Primo Wiring" src="../pics/Senseair2.png" /></p>

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/7dc2cb54/develop/sitemap.xml
----------------------------------------------------------------------
diff --git a/develop/sitemap.xml b/develop/sitemap.xml
index 37caf7e..ae7f50a 100644
--- a/develop/sitemap.xml
+++ b/develop/sitemap.xml
@@ -4,7 +4,7 @@
     
     <url>
      <loc>http://mynewt.apache.org/</loc>
-     <lastmod>2017-01-27</lastmod>
+     <lastmod>2017-01-31</lastmod>
      <changefreq>daily</changefreq>
     </url>
     
@@ -13,7 +13,7 @@
         
     <url>
      <loc>http://mynewt.apache.org/pages/ble/</loc>
-     <lastmod>2017-01-27</lastmod>
+     <lastmod>2017-01-31</lastmod>
      <changefreq>daily</changefreq>
     </url>
         
@@ -22,7 +22,7 @@
     
     <url>
      <loc>http://mynewt.apache.org/quick-start/</loc>
-     <lastmod>2017-01-27</lastmod>
+     <lastmod>2017-01-31</lastmod>
      <changefreq>daily</changefreq>
     </url>
     
@@ -30,7 +30,7 @@
     
     <url>
      <loc>http://mynewt.apache.org/about/</loc>
-     <lastmod>2017-01-27</lastmod>
+     <lastmod>2017-01-31</lastmod>
      <changefreq>daily</changefreq>
     </url>
     
@@ -38,7 +38,7 @@
     
     <url>
      <loc>http://mynewt.apache.org/talks/</loc>
-     <lastmod>2017-01-27</lastmod>
+     <lastmod>2017-01-31</lastmod>
      <changefreq>daily</changefreq>
     </url>
     
@@ -46,7 +46,7 @@
     
     <url>
      <loc>http://mynewt.apache.org/download/</loc>
-     <lastmod>2017-01-27</lastmod>
+     <lastmod>2017-01-31</lastmod>
      <changefreq>daily</changefreq>
     </url>
     
@@ -54,7 +54,7 @@
     
     <url>
      <loc>http://mynewt.apache.org/community/</loc>
-     <lastmod>2017-01-27</lastmod>
+     <lastmod>2017-01-31</lastmod>
      <changefreq>daily</changefreq>
     </url>
     
@@ -62,7 +62,7 @@
     
     <url>
      <loc>http://mynewt.apache.org/events/</loc>
-     <lastmod>2017-01-27</lastmod>
+     <lastmod>2017-01-31</lastmod>
      <changefreq>daily</changefreq>
     </url>
     
@@ -71,7 +71,7 @@
         
     <url>
      <loc>http://mynewt.apache.org/os/introduction/</loc>
-     <lastmod>2017-01-27</lastmod>
+     <lastmod>2017-01-31</lastmod>
      <changefreq>daily</changefreq>
     </url>
         
@@ -83,7 +83,7 @@
         
     <url>
      <loc>http://mynewt.apache.org/os/get_started/vocabulary/</loc>
-     <lastmod>2017-01-27</lastmod>
+     <lastmod>2017-01-31</lastmod>
      <changefreq>daily</changefreq>
     </url>
         
@@ -123,13 +123,13 @@
         
     <url>
      <loc>http://mynewt.apache.org/faq/how_to_edit_docs/</loc>
-     <lastmod>2017-01-27</lastmod>
+     <lastmod>2017-01-31</lastmod>
      <changefreq>daily</changefreq>
     </url>
         
     <url>
      <loc>http://mynewt.apache.org/faq/answers/</loc>
-     <lastmod>2017-01-27</lastmod>
+     <lastmod>2017-01-31</lastmod>
      <changefreq>daily</changefreq>
     </url>