Function packet_type
Source pub fn packet_type(
packet_data: &[u8],
) -> Result<HidIoPacketType, HidIoParseError>
Expand description
Determines the packet type from a byte stream
§Arguments
packet_data
- Vector of bytes
Uses a packet byte stream to determine the packet type.
First three bits of data stream are used (from C-Struct):
struct HidIo_Packet {
HidIo_Packet_Type type:3;
...
};