[][src]Struct usb_device::control::Request

pub struct Request {
    pub direction: UsbDirection,
    pub request_type: RequestType,
    pub recipient: Recipient,
    pub request: u8,
    pub value: u16,
    pub index: u16,
    pub length: u16,
}

A control request read from a SETUP packet.

Fields

direction: UsbDirection

Direction of the request.

request_type: RequestType

Type of the request.

recipient: Recipient

Recipient of the request.

request: u8

Request code. The meaning of the value depends on the previous fields.

value: u16

Request value. The meaning of the value depends on the previous fields.

index: u16

Request index. The meaning of the value depends on the previous fields.

length: u16

Length of the DATA stage. For control OUT transfers this is the exact length of the data the host sent. For control IN transfers this is the maximum length of data the device should return.

Methods

impl Request
[src]

pub const GET_STATUS: u8[src]

Standard USB control request Get Status

pub const CLEAR_FEATURE: u8[src]

Standard USB control request Clear Feature

pub const SET_FEATURE: u8[src]

Standard USB control request Set Feature

pub const SET_ADDRESS: u8[src]

Standard USB control request Set Address

pub const GET_DESCRIPTOR: u8[src]

Standard USB control request Get Descriptor

pub const SET_DESCRIPTOR: u8[src]

Standard USB control request Set Descriptor

pub const GET_CONFIGURATION: u8[src]

Standard USB control request Get Configuration

pub const SET_CONFIGURATION: u8[src]

Standard USB control request Set Configuration

pub const GET_INTERFACE: u8[src]

Standard USB control request Get Interface

pub const SET_INTERFACE: u8[src]

Standard USB control request Set Interface

pub const SYNCH_FRAME: u8[src]

Standard USB control request Synch Frame

pub const FEATURE_ENDPOINT_HALT: u16[src]

Standard USB feature Endpoint Halt for Set/Clear Feature

pub const FEATURE_DEVICE_REMOTE_WAKEUP: u16[src]

Standard USB feature Device Remote Wakeup for Set/Clear Feature

pub fn descriptor_type_index(&self) -> (u8, u8)
[src]

Gets the descriptor type and index from the value field of a GET_DESCRIPTOR request.

Trait Implementations

impl Copy for Request
[src]

impl PartialEq<Request> for Request
[src]

impl Eq for Request
[src]

impl Clone for Request
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Request
[src]

Auto Trait Implementations

impl Send for Request

impl Sync for Request

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]