TODO crate description
embassy-usb has some configuration settings that are set at compile time, affecting sizes
and counts of buffers.
They can be set in two ways:
- Via Cargo features: enable a feature like
namemust be in lowercase and use dashes instead of underscores. For example.
max-interface-count-3. Only a selection of values is available, check
Cargo.tomlfor the list.
- Via environment variables at build time: set the variable named
EMBASSY_USB_<value>. For example
EMBASSY_USB_MAX_INTERFACE_COUNT=3 cargo build. You can also set them in the
.cargo/config.toml. Any value can be set, unlike with Cargo features.
Environment variables take precedence over Cargo features. If two Cargo features are enabled for the same setting with different values, compilation fails.
Max amount of interfaces that can be created in one device. Default: 4.
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.
pub use embassy_usb_driver as driver;
- Implementations of well-known USB classes.
- USB control data types.
- Utilities for writing USB descriptors.
- USB types.
- Configuration used when creating UsbDevice.
- Function builder.
- Interface alternate setting builder.
- Interface builder.
- A report of the used size of the runtime allocated buffers
- Main struct for the USB device stack.
- Error returned by
- The global state of the USB device.
- The bConfiguration value for the not configured state.
- The bConfiguration value for the single configuration supported by this device.
- Handler for device events and control requests.