Expand description
§embassy-usb-driver
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 embassy-usb
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 embassy-usb crate
instead of this one.
§Interoperability
This crate can run on any executor.
Modules§
- host
- USB host driver traits and data types.
Structs§
- Endpoint
Address - Type-safe endpoint address.
- Endpoint
Alloc Error - Allocating an endpoint failed.
- Endpoint
Config - Configuration to allocate an endpoint with.
- Endpoint
Disabled Error - The endpoint is disabled, or a control transfer was aborted by a bus event or new SETUP packet.
- Endpoint
Info - Information for an endpoint.
- Endpoint
Interval - Polling interval of an endpoint.
- Unsupported
- Operation is unsupported by the driver.
Enums§
- Direction
- 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.
- Endpoint
Error - Errors returned by
EndpointOut::read_transferandBus::control_data_out. - Endpoint
Type - USB endpoint transfer type. The values of this enum can be directly cast into
u8to get the transfer bmAttributes transfer type bits. - Event
- Event returned by
Bus::poll. - Speed
- Speed of a device or port
Traits§
- Bus
- USB bus trait.
- Driver
- Main USB device driver trait.
- Endpoint
- Endpoint trait, common for OUT and IN. Endpoint is a buffer on a device that stores rx/tx data. Endpoint can be thought of as one end of a pipe/channel.
- Endpoint
In - IN Endpoint trait.
- Endpoint
Out - OUT Endpoint trait.