Experimental device-side USB stack for embedded devices.
In the future USB device implementors will be able to use pre-existing peripheral driver crates and USB class implementation crates. The necessary types for the basic USB composite device implementation are available with:
device module for a more complete example.
For information on how to implement new USB classes, see the
class module and the
TestClass source code for an example of a custom USB device class
implementation. The necessary types for creating new classes are available with:
New peripheral driver crates can be created by implementing the
This crate uses standard host-centric USB terminology for transfer directions. Therefore an OUT transfer refers to a host-to-device transfer, and an IN transfer refers to a device-to-host transfer. This is mainly a concern for implementing new USB peripheral drivers and USB classes, and people doing that should be familiar with the USB standard.
For implementing peripheral drivers.
For implementing standard as well as vendor-specific USB classes.
Prelude for class implementors.
USB control transfers and the SETUP packet.
Creating USB descriptors
USB composite device.
Prelude for device implementors.
Test USB class for testing USB driver implementations. Peripheral driver implementations should include an example called "test_class" that creates a device with this class to enable the driver to be tested with the test_class_host example in this crate.
Direction of USB traffic. Note that in the USB standard the direction is always indicated from the perspective of the host, which is backward for devices, but the standard directions are used for consistency.
A USB stack error.
Result for USB operations.