User Tools

Site Tools


hid_device_api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hid_device_api [2012/05/21 05:54]
hile [References]
hid_device_api [2018/12/28 03:05] (current)
be.ing old revision restored (2018/12/27 10:46)
Line 65: Line 65:
 === Packing === === Packing ===
  
-Instead of telling the packet field length, HIDPacket parses the fields based on //pack// attribute. The packing tells the size and numeric range for each field, and allows us to convert the input number to and from exactly correct value. ​Valid '​pack'​ values are b (signed byte), ​(unsigned byte), (signed ​short), H (unsigned ​short)(unsigned ​int) and I (signed ​int)A field containing bits still needs to be given valid '​pack'​ value, to calculate bit vector masks and check boundaries.+Instead of telling the packet field length, HIDPacket parses the fields based on //pack// attribute. The packing tells the size and numeric range for each field, and allows us to convert the input number to and from exactly correct value. ​Currently supported ​'​pack'​ values are 
 +unsigned/​signed ​byte                    | 
 +/ H | unsigned/signed ​two byte value (short) ​ | 
 +/ I | unsigned/signed four byte value (int)   | 
 +A field containing bits still needs to be given valid '​pack'​ value, to calculate bit vector masks and check boundaries.
  
 === Bitmask === === Bitmask ===
hid_device_api.1337594088.txt.gz · Last modified: 2018/02/01 09:09 (external edit)