Hello,
On two devices I’ve found something rather odd with the HID preparsed
data APIs. On one device,
Usage Page (Vendor-Defined 1) 06Â 00Â FF
        Report Size (1) 75 01
        Report Count (16) 95 10
        Logical Maximum (1) 25 01
        Physical Maximum (1) 45 01
        Usage (Vendor-Defined 1) 09 01
*Input* (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81Â 02
On another,
Report Size (1) 75Â 01
    Report Count (2) 95 02
*Input* (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81Â 02
    Usage (Mute) 09 E2
    Usage (Undefined) 09 00
*Input* (Data,Var,Rel,NWrp,Lin,Pref,NNul,Bit) 81Â 06
    Usage Page (Telephony Devices) 05 0B
    Usage (Hook Switch) 09 20
    Report Count (1) 95 01
*Input* (Data,Var,Rel,NWrp,Lin,Pref,NNul,Bit) 81Â 06
    Usage Page (Consumer Devices) 05 0C
    Usage (Undefined) 09 00
    Report Count (3) 95 03
In both cases, Report Size (1) means the Input segment shows up in
HidP_GetButtonCaps, not HidP_GetValueCaps.
However, these are multiple bits with a single Usage (Vendor Defined in
the first, Undefined in the second). The data index does not show up as
a range, and HIDP_BUTTON_CAPS does not provide ReportCount like
HIDP_VALUE_CAPS does.
Because there are multiple bits, calling HidP_SetData fails with
HIDP_STATUS_IS_VALUE_ARRAY.
If I do try calling HidP_SetUsageValueArray, it fails with
HIDP_STATUS_USAGE_NOT_FOUND, unsurprisingly, because the segment was
returned in HidP_GetButtonCaps.
Is there something I am missing? Neither method seems to be able to
introspect or otherwise interact with this array of buttons.
Thanks!
James