pub fn from_bytes(buffer: &[u8; 6]) -> Self {
        Self::new(
            DeviceStatusCode::from_byte(buffer[0]).unwrap_or(DeviceStatusCode::errUNKNOWN),
            u32::from_le_bytes([buffer[1], buffer[2], buffer[3], 0]),
            DeviceStateCode::from_byte(buffer[4]).unwrap_or(DeviceStateCode::dfuERROR),
            u8::from_le(buffer[5]),
        )
    }
/// Creates a new image element from a buffer of u8 values
Creates a new image element from a buffer of u8 values
Creates a new image element from a buffer of u8 values
pub fn from_bytes(buffer: &[u8; 6]) -> Self {
        Self::new(
            DeviceStatusCode::from_byte(buffer[0]).unwrap_or(DeviceStatusCode::errUNKNOWN),
            u32::from_le_bytes([buffer[1], buffer[2], buffer[3], 0]),
            DeviceStateCode::from_byte(buffer[4]).unwrap_or(DeviceStateCode::dfuERROR),
            u8::from_le(buffer[5]),
        )
    }
pub fn from_bytes ( buffer : & [ u8 ; 6 ] ) -> Self { Self :: new ( DeviceStatusCode :: from_byte ( buffer [ 0 ] ) . unwrap_or ( DeviceStatusCode :: errUNKNOWN ) , u32 :: from_le_bytes ( [ buffer [ 1 ] , buffer [ 2 ] , buffer [ 3 ] , 0 ] ) , DeviceStateCode :: from_byte ( buffer [ 4 ] ) . unwrap_or ( DeviceStateCode :: dfuERROR ) , u8 :: from_le ( buffer [ 5 ] ) , ) }
Creates a new image element from a buffer of u8 values
Creates a new image element from a buffer of u8 values
buffer
&[u8; 6]