embassy-usb-host

Crates

git

Versions

default

Flavors

bus

Function bus 

Source
pub fn bus<'d, C: UsbHostController<'d>>(
    driver: C,
    state: &'d BusState,
) -> (BusController<'d, C>, BusHandle<'d, C::Allocator>)
Expand description

Split a UsbHostController into a bus controller / bus handle pair.

The returned BusController drives root-port events and bus resets. The BusHandle owns pipe allocation and device enumeration and can be freely shared, handed to class drivers, hub handlers, or other concurrent tasks while the controller task is blocked inside wait_for_device_event.