Trait xhci::context::DeviceHandler [−][src]
A trait to handle the Device Context.
Examples
use xhci::context::{byte32::Device, DeviceHandler}; let mut device = Device::new(); let slot = device.slot_mut(); let ep0 = device.endpoint0_mut(); let ep1 = device.endpoints_mut(1);
Required methods
fn slot_mut(&mut self) -> &mut dyn SlotHandler
[src]
Returns a mutable reference to the Slot Context.
Examples
use xhci::context::{byte32::Device, DeviceHandler}; let mut device = Device::new(); let slot = device.slot_mut();
fn endpoint0_mut(&mut self) -> &mut dyn EndpointHandler
[src]
Returns a mutable reference to the Endpoint Context 0.
Examples
use xhci::context::{byte32::Device, DeviceHandler}; let mut device = Device::new(); let ep0 = device.endpoint0_mut();
fn endpoints_mut(&mut self, i: usize) -> &mut dyn EndpointPairHandler
[src]
Returns a mutable reference to the Endpoint Context i
.
Panics
This method panics if i == 0
or i > 15
.
Examples
use xhci::context::{byte32::Device, DeviceHandler}; let mut device = Device::new(); let ep1 = device.endpoints_mut(1);
Do not call this method with i == 0
. Call DeviceHandler::slot_mut
instead.
ⓘ
use xhci::context::{byte32::Device, DeviceHandler}; let mut device = Device::new(); let ep0 = device.endpoints_mut(0);