pub struct Setup {
pub request_type: u8,
pub request: u8,
pub value: u16,
pub index: u16,
pub length: u16,
}Expand description
USB control-transfer setup packet: bmRequestType, bRequest, wValue, wIndex, wLength
(USB spec §9.3), eight bytes little-endian on the wire.
length is the data-stage length: for an IN request, the bytes to read back (the device may
return fewer); for an OUT request, the length of the data passed to
transfer, which the box carries after the setup packet.
Fields§
§request_type: u8bmRequestType: direction (b7), type and recipient.
request: u8bRequest: request code.
value: u16wValue: request-specific.
index: u16wIndex: request-specific (often an interface or endpoint).
length: u16wLength: data-stage length (see the type docs).
Implementations§
Trait Implementations§
impl Copy for Setup
impl Eq for Setup
impl StructuralPartialEq for Setup
Auto Trait Implementations§
impl Freeze for Setup
impl RefUnwindSafe for Setup
impl Send for Setup
impl Sync for Setup
impl Unpin for Setup
impl UnsafeUnpin for Setup
impl UnwindSafe for Setup
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