pub fn packet_id_width(packet_data: &[u8]) -> Result<usize, HidIoParseError>
Expand description

Determines id_width from a byte stream

Arguments

  • packet_data - Vector of bytes

Remarks

Uses a packet byte stream to determine packet id_width.

struct HidIo_Packet {
   ... (4 bits)
   uint8_t           id_width:1;  // 0 - 16bits, 1 - 32bits
   ...
};