This crate contains the driver traits for
embassy-usb. HAL/BSP crates can implement these
traits to add support for using
embassy-usb for a given chip/platform.
The traits are kept in a separate crate so that breaking changes in the higher-level
APIs don’t cause a semver-major bump of this crate. This allows existing HALs/BSPs to be used
with the newer
embassy-usb without needing updates.
If you’re writing an application using USB, you should depend on the main
instead of this one.
This crate can run on any executor.
This crate requires nightly Rust, due to using “async fn in trait” support.
This work is licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
- Type-safe endpoint address.
- Allocating an endpoint failed.
- Information for an endpoint.
- Operation is unsupported by the driver.
- 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.
- USB endpoint transfer type. The values of this enum can be directly cast into
u8to get the transfer bmAttributes transfer type bits.
- Event returned by
- USB bus trait.
- USB control pipe trait.
- Main USB driver trait.
- Endpoint trait, common for OUT and IN.
- IN Endpoint trait.
- OUT Endpoint trait.