blob: 9e4b1693fb1aac32d9c6ba20c33c33be47cb2c12 [file] [log] [blame]
<!--
Documentation/_templates/layout.html
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership. The
ASF licenses this file to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
-->
<!DOCTYPE html>
<html class="writer-html5" lang="en">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Device Drivers &mdash; NuttX latest documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" />
<link rel="stylesheet" type="text/css" href="../../_static/custom.css" />
<link rel="shortcut icon" href="../../_static/favicon.ico"/>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/sphinx_highlight.js"></script>
<script src="../../_static/clipboard.min.js"></script>
<script src="../../_static/copybutton.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Character Device Drivers" href="character/index.html" />
<link rel="prev" title="Binary Loader" href="../binfmt.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> NuttX
</a>
<!-- this version selector is quite ugly, should be probably replaced by something
more modern -->
<div class="version-selector">
<select onchange="javascript:location.href = this.value;">
<option value="../../../latest" selected="selected">latest</option>
<option value="../../../10.0.0" >10.0.0</option>
<option value="../../../10.0.1" >10.0.1</option>
<option value="../../../10.1.0" >10.1.0</option>
<option value="../../../10.2.0" >10.2.0</option>
<option value="../../../10.3.0" >10.3.0</option>
<option value="../../../11.0.0" >11.0.0</option>
<option value="../../../12.0.0" >12.0.0</option>
<option value="../../../12.1.0" >12.1.0</option>
<option value="../../../12.2.0" >12.2.0</option>
<option value="../../../12.2.1" >12.2.1</option>
<option value="../../../12.3.0" >12.3.0</option>
<option value="../../../12.4.0" >12.4.0</option>
<option value="../../../12.5.0" >12.5.0</option>
<option value="../../../12.5.1" >12.5.1</option>
<option value="../../../12.6.0" >12.6.0</option>
<option value="../../../12.7.0" >12.7.0</option>
<option value="../../../12.8.0" >12.8.0</option>
<option value="../../../12.9.0" >12.9.0</option>
<option value="../../../12.10.0" >12.10.0</option>
<option value="../../../12.11.0" >12.11.0</option>
</select>
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Table of Contents</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../index.html">Home</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../introduction/index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../quickstart/index.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../contributing/index.html">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../introduction/inviolables.html">The Inviolable Principles of NuttX</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../platforms/index.html">Supported Platforms</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">OS Components</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../binfmt.html">Binary Loader</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Device Drivers</a><ul>
<li class="toctree-l3"><a class="reference internal" href="character/index.html">Character Device Drivers</a></li>
<li class="toctree-l3"><a class="reference internal" href="block/index.html">Block Device Drivers</a></li>
<li class="toctree-l3"><a class="reference internal" href="special/index.html">Specialized Device Drivers</a></li>
<li class="toctree-l3"><a class="reference internal" href="thermal/index.html">Thermal Framework</a></li>
<li class="toctree-l3"><a class="reference internal" href="#lower-half-and-upper-half">Lower-half and upper-half</a></li>
<li class="toctree-l3"><a class="reference internal" href="#subdirectories-of-nuttx-drivers">Subdirectories of <code class="docutils literal notranslate"><span class="pre">nuttx/drivers</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#skeleton-files">Skeleton Files</a></li>
<li class="toctree-l3"><a class="reference internal" href="#drivers-early-initialization">Drivers Early Initialization</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../nxflat.html">NXFLAT</a></li>
<li class="toctree-l2"><a class="reference internal" href="../nxgraphics/index.html">NX Graphics Subsystem</a></li>
<li class="toctree-l2"><a class="reference internal" href="../paging.html">On-Demand Paging</a></li>
<li class="toctree-l2"><a class="reference internal" href="../audio/index.html">Audio Subsystem</a></li>
<li class="toctree-l2"><a class="reference internal" href="../filesystem/index.html">NuttX File System</a></li>
<li class="toctree-l2"><a class="reference internal" href="../libs/index.html">NuttX libraries</a></li>
<li class="toctree-l2"><a class="reference internal" href="../net/index.html">Network Support</a></li>
<li class="toctree-l2"><a class="reference internal" href="../mm/index.html">Memory Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../syscall.html">Syscall Layer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../tools/index.html"><code class="docutils literal notranslate"><span class="pre">/tools</span></code> Host Tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="../arch/index.html">Architecture-Specific Code</a></li>
<li class="toctree-l2"><a class="reference internal" href="../boards.html">Boards Support</a></li>
<li class="toctree-l2"><a class="reference internal" href="../cmake.html">CMake Support</a></li>
<li class="toctree-l2"><a class="reference internal" href="../openamp.html">OpenAMP Support</a></li>
<li class="toctree-l2"><a class="reference internal" href="../video.html">Video Subsystem</a></li>
<li class="toctree-l2"><a class="reference internal" href="../crypto.html">Crypto API Subsystem</a></li>
<li class="toctree-l2"><a class="reference internal" href="../wireless.html">Wireless Subsystem</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../applications/index.html">Applications</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/index.html">Implementation Details</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../reference/index.html">API Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../faq/index.html">FAQ</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../guides/index.html">Guides</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../glossary.html">Glossary</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../logos/index.html">NuttX Logos</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">NuttX</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../index.html">OS Components</a></li>
<li class="breadcrumb-item active">Device Drivers</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/components/drivers/index.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="device-drivers">
<h1>Device Drivers<a class="headerlink" href="#device-drivers" title="Permalink to this heading"></a></h1>
<p>NuttX supports a variety of device drivers, which can be broadly
divided in three classes:</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="character/index.html">Character Device Drivers</a></li>
<li class="toctree-l1"><a class="reference internal" href="block/index.html">Block Device Drivers</a></li>
<li class="toctree-l1"><a class="reference internal" href="special/index.html">Specialized Device Drivers</a></li>
<li class="toctree-l1"><a class="reference internal" href="thermal/index.html">Thermal Framework</a></li>
</ul>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Device driver support depends on the <em>in-memory</em>, <em>pseudo</em>
file system that is enabled by default.</p>
</div>
<section id="lower-half-and-upper-half">
<h2>Lower-half and upper-half<a class="headerlink" href="#lower-half-and-upper-half" title="Permalink to this heading"></a></h2>
<p>Drivers in NuttX generally work in two distinct layers:</p>
<blockquote>
<div><ul class="simple">
<li><p>An <em>upper half</em> which registers itself to NuttX using
a call such as <code class="xref c c-func docutils literal notranslate"><span class="pre">register_driver()</span></code> or
<code class="xref c c-func docutils literal notranslate"><span class="pre">register_blockdriver()</span></code> and implements the corresponding
high-level interface (<cite>read</cite>, <cite>write</cite>, <cite>close</cite>, etc.).
implements the interface. This <em>upper half</em> calls into
the <em>lower half</em> via callbacks.</p></li>
<li><p>A “lower half” which is typically hardware-specific. This is
usually implemented at the architecture or board level.</p></li>
</ul>
</div></blockquote>
</section>
<section id="subdirectories-of-nuttx-drivers">
<h2>Subdirectories of <code class="docutils literal notranslate"><span class="pre">nuttx/drivers</span></code><a class="headerlink" href="#subdirectories-of-nuttx-drivers" title="Permalink to this heading"></a></h2>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">1wire/</span></code> <a class="reference internal" href="character/1wire.html"><span class="doc">One Wire Drivers</span></a></p>
<p>1wire device drivers.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">analog/</span></code> <a class="reference internal" href="character/analog/index.html"><span class="doc">Analog (ADC/DAC) Drivers</span></a></p>
<p>This directory holds implementations of analog device drivers.
This includes drivers for Analog to Digital Conversion (ADC) as
well as drivers for Digital to Analog Conversion (DAC).</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">audio/</span></code> <a class="reference internal" href="special/audio.html"><span class="doc">Audio Device Drivers</span></a></p>
<p>Audio device drivers.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">bch/</span></code> <a class="reference internal" href="character/bch.html"><span class="doc">Block Driver to Character Driver</span></a></p>
<p>Contains logic that may be used to convert a block driver into
a character driver. This is the complementary conversion as that
performed by loop.c.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">can/</span></code> <a class="reference internal" href="character/can.html"><span class="doc">CAN Drivers</span></a></p>
<p>This is the CAN drivers and logic support.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">clk/</span></code><a class="reference internal" href="special/clk.html"><span class="doc">Clock management (CLK)</span></a></p>
<p>Clock management (CLK) device drivers.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">contactless/</span></code> <a class="reference internal" href="character/contactless.html"><span class="doc">Constactless Devices</span></a></p>
<p>Contactless devices are related to wireless devices. They are not
communication devices with other similar peers, but couplers/interfaces
to contactless cards and tags.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">crypto/</span></code> <a class="reference internal" href="character/crypto/index.html"><span class="doc">Crypto Drivers</span></a></p>
<p>Contains crypto drivers and support logic, including the
<code class="docutils literal notranslate"><span class="pre">/dev/urandom</span></code> device.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">devicetree/</span></code> <a class="reference internal" href="special/devicetree.html"><span class="doc">Device Tree support</span></a></p>
<p>Device Tree support.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">dma/</span></code> <a class="reference internal" href="special/dma.html"><span class="doc">DMA Drivers</span></a></p>
<p>DMA drivers support.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">eeprom/</span></code> <a class="reference internal" href="block/eeprom.html"><span class="doc">EEPROM</span></a></p>
<p>An EEPROM is a form of Memory Technology Device (see <code class="docutils literal notranslate"><span class="pre">drivers/mtd</span></code>).
EEPROMs are non-volatile memory like FLASH, but differ in underlying
memory technology and differ in usage in many respects: They may not
be organized into blocks (at least from the standpoint of the user)
and it is not necessary to erase the EEPROM memory before re-writing
it. In addition, EEPROMs tend to be much smaller than FLASH parts,
usually only a few kilobytes vs megabytes for FLASH. EEPROM tends to
be used to retain a small amount of device configuration information;
FLASH tends to be used for program or massive data storage. For these
reasons, it may not be convenient to use the more complex MTD
interface but instead use the simple character interface provided by
the EEPROM drivers.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">efuse/</span></code> <a class="reference internal" href="character/efuse.html"><span class="doc">EFUSE Drivers</span></a></p>
<p>EFUSE drivers support.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">i2c/</span></code> <a class="reference internal" href="special/i2c.html"><span class="doc">I2C Device Drivers</span></a></p>
<p>I2C drivers and support logic.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">i2s/</span></code> <a class="reference internal" href="character/i2s.html"><span class="doc">I2S Drivers</span></a></p>
<p>I2S drivers and support logic.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">input/</span></code> <a class="reference internal" href="character/input/index.html"><span class="doc">Input Devices</span></a></p>
<p>This directory holds implementations of human input device (HID) drivers.
This includes such things as mouse, touchscreen, joystick,
keyboard and keypad drivers.</p>
<p>Note that USB HID devices are treated differently. These can be found under
<code class="docutils literal notranslate"><span class="pre">usbdev/</span></code> or <code class="docutils literal notranslate"><span class="pre">usbhost/</span></code>.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">ioexpander/</span></code> <a class="reference internal" href="special/ioexpander.html"><span class="doc">IO Expander Device Drivers</span></a></p>
<p>IO Expander drivers.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">ipcc/</span></code> <a class="reference internal" href="character/ipcc.html"><span class="doc">IPCC (Inter Processor Communication Controller) Driver</span></a></p>
<p>IPCC (Inter Processor Communication Controller) driver.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">lcd/</span></code> <a class="reference internal" href="special/lcd.html"><span class="doc">LCD Character Drivers</span></a></p>
<p>Drivers for parallel and serial LCD and OLED type devices.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">leds/</span></code> <a class="reference internal" href="character/leds/index.html"><span class="doc">LEDS</span></a></p>
<p>Various LED-related drivers including discrete as well as PWM- driven LEDs.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">loop/</span></code> <a class="reference internal" href="character/loop.html"><span class="doc">Loop Device</span></a></p>
<p>Supports the standard loop device that can be used to export a
file (or character device) as a block device.</p>
<p>See <code class="docutils literal notranslate"><span class="pre">losetup()</span></code> and <code class="docutils literal notranslate"><span class="pre">loteardown()</span></code> in <code class="docutils literal notranslate"><span class="pre">include/nuttx/fs/fs.h</span></code>.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">math/</span></code> <a class="reference internal" href="character/math.html"><span class="doc">Math Acceleration Drivers</span></a></p>
<p>MATH Acceleration drivers.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">misc/</span></code> <a class="reference internal" href="character/nullzero.html"><span class="doc">dev_null.c and dev_zero.c</span></a> <a class="reference internal" href="special/rwbuffer.html"><span class="doc">rwbuffer.c</span></a> <a class="reference internal" href="block/ramdisk.html"><span class="doc">ramdisk.c</span></a></p>
<p>Various drivers that don’t fit elsewhere.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">mmcsd/</span></code> <a class="reference internal" href="special/sdio.html"><span class="doc">SDIO Device Drivers</span></a> <a class="reference internal" href="special/mmcsd.html"><span class="doc">MMCSD Device Drivers</span></a></p>
<p>Support for MMC/SD block drivers. MMC/SD block drivers based on
SPI and SDIO/MCI interfaces are supported.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">modem/</span></code> <a class="reference internal" href="character/modem.html"><span class="doc">Modem Device</span></a></p>
<p>Modem Support.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">motor/</span></code> <a class="reference internal" href="character/motor/index.html"><span class="doc">Motor Drivers</span></a></p>
<p>Motor control drivers.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">mtd/</span></code> <a class="reference internal" href="special/mtd.html"><span class="doc">Memory Technology Device Drivers</span></a></p>
<p>Memory Technology Device (MTD) drivers. Some simple drivers for
memory technologies like FLASH, EEPROM, NVRAM, etc.</p>
<p>(Note: This is a simple memory interface and should not be
confused with the “real” MTD developed at infradead.org. This
logic is unrelated; I just used the name MTD because I am not
aware of any other common way to refer to this class of devices).</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">net/</span></code> <a class="reference internal" href="special/net/index.html"><span class="doc">Network interface drivers</span></a></p>
<p>Network interface drivers.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">notes/</span></code> <a class="reference internal" href="character/note.html"><span class="doc">Note Driver Interface</span></a></p>
<p>Note Driver Support.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">pinctrl/</span></code> <a class="reference internal" href="special/pinctrl.html"><span class="doc">Pinctrl Device Drivers</span></a></p>
<p>Configure and manage pin.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">pipes/</span></code> <a class="reference internal" href="special/pipes.html"><span class="doc">FIFO and named pipe drivers</span></a></p>
<p>FIFO and named pipe drivers.
Standard interfaces are declared in <code class="docutils literal notranslate"><span class="pre">include/unistd.h</span></code></p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">power/</span></code> <a class="reference internal" href="special/power/index.html"><span class="doc">Power-related Drivers</span></a></p>
<p>Various drivers related to power management.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">rc/</span></code> <a class="reference internal" href="character/rc.html"><span class="doc">Remote Control Devices</span></a></p>
<p>Remote Control Device Support.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">regmap/</span></code> <a class="reference internal" href="special/regmap.html"><span class="doc">drivers/regmap</span></a></p>
<p>Regmap Subsystems Support.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">reset/</span></code> <a class="reference internal" href="special/reset.html"><span class="doc">Reset Driver</span></a></p>
<p>Reset Driver Support.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">rf/</span></code> <a class="reference internal" href="character/rf.html"><span class="doc">RF Devices</span></a></p>
<p>RF Device Support.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">rptun/</span></code> <a class="reference internal" href="special/rptun.html"><span class="doc">Remote Proc Tunnel Drivers</span></a></p>
<p>Remote Proc Tunnel Driver Support.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">segger/</span></code> <a class="reference internal" href="special/segger.html"><span class="doc">Segger RTT drivers</span></a></p>
<p>Segger RTT drivers.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">sensors/</span></code> <a class="reference internal" href="special/sensors.html"><span class="doc">Sensor Drivers</span></a></p>
<p>Drivers for various sensors. A sensor driver differs little from
other types of drivers other than they are use to provide measurements
of things in environment like temperature, orientation, acceleration,
altitude, direction, position, etc.</p>
<p>DACs might fit this definition of a sensor driver as well since they
measure and convert voltage levels. DACs, however, are retained in
the <code class="docutils literal notranslate"><span class="pre">analog/</span></code> sub-directory.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">serial/</span></code><a class="reference internal" href="character/serial.html"><span class="doc">Serial Device Drivers</span></a></p>
<p>Front-end character drivers for chip-specific UARTs.
This provide some TTY-like functionality and are commonly used (but
not required for) the NuttX system console.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">spi/</span></code> <a class="reference internal" href="special/spi.html"><span class="doc">SPI Device Drivers</span></a></p>
<p>SPI drivers and support logic.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">syslog/</span></code> <a class="reference internal" href="special/syslog.html"><span class="doc">SYSLOG</span></a></p>
<p>System logging devices.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">timers/</span></code> <a class="reference internal" href="character/timers/index.html"><span class="doc">Timers Drivers</span></a></p>
<p>Includes support for various timer devices.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">usbdev/</span></code> <a class="reference internal" href="special/usbdev.html"><span class="doc">USB Device-Side Drivers</span></a></p>
<p>USB device drivers.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">usbhost/</span></code> <a class="reference internal" href="special/usbhost.html"><span class="doc">USB Host-Side Drivers</span></a></p>
<p>USB host drivers.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">usbmisc/</span></code> <a class="reference internal" href="special/usbmisc.html"><span class="doc">USB Miscellaneous Drivers</span></a></p>
<p>USB Miscellaneous drivers.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">usbmonitor/</span></code> <a class="reference internal" href="special/usbmonitor.html"><span class="doc">USB Monitor support</span></a></p>
<p>USB Monitor support.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">usrsock/</span></code> <a class="reference internal" href="special/usrsock.html"><span class="doc">Usrsock Driver</span></a></p>
<p>Usrsock Driver Support.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">video/</span></code> <a class="reference internal" href="special/video.html"><span class="doc">Video Device Drivers</span></a></p>
<p>Video-related drivers.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">virtio/</span></code> <a class="reference internal" href="special/virtio.html"><span class="doc">Virtio Device Drivers</span></a></p>
<p>Virtio Device Support.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">wireless/</span></code> <a class="reference internal" href="special/wireless.html"><span class="doc">Wireless Drivers</span></a></p>
<p>Drivers for various wireless devices.</p>
</li>
</ul>
</section>
<section id="skeleton-files">
<h2>Skeleton Files<a class="headerlink" href="#skeleton-files" title="Permalink to this heading"></a></h2>
<p>Skeleton files are “empty” frameworks for NuttX drivers. They are provided to
give you a good starting point if you want to create a new NuttX driver.
The following skeleton files are available:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">drivers/lcd/skeleton.c</span></code> Skeleton LCD driver</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">drivers/mtd/skeleton.c</span></code> Skeleton memory technology device drivers</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">drivers/net/skeleton.c</span></code> Skeleton network/Ethernet drivers</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">drivers/usbhost/usbhost_skeleton.c</span></code> Skeleton USB host class driver</p></li>
</ul>
</section>
<section id="drivers-early-initialization">
<h2>Drivers Early Initialization<a class="headerlink" href="#drivers-early-initialization" title="Permalink to this heading"></a></h2>
<p>To initialize drivers early in the boot process, the <code class="xref c c-func docutils literal notranslate"><span class="pre">drivers_early_initialize()</span></code>
function is introduced. This is particularly beneficial for certain drivers,
such as SEGGER SystemView, or others that require initialization before the
system is fully operational.</p>
<p>It is important to note that during this early initialization phase,
system resources are not yet available for use. This includes memory allocation,
file systems, and any other system resources.</p>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../binfmt.html" class="btn btn-neutral float-left" title="Binary Loader" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="character/index.html" class="btn btn-neutral float-right" title="Character Device Drivers" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2023, The Apache Software Foundation.</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>