pub enum PollResult {
None,
Reset,
Data {
ep_out: u16,
ep_in_complete: u16,
ep_setup: u16,
},
Suspend,
Resume,
}Expand description
Events returned by UsbBus::poll.
Variants§
None
No events to report.
Reset
The USB bus was reset by the host.
Data
One or more endpoints have received or completed data.
Each field is a 16-bit mask where bit n corresponds to endpoint n.
Fields
Suspend
The host asserted USB suspend.
Resume
The host deasserted USB suspend (resume).
Implementations§
Source§impl PollResult
impl PollResult
Sourcepub fn is_data(self) -> bool
pub fn is_data(self) -> bool
true for PollResult::Data, i.e. when endpoint events are pending.
Auto Trait Implementations§
impl Forget for PollResult
impl Freeze for PollResult
impl Move for PollResult
impl RefUnwindSafe for PollResult
impl Send for PollResult
impl Sync for PollResult
impl Unpin for PollResult
impl UnsafeUnpin for PollResult
impl UnwindSafe for PollResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more