Trait devices::usb::xhci::xhci_backend_device::XhciBackendDevice
source · 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§
sourcefn get_backend_type(&self) -> BackendType
fn get_backend_type(&self) -> BackendType
Returns the type of USB device provided by this device.
sourcefn set_address(&mut self, address: UsbDeviceAddress)
fn set_address(&mut self, address: UsbDeviceAddress)
Set address of this backend.
sourcefn get_speed(&self) -> Option<DeviceSpeed>
fn get_speed(&self) -> Option<DeviceSpeed>
Get speed of this device.
sourcefn alloc_streams(&self, ep: u8, num_streams: u16) -> Result<()>
fn alloc_streams(&self, ep: u8, num_streams: u16) -> Result<()>
Allocate streams for the endpoint
sourcefn free_streams(&self, ep: u8) -> Result<()>
fn free_streams(&self, ep: u8) -> Result<()>
Free streams for the endpoint