pub trait XhciBackendDevice: Send + Sync {
    // Required methods
    fn get_backend_type(&self) -> BackendType;
    fn get_vid(&self) -> u16;
    fn get_pid(&self) -> u16;
    fn set_address(&mut self, address: UsbDeviceAddress);
    fn reset(&mut self) -> Result<()>;
    fn get_speed(&self) -> Option<DeviceSpeed>;
    fn alloc_streams(&self, ep: u8, num_streams: u16) -> Result<()>;
    fn free_streams(&self, ep: u8) -> Result<()>;
    fn stop(&mut self);
}
Expand description

Xhci backend device is a virtual device connected to xHCI controller. It handles xhci transfers.

Required Methods§

source

fn get_backend_type(&self) -> BackendType

Returns the type of USB device provided by this device.

source

fn get_vid(&self) -> u16

Get vendor id of this device.

source

fn get_pid(&self) -> u16

Get product id of this device.

source

fn set_address(&mut self, address: UsbDeviceAddress)

Set address of this backend.

source

fn reset(&mut self) -> Result<()>

Reset the backend device.

source

fn get_speed(&self) -> Option<DeviceSpeed>

Get speed of this device.

source

fn alloc_streams(&self, ep: u8, num_streams: u16) -> Result<()>

Allocate streams for the endpoint

source

fn free_streams(&self, ep: u8) -> Result<()>

Free streams for the endpoint

source

fn stop(&mut self)

Stop the backend device, allowing it to execute cleanup routines.

Implementors§