|
RTUSB-32 - Portable Real-Time Embedded USB Host Stack
RTUSB-32 contains the core USB host protocol stack, the required host
controller device drivers, a low-level communication API and high-level
class drivers. Full source code is available. RTUSB-32 is suitable for
implementing USB hosts, not USB devices.
Features
- USB 1.1, 2.0, 3.0, 3.1, 3.2
All USB versions currently in use are supported.
- UHCI, OHCI, EHCI, and XHCI Host Controllers
All
major USB 1.1, 2.0, and 3.x host controller types are supported. All of
these controller types are supported, regardless of their respective
vendor or model.
- Transfer Types Control, Bulk, Interrupt, and Isochronous
All USB data transfer types/protocols can be used to support both high
throughput and real-time oriented devices.
- Low-, Full-, High-, SuperSpeed, and SuperSpeedPlus Data Transfer
RTUSB-32 supports 12 Mb/s, 480 Mb/s, 5 Gb/s, and 10 Gb/s.
- No Copy
RTUSB-32 does not copy data transferred to or from a device. Even if the
buffers supplied by the application reside in the virtual address space,
data transfers are always performed by DMA to/from the application's
buffer. Even at very high data throughput, no CPU time is consumed to
transfer the data.
- Plug-and-Play and Hot Plugging
RTUSB-32 automatically detects USB devices being added and removed from
the bus and calls application supplied callbacks for each such event. The
application can then decide whether to enable and operate the device or
not. RTUSB-32 supplies functions to query a device's name, vendor, class,
descriptors, interfaces, endpoints, etc.
- Class Drivers
RTUSB-32 provides high-level
class drivers for keyboards, mice, touch screens, printers, audio devices,
mass storage devices (disks, memory sticks, floppies, digital cameras,
CD-ROMs, DVDs, etc), ASIX USB-Ethernet bridge devices, CDC ECM
USB-Ethernet bridge devices, and mobile devices such as smartphones. A hub
class driver is integrated in the core USB protocol stack. Class drivers
allow applications to use a device without being concerned about details
such as the transfer type and speed to use, etc. The source code of the
class drivers is included with RTUSB-32. The mass storage device class
driver can be used by a file system such as RTFiles-32. The USB-Ethernet bridge drivers can
be integrated with a network stack such as RTIP-32.
- Low-Level API
RTUSB-32 also allows direct access to a device. An application can query a
device's endpoints, supported transfer types and speeds, etc., and then
communicate directly with the device. Thus, any USB device can be used,
even if no class driver is available or the device does not adhere to a
standard USB class specification. Many examples are included with RTUSB-32
showing how an application can query and operate arbitrary USB
devices.
- Asynchronous I/O
RTUSB-32 performs I/O in the background. The application starts I/O
operations and can then perform other tasks and query the status of the
transaction at a later time. Any number of I/O transactions can be pending
simultaneously. If two or more transactions are started on the same I/O
pipe, a continuous data stream can be implemented with the application
processing one buffer while the other is being transferred.
- Real-Time
RTUSB-32 can call application supplied callbacks when data is received
from an attached device. Depending on the transfer type, such callbacks
can occur periodically or asynchronously with 1 millisecond (or even
125 microseconds on USB 2.0/3.x) resolution.
- Portable
RTUSB-32 can easily be ported to any target platform. All OS-dependent code is placed in a
configuration header file and a linkable system driver with a simple and
small API containing functions for port I/O, memory management, interrupt
handling, etc. RTUSB-32 is completely written in ANSI C and supports
little- and big-endian CPUs. It can be configured to ensure cache
coherence in software, if required. The complete source code of a
porting layer implementation is included with RTUSB-32 and the
RTUSB-32 Evaluation Kit.
More information about RTUSB-32 is available in the RTUSB-32 Evaluation Kit. The Eval Kit includes
the licensing terms, the Programming and Reference Manuals, the complete
source code of a System Driver (the porting layer of RTUSB-32), and the
source code of six example programs using RTUSB-32.
Structure of RTUSB-32
|