|
RTUSB-32 - Real-Time USB Host Stack for On Time RTOS-32
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.
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.
If you are interested in porting RTUSB-32 to a different platform,
please have a look at the RTUSB-32 Evaluation
Kit.
Structure of RTUSB-32
|