blob: 9b2d91f67755f6e090d616e294c29c669dcd5b1e [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Console &mdash; Apache Mynewt latest documentation</title>
<link rel="shortcut icon" href="../../../_static/mynewt-logo-only-newt32x32.png"/>
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/sphinx_theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/bootstrap-3.0.3.min.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/v2.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/custom.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/restructuredtext.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/overrides.css" type="text/css" />
<link rel="index" title="Index"
href="../../../genindex.html"/>
<link rel="search" title="Search" href="../../../search.html"/>
<link rel="top" title="Apache Mynewt latest documentation" href="../../../index.html"/>
<link rel="up" title="System Modules" href="../system_modules.html"/>
<link rel="next" title="Shell" href="../shell/shell.html"/>
<link rel="prev" title="Statistics Module" href="../stats/stats.html"/>
<script src="../../../_static/js/modernizr.min.js"></script>
<script>
(function(i, s, o, g, r, a, m) {
i["GoogleAnalyticsObject"] = r;
(i[r] =
i[r] ||
function() {
(i[r].q = i[r].q || []).push(arguments);
}),
(i[r].l = 1 * new Date());
(a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m);
})(window, document, "script", "//www.google-analytics.com/analytics.js", "ga");
ga("create", "UA-72162311-1", "auto");
ga("send", "pageview");
</script>
</head>
<body class="not-front page-documentation" role="document" >
<div id="wrapper">
<div class="container">
<div id="banner" class="row v2-main-banner">
<a class="logo-cell" href="/">
<img class="logo" src="../../../_static/img/logo.png">
</a>
<div class="tagline-cell">
<h4 class="tagline">An OS to build, deploy and securely manage billions of devices</h4>
</div>
<div class="news-cell">
<div class="well">
<h4>Latest News:</h4> <a href="/download">Apache Mynewt 1.12.0, Apache NimBLE 1.7.0 </a> released April 4, 2024)
</div>
</div>
</div>
</div>
<header>
<nav id="navbar" class="navbar navbar-inverse" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav navbar-right">
<li>
<a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a>
</li>
<li class="important">
<a href="/quick-start/">Quick Start</a>
</li>
<li>
<a href="/about/">About</a>
</li>
<li>
<a href="/talks/">Talks</a>
</li>
<li class="active">
<a href="/documentation/">Documentation</a>
</li>
<li>
<a href="/download/">Download</a>
</li>
<li>
<a href="/community/">Community</a>
</li>
<li>
<a href="/events/">Events</a>
</li>
</ul>
<!-- Search, Navigation and Repo links -->
<ul class="nav navbar-nav navbar-right">
</ul>
</div>
</div>
</nav>
</header>
<!-- STARTS MAIN CONTENT -->
<div id="main-content">
<div id="breadcrumb">
<div class="container">
<a href="/documentation/">Docs</a> /
<a href="../../os_user_guide.html">OS User Guide</a> /
<a href="../system_modules.html">System Modules</a> /
Console
<div class="sourcelink">
<a href="https://github.com/apache/mynewt-core/edit/master/docs/os/modules/console/console.rst" class="icon icon-github"
rel="nofollow"> Edit on GitHub</a>
</div>
</div>
</div>
<!-- STARTS CONTAINER -->
<div class="container">
<!-- STARTS .content -->
<div id="content" class="row">
<!-- STARTS .container-sidebar -->
<div class="container-sidebar col-xs-12 col-sm-3">
<div id="docSidebar" class="sticky-container">
<div role="search" class="sphinx-search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search documentation" class="search-documentation" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<!-- Note: only works when deployed -->
<select class="form-control" onchange="if (this.value) window.location.href=this.value">
<option value="/latest" selected>
Version: latest
</option>
<option value="/v1_12_0" >
Version: 1.12.0
</option>
<option value="/v1_11_0" >
Version: 1.11.0
</option>
<option value="/v1_10_0" >
Version: 1.10.0
</option>
<option value="/v1_9_0" >
Version: 1.9.0
</option>
<option value="/v1_8_0" >
Version: 1.8.0
</option>
<option value="/v1_7_0" >
Version: 1.7.0
</option>
<option value="/v1_6_0" >
Version: 1.6.0
</option>
<option value="/v1_5_0" selected="selected" >
Version: 1.5.0
</option>
<option value="/v1_4_0" >
Version: 1.4.0
</option>
<option value="/v1_3_0/os/introduction" >
Version: 1.3.0
</option>
<option value="/v1_2_0/os/introduction" >
Version: 1.2.0
</option>
<option value="/v1_1_0/os/introduction" >
Version: 1.1.0
</option>
<option value="/v1_0_0/os/introduction" >
Version: 1.0.0
</option>
<option value="/v0_9_0/os/introduction" >
Version: 0.9.0
</option>
</select>
<div class="region region-sidebar">
<div class="docs-menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../get_started/index.html">Setup &amp; Get Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../concepts.html">Concepts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../tutorials/tutorials.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../external_links.html">Third-party Resources</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../os_user_guide.html">OS User Guide</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../core_os/mynewt_os.html">Kernel</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../system_modules.html">System</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../config/config.html">Config</a></li>
<li class="toctree-l3"><a class="reference internal" href="../logs/logs.html">Logs</a></li>
<li class="toctree-l3"><a class="reference internal" href="../stats/stats.html">Statistics</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">Console</a></li>
<li class="toctree-l3"><a class="reference internal" href="../shell/shell.html">Shell</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../hal/hal.html">Hardware Abstraction</a></li>
<li class="toctree-l2"><a class="reference internal" href="../bootloader/bootloader.html">Secure Bootloader</a></li>
<li class="toctree-l2"><a class="reference internal" href="../split/split.html">Split Images</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../core_os/porting/port_os.html">Porting Guide</a></li>
<li class="toctree-l2"><a class="reference internal" href="../baselibc.html">Baselibc</a></li>
<li class="toctree-l2"><a class="reference internal" href="../drivers/driver.html">Drivers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../devmgmt/newtmgr.html">Device Management with Newt Manager</a></li>
<li class="toctree-l2"><a class="reference internal" href="../imgmgr/imgmgr.html">Image Manager</a></li>
<li class="toctree-l2"><a class="reference internal" href="../sysinitconfig/sysinitconfig.html">Compile-Time Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="../fs/fs.html">File System</a></li>
<li class="toctree-l2"><a class="reference internal" href="../fcb/fcb.html">Flash Circular Buffer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../sensor_framework/sensor_framework.html">Sensor Framework</a></li>
<li class="toctree-l2"><a class="reference internal" href="../testutil/testutil.html">Test Utilities</a></li>
<li class="toctree-l2"><a class="reference internal" href="../json/json.html">JSON</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../network/index.html">BLE User Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../newt/index.html">Newt Tool Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../newtmgr/index.html">Newt Manager Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mynewt_faq/index.html">Mynewt FAQ</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../misc/index.html">Appendix</a></li>
</ul>
</div>
</div>
</div>
<!-- ENDS STICKY CONTAINER -->
</div>
<!-- ENDS .container-sidebar -->
<div class="col-xs-12 col-sm-9">
<div class="alert alert-warning">
<p>
Version 1.5.0 is not the most recent version of the
Apache Mynewt documentation. Click <a href="/latest">here</a> to
read the latest version.
</p>
</div>
<div class="">
<div class="rst-content">
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="console">
<h1>Console<a class="headerlink" href="#console" title="Permalink to this headline"></a></h1>
<p>The console is an operating system window where users interact with the
OS subsystems or a console application. A user typically inputs text
from a keyboard and reads the OS output text on a computer monitor. The
text is sent as a sequence of characters between the user and the OS.</p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#description" id="id1">Description</a></p>
<ul>
<li><p><a class="reference internal" href="#using-the-full-console-package" id="id2">Using the Full Console Package</a></p></li>
<li><p><a class="reference internal" href="#using-the-stub-console-package" id="id3">Using the Stub Console Package</a></p></li>
<li><p><a class="reference internal" href="#using-the-minimal-console-package" id="id4">Using the Minimal Console Package</a></p></li>
<li><p><a class="reference internal" href="#output-to-the-console" id="id5">Output to the Console</a></p></li>
<li><p><a class="reference internal" href="#input-from-the-console" id="id6">Input from the Console</a></p></li>
<li><p><a class="reference internal" href="#mynewt-1-0-console-api" id="id7">Mynewt 1.0 Console API</a></p></li>
<li><p><a class="reference internal" href="#mynewt-1-1-console-api" id="id8">Mynewt 1.1 Console API</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#api" id="id9">API</a></p></li>
</ul>
</div>
<p>You can configure the console to communicate via a UART or the SEGGER
Real Time Terminal (RTT) . The <code class="docutils literal notranslate"><span class="pre">CONSOLE_UART</span></code> syscfg setting enables
the communication via a UART and is enabled by default. The
<code class="docutils literal notranslate"><span class="pre">CONSOLE_RTT</span></code> setting enables the communication via the RTT and is
disabled by default. When the <code class="docutils literal notranslate"><span class="pre">CONSOLE_UART</span></code> setting is enabled, the
following settings apply:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CONSOLE_UART_DEV</span></code>: Specifies the UART device to use. The default
is <code class="docutils literal notranslate"><span class="pre">uart0</span></code>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CONSOLE_UART_BAUD</span></code>: Specifies the UART baud rate. The default is
115200.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CONSOLE_UART_FLOW_CONTROL</span></code>: Specifies the UART flow control. The
default is <code class="docutils literal notranslate"><span class="pre">UART_FLOW_CONTROL_NONE</span></code>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CONSOLE_UART_TX_BUF_SIZE</span></code>: Specifies the transmit buffer size and
must be a power of 2. The default is 32.</p></li>
</ul>
<p>The <code class="docutils literal notranslate"><span class="pre">CONSOLE_TICKS</span></code> setting enables the console to print the current
OS ticks in each output line.</p>
<p><strong>Notes:</strong></p>
<ul class="simple">
<li><p>SEGGER RTT support is not available in the Mynewt 1.0 console
package.</p></li>
<li><p>The console package is initialized during system initialization
(sysinit) so you do not need to initialize the console. However, if
you use the Mynewt 1.0 console API to read from the console, you will
need to call the <a class="reference internal" href="#c.console_init" title="console_init"><code class="xref c c-func docutils literal notranslate"><span class="pre">console_init()</span></code></a> function to enable backward
compatibility support.</p></li>
</ul>
<div class="section" id="description">
<h2><a class="toc-backref" href="#id1">Description</a><a class="headerlink" href="#description" title="Permalink to this headline"></a></h2>
<p>In the Mynewt OS, the console library comes in three versions:</p>
<ul class="simple">
<li><p>The <code class="docutils literal notranslate"><span class="pre">sys/console/full</span></code> package implements the complete console
functionality and API.</p></li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">sys/console/stub</span></code> package implements stubs for the API.</p></li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">sys/console/minimal</span></code> package implements minimal console
functionality of reading from and writing to console. It implements
the <a class="reference internal" href="#c.console_read" title="console_read"><code class="xref c c-func docutils literal notranslate"><span class="pre">console_read()</span></code></a> and <a class="reference internal" href="#c.console_write" title="console_write"><code class="xref c c-func docutils literal notranslate"><span class="pre">console_write()</span></code></a> functions and stubs
for all the other console functions.</p></li>
</ul>
<p>All the packages export the <code class="docutils literal notranslate"><span class="pre">console</span></code> API, and any package that uses
the console API must list <code class="docutils literal notranslate"><span class="pre">console</span></code> as a requirement its <code class="docutils literal notranslate"><span class="pre">pkg.yml</span></code>
file:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">pkg.name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">sys/shell</span>
<span class="nt">pkg.deps</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/kernel/os&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/encoding/base64&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/time/datetime&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/util/crc&quot;</span>
<span class="nt">pkg.req_apis</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">console</span>
</pre></div>
</div>
<p>The project <code class="docutils literal notranslate"><span class="pre">pkg.yml</span></code> file also specifies the version of the console
package to use.</p>
<div class="section" id="using-the-full-console-package">
<h3><a class="toc-backref" href="#id2">Using the Full Console Package</a><a class="headerlink" href="#using-the-full-console-package" title="Permalink to this headline"></a></h3>
<p>A project that requires the full console capability must list the <code class="docutils literal notranslate"><span class="pre">sys/console/full</span></code> package as a
dependency in its <code class="docutils literal notranslate"><span class="pre">pkg.yml</span></code> file.</p>
<p>An example is the <code class="docutils literal notranslate"><span class="pre">slinky</span></code> application. It requires the full console
capability and has the following <code class="docutils literal notranslate"><span class="pre">pkg.yml</span></code> file:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">pkg.name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">apps/slinky</span>
<span class="nt">pkg.deps</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/test/flash_test&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/mgmt/imgmgr&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/mgmt/newtmgr&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/mgmt/newtmgr/transport/nmgr_shell&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/kernel/os&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/boot/bootutil&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/sys/shell&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/sys/console/full&quot;</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/sys/id&quot;</span>
</pre></div>
</div>
</div>
<div class="section" id="using-the-stub-console-package">
<h3><a class="toc-backref" href="#id3">Using the Stub Console Package</a><a class="headerlink" href="#using-the-stub-console-package" title="Permalink to this headline"></a></h3>
<p>A project that uses console stub API must list the <code class="docutils literal notranslate"><span class="pre">sys/console/stub</span></code>
package as a dependency in its <code class="docutils literal notranslate"><span class="pre">pkg.yml</span></code> file.</p>
<p>Examples of when a project would use the console stubs might be:</p>
<ul class="simple">
<li><p>A project may not have a physical console (e.g. a UART port to
connect a terminal to) but may have a dependency on a package that
has console capability.</p></li>
<li><p>A bootloader project where we want to keep the size of the image
small. It includes the <code class="docutils literal notranslate"><span class="pre">kernel/os</span></code> package that can print out
messages on a console (e.g. if there is a hard fault). However, we do
not want to use any console I/O capability in this particular
bootloader project to keep the size small.</p></li>
</ul>
<p>The project would use the console stub API and has the following
<code class="docutils literal notranslate"><span class="pre">pkg.yml</span></code> file:</p>
<p>Another example would be the bootloader project where we want to keep
the size of the image small. It includes the <code class="docutils literal notranslate"><span class="pre">libs/os</span></code> pkg that can
print out messages on a console (e.g. if there is a hard fault) and the
<code class="docutils literal notranslate"><span class="pre">libs/util</span></code> pkg that uses full console (but only if SHELL is present
to provide a CLI). However, we do not want to use any console I/O
capability in this particular bootloader project to keep the size small.
We simply use the console stub instead, and the pkg.yml file for the
project boot pkg looks like the following:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">pkg.name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">apps/boot</span>
<span class="nt">pkg.deps</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/boot/bootutil&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/kernel/os&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/sys/console/stub&quot;</span>
</pre></div>
</div>
</div>
<div class="section" id="using-the-minimal-console-package">
<h3><a class="toc-backref" href="#id4">Using the Minimal Console Package</a><a class="headerlink" href="#using-the-minimal-console-package" title="Permalink to this headline"></a></h3>
<p>There might be projects that need to read and write data on a serial
connection but do not need the full console capability. An example might
be a project that supports serial image upgrade but does not need full
newtmgr capability. The project would use the console minimal API and
has the following <code class="docutils literal notranslate"><span class="pre">pkg.yml</span></code> file:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">pkg.name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">apps/boot</span>
<span class="nt">pkg.type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">app</span>
<span class="nt">pkg.description</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Boot loader application.</span>
<span class="nt">pkg.author</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Apache</span><span class="nv"> </span><span class="s">Mynewt</span><span class="nv"> </span><span class="s">&lt;dev@mynewt.apache.org&gt;&quot;</span>
<span class="nt">pkg.homepage</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;http://mynewt.apache.org/&quot;</span>
<span class="nt">pkg.keywords</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">loader</span>
<span class="nt">pkg.deps</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/boot/bootutil&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/kernel/os&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/sys/console/stub&quot;</span>
<span class="nt">pkg.deps.BOOT_SERIAL.OVERWRITE</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/sys/console/minimal&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;@apache-mynewt-core/boot/boot_serial&quot;</span>
</pre></div>
</div>
</div>
<div class="section" id="output-to-the-console">
<h3><a class="toc-backref" href="#id5">Output to the Console</a><a class="headerlink" href="#output-to-the-console" title="Permalink to this headline"></a></h3>
<p>You use the <a class="reference internal" href="#c.console_write" title="console_write"><code class="xref c c-func docutils literal notranslate"><span class="pre">console_write()</span></code></a> function to write raw output and the
<code class="xref c c-func docutils literal notranslate"><span class="pre">console_printf()</span></code> function to write a C-style formatted string to the
console.</p>
</div>
<div class="section" id="input-from-the-console">
<h3><a class="toc-backref" href="#id6">Input from the Console</a><a class="headerlink" href="#input-from-the-console" title="Permalink to this headline"></a></h3>
<p>The following syscfg settings control input from the console:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CONSOLE_INPUT</span></code>: Enables input from the console. The setting is
enabled by default.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CONSOLE_ECHO</span></code>: Enables echoing of the received data back to the
console. Echoing is enabled by default. Terminal programs expect
this, and is a way for the user to know that the console is connected
and responsive. You can also use the <a class="reference internal" href="#c.console_echo" title="console_echo"><code class="xref c c-func docutils literal notranslate"><span class="pre">console_echo()</span></code></a> function to
set echo on or off programatically.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">CONSOLE_MAX_INPUT_LEN</span></code>: Specifies the maximum input line length.</p></li>
</ul>
<p>The Mynewt 1.1 console package adds a new API for reading input data
from the console. The package supports backward compatibility for the
Mynewt 1.0 console API. The steps you use to receive data from the
console for each API version are provided below.</p>
</div>
<div class="section" id="mynewt-1-0-console-api">
<h3><a class="toc-backref" href="#id7">Mynewt 1.0 Console API</a><a class="headerlink" href="#mynewt-1-0-console-api" title="Permalink to this headline"></a></h3>
<p>To use the Mynewt 1.0 console API for reading input from the console,
you perform the follow steps:</p>
<ol class="arabic simple">
<li><p>Call the <a class="reference internal" href="#c.console_init" title="console_init"><code class="xref c c-func docutils literal notranslate"><span class="pre">console_init()</span></code></a> function and pass either a pointer to a
callback function or NULL for the argument. The console calls this
callback function, if specified, when it receives a full line of
data.</p></li>
<li><p>Call the <a class="reference internal" href="#c.console_read" title="console_read"><code class="xref c c-func docutils literal notranslate"><span class="pre">console_read()</span></code></a> function to read the input data.</p></li>
</ol>
<p><strong>Note:</strong> The <code class="docutils literal notranslate"><span class="pre">CONSOLE_COMPAT</span></code> syscfg setting must be set to 1 to
enable backward compatibility support. The setting is enabled by
default.</p>
</div>
<div class="section" id="mynewt-1-1-console-api">
<h3><a class="toc-backref" href="#id8">Mynewt 1.1 Console API</a><a class="headerlink" href="#mynewt-1-1-console-api" title="Permalink to this headline"></a></h3>
<p>Mynewt 1.1 console API adds the
<code class="xref c c-func docutils literal notranslate"><span class="pre">console_set_queues()</span></code>
function. An application or the package, such as the shell, calls this
function to specify two event queues that the console uses to manage
input data buffering and to send notification when a full line of data
is received. The two event queues are used as follows:</p>
<ul>
<li><p><strong>avail_queue</strong>: Each event in this queue indicates that a buffer is
available for the console to use for buffering input data.</p>
<p>The caller must initialize the avail_queue and initialize and add an
<span class="xref std std-doc">../../os/core_os/event_queue/event_queue</span> to the
avail_queue before calling the <code class="xref c c-func docutils literal notranslate"><span class="pre">console_set_queues()</span></code> function.
The fields for the event should be set as follows:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">ev_cb</span></code>: Pointer to the callback function to call when a
full line of data is received.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">ev_arg</span></code>: Pointer to a <a class="reference internal" href="#c.console_input" title="console_input"><code class="xref c c-data docutils literal notranslate"><span class="pre">console_input</span></code></a> structure. This
structure contains a data buffer to store the current input.</p></li>
</ul>
<p>The console removes an event from this queue and uses the
<a class="reference internal" href="#c.console_input" title="console_input"><code class="xref c c-data docutils literal notranslate"><span class="pre">console_input</span></code></a> buffer from this event to buffer the received
characters until it receives a new line, ‘/n’, character. When the
console receives a full line of data, it adds this event to the
<strong>lines_queue</strong>.</p>
</li>
<li><p><strong>lines_queue</strong>: Each event in this queue indicates a full line of
data is received and ready for processing. The console adds an event
to this queue when it receives a full line of data. This event is the
same event that the console removes from the avail_queue.</p>
<p>The task that manages the lines_queue removes an event from the
queue and calls the event callback function to process the input
line. The event callback function must add the event back to the
avail_queue when it completes processing the current input data, and
allows the console to use the <a class="reference internal" href="#c.console_input" title="console_input"><code class="xref c c-data docutils literal notranslate"><span class="pre">console_input</span></code></a> buffer set for this
event to buffer input data.</p>
<p>We recommend that you use the OS default queue for the lines_queue
so that the callback is processed in the context of the OS main task.
If you do not use the OS default event queue, you must initialize an
event queue and create a task to process events from the queue.</p>
<p><strong>Note</strong>: If the callback function needs to read another line of
input from the console while processing the current line, it may use
the <a class="reference internal" href="#c.console_read" title="console_read"><code class="xref c c-func docutils literal notranslate"><span class="pre">console_read()</span></code></a> function to read the next line of input from
the console. The console will need another <a class="reference internal" href="#c.console_input" title="console_input"><code class="xref c c-data docutils literal notranslate"><span class="pre">console_input</span></code></a> buffer
to store the next input line, so two events, initialized with the
pointers to the callback and the <a class="reference internal" href="#c.console_input" title="console_input"><code class="xref c c-data docutils literal notranslate"><span class="pre">console_input</span></code></a> buffer, must be
added to the avail_queue.</p>
</li>
</ul>
<p>Here is a code excerpt that shows how to use the
<code class="xref c c-func docutils literal notranslate"><span class="pre">console_set_queues()</span></code> function. The example adds one event to the
avail_queue and uses the OS default event queue for the lines_queue.</p>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="k">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">myapp_process_input</span><span class="p">(</span><span class="k">struct</span><span class="w"> </span><span class="nc">os_event</span><span class="w"> </span><span class="o">*</span><span class="n">ev</span><span class="p">);</span>
<span class="k">static</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">os_eventq</span><span class="w"> </span><span class="n">avail_queue</span><span class="p">;</span>
<span class="k">static</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">console_input</span><span class="w"> </span><span class="n">myapp_console_buf</span><span class="p">;</span>
<span class="k">static</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">os_event</span><span class="w"> </span><span class="n">myapp_console_event</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="p">.</span><span class="n">ev_cb</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">myapp_process_input</span><span class="p">,</span>
<span class="w"> </span><span class="p">.</span><span class="n">ev_arg</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;</span><span class="n">myapp_console_buf</span>
<span class="p">};</span>
<span class="cm">/* Event callback to process a line of input from console. */</span>
<span class="k">static</span><span class="w"> </span><span class="kt">void</span>
<span class="nf">myapp_process_input</span><span class="p">(</span><span class="k">struct</span><span class="w"> </span><span class="nc">os_event</span><span class="w"> </span><span class="o">*</span><span class="n">ev</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">line</span><span class="p">;</span>
<span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">console_input</span><span class="w"> </span><span class="o">*</span><span class="n">input</span><span class="p">;</span>
<span class="w"> </span><span class="n">input</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ev</span><span class="o">-&gt;</span><span class="n">ev_arg</span><span class="p">;</span>
<span class="w"> </span><span class="n">assert</span><span class="w"> </span><span class="p">(</span><span class="n">input</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span>
<span class="w"> </span><span class="n">line</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">input</span><span class="o">-&gt;</span><span class="n">line</span><span class="p">;</span>
<span class="w"> </span><span class="cm">/* Do some work with line */</span>
<span class="w"> </span><span class="p">....</span>
<span class="w"> </span><span class="cm">/* Done processing line. Add the event back to the avail_queue */</span>
<span class="w"> </span><span class="n">os_eventq_put</span><span class="p">(</span><span class="o">&amp;</span><span class="n">avail_queue</span><span class="p">,</span><span class="w"> </span><span class="n">ev</span><span class="p">);</span>
<span class="w"> </span><span class="k">return</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">static</span><span class="w"> </span><span class="kt">void</span>
<span class="nf">myapp_init</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="n">os_eventq_init</span><span class="p">(</span><span class="o">&amp;</span><span class="n">avail_queue</span><span class="p">);</span>
<span class="w"> </span><span class="n">os_eventq_put</span><span class="p">(</span><span class="o">&amp;</span><span class="n">avail_queue</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">myapp_console_event</span><span class="p">);</span>
<span class="w"> </span><span class="n">console_set_queues</span><span class="p">(</span><span class="o">&amp;</span><span class="n">avail_queue</span><span class="p">,</span><span class="w"> </span><span class="n">os_eventq_dflt_get</span><span class="p">());</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="api">
<h2><a class="toc-backref" href="#id9">API</a><a class="headerlink" href="#api" title="Permalink to this headline"></a></h2>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-typedefs">Typedefs</p>
<dl class="c type">
<dt id="c.console_rx_cb">
<span class="target" id="full_2include_2console_2console_8h_1a28b09e6faebf3f226c9c73f296c772db"></span><em class="property"><span class="pre">typedef</span> </em><span class="pre">void</span> <span class="pre">(</span><span class="pre">*</span><code class="sig-name descname"><span class="pre">console_rx_cb</span></code><span class="pre">)</span><span class="sig-paren">(</span><span class="pre">void</span><span class="sig-paren">)</span><a class="headerlink" href="#c.console_rx_cb" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c type">
<dt id="c.console_append_char_cb">
<span class="target" id="full_2include_2console_2console_8h_1aa1649e5c8303160003073fcdcc4d5a08"></span><em class="property"><span class="pre">typedef</span> </em><span class="pre">int</span> <span class="pre">(</span><span class="pre">*</span><code class="sig-name descname"><span class="pre">console_append_char_cb</span></code><span class="pre">)</span><span class="sig-paren">(</span><span class="pre">char</span> <span class="pre">*</span><span class="pre">line</span>, <span class="pre">uint8_t</span> <span class="pre">byte</span><span class="sig-paren">)</span><a class="headerlink" href="#c.console_append_char_cb" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c type">
<dt id="c.completion_cb">
<span class="target" id="full_2include_2console_2console_8h_1a5d88336d9aedf8a43587d7e6e7262cd3"></span><em class="property"><span class="pre">typedef</span> </em><span class="pre">void</span> <span class="pre">(</span><span class="pre">*</span><code class="sig-name descname"><span class="pre">completion_cb</span></code><span class="pre">)</span><span class="sig-paren">(</span><span class="pre">char</span> <span class="pre">*</span><span class="pre">str</span>, <a class="reference internal" href="#c.console_append_char_cb" title="console_append_char_cb"><span class="pre">console_append_char_cb</span></a> <span class="pre">cb</span><span class="sig-paren">)</span><a class="headerlink" href="#c.completion_cb" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
</div>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-functions">Functions</p>
<dl class="c function">
<dt id="c.console_init">
<span class="target" id="full_2include_2console_2console_8h_1ae198feb5fa066fe9ed6c59bb87d767e9"></span><span class="pre">int</span> <code class="sig-name descname"><span class="pre">console_init</span></code><span class="sig-paren">(</span><a class="reference internal" href="#c.console_rx_cb" title="console_rx_cb"><span class="pre">console_rx_cb</span></a> <em><span class="pre">rx_cb</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.console_init" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c function">
<dt id="c.console_is_init">
<span class="target" id="full_2include_2console_2console_8h_1ad39b7dd9413c3738d95d1cc38c62dcb2"></span><span class="pre">int</span> <code class="sig-name descname"><span class="pre">console_is_init</span></code><span class="sig-paren">(</span><span class="pre">void</span><span class="sig-paren">)</span><a class="headerlink" href="#c.console_is_init" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c function">
<dt id="c.console_write">
<span class="target" id="full_2include_2console_2console_8h_1af133dc4b2490178e7e7893fc254a85e0"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">console_write</span></code><span class="sig-paren">(</span><em class="property"><span class="pre">const</span></em> <span class="pre">char</span> <span class="pre">*</span><em><span class="pre">str</span></em>, <span class="pre">int</span> <em><span class="pre">cnt</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.console_write" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c function">
<dt id="c.console_read">
<span class="target" id="full_2include_2console_2console_8h_1a000fad49278baaec3848aba3fa9556cb"></span><span class="pre">int</span> <code class="sig-name descname"><span class="pre">console_read</span></code><span class="sig-paren">(</span><span class="pre">char</span> <span class="pre">*</span><em><span class="pre">str</span></em>, <span class="pre">int</span> <em><span class="pre">cnt</span></em>, <span class="pre">int</span> <span class="pre">*</span><em><span class="pre">newline</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.console_read" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c function">
<dt id="c.console_blocking_mode">
<span class="target" id="full_2include_2console_2console_8h_1af036548e29267e7b8f4a61bcbda68a35"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">console_blocking_mode</span></code><span class="sig-paren">(</span><span class="pre">void</span><span class="sig-paren">)</span><a class="headerlink" href="#c.console_blocking_mode" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c function">
<dt id="c.console_non_blocking_mode">
<span class="target" id="full_2include_2console_2console_8h_1a7bafaa5930d1f88684d4692fed11b157"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">console_non_blocking_mode</span></code><span class="sig-paren">(</span><span class="pre">void</span><span class="sig-paren">)</span><a class="headerlink" href="#c.console_non_blocking_mode" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c function">
<dt id="c.console_echo">
<span class="target" id="full_2include_2console_2console_8h_1a79a26136ccbca1d0d9c8c1e06b837cee"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">console_echo</span></code><span class="sig-paren">(</span><span class="pre">int</span> <em><span class="pre">on</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.console_echo" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c function">
<dt>
<span class="target" id="full_2include_2console_2console_8h_1a7af55dcf9e50644d903184215bd24b77"></span><code class="sig-name descname"><span class="pre">inline</span> <span class="pre">int</span> <span class="pre">console_printf</span> <span class="pre">(const</span> <span class="pre">char</span> <span class="pre">*fmt,...)</span> <span class="pre">__attribute__((format(printf</span></code></dt>
<dd></dd></dl>
<dl class="c function">
<dt>
<span class="target" id="full_2include_2console_2console_8h_1a5ca96dcb5a2435a586bc8a7ee3b22fab"></span><code class="sig-name descname"><span class="pre">int</span> <span class="pre">void</span> <span class="pre">console_set_completion_cb</span> <span class="pre">(completion_cb</span> <span class="pre">cb)</span></code></dt>
<dd></dd></dl>
<dl class="c function">
<dt id="c.console_handle_char">
<span class="target" id="full_2include_2console_2console_8h_1a3e46daa7c48f67a1ff0f221d49a597e0"></span><span class="pre">int</span> <code class="sig-name descname"><span class="pre">console_handle_char</span></code><span class="sig-paren">(</span><span class="pre">uint8_t</span> <em><span class="pre">byte</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.console_handle_char" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c function">
<dt id="c.console_line_queue_set">
<span class="target" id="full_2include_2console_2console_8h_1acf950e9737eb5309cc49bfc862d3cc5c"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">console_line_queue_set</span></code><span class="sig-paren">(</span><em class="property"><span class="pre">struct</span></em> <a class="reference internal" href="../../core_os/event_queue/event_queue.html#c.os_eventq" title="os_eventq"><span class="pre">os_eventq</span></a> <span class="pre">*</span><em><span class="pre">evq</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.console_line_queue_set" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c function">
<dt id="c.console_line_event_put">
<span class="target" id="full_2include_2console_2console_8h_1a1c29e7593be0884b8ed2d2cc46bca94e"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">console_line_event_put</span></code><span class="sig-paren">(</span><em class="property"><span class="pre">struct</span></em> <a class="reference internal" href="../../core_os/event_queue/event_queue.html#c.os_event" title="os_event"><span class="pre">os_event</span></a> <span class="pre">*</span><em><span class="pre">ev</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.console_line_event_put" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c function">
<dt id="c.console_silence">
<span class="target" id="full_2include_2console_2console_8h_1a706a087093d62f852d46cbde756e297d"></span><em class="property"><span class="pre">static</span></em> <em class="property"><span class="pre">inline</span></em> <span class="pre">void</span> <code class="sig-name descname"><span class="pre">console_silence</span></code><span class="sig-paren">(</span><span class="pre">bool</span> <em><span class="pre">silent</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.console_silence" title="Permalink to this definition"></a><br /></dt>
<dd><p>Silences console output, input is still active. </p>
<p><dl class="simple">
<dt><strong>Parameters</strong></dt><dd><ul class="breatheparameterlist simple">
<li><p><code class="docutils literal notranslate"><span class="pre">silent</span></code>: Let console know if it needs to be silent, true for silence, false otherwise </p></li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="c function">
<dt id="c.console_out">
<span class="target" id="full_2include_2console_2console_8h_1a93d5392315f991a1ce513a51170443cc"></span><span class="pre">int</span> <code class="sig-name descname"><span class="pre">console_out</span></code><span class="sig-paren">(</span><span class="pre">int</span> <em><span class="pre">character</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.console_out" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c function">
<dt id="c.console_rx_restart">
<span class="target" id="full_2include_2console_2console_8h_1af89d3b95d9cbc09fb71b71ce0b12cf97"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">console_rx_restart</span></code><span class="sig-paren">(</span><span class="pre">void</span><span class="sig-paren">)</span><a class="headerlink" href="#c.console_rx_restart" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
</div>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-variables">Variables</p>
<dl class="c var">
<dt id="c.g_silence_console">
<span class="target" id="full_2include_2console_2console_8h_1ae5f029f66511858a9b9aef0e4511c73e"></span><span class="pre">bool</span> <code class="sig-name descname"><span class="pre">g_silence_console</span></code><a class="headerlink" href="#c.g_silence_console" title="Permalink to this definition"></a><br /></dt>
<dd><p>Global indicating whether console is silent or not. </p>
</dd></dl>
<dl class="c var">
<dt id="c.console_is_midline">
<span class="target" id="full_2include_2console_2console_8h_1a99c3dc883e5262377e8ab35af6a0b25c"></span><span class="pre">int</span> <code class="sig-name descname"><span class="pre">console_is_midline</span></code><a class="headerlink" href="#c.console_is_midline" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
</div>
<dl class="c struct">
<dt id="c.console_input">
<span class="target" id="structconsole__input"></span><em class="property"><span class="pre">struct</span> </em><code class="sig-name descname"><span class="pre">console_input</span></code><a class="headerlink" href="#c.console_input" title="Permalink to this definition"></a><br /></dt>
<dd><em>#include &lt;console.h&gt;</em><p>The <a class="reference internal" href="#structconsole__input"><span class="std std-ref">console_input</span></a> data structure represents a console input buffer.</p>
<p>Each event added to the console avail_queue must have the ev_arg field point to a <a class="reference internal" href="#structconsole__input"><span class="std std-ref">console_input</span></a> structure. </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-members">Public Members</p>
<dl class="c var">
<dt id="c.console_input.line">
<span class="target" id="structconsole__input_1a430d31af9a9c1e3265cf1f1934fa2c5f"></span><span class="pre">char</span> <code class="sig-name descname"><span class="pre">line</span></code><span class="pre">[</span><code class="sig-name descname"><span class="pre">MYNEWT_VAL</span></code><span class="pre">(</span><code class="sig-name descname"><span class="pre">CONSOLE_MAX_INPUT_LEN</span></code><span class="pre">)</span><span class="pre">]</span><a class="headerlink" href="#c.console_input.line" title="Permalink to this definition"></a><br /></dt>
<dd><p>Data buffer that the console uses to save received characters until a new line is received. </p>
</dd></dl>
</div>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="rst-footer-buttons row" role="navigation" aria-label="footer navigation">
<a href="../shell/shell.html" class="btn btn-neutral float-right" title="Shell" accesskey="n">Next: Shell <span class="fa fa-arrow-circle-right"></span></a>
<a href="../stats/stats.html" class="btn btn-neutral" title="Statistics Module" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous: Statistics Module</a>
</div>
</div>
</div>
</div>
<!-- ENDS CONTENT SECTION -->
</div>
<!-- ENDS .content -->
</div>
</div>
<footer>
<div class="container">
<div class="row">
<div class="col-xs-12">
<p class="copyright">Apache Mynewt is available under Apache License, version 2.0.</p>
</div>
<div class="col-xs-12">
<div class="logos">
<img src="../../../_static/img/asf_logo_wide_small.png" alt="Apache" title="Apache">
<small class="footnote">
Apache Mynewt, Mynewt, Apache, the Apache feather logo, and the Apache Mynewt project logo are either
registered trademarks or trademarks of the Apache Software Foundation in the United States and other countries.
</small>
<a href="">
<img src="../../../_static/img/add_to_slack.png" alt="Slack Icon" title="Join our Slack Community" />
</a>
</div>
</div>
</div>
</div>
</footer>
</div>
<!-- ENDS #wrapper -->
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'latest',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
LINK_SUFFIX: '.html'
};
</script>
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<script type="text/javascript" src="../../../_static/js/bootstrap-3.0.3.min.js"></script>
<script type="text/javascript" src="../../../_static/js/affix.js"></script>
<script type="text/javascript" src="../../../_static/js/main.js"></script>
</body>
</html>