usb_device
Portable, allocation-free USB CDC device service. The board constructs it;
the controller only handles packets. Call service from its IRQ and at least
once per millisecond from a task, then handle take_reset in task context.
Structs
Section titled “Structs”Identity
Section titled “Identity”struct Identity { pub vid: u16, pub pid: u16, pub manufacturer: &'static str, pub product: &'static str, pub serial: Option<&'static str>, pub allow_reset: bool,}Implements: Clone, Copy
Status
Section titled “Status”struct Status { pub configured: bool, pub connected: bool, pub resets: u32, pub stalls: u32, pub setups: u32, pub received: u32, pub transmitted: u32, pub transmit_idle: bool,}Implements: Clone, Copy, Debug, Default
UsbSerial
Section titled “UsbSerial”struct UsbSerial<C> { /* private fields */ }Implements: ByteStream, Serial
Traits
Section titled “Traits”Serial
Section titled “Serial”trait Serial: ByteStream { fn service(&self) -> Result<(), Error> fn status(&self) -> Status fn take_reset(&self) -> Option<ResetTarget>}Board-facing service; applications need not name a physical controller.