Cargo Features

UsbDevice has no features set by default.

[dependencies]
usb-device = { version = "0.3.2", features = ["control-buffer-256", "log", "test-class-high-speed", "defmt"] }
control-buffer-256

Use a 256 byte buffer for control transfers instead of 128.

log

Enable logging and tracing via the log crate

Enables log

test-class-high-speed

Use larger endpoint buffers for highspeed operation (default fullspeed)

Note: usb-device doesn't truly support high speed enumeration yet, so setting this will make TestClass only compliant with high speed mode. It may still manage to be enumerated as a full speed device, but the descriptors will be invalid.

Features from optional dependencies

defmt implicit feature