Why do we ignore constant fields?
From: Daniel Martin <hidden>
Date: 2015-09-23 13:42:14
Hi,
why do we skip constant fields (HID_MAIN_ITEM_CONSTANT) in hid-input
and hid-core?
In the "Device Class Definition for Human Interface Devices" (v1.11)
one can read:
"Constant indicates the item is a static read-only field in a
report and cannot be modified (written) by the host."
(As an HID noob) I'm interpreting this as:
- The values we see in this field are not constant per se as the
device (firmware) may change it, but we can't with a command.
To give a more practical hint - why I'm asking. I've had a look at the
Type Cover of a MS Surface 2. Here the touchpad doesn't do multitouch.
Within the report descriptor is Input(4), Application
(Digitizers.TouchPad), having the ContactID field as constant tagged.
Now, I just removed the constant checks from hid-{core,input} plus a
few other tweaks and hid-multitouch handles it fine with up to 3
contacts.
Can't we remove those checks?
Cheers,
Daniel