On Time RTOS-32 Documentation
Welcome
RTTarget-32
RTKernel-32
RTFiles-32
RTIP-32
RTPEG-32
RTUSB-32
RTUSB-32 Programming Manual
Introduction
Terms and Definitions
The Universal Serial Bus
Programming with RTUSB-32
Demo Programs
Advanced Topics
RTUSB-32 Reference Manual
|
Introduction
RTUSB-32 is a USB host protocol stack for embedded systems. It contains the core protocol stack, the required USB host controller device drivers, a low-level communication API and high-level class drivers.
The main features of RTUSB-32 are:
- USB 1.1, 2.0, 3.0, 3.1, and 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. These controller types are always 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-Speed, Full-Speed, High-Speed, SuperSpeed, and SuperSpeedPlus Data Transfer
Up to 12 Mb/s on USB 1.1, 480 Mb/s on USB 2.0, 5 Gb/s on USB 3.0, and 10Gb/s on USB 3.2 are supported.
- No Copy
RTUSB-32 never needs to copy data transferred to or from a device. Even if application supplied buffers reside in the virtual address space, data transfers are always performed by DMA hardware from/to the USB to/from the application's buffer. Even at very high data throughput of up to about 50 Mb/s, no CPU time is required to transfer the data.
- Plug-and-Play and Hot Plugging
RTUSB-32 automatically detects devices and/or hubs 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, printers, mass storage devices (disks, memory sticks, digital cameras, etc.), and mobile phones and cameras. 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 supplied with RTUSB-32. The mass storage device driver requires a file system such as RTFiles-32.
- Low-Level API
RTUSB-32 allows direct access to a device. An application can query a device's interfaces, endpoints, etc., and then communicate directly with the device. Thus, any USB 1.1 or 2.0 device can be used, even if no class driver is available or the device does not adhere to a standard USB class specification. Numerous examples are shipped 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. An arbitrary 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) resolution.
- Portable
RTUSB-32 is preconfigured to work with On Time RTOS-32, but can easily be ported to any other system. 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.
Terms and Definitions
The Universal Serial Bus
|