#[repr(C)]pub struct SetupPacket {
pub request_type: RequestType,
pub request: u8,
pub value: u16,
pub index: u16,
pub length: u16,
}Expand description
USB Control Setup Packet
Fields§
§request_type: RequestTypeRequest characteristics: direction, type, recipient. See RequestType type for details. Called bmRequestType in USB spec (Table 9-2).
request: u8Request code. See Table 9-3 of USB spec for standard ones. Called bRequest in USB spec (Table 9-2).
value: u16Use depending on request field. Called wValue in USB spec (Table 9-2).
index: u16Use depending on request field. Called wIndex in USB spec (Table 9-2).
length: u16Number of bytes to transfer in data stage if there is one. Called wLength in USB spec (Table 9-2).
Implementations§
Trait Implementations§
Source§impl Clone for SetupPacket
impl Clone for SetupPacket
Source§fn clone(&self) -> SetupPacket
fn clone(&self) -> SetupPacket
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SetupPacket
impl Debug for SetupPacket
Source§impl Format for SetupPacketwhere
RequestType: Format,
impl Format for SetupPacketwhere
RequestType: Format,
Source§impl PartialEq for SetupPacket
impl PartialEq for SetupPacket
impl Copy for SetupPacket
impl Eq for SetupPacket
impl StructuralPartialEq for SetupPacket
Auto Trait Implementations§
impl Freeze for SetupPacket
impl RefUnwindSafe for SetupPacket
impl Send for SetupPacket
impl Sync for SetupPacket
impl Unpin for SetupPacket
impl UnwindSafe for SetupPacket
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