pub fn from_bytes(buffer: &[u8]) -> Self {
        Self {
            bLength: u8::from_le(buffer[0]),
            bDescriptorType: u8::from_le(buffer[1]),
            bmAttributes: u8::from_le(buffer[2]),
            wDetachTimeOut: u16::from_le_bytes([buffer[3], buffer[4]]),
            wTransferSize: u16::from_le_bytes([buffer[5], buffer[6]]),
            bcdDFUVersion: u16::from_le_bytes([buffer[7], buffer[8]]),
        }
    }
/// Creates a new descriptor from a buffer of u8 values
Creates a new descriptor from a buffer of u8 values
Creates a new descriptor from a buffer of u8 values
pub fn from_bytes(buffer: &[u8]) -> Self {
        Self {
            bLength: u8::from_le(buffer[0]),
            bDescriptorType: u8::from_le(buffer[1]),
            bmAttributes: u8::from_le(buffer[2]),
            wDetachTimeOut: u16::from_le_bytes([buffer[3], buffer[4]]),
            wTransferSize: u16::from_le_bytes([buffer[5], buffer[6]]),
            bcdDFUVersion: u16::from_le_bytes([buffer[7], buffer[8]]),
        }
    }
pub fn from_bytes ( buffer : & [ u8 ] ) -> Self { Self { bLength : u8 :: from_le ( buffer [ 0 ] ) , bDescriptorType : u8 :: from_le ( buffer [ 1 ] ) , bmAttributes : u8 :: from_le ( buffer [ 2 ] ) , wDetachTimeOut : u16 :: from_le_bytes ( [ buffer [ 3 ] , buffer [ 4 ] ] ) , wTransferSize : u16 :: from_le_bytes ( [ buffer [ 5 ] , buffer [ 6 ] ] ) , bcdDFUVersion : u16 :: from_le_bytes ( [ buffer [ 7 ] , buffer [ 8 ] ] ) , } }
Creates a new descriptor from a buffer of u8 values
Creates a new descriptor from a buffer of u8 values
buffer
&[u8]