pub struct SetupData {
pub request_type: DeviceRequestType,
pub request_code: u8,
pub value: u16,
pub index: u16,
pub length: u16,
}
Expand description
The data structure sent in a SETUP handshake.
Fields§
§request_type: DeviceRequestType
§request_code: u8
§value: u16
§index: u16
§length: u16
Implementations§
Source§impl SetupData
impl SetupData
Sourcepub fn get(p: &[VolatileCell<u8>]) -> Option<Self>
pub fn get(p: &[VolatileCell<u8>]) -> Option<Self>
Create a SetupData
structure from a packet received from the wire
Sourcepub fn get_standard_request(&self) -> Option<StandardRequest>
pub fn get_standard_request(&self) -> Option<StandardRequest>
If the SetupData
represents a standard device request, return it
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SetupData
impl RefUnwindSafe for SetupData
impl Send for SetupData
impl Sync for SetupData
impl Unpin for SetupData
impl UnwindSafe for SetupData
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