Enum usb2::StandardRequest[][src]

pub enum StandardRequest {
    ClearFeature(ClearFeature),
    GetConfiguration,
    GetDescriptor {
        descriptor: GetDescriptor,
        length: u16,
    },
    GetInterface {
        interface: u8,
    },
    GetStatus(GetStatus),
    SetAddress {
        address: Option<Address>,
    },
    SetConfiguration {
        value: Option<NonZeroU8>,
    },
    SetDescriptor {
        descriptor: SetDescriptor,
        length: u16,
    },
    SetFeature(SetFeature),
    SetInterface {
        interface: u8,
        alternate: u8,
    },
    SynchFrame {
        endpoint: Endpoint,
    },
}

Standard device requests

See section 9.4 of (USB2)

Variants

ClearFeature(ClearFeature)

CLEAR_FEATURE

GetConfiguration

GET_CONFIGURATION

GetDescriptor

GET_DESCRIPTOR

Fields of GetDescriptor

descriptor: GetDescriptor

Requested descriptor

length: u16

Maximum number of bytes to return

GetInterface

GET_INTERFACE – returns the alternate setting of the specified interface

Fields of GetInterface

interface: u8

The interface

GetStatus(GetStatus)

GET_STATUS

SetAddress

SET_ADDRESS

Fields of SetAddress

address: Option<Address>

The new address – None is used to return to the Default state

SetConfiguration

SET_CONFIGURATION

Fields of SetConfiguration

value: Option<NonZeroU8>

The new configuration – None is used to return to the Address state

SetDescriptor

SET_DESCRIPTOR

Fields of SetDescriptor

descriptor: SetDescriptor

The descriptor to set or change

length: u16

The length of the descriptor

SetFeature(SetFeature)

SET_FEATURE

SetInterface

SET_INTERFACE – changes the alternate setting of the specified interface

Fields of SetInterface

interface: u8

The interface to modify

alternate: u8

The new alternate setting

SynchFrame

SYNCH_FRAME

Fields of SynchFrame

endpoint: Endpoint

The endpoint this synchronization frame is for

Implementations

impl StandardRequest[src]

pub fn parse(
    bmrequesttype: u8,
    brequest: u8,
    wvalue: u16,
    windex: u16,
    wlength: u16
) -> Result<Self, ()>
[src]

Parses a standard request

Trait Implementations

impl Clone for StandardRequest[src]

impl Copy for StandardRequest[src]

impl Debug for StandardRequest[src]

impl PartialEq<StandardRequest> for StandardRequest[src]

impl StructuralPartialEq for StandardRequest[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.