Trait xhci::context::EndpointHandler[][src]

pub trait EndpointHandler: AsMut<[u32]> {
    fn set_mult(&mut self, m: u8) { ... }
fn set_max_primary_streams(&mut self, s: u8) { ... }
fn set_interval(&mut self, i: u8) { ... }
fn set_error_count(&mut self, c: u8) { ... }
fn set_endpoint_type(&mut self, t: EndpointType) { ... }
fn set_max_burst_size(&mut self, s: u8) { ... }
fn set_max_packet_size(&mut self, s: u16) { ... }
fn set_dequeue_cycle_state(&mut self, c: bool) { ... }
fn set_transfer_ring_dequeue_pointer(&mut self, p: u64) { ... } }

A trait to handle the Endpoint Context.

Examples

use xhci::context::{byte32::Device, DeviceHandler};

let mut device = Device::new();
let ep0 = device.endpoint0_mut();

ep0.set_mult(0);

Provided methods

fn set_mult(&mut self, m: u8)[src]

Sets the value of the Mult field.

Panics

This method panics if m >= 4.

Examples

use xhci::context::{byte32::Device, DeviceHandler};

let mut device = Device::new();
let ep0 = device.endpoint0_mut();

ep0.set_mult(0);

fn set_max_primary_streams(&mut self, s: u8)[src]

Sets the value of the Max Primary Streams field.

Examples

use xhci::context::{byte32::Device, DeviceHandler};

let mut device = Device::new();
let ep0 = device.endpoint0_mut();

ep0.set_max_primary_streams(0);

fn set_interval(&mut self, i: u8)[src]

Sets the value of the Interval field.

Examples

use xhci::context::{byte32::Device, DeviceHandler};

let mut device = Device::new();
let ep0 = device.endpoint0_mut();

ep0.set_interval(0);

fn set_error_count(&mut self, c: u8)[src]

Sets the value of the Error Count field.

Examples

use xhci::context::{byte32::Device, DeviceHandler};

let mut device = Device::new();
let ep0 = device.endpoint0_mut();

ep0.set_error_count(3);

fn set_endpoint_type(&mut self, t: EndpointType)[src]

Sets the type of the Endpoint.

Examples

use xhci::context::{byte32::Device, DeviceHandler, EndpointType};

let mut device = Device::new();
let ep0 = device.endpoint0_mut();

ep0.set_endpoint_type(EndpointType::Control);

fn set_max_burst_size(&mut self, s: u8)[src]

Sets the value of the Max Burst Size field.

Panics

This method panics if s > 15.

Examples

use xhci::context::{byte32::Device, DeviceHandler, EndpointType};

let mut device = Device::new();
let ep0 = device.endpoint0_mut();

ep0.set_max_burst_size(0);

fn set_max_packet_size(&mut self, s: u16)[src]

Sets the value of the Max Packet Size field.

Examples

use xhci::context::{byte32::Device, DeviceHandler, EndpointType};

let mut device = Device::new();
let ep0 = device.endpoint0_mut();

ep0.set_max_packet_size(max_packet_size);

fn set_dequeue_cycle_state(&mut self, c: bool)[src]

Sets the value of the Dequeue Cycle State field.

Examples

use xhci::context::{byte32::Device, DeviceHandler, EndpointType};

let mut device = Device::new();
let ep0 = device.endpoint0_mut();

ep0.set_dequeue_cycle_state(true);

fn set_transfer_ring_dequeue_pointer(&mut self, p: u64)[src]

Sets the value of the Transfer Ring Dequeue pointer field.

Panics

This method panics if p is not 16 byte aligned.

Examples

use xhci::context::{byte32::Device, DeviceHandler, EndpointType};

let mut device = Device::new();
let ep0 = device.endpoint0_mut();

ep0.set_transfer_ring_dequeue_pointer(ring_addr);
Loading content...

Implementors

Loading content...