[][src]Function hid_io::protocol::hidio::packet_type

pub fn packet_type(
    packet_data: &mut Vec<u8>
) -> Result<HIDIOPacketType, HIDIOParseError>

Determines the packet type from a byte stream

Arguments

Remarks

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;
   ...
};