This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 66abfa1 Publishing web: feb249977349f687d40e57cfe5f0d39e5c5c71f9
docs: d1f0c71d2cd5b3bb0645951fddcb234fe65f5073
66abfa1 is described below
commit 66abfa14aff2e30fd545bf38281dee79c1fe3acc
Author: Matias <[email protected]>
AuthorDate: Thu Oct 15 22:36:18 2020 +0000
Publishing web: feb249977349f687d40e57cfe5f0d39e5c5c71f9 docs:
d1f0c71d2cd5b3bb0645951fddcb234fe65f5073
---
.../components/drivers/character/timer.rst.txt | 315 ++++++++++++++++++
.../latest/components/drivers/character/index.html | 7 +-
.../latest/components/drivers/character/timer.html | 357 +++++++++++++++++++++
content/docs/latest/genindex.html | 32 +-
content/docs/latest/index.html | 2 +-
content/docs/latest/objects.inv | Bin 19662 -> 19891 bytes
content/docs/latest/searchindex.js | 2 +-
content/feed.xml | 4 +-
8 files changed, 710 insertions(+), 9 deletions(-)
diff --git
a/content/docs/latest/_sources/components/drivers/character/timer.rst.txt
b/content/docs/latest/_sources/components/drivers/character/timer.rst.txt
index 6f2a90e..7710def 100644
--- a/content/docs/latest/_sources/components/drivers/character/timer.rst.txt
+++ b/content/docs/latest/_sources/components/drivers/character/timer.rst.txt
@@ -16,3 +16,318 @@ locations:
reside in ``arch/``\ *<architecture>*\ ``/src/``\ *<hardware>*
directory for the specific processor *<architecture>* and for
the specific *<chip>* timer peripheral devices.
+
+There are two ways to enable Timer Support along with the Timer Example. The
first is faster and simpler. Just run the following command to use a ready
config file with timer support and example included. You need to check if
there's a timer config file for your specific chip. You may check it at the
specific board's path: ``/boards/<arch>/<chip>/<variant>/config``.
+
+.. code-block:: console
+
+ $ ./tools/configure.sh <variant>:timer
+
+And the second way is creating your own config file. To do so, follow the next
instructions.
+
+Enabling the Timer Support and Example in ``menuconfing``
+----------------------------------------------------------
+
+ 1. Select Timer Instances
+
+ To select these timers browse in the ``menuconfig`` using the following path:
+
+ Go into menu :menuselection:`System Type --> <Chip> Peripheral Selection`
and press :kbd:`Enter`.
+
+ Then select one or more timers according to availability.
+
+ 2. Enable the Timer Support
+
+ Go into menu :menuselection:`Device Drivers --> Timer Driver Support` and
press :kbd:`Enter`. Then enable:
+
+ - [x] Timer Support
+ - [x] Timer Arch Implementation
+
+ 3. Include the Timer Example
+
+ Go into menu :menuselection:`Application Configuration --> Examples` and
press :kbd:`Enter`. Then select the Timer Example.
+
+ - [x] Timer example
+
+ Below the option, it is possible to manually configure some parameters as
the standard timer device path, the timeout, the sample rate in which the
counter will be read, the number of samples to be executed, and other
parameters.
+
+Timer Example
+--------------
+
+The previously selected example will basically consult the timer status, set a
timer alarm interval, set a timer signal handler function to be notified at the
alarm, which only increments a variable, and then it will start the timer. The
application will periodically consult the timer status at the sample rate
previously configured through the ``menuconfig`` to follow the time left until
the timer expires. After the samples have been read, the application stops de
timer.
+
+The `example code
<https://github.com/apache/incubator-nuttx-apps/blob/master/examples/timer/timer_main.c#ref-example>`_
may be explored, its path is at ``/examples/timer/timer_main.c`` in the apps'
repository.
+
+In NuttX, the timer driver is a character driver and when a chip supports
multiple timers, each one is accessible through its respective file in ``/dev``
directory. Each timer is registered using a unique numeric identifier (i.e.
``/dev/timer0``, ``/dev/timer1``, ...).
+
+Use the following command to run the example:
+
+.. code-block:: console
+
+ `nsh> timer`
+
+This command will use the timer 0. To use the others, specify it through a
parameter (where x is the timer number):
+
+.. code-block:: console
+
+ `nsh> timer -d /dev/timerx`
+
+Application Level Interface
+----------------------------
+
+The first necessary thing to be done in order to use the timer driver in an
application is to include the header file for the NuttX timer driver. It
contains the Application Level Interface to the timer driver. To do so, include:
+
+.. code-block:: c
+
+ #include <nuttx/timers/timer.h>
+
+
+At an application level, the timer functionalities may be accessed through
``ioctl`` systems calls. The available ``ioctl`` commands are:
+
+.. c:macro:: TCIOC_START
+.. c:macro:: TCIOC_STOP
+.. c:macro:: TCIOC_GETSTATUS
+.. c:macro:: TCIOC_SETTIMEOUT
+.. c:macro:: TCIOC_NOTIFICATION
+.. c:macro:: TCIOC_MAXTIMEOUT
+
+These ``ioctl`` commands internally call lower-half layer operations and the
parameters are forwarded to these ops through the ``ioctl`` system call. The
return of a system call is the return of an operation.
+These ``struct timer_ops_s`` keeps pointers to the implementation of each
operation. Following is the struct.
+
+.. c:struct:: timer_ops_s
+.. code-block:: c
+
+ struct timer_ops_s
+ {
+ /* Required methods
*******************************************************/
+
+ /* Start the timer, resetting the time to the current timeout */
+
+ CODE int (*start)(FAR struct timer_lowerhalf_s *lower);
+
+ /* Stop the timer */
+
+ CODE int (*stop)(FAR struct timer_lowerhalf_s *lower);
+
+ /* Get the current timer status */
+
+ CODE int (*getstatus)(FAR struct timer_lowerhalf_s *lower,
+ FAR struct timer_status_s *status);
+
+ /* Set a new timeout value (and reset the timer) */
+
+ CODE int (*settimeout)(FAR struct timer_lowerhalf_s *lower,
+ uint32_t timeout);
+
+ /* Call the NuttX INTERNAL timeout callback on timeout.
+ * NOTE: Providing callback==NULL disable.
+ * NOT to call back into applications.
+ */
+
+ CODE void (*setcallback)(FAR struct timer_lowerhalf_s *lower,
+ CODE tccb_t callback, FAR void *arg);
+
+ /* Any ioctl commands that are not recognized by the "upper-half" driver
+ * are forwarded to the lower half driver through this method.
+ */
+
+ CODE int (*ioctl)(FAR struct timer_lowerhalf_s *lower, int cmd,
+ unsigned long arg);
+
+ /* Get the maximum supported timeout value */
+
+ CODE int (*maxtimeout)(FAR struct timer_lowerhalf_s *lower,
+ FAR uint32_t *maxtimeout);
+ };
+
+
+
+Since ``ioctl`` system calls expect a file descriptor, before using these
commands, it's necessary to open the timer device special file in order to get
a file descriptor. The following snippet demonstrates how to do so:
+
+.. code-block:: c
+
+ /* Open the timer device */
+
+ printf("Open %s\n", devname);
+
+ fd = open(devname, O_RDONLY);
+ if (fd < 0)
+ {
+ fprintf(stderr, "ERROR: Failed to open %s: %d\n",
+ devname, errno);
+ return EXIT_FAILURE;
+ }
+
+.. c:macro:: TCIOC_START
+
+The ``TCIOC_START`` command calls the ``start`` operation, which is described
below.
+
+.. c:function:: int start(void)
+
+ The start operation configures the timer, enables the interrupt if
``TCIOC_NOTIFICATION`` has already been called and finally starts the timer.
+
+ :return: A Linux System Error Code for failing or 0 for success.
+
+This command may be used like so:
+
+.. code-block:: c
+
+ /* Start the timer */
+
+ printf("Start the timer\n");
+
+ ret = ioctl(fd, TCIOC_START, 0);
+ if (ret < 0)
+ {
+ fprintf(stderr, "ERROR: Failed to start the timer: %d\n", errno);
+ close(fd);
+ return EXIT_FAILURE;
+ }
+
+.. c:macro:: TCIOC_STOP
+
+The ``TCIOC_STOP`` command calls the ``stop`` operation, which is described
below.
+
+.. c:function:: int stop(void)
+
+ The stop operation stops the timer and disables the interrupt.
+
+ :return: A Linux System Error Code for failing or 0 for success.
+
+This command may be used like so:
+
+.. code-block:: c
+
+ /* Stop the timer */
+
+ printf("\nStop the timer\n");
+
+ ret = ioctl(fd, TCIOC_STOP, 0);
+ if (ret < 0)
+ {
+ fprintf(stderr, "ERROR: Failed to stop the timer: %d\n", errno);
+ close(fd);
+ return EXIT_FAILURE;
+ }
+
+.. c:macro:: TCIOC_GETSTATUS
+
+The ``TCIOC_GETSTATUS`` command calls the ``getstatus`` operation, which is
described below.
+
+.. c:function:: int getstatus(FAR struct timer_status_s *status)
+
+ The getstatus operation gathers the timer's current information.
+
+ :param status: A writable pointer to a struct ``timer_status_s``. This
struct contains 3 fields: ``flags`` (``uint32_t``), ``timeout`` (``uint32_t``)
and ``timeleft`` (``uint32_t``). Bit 0 from `flags` indicates the timer's
status, 1 indicates that the timer is running, zero it is stopped. Bit 1 from
`flags` indicates if there's a callback registered. The `timeout` indicates the
time interval that was configured to trigger an alarm, it is in microseconds.
The `timeleft` interval indica [...]
+
+ :return: A Linux System Error Code for failing or 0 for success.
+
+This command may be used like so:
+
+.. code-block:: c
+
+ /* Get timer status */
+
+ ret = ioctl(fd, TCIOC_GETSTATUS, (unsigned long)((uintptr_t)&status));
+ if (ret < 0)
+ {
+ fprintf(stderr, "ERROR: Failed to get timer status: %d\n", errno);
+ close(fd);
+ exit(EXIT_FAILURE);
+ }
+
+ /* Print the timer status */
+
+ printf(" flags: %08lx timeout: %lu timeleft: %lu\n",
+ (unsigned long)status.flags, (unsigned long)status.timeout,
+ (unsigned long)status.timeleft);
+
+.. c:macro:: TCIOC_SETTIMEOUT
+
+The ``TCIOC_SETTIMEOUT`` command calls the ``settimeout`` operation, which is
described below.
+
+.. c:function:: int settimeout(uint32_t timeout)
+
+ The getstatus operation sets a timeout interval to trigger the alarm and
then trigger an interrupt. It defines the timer interval in which the handler
will be called.
+
+ :param timeout: An argument of type ``uint32_t`` with the timeout value in
microseconds.
+
+ :return: A Linux System Error Code for failing or 0 for success.
+
+This command may be used like so:
+
+.. code-block:: c
+
+ /* Set the timer interval */
+
+ printf("Set timer interval to %lu\n",
+ (unsigned long)CONFIG_EXAMPLES_TIMER_INTERVAL);
+
+ ret = ioctl(fd, TCIOC_SETTIMEOUT, CONFIG_EXAMPLES_TIMER_INTERVAL);
+ if (ret < 0)
+ {
+ fprintf(stderr, "ERROR: Failed to set the timer interval: %d\n", errno);
+ close(fd);
+ return EXIT_FAILURE;
+ }
+
+.. c:macro:: TCIOC_NOTIFICATION
+
+The ``TCIOC_NOTIFICATION`` is used to configure the timer callback to notify
the application via a signal when the timer expires. This command calls the
``setcallback`` operation. Which will not be described here, since the
application does not set a callback directly. Instead, the user should
configure a signal handler to catch notifications, and then, configure a timer
notifier to notify and to signal the previously configured signal handler. For
a better performance, a separate pthrea [...]
+
+In any case, this command expects a read-only pointer to a struct
`timer_notify_s`. This struct contains 2 fields: ``pid`` (``pid_t``), that
indicates the ID of the task/thread to receive the signal and ``event``
(``struct sigevent``), which describes the way a task will be notified.
+
+This command may be used like so:
+
+.. code-block:: c
+
+ printf("Configure the notification\n");
+
+ notify.pid = getpid();
+ notify.event.sigev_notify = SIGEV_SIGNAL;
+ notify.event.sigev_signo = CONFIG_EXAMPLES_TIMER_SIGNO;
+ notify.event.sigev_value.sival_ptr = NULL;
+
+ ret = ioctl(fd, TCIOC_NOTIFICATION, (unsigned long)((uintptr_t)¬ify));
+ if (ret < 0)
+ {
+ fprintf(stderr, "ERROR: Failed to set the timer handler: %d\n", errno);
+ close(fd);
+ return EXIT_FAILURE;
+ }
+
+
+.. c:macro:: TCIOC_MAXTIMEOUT
+
+The ``TCIOC_MAXTIMEOUT`` command calls the ``maxtimeout`` operation, which is
described below.
+
+.. c:function:: int maxtimeout(uint32_t *status)
+
+ The maxtimeout operation gets the maximum timeout value that can be
configured.
+
+ :param maxtimeout: A writable pointer to a variable of ``uint32_t`` type in
which the value will be stored.
+ :return: A Linux System Error Code for failing or 0 for success.
+
+This command may be used like so:
+
+.. code-block:: c
+
+ /* Get the maximum timer timeout */
+
+ printf("Get the maximum timer timeout\n");
+
+ ret = ioctl(fd, TCIOC_MAXTIMEOUT, (uint32_t*)(&max_timeout));
+ if (ret < 0)
+ {
+ fprintf(stderr, "ERROR: Failed to reat the timer's maximum timeout:
%d\n", errno);
+ close(fd);
+ return EXIT_FAILURE;
+ }
+
+ /* Print the maximum supported timeout */
+
+ printf("Maximum supported timeout: %" PRIu32 "\n", max_timeout);
+
+
+Those snippets were taken from the Example which provides a great resource to
demonstrate how to use those ``ioctl`` commands.
+
diff --git a/content/docs/latest/components/drivers/character/index.html
b/content/docs/latest/components/drivers/character/index.html
index 57cb9a1..284988f 100644
--- a/content/docs/latest/components/drivers/character/index.html
+++ b/content/docs/latest/components/drivers/character/index.html
@@ -286,7 +286,12 @@ documented in the following paragraphs.</p>
<li class="toctree-l1"><a class="reference internal" href="pwm.html">PWM
Drivers</a></li>
<li class="toctree-l1"><a class="reference internal" href="can.html">CAN
Drivers</a></li>
<li class="toctree-l1"><a class="reference internal"
href="quadrature.html">Quadrature Encoder Drivers</a></li>
-<li class="toctree-l1"><a class="reference internal" href="timer.html">Timer
Drivers</a></li>
+<li class="toctree-l1"><a class="reference internal" href="timer.html">Timer
Drivers</a><ul>
+<li class="toctree-l2"><a class="reference internal"
href="timer.html#enabling-the-timer-support-and-example-in-menuconfing">Enabling
the Timer Support and Example in <code class="docutils literal
notranslate"><span class="pre">menuconfing</span></code></a></li>
+<li class="toctree-l2"><a class="reference internal"
href="timer.html#timer-example">Timer Example</a></li>
+<li class="toctree-l2"><a class="reference internal"
href="timer.html#application-level-interface">Application Level
Interface</a></li>
+</ul>
+</li>
<li class="toctree-l1"><a class="reference internal" href="rtc.html">RTC
Drivers</a></li>
<li class="toctree-l1"><a class="reference internal"
href="watchdog.html">Watchdog Timer Drivers</a></li>
<li class="toctree-l1"><a class="reference internal"
href="keypad.html">Keyboard/Keypad Drivers</a></li>
diff --git a/content/docs/latest/components/drivers/character/timer.html
b/content/docs/latest/components/drivers/character/timer.html
index 8bae878..1f5217c 100644
--- a/content/docs/latest/components/drivers/character/timer.html
+++ b/content/docs/latest/components/drivers/character/timer.html
@@ -249,6 +249,363 @@ reside in <code class="docutils literal
notranslate"><span class="pre">arch/</sp
directory for the specific processor <em><architecture></em> and for
the specific <em><chip></em> timer peripheral devices.</p></li>
</ul>
+<p>There are two ways to enable Timer Support along with the Timer Example.
The first is faster and simpler. Just run the following command to use a ready
config file with timer support and example included. You need to check if
there’s a timer config file for your specific chip. You may check it at the
specific board’s path: <code class="docutils literal notranslate"><span
class="pre">/boards/<arch>/<chip>/<variant>/config</span></code>.</p>
+<div class="highlight-console notranslate"><div
class="highlight"><pre><span></span><span class="gp">$</span>
./tools/configure.sh <variant>:timer
+</pre></div>
+</div>
+<p>And the second way is creating your own config file. To do so, follow the
next instructions.</p>
+<div class="section"
id="enabling-the-timer-support-and-example-in-menuconfing">
+<h2>Enabling the Timer Support and Example in <code class="docutils literal
notranslate"><span class="pre">menuconfing</span></code><a class="headerlink"
href="#enabling-the-timer-support-and-example-in-menuconfing" title="Permalink
to this headline">¶</a></h2>
+<blockquote>
+<div><blockquote>
+<div><ol class="arabic simple">
+<li><p>Select Timer Instances</p></li>
+</ol>
+</div></blockquote>
+<p>To select these timers browse in the <code class="docutils literal
notranslate"><span class="pre">menuconfig</span></code> using the following
path:</p>
+<blockquote>
+<div><p>Go into menu <span class="menuselection">System Type ‣ <Chip>
Peripheral Selection</span> and press <kbd class="kbd docutils literal
notranslate">Enter</kbd>.</p>
+<p>Then select one or more timers according to availability.</p>
+<ol class="arabic simple" start="2">
+<li><p>Enable the Timer Support</p></li>
+</ol>
+<p>Go into menu <span class="menuselection">Device Drivers ‣ Timer Driver
Support</span> and press <kbd class="kbd docutils literal
notranslate">Enter</kbd>. Then enable:</p>
+<ul class="simple">
+<li><p>[x] Timer Support</p></li>
+<li><p>[x] Timer Arch Implementation</p></li>
+</ul>
+<ol class="arabic simple" start="3">
+<li><p>Include the Timer Example</p></li>
+</ol>
+<p>Go into menu <span class="menuselection">Application Configuration ‣
Examples</span> and press <kbd class="kbd docutils literal
notranslate">Enter</kbd>. Then select the Timer Example.</p>
+<ul class="simple">
+<li><p>[x] Timer example</p></li>
+</ul>
+<p>Below the option, it is possible to manually configure some parameters as
the standard timer device path, the timeout, the sample rate in which the
counter will be read, the number of samples to be executed, and other
parameters.</p>
+</div></blockquote>
+</div></blockquote>
+</div>
+<div class="section" id="timer-example">
+<h2>Timer Example<a class="headerlink" href="#timer-example" title="Permalink
to this headline">¶</a></h2>
+<p>The previously selected example will basically consult the timer status,
set a timer alarm interval, set a timer signal handler function to be notified
at the alarm, which only increments a variable, and then it will start the
timer. The application will periodically consult the timer status at the sample
rate previously configured through the <code class="docutils literal
notranslate"><span class="pre">menuconfig</span></code> to follow the time left
until the timer expires. After th [...]
+<p>The <a class="reference external"
href="https://github.com/apache/incubator-nuttx-apps/blob/master/examples/timer/timer_main.c#ref-example">example
code</a> may be explored, its path is at <code class="docutils literal
notranslate"><span class="pre">/examples/timer/timer_main.c</span></code> in
the apps’ repository.</p>
+<p>In NuttX, the timer driver is a character driver and when a chip supports
multiple timers, each one is accessible through its respective file in <code
class="docutils literal notranslate"><span class="pre">/dev</span></code>
directory. Each timer is registered using a unique numeric identifier (i.e.
<code class="docutils literal notranslate"><span
class="pre">/dev/timer0</span></code>, <code class="docutils literal
notranslate"><span class="pre">/dev/timer1</span></code>, …).</p>
+<p>Use the following command to run the example:</p>
+<div class="highlight-console notranslate"><div
class="highlight"><pre><span></span><span class="go">`nsh> timer`</span>
+</pre></div>
+</div>
+<p>This command will use the timer 0. To use the others, specify it through a
parameter (where x is the timer number):</p>
+<div class="highlight-console notranslate"><div
class="highlight"><pre><span></span><span class="go">`nsh> timer -d
/dev/timerx`</span>
+</pre></div>
+</div>
+</div>
+<div class="section" id="application-level-interface">
+<h2>Application Level Interface<a class="headerlink"
href="#application-level-interface" title="Permalink to this
headline">¶</a></h2>
+<p>The first necessary thing to be done in order to use the timer driver in an
application is to include the header file for the NuttX timer driver. It
contains the Application Level Interface to the timer driver. To do so,
include:</p>
+<div class="highlight-c notranslate"><div
class="highlight"><pre><span></span><span class="cp">#include</span> <span
class="cpf"><nuttx/timers/timer.h></span><span class="cp"></span>
+</pre></div>
+</div>
+<p>At an application level, the timer functionalities may be accessed through
<code class="docutils literal notranslate"><span
class="pre">ioctl</span></code> systems calls. The available <code
class="docutils literal notranslate"><span class="pre">ioctl</span></code>
commands are:</p>
+<dl class="c macro">
+<dt id="c.TCIOC_START">
+<code class="sig-name descname">TCIOC_START</code><a class="headerlink"
href="#c.TCIOC_START" title="Permalink to this definition">¶</a><br /></dt>
+<dd></dd></dl>
+
+<dl class="c macro">
+<dt id="c.TCIOC_STOP">
+<code class="sig-name descname">TCIOC_STOP</code><a class="headerlink"
href="#c.TCIOC_STOP" title="Permalink to this definition">¶</a><br /></dt>
+<dd></dd></dl>
+
+<dl class="c macro">
+<dt id="c.TCIOC_GETSTATUS">
+<code class="sig-name descname">TCIOC_GETSTATUS</code><a class="headerlink"
href="#c.TCIOC_GETSTATUS" title="Permalink to this definition">¶</a><br /></dt>
+<dd></dd></dl>
+
+<dl class="c macro">
+<dt id="c.TCIOC_SETTIMEOUT">
+<code class="sig-name descname">TCIOC_SETTIMEOUT</code><a class="headerlink"
href="#c.TCIOC_SETTIMEOUT" title="Permalink to this definition">¶</a><br /></dt>
+<dd></dd></dl>
+
+<dl class="c macro">
+<dt id="c.TCIOC_NOTIFICATION">
+<code class="sig-name descname">TCIOC_NOTIFICATION</code><a class="headerlink"
href="#c.TCIOC_NOTIFICATION" title="Permalink to this definition">¶</a><br
/></dt>
+<dd></dd></dl>
+
+<dl class="c macro">
+<dt id="c.TCIOC_MAXTIMEOUT">
+<code class="sig-name descname">TCIOC_MAXTIMEOUT</code><a class="headerlink"
href="#c.TCIOC_MAXTIMEOUT" title="Permalink to this definition">¶</a><br /></dt>
+<dd></dd></dl>
+
+<p>These <code class="docutils literal notranslate"><span
class="pre">ioctl</span></code> commands internally call lower-half layer
operations and the parameters are forwarded to these ops through the <code
class="docutils literal notranslate"><span class="pre">ioctl</span></code>
system call. The return of a system call is the return of an operation.
+These <code class="docutils literal notranslate"><span
class="pre">struct</span> <span class="pre">timer_ops_s</span></code> keeps
pointers to the implementation of each operation. Following is the struct.</p>
+<dl class="c struct">
+<dt id="c.timer_ops_s">
+<em class="property">struct </em><code class="sig-name
descname">timer_ops_s</code><a class="headerlink" href="#c.timer_ops_s"
title="Permalink to this definition">¶</a><br /></dt>
+<dd></dd></dl>
+
+<div class="highlight-c notranslate"><div
class="highlight"><pre><span></span><span class="k">struct</span> <span
class="n">timer_ops_s</span>
+<span class="p">{</span>
+ <span class="cm">/* Required methods
*******************************************************/</span>
+
+ <span class="cm">/* Start the timer, resetting the time to the current
timeout */</span>
+
+ <span class="n">CODE</span> <span class="kt">int</span> <span
class="p">(</span><span class="o">*</span><span class="n">start</span><span
class="p">)(</span><span class="n">FAR</span> <span class="k">struct</span>
<span class="n">timer_lowerhalf_s</span> <span class="o">*</span><span
class="n">lower</span><span class="p">);</span>
+
+ <span class="cm">/* Stop the timer */</span>
+
+ <span class="n">CODE</span> <span class="nf">int</span> <span
class="p">(</span><span class="o">*</span><span class="n">stop</span><span
class="p">)(</span><span class="n">FAR</span> <span class="k">struct</span>
<span class="n">timer_lowerhalf_s</span> <span class="o">*</span><span
class="n">lower</span><span class="p">);</span>
+
+ <span class="cm">/* Get the current timer status */</span>
+
+ <span class="n">CODE</span> <span class="nf">int</span> <span
class="p">(</span><span class="o">*</span><span class="n">getstatus</span><span
class="p">)(</span><span class="n">FAR</span> <span class="k">struct</span>
<span class="n">timer_lowerhalf_s</span> <span class="o">*</span><span
class="n">lower</span><span class="p">,</span>
+ <span class="n">FAR</span> <span
class="k">struct</span> <span class="n">timer_status_s</span> <span
class="o">*</span><span class="n">status</span><span class="p">);</span>
+
+ <span class="cm">/* Set a new timeout value (and reset the timer) */</span>
+
+ <span class="n">CODE</span> <span class="nf">int</span> <span
class="p">(</span><span class="o">*</span><span
class="n">settimeout</span><span class="p">)(</span><span class="n">FAR</span>
<span class="k">struct</span> <span class="n">timer_lowerhalf_s</span> <span
class="o">*</span><span class="n">lower</span><span class="p">,</span>
+ <span class="kt">uint32_t</span> <span
class="n">timeout</span><span class="p">);</span>
+
+ <span class="cm">/* Call the NuttX INTERNAL timeout callback on
timeout.</span>
+<span class="cm"> * NOTE: Providing callback==NULL disable.</span>
+<span class="cm"> * NOT to call back into applications.</span>
+<span class="cm"> */</span>
+
+ <span class="n">CODE</span> <span class="nf">void</span> <span
class="p">(</span><span class="o">*</span><span
class="n">setcallback</span><span class="p">)(</span><span class="n">FAR</span>
<span class="k">struct</span> <span class="n">timer_lowerhalf_s</span> <span
class="o">*</span><span class="n">lower</span><span class="p">,</span>
+ <span class="n">CODE</span> <span
class="n">tccb_t</span> <span class="n">callback</span><span class="p">,</span>
<span class="n">FAR</span> <span class="kt">void</span> <span
class="o">*</span><span class="n">arg</span><span class="p">);</span>
+
+ <span class="cm">/* Any ioctl commands that are not recognized by the
"upper-half" driver</span>
+<span class="cm"> * are forwarded to the lower half driver through this
method.</span>
+<span class="cm"> */</span>
+
+ <span class="n">CODE</span> <span class="nf">int</span> <span
class="p">(</span><span class="o">*</span><span class="n">ioctl</span><span
class="p">)(</span><span class="n">FAR</span> <span class="k">struct</span>
<span class="n">timer_lowerhalf_s</span> <span class="o">*</span><span
class="n">lower</span><span class="p">,</span> <span class="kt">int</span>
<span class="n">cmd</span><span class="p">,</span>
+ <span class="kt">unsigned</span> <span
class="kt">long</span> <span class="n">arg</span><span class="p">);</span>
+
+ <span class="cm">/* Get the maximum supported timeout value */</span>
+
+ <span class="n">CODE</span> <span class="nf">int</span> <span
class="p">(</span><span class="o">*</span><span
class="n">maxtimeout</span><span class="p">)(</span><span class="n">FAR</span>
<span class="k">struct</span> <span class="n">timer_lowerhalf_s</span> <span
class="o">*</span><span class="n">lower</span><span class="p">,</span>
+ <span class="n">FAR</span> <span
class="kt">uint32_t</span> <span class="o">*</span><span
class="n">maxtimeout</span><span class="p">);</span>
+<span class="p">};</span>
+</pre></div>
+</div>
+<p>Since <code class="docutils literal notranslate"><span
class="pre">ioctl</span></code> system calls expect a file descriptor, before
using these commands, it’s necessary to open the timer device special file in
order to get a file descriptor. The following snippet demonstrates how to do
so:</p>
+<div class="highlight-c notranslate"><div
class="highlight"><pre><span></span><span class="cm">/* Open the timer device
*/</span>
+
+<span class="n">printf</span><span class="p">(</span><span
class="s">"Open %s</span><span class="se">\n</span><span
class="s">"</span><span class="p">,</span> <span
class="n">devname</span><span class="p">);</span>
+
+<span class="n">fd</span> <span class="o">=</span> <span
class="n">open</span><span class="p">(</span><span
class="n">devname</span><span class="p">,</span> <span
class="n">O_RDONLY</span><span class="p">);</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">fd</span>
<span class="o"><</span> <span class="mi">0</span><span class="p">)</span>
+ <span class="p">{</span>
+ <span class="n">fprintf</span><span class="p">(</span><span
class="n">stderr</span><span class="p">,</span> <span class="s">"ERROR:
Failed to open %s: %d</span><span class="se">\n</span><span
class="s">"</span><span class="p">,</span>
+ <span class="n">devname</span><span class="p">,</span> <span
class="n">errno</span><span class="p">);</span>
+ <span class="k">return</span> <span class="n">EXIT_FAILURE</span><span
class="p">;</span>
+ <span class="p">}</span>
+</pre></div>
+</div>
+<dl class="c macro">
+<dt>
+<code class="sig-name descname">TCIOC_START</code><br /></dt>
+<dd></dd></dl>
+
+<p>The <code class="docutils literal notranslate"><span
class="pre">TCIOC_START</span></code> command calls the <code class="docutils
literal notranslate"><span class="pre">start</span></code> operation, which is
described below.</p>
+<dl class="c function">
+<dt id="c.start">
+int <code class="sig-name descname">start</code><span
class="sig-paren">(</span>void<span class="sig-paren">)</span><a
class="headerlink" href="#c.start" title="Permalink to this
definition">¶</a><br /></dt>
+<dd><p>The start operation configures the timer, enables the interrupt if
<code class="docutils literal notranslate"><span
class="pre">TCIOC_NOTIFICATION</span></code> has already been called and
finally starts the timer.</p>
+<dl class="field-list simple">
+<dt class="field-odd">Returns</dt>
+<dd class="field-odd"><p>A Linux System Error Code for failing or 0 for
success.</p>
+</dd>
+</dl>
+</dd></dl>
+
+<p>This command may be used like so:</p>
+<div class="highlight-c notranslate"><div
class="highlight"><pre><span></span><span class="cm">/* Start the timer
*/</span>
+
+<span class="n">printf</span><span class="p">(</span><span
class="s">"Start the timer</span><span class="se">\n</span><span
class="s">"</span><span class="p">);</span>
+
+<span class="n">ret</span> <span class="o">=</span> <span
class="n">ioctl</span><span class="p">(</span><span class="n">fd</span><span
class="p">,</span> <span class="n">TCIOC_START</span><span class="p">,</span>
<span class="mi">0</span><span class="p">);</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">ret</span>
<span class="o"><</span> <span class="mi">0</span><span class="p">)</span>
+ <span class="p">{</span>
+ <span class="n">fprintf</span><span class="p">(</span><span
class="n">stderr</span><span class="p">,</span> <span class="s">"ERROR:
Failed to start the timer: %d</span><span class="se">\n</span><span
class="s">"</span><span class="p">,</span> <span
class="n">errno</span><span class="p">);</span>
+ <span class="n">close</span><span class="p">(</span><span
class="n">fd</span><span class="p">);</span>
+ <span class="k">return</span> <span class="n">EXIT_FAILURE</span><span
class="p">;</span>
+ <span class="p">}</span>
+</pre></div>
+</div>
+<dl class="c macro">
+<dt>
+<code class="sig-name descname">TCIOC_STOP</code><br /></dt>
+<dd></dd></dl>
+
+<p>The <code class="docutils literal notranslate"><span
class="pre">TCIOC_STOP</span></code> command calls the <code class="docutils
literal notranslate"><span class="pre">stop</span></code> operation, which is
described below.</p>
+<dl class="c function">
+<dt id="c.stop">
+int <code class="sig-name descname">stop</code><span
class="sig-paren">(</span>void<span class="sig-paren">)</span><a
class="headerlink" href="#c.stop" title="Permalink to this definition">¶</a><br
/></dt>
+<dd><p>The stop operation stops the timer and disables the interrupt.</p>
+<dl class="field-list simple">
+<dt class="field-odd">Returns</dt>
+<dd class="field-odd"><p>A Linux System Error Code for failing or 0 for
success.</p>
+</dd>
+</dl>
+</dd></dl>
+
+<p>This command may be used like so:</p>
+<div class="highlight-c notranslate"><div
class="highlight"><pre><span></span><span class="cm">/* Stop the timer */</span>
+
+<span class="n">printf</span><span class="p">(</span><span
class="s">"</span><span class="se">\n</span><span class="s">Stop the
timer</span><span class="se">\n</span><span class="s">"</span><span
class="p">);</span>
+
+<span class="n">ret</span> <span class="o">=</span> <span
class="n">ioctl</span><span class="p">(</span><span class="n">fd</span><span
class="p">,</span> <span class="n">TCIOC_STOP</span><span class="p">,</span>
<span class="mi">0</span><span class="p">);</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">ret</span>
<span class="o"><</span> <span class="mi">0</span><span class="p">)</span>
+ <span class="p">{</span>
+ <span class="n">fprintf</span><span class="p">(</span><span
class="n">stderr</span><span class="p">,</span> <span class="s">"ERROR:
Failed to stop the timer: %d</span><span class="se">\n</span><span
class="s">"</span><span class="p">,</span> <span
class="n">errno</span><span class="p">);</span>
+ <span class="n">close</span><span class="p">(</span><span
class="n">fd</span><span class="p">);</span>
+ <span class="k">return</span> <span class="n">EXIT_FAILURE</span><span
class="p">;</span>
+ <span class="p">}</span>
+</pre></div>
+</div>
+<dl class="c macro">
+<dt>
+<code class="sig-name descname">TCIOC_GETSTATUS</code><br /></dt>
+<dd></dd></dl>
+
+<p>The <code class="docutils literal notranslate"><span
class="pre">TCIOC_GETSTATUS</span></code> command calls the <code
class="docutils literal notranslate"><span class="pre">getstatus</span></code>
operation, which is described below.</p>
+<dl class="c function">
+<dt id="c.getstatus">
+int <code class="sig-name descname">getstatus</code><span
class="sig-paren">(</span>FAR <em class="property">struct</em> timer_status_s
*<em>status</em><span class="sig-paren">)</span><a class="headerlink"
href="#c.getstatus" title="Permalink to this definition">¶</a><br /></dt>
+<dd><p>The getstatus operation gathers the timer’s current information.</p>
+<dl class="field-list simple">
+<dt class="field-odd">Parameters</dt>
+<dd class="field-odd"><ul class="simple">
+<li><p><strong>status</strong> – A writable pointer to a struct <code
class="docutils literal notranslate"><span
class="pre">timer_status_s</span></code>. This struct contains 3 fields: <code
class="docutils literal notranslate"><span class="pre">flags</span></code>
(<code class="docutils literal notranslate"><span
class="pre">uint32_t</span></code>), <code class="docutils literal
notranslate"><span class="pre">timeout</span></code> (<code class="docutils
literal notranslate"><span class [...]
+</ul>
+</dd>
+<dt class="field-even">Returns</dt>
+<dd class="field-even"><p>A Linux System Error Code for failing or 0 for
success.</p>
+</dd>
+</dl>
+</dd></dl>
+
+<p>This command may be used like so:</p>
+<div class="highlight-c notranslate"><div
class="highlight"><pre><span></span><span class="cm">/* Get timer status
*/</span>
+
+<span class="n">ret</span> <span class="o">=</span> <span
class="n">ioctl</span><span class="p">(</span><span class="n">fd</span><span
class="p">,</span> <span class="n">TCIOC_GETSTATUS</span><span
class="p">,</span> <span class="p">(</span><span class="kt">unsigned</span>
<span class="kt">long</span><span class="p">)((</span><span
class="kt">uintptr_t</span><span class="p">)</span><span
class="o">&</span><span class="n">status</span><span class="p">));</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">ret</span>
<span class="o"><</span> <span class="mi">0</span><span class="p">)</span>
+ <span class="p">{</span>
+ <span class="n">fprintf</span><span class="p">(</span><span
class="n">stderr</span><span class="p">,</span> <span class="s">"ERROR:
Failed to get timer status: %d</span><span class="se">\n</span><span
class="s">"</span><span class="p">,</span> <span
class="n">errno</span><span class="p">);</span>
+ <span class="n">close</span><span class="p">(</span><span
class="n">fd</span><span class="p">);</span>
+ <span class="n">exit</span><span class="p">(</span><span
class="n">EXIT_FAILURE</span><span class="p">);</span>
+ <span class="p">}</span>
+
+<span class="cm">/* Print the timer status */</span>
+
+<span class="n">printf</span><span class="p">(</span><span class="s">"
flags: %08lx timeout: %lu timeleft: %lu</span><span class="se">\n</span><span
class="s">"</span><span class="p">,</span>
+ <span class="p">(</span><span class="kt">unsigned</span> <span
class="kt">long</span><span class="p">)</span><span
class="n">status</span><span class="p">.</span><span
class="n">flags</span><span class="p">,</span> <span class="p">(</span><span
class="kt">unsigned</span> <span class="kt">long</span><span
class="p">)</span><span class="n">status</span><span class="p">.</span><span
class="n">timeout</span><span class="p">,</span>
+ <span class="p">(</span><span class="kt">unsigned</span> <span
class="kt">long</span><span class="p">)</span><span
class="n">status</span><span class="p">.</span><span
class="n">timeleft</span><span class="p">);</span>
+</pre></div>
+</div>
+<dl class="c macro">
+<dt>
+<code class="sig-name descname">TCIOC_SETTIMEOUT</code><br /></dt>
+<dd></dd></dl>
+
+<p>The <code class="docutils literal notranslate"><span
class="pre">TCIOC_SETTIMEOUT</span></code> command calls the <code
class="docutils literal notranslate"><span class="pre">settimeout</span></code>
operation, which is described below.</p>
+<dl class="c function">
+<dt id="c.settimeout">
+int <code class="sig-name descname">settimeout</code><span
class="sig-paren">(</span>uint32_t <em>timeout</em><span
class="sig-paren">)</span><a class="headerlink" href="#c.settimeout"
title="Permalink to this definition">¶</a><br /></dt>
+<dd><p>The getstatus operation sets a timeout interval to trigger the alarm
and then trigger an interrupt. It defines the timer interval in which the
handler will be called.</p>
+<dl class="field-list simple">
+<dt class="field-odd">Parameters</dt>
+<dd class="field-odd"><ul class="simple">
+<li><p><strong>timeout</strong> – An argument of type <code class="docutils
literal notranslate"><span class="pre">uint32_t</span></code> with the timeout
value in microseconds.</p></li>
+</ul>
+</dd>
+<dt class="field-even">Returns</dt>
+<dd class="field-even"><p>A Linux System Error Code for failing or 0 for
success.</p>
+</dd>
+</dl>
+</dd></dl>
+
+<p>This command may be used like so:</p>
+<div class="highlight-c notranslate"><div
class="highlight"><pre><span></span><span class="cm">/* Set the timer interval
*/</span>
+
+<span class="n">printf</span><span class="p">(</span><span class="s">"Set
timer interval to %lu</span><span class="se">\n</span><span
class="s">"</span><span class="p">,</span>
+ <span class="p">(</span><span class="kt">unsigned</span> <span
class="kt">long</span><span class="p">)</span><span
class="n">CONFIG_EXAMPLES_TIMER_INTERVAL</span><span class="p">);</span>
+
+<span class="n">ret</span> <span class="o">=</span> <span
class="n">ioctl</span><span class="p">(</span><span class="n">fd</span><span
class="p">,</span> <span class="n">TCIOC_SETTIMEOUT</span><span
class="p">,</span> <span class="n">CONFIG_EXAMPLES_TIMER_INTERVAL</span><span
class="p">);</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">ret</span>
<span class="o"><</span> <span class="mi">0</span><span class="p">)</span>
+ <span class="p">{</span>
+ <span class="n">fprintf</span><span class="p">(</span><span
class="n">stderr</span><span class="p">,</span> <span class="s">"ERROR:
Failed to set the timer interval: %d</span><span class="se">\n</span><span
class="s">"</span><span class="p">,</span> <span
class="n">errno</span><span class="p">);</span>
+ <span class="n">close</span><span class="p">(</span><span
class="n">fd</span><span class="p">);</span>
+ <span class="k">return</span> <span class="n">EXIT_FAILURE</span><span
class="p">;</span>
+ <span class="p">}</span>
+</pre></div>
+</div>
+<dl class="c macro">
+<dt>
+<code class="sig-name descname">TCIOC_NOTIFICATION</code><br /></dt>
+<dd></dd></dl>
+
+<p>The <code class="docutils literal notranslate"><span
class="pre">TCIOC_NOTIFICATION</span></code> is used to configure the timer
callback to notify the application via a signal when the timer expires. This
command calls the <code class="docutils literal notranslate"><span
class="pre">setcallback</span></code> operation. Which will not be described
here, since the application does not set a callback directly. Instead, the user
should configure a signal handler to catch notifications, a [...]
+<p>In any case, this command expects a read-only pointer to a struct
<cite>timer_notify_s</cite>. This struct contains 2 fields: <code
class="docutils literal notranslate"><span class="pre">pid</span></code> (<code
class="docutils literal notranslate"><span class="pre">pid_t</span></code>),
that indicates the ID of the task/thread to receive the signal and <code
class="docutils literal notranslate"><span class="pre">event</span></code>
(<code class="docutils literal notranslate"><span cl [...]
+<p>This command may be used like so:</p>
+<div class="highlight-c notranslate"><div
class="highlight"><pre><span></span><span class="n">printf</span><span
class="p">(</span><span class="s">"Configure the notification</span><span
class="se">\n</span><span class="s">"</span><span class="p">);</span>
+
+<span class="n">notify</span><span class="p">.</span><span
class="n">pid</span> <span class="o">=</span> <span
class="n">getpid</span><span class="p">();</span>
+<span class="n">notify</span><span class="p">.</span><span
class="n">event</span><span class="p">.</span><span
class="n">sigev_notify</span> <span class="o">=</span> <span
class="n">SIGEV_SIGNAL</span><span class="p">;</span>
+<span class="n">notify</span><span class="p">.</span><span
class="n">event</span><span class="p">.</span><span
class="n">sigev_signo</span> <span class="o">=</span> <span
class="n">CONFIG_EXAMPLES_TIMER_SIGNO</span><span class="p">;</span>
+<span class="n">notify</span><span class="p">.</span><span
class="n">event</span><span class="p">.</span><span
class="n">sigev_value</span><span class="p">.</span><span
class="n">sival_ptr</span> <span class="o">=</span> <span
class="nb">NULL</span><span class="p">;</span>
+
+<span class="n">ret</span> <span class="o">=</span> <span
class="n">ioctl</span><span class="p">(</span><span class="n">fd</span><span
class="p">,</span> <span class="n">TCIOC_NOTIFICATION</span><span
class="p">,</span> <span class="p">(</span><span class="kt">unsigned</span>
<span class="kt">long</span><span class="p">)((</span><span
class="kt">uintptr_t</span><span class="p">)</span><span
class="o">&</span><span class="n">notify</span><span class="p">));</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">ret</span>
<span class="o"><</span> <span class="mi">0</span><span class="p">)</span>
+ <span class="p">{</span>
+ <span class="n">fprintf</span><span class="p">(</span><span
class="n">stderr</span><span class="p">,</span> <span class="s">"ERROR:
Failed to set the timer handler: %d</span><span class="se">\n</span><span
class="s">"</span><span class="p">,</span> <span
class="n">errno</span><span class="p">);</span>
+ <span class="n">close</span><span class="p">(</span><span
class="n">fd</span><span class="p">);</span>
+ <span class="k">return</span> <span class="n">EXIT_FAILURE</span><span
class="p">;</span>
+ <span class="p">}</span>
+</pre></div>
+</div>
+<dl class="c macro">
+<dt>
+<code class="sig-name descname">TCIOC_MAXTIMEOUT</code><br /></dt>
+<dd></dd></dl>
+
+<p>The <code class="docutils literal notranslate"><span
class="pre">TCIOC_MAXTIMEOUT</span></code> command calls the <code
class="docutils literal notranslate"><span class="pre">maxtimeout</span></code>
operation, which is described below.</p>
+<dl class="c function">
+<dt id="c.maxtimeout">
+int <code class="sig-name descname">maxtimeout</code><span
class="sig-paren">(</span>uint32_t *<em>status</em><span
class="sig-paren">)</span><a class="headerlink" href="#c.maxtimeout"
title="Permalink to this definition">¶</a><br /></dt>
+<dd><p>The maxtimeout operation gets the maximum timeout value that can be
configured.</p>
+<dl class="field-list simple">
+<dt class="field-odd">Parameters</dt>
+<dd class="field-odd"><ul class="simple">
+<li><p><strong>maxtimeout</strong> – A writable pointer to a variable of <code
class="docutils literal notranslate"><span class="pre">uint32_t</span></code>
type in which the value will be stored.</p></li>
+</ul>
+</dd>
+<dt class="field-even">Returns</dt>
+<dd class="field-even"><p>A Linux System Error Code for failing or 0 for
success.</p>
+</dd>
+</dl>
+</dd></dl>
+
+<p>This command may be used like so:</p>
+<div class="highlight-c notranslate"><div
class="highlight"><pre><span></span><span class="cm">/* Get the maximum timer
timeout */</span>
+
+<span class="n">printf</span><span class="p">(</span><span class="s">"Get
the maximum timer timeout</span><span class="se">\n</span><span
class="s">"</span><span class="p">);</span>
+
+<span class="n">ret</span> <span class="o">=</span> <span
class="n">ioctl</span><span class="p">(</span><span class="n">fd</span><span
class="p">,</span> <span class="n">TCIOC_MAXTIMEOUT</span><span
class="p">,</span> <span class="p">(</span><span
class="kt">uint32_t</span><span class="o">*</span><span
class="p">)(</span><span class="o">&</span><span
class="n">max_timeout</span><span class="p">));</span>
+<span class="k">if</span> <span class="p">(</span><span class="n">ret</span>
<span class="o"><</span> <span class="mi">0</span><span class="p">)</span>
+ <span class="p">{</span>
+ <span class="n">fprintf</span><span class="p">(</span><span
class="n">stderr</span><span class="p">,</span> <span class="s">"ERROR:
Failed to reat the timer's maximum timeout: %d</span><span
class="se">\n</span><span class="s">"</span><span class="p">,</span> <span
class="n">errno</span><span class="p">);</span>
+ <span class="n">close</span><span class="p">(</span><span
class="n">fd</span><span class="p">);</span>
+ <span class="k">return</span> <span class="n">EXIT_FAILURE</span><span
class="p">;</span>
+ <span class="p">}</span>
+
+<span class="cm">/* Print the maximum supported timeout */</span>
+
+<span class="n">printf</span><span class="p">(</span><span
class="s">"Maximum supported timeout: %"</span> <span
class="n">PRIu32</span> <span class="s">"</span><span
class="se">\n</span><span class="s">"</span><span class="p">,</span> <span
class="n">max_timeout</span><span class="p">);</span>
+</pre></div>
+</div>
+<p>Those snippets were taken from the Example which provides a great resource
to demonstrate how to use those <code class="docutils literal
notranslate"><span class="pre">ioctl</span></code> commands.</p>
+</div>
</div>
diff --git a/content/docs/latest/genindex.html
b/content/docs/latest/genindex.html
index b4f9e5c..c89646f 100644
--- a/content/docs/latest/genindex.html
+++ b/content/docs/latest/genindex.html
@@ -440,6 +440,8 @@
</li>
<li><a href="reference/user/11_network.html#c.getsockopt">getsockopt (C
function)</a>
</li>
+ <li><a
href="components/drivers/character/timer.html#c.getstatus">getstatus (C
function)</a>
+</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a
href="reference/user/06_clocks_timers.html#c.gettimeofday">gettimeofday (C
function)</a>
@@ -596,6 +598,8 @@
</li>
<li><a href="reference/user/structures.html#c.main_t">main_t (C type)</a>
</li>
+ <li><a
href="components/drivers/character/timer.html#c.maxtimeout">maxtimeout (C
function)</a>
+</li>
<li><a href="glossary.html#term-MCI"><strong>MCI</strong></a>
</li>
<li><a href="glossary.html#term-MCU"><strong>MCU</strong></a>
@@ -620,10 +624,10 @@
</li>
<li><a href="glossary.html#term-MMU"><strong>MMU</strong></a>
</li>
- <li><a href="guides/nfs.html#c.mount">mount (C function)</a>
-</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
+ <li><a href="guides/nfs.html#c.mount">mount (C function)</a>
+</li>
<li><a href="components/nxgraphics/nx.html#c.mousein">mousein (C
function)</a>
</li>
<li><a href="glossary.html#term-MPU"><strong>MPU</strong></a>
@@ -1274,6 +1278,8 @@
</li>
<li><a href="reference/user/11_network.html#c.setsockopt">setsockopt (C
function)</a>
</li>
+ <li><a
href="components/drivers/character/timer.html#c.settimeout">settimeout (C
function)</a>
+</li>
<li><a href="reference/user/12_shared_memory.html#c.shmat">shmat (C
function)</a>
</li>
<li><a href="reference/user/12_shared_memory.html#c.shmctl">shmctl (C
function)</a>
@@ -1346,6 +1352,10 @@
</li>
<li><a href="glossary.html#term-SRAM"><strong>SRAM</strong></a>
</li>
+ <li><a href="components/drivers/character/timer.html#c.start">start (C
function)</a>
+</li>
+ <li><a href="components/drivers/character/timer.html#c.stop">stop (C
function)</a>
+</li>
<li><a href="components/binfmt.html#c.symbtab_s">symbtab_s (C struct)</a>
</li>
<li><a
href="components/binfmt.html#c.symtab_findbyname">symtab_findbyname (C
function)</a>
@@ -1386,12 +1396,24 @@
</li>
<li><a href="reference/user/structures.html#c.tcb_s">tcb_s (C struct)</a>
</li>
- <li><a href="glossary.html#term-TCP"><strong>TCP</strong></a>
+ <li><a
href="components/drivers/character/timer.html#c.TCIOC_GETSTATUS">TCIOC_GETSTATUS
(C macro)</a>, <a
href="components/drivers/character/timer.html#c.TCIOC_GETSTATUS">[1]</a>
</li>
- <li><a href="reference/user/10_filesystem.html#c.telldir">telldir (C
function)</a>
+ <li><a
href="components/drivers/character/timer.html#c.TCIOC_MAXTIMEOUT">TCIOC_MAXTIMEOUT
(C macro)</a>, <a
href="components/drivers/character/timer.html#c.TCIOC_MAXTIMEOUT">[1]</a>
+</li>
+ <li><a
href="components/drivers/character/timer.html#c.TCIOC_NOTIFICATION">TCIOC_NOTIFICATION
(C macro)</a>, <a
href="components/drivers/character/timer.html#c.TCIOC_NOTIFICATION">[1]</a>
+</li>
+ <li><a
href="components/drivers/character/timer.html#c.TCIOC_SETTIMEOUT">TCIOC_SETTIMEOUT
(C macro)</a>, <a
href="components/drivers/character/timer.html#c.TCIOC_SETTIMEOUT">[1]</a>
+</li>
+ <li><a
href="components/drivers/character/timer.html#c.TCIOC_START">TCIOC_START (C
macro)</a>, <a
href="components/drivers/character/timer.html#c.TCIOC_START">[1]</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
+ <li><a
href="components/drivers/character/timer.html#c.TCIOC_STOP">TCIOC_STOP (C
macro)</a>, <a
href="components/drivers/character/timer.html#c.TCIOC_STOP">[1]</a>
+</li>
+ <li><a href="glossary.html#term-TCP"><strong>TCP</strong></a>
+</li>
+ <li><a href="reference/user/10_filesystem.html#c.telldir">telldir (C
function)</a>
+</li>
<li><a href="reference/user/structures.html#c.time_t">time_t (C type)</a>
</li>
<li><a
href="reference/user/06_clocks_timers.html#c.timer_create">timer_create (C
function)</a>
@@ -1402,6 +1424,8 @@
</li>
<li><a
href="reference/user/06_clocks_timers.html#c.timer_gettime">timer_gettime (C
function)</a>
</li>
+ <li><a
href="components/drivers/character/timer.html#c.timer_ops_s">timer_ops_s (C
struct)</a>
+</li>
<li><a
href="reference/user/06_clocks_timers.html#c.timer_settime">timer_settime (C
function)</a>
</li>
<li><a href="reference/user/structures.html#c.timespec">timespec (C
struct)</a>
diff --git a/content/docs/latest/index.html b/content/docs/latest/index.html
index a0ad203..ca87840 100644
--- a/content/docs/latest/index.html
+++ b/content/docs/latest/index.html
@@ -207,7 +207,7 @@ by following these <a class="reference internal"
href="contributing/documentatio
<div class="section" id="nuttx-documentation">
<h1>NuttX Documentation<a class="headerlink" href="#nuttx-documentation"
title="Permalink to this headline">¶</a></h1>
<p>NuttX is a real-time operating system (RTOS) with an emphasis on standards
compliance and small footprint. Scalable from 8-bit to 32-bit microcontroller
environments, the primary governing standards in NuttX are Posix and ANSI
standards. Additional standard APIs from Unix and other common RTOS’s (such as
VxWorks) are adopted for functionality not available under these standards, or
for functionality that is not appropriate for deeply-embedded environments
(such as fork()).</p>
-<p>Last Updated: 13 October 20 at 16:55</p>
+<p>Last Updated: 15 October 20 at 22:34</p>
<div class="toctree-wrapper compound">
<p class="caption"><span class="caption-text">Table of Contents</span></p>
<ul class="current">
diff --git a/content/docs/latest/objects.inv b/content/docs/latest/objects.inv
index 17c0de1..b58b73f 100644
Binary files a/content/docs/latest/objects.inv and
b/content/docs/latest/objects.inv differ
diff --git a/content/docs/latest/searchindex.js
b/content/docs/latest/searchindex.js
index afa0947..1bc98a0 100644
--- a/content/docs/latest/searchindex.js
+++ b/content/docs/latest/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["applications/index","boards/index","components/binfmt","components/drivers/block/index","components/drivers/character/analog","components/drivers/character/can","components/drivers/character/index","components/drivers/character/keypad","components/drivers/character/pwm","components/drivers/character/quadrature","components/drivers/character/rtc","components/drivers/character/serial","components/drivers/character/timer","components/drivers/character/touchscreen
[...]
\ No newline at end of file
+Search.setIndex({docnames:["applications/index","boards/index","components/binfmt","components/drivers/block/index","components/drivers/character/analog","components/drivers/character/can","components/drivers/character/index","components/drivers/character/keypad","components/drivers/character/pwm","components/drivers/character/quadrature","components/drivers/character/rtc","components/drivers/character/serial","components/drivers/character/timer","components/drivers/character/touchscreen
[...]
\ No newline at end of file
diff --git a/content/feed.xml b/content/feed.xml
index 0904841..92e23a7 100644
--- a/content/feed.xml
+++ b/content/feed.xml
@@ -5,8 +5,8 @@
<description></description>
<link>/</link>
<atom:link href="/feed.xml" rel="self" type="application/rss+xml"/>
- <pubDate>Tue, 13 Oct 2020 16:57:40 +0000</pubDate>
- <lastBuildDate>Tue, 13 Oct 2020 16:57:40 +0000</lastBuildDate>
+ <pubDate>Thu, 15 Oct 2020 22:36:17 +0000</pubDate>
+ <lastBuildDate>Thu, 15 Oct 2020 22:36:17 +0000</lastBuildDate>
<generator>Jekyll v3.8.5</generator>
<item>