Module xhci::context[][src]

The xHC Contexts.

The xHC supports either 32-byte or 64-byte Contexts. You must check the Context Size bit of the HCCPARAMS1 register. If the bit is 0, use the byte32 module. If the bit is 1, use the byte64 module.

Examples

use xhci::{context, context::InputHandler};

let mut input = context::byte32::Input::new();
let input_control = input.control_mut();
input_control.set_aflag(0);
input_control.set_aflag(1);

let device = input.device_mut();
let slot = device.slot_mut();
slot.set_context_entries(1);
slot.set_root_hub_port_number(port_id);

Modules

byte32

32-byte Contexts.

byte64

64-byte Contexts.

Enums

EndpointType

Endpoint Type.

Traits

DeviceHandler

A trait to handle the Device Context.

EndpointHandler

A trait to handle the Endpoint Context.

EndpointPairHandler

A trait to handle a pair of the Endpoint Context.

InputControlHandler

A trait to handle the Input Control Context.

InputHandler

A trait to handle the Input Context.

SlotHandler

A trait to handle the Slot Context.