pub enum PollResult {
    None,
    Reset,
    Data {
        ep_out: u16,
        ep_in_complete: u16,
        ep_setup: u16,
    },
    Suspend,
    Resume,
}
Expand description

Event and incoming packet information returned by UsbBus::poll.

Variants§

§

None

No events or packets to report.

§

Reset

The USB reset condition has been detected.

§

Data

Fields

§ep_out: u16

An OUT packet has been received. This event should continue to be reported until the packet is read.

§ep_in_complete: u16

An IN packet has finished transmitting. This event should only be reported once for each completed transfer.

§ep_setup: u16

A SETUP packet has been received. This event should continue to be reported until the packet is read. The corresponding bit in ep_out may also be set but is ignored.

USB packets have been received or sent. Each data field is a bit-field where the least significant bit represents endpoint 0 etc., and a set bit signifies the event has occurred for the corresponding endpoint.

§

Suspend

A USB suspend request has been detected or, in the case of self-powered devices, the device has been disconnected from the USB bus.

§

Resume

A USB resume request has been detected after being suspended or, in the case of self-powered devices, the device has been connected to the USB bus.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.