silly libusbhid question

From: Maksim Yevmenkin <maksim.yevmenkin_at_gmail.com>
Date: Wed, 8 Sep 2010 11:57:50 -0700
hello,

[trying current_at_ first to get wider audience :)]

so, i have a somewhat silly question about libusbhid. please consider
the following code

hid_data_t      d;
hid_item_t      h;

for (d = hid_start_parse(desc, 1 << hid_input, -1); hid_get_item(d, &h) > 0; ) {
...
}
hid_end_parse(d);

the idea is/was to parse and iterate over hid descriptor desc in a
such a way that only "hid_input" items are returned. as it turns out,
this code will also pick up "hid_collection" items as well, i.e.
"h.kind" is set to "hid_collection". is this a bug or a feature?

thanks,
max
Received on Wed Sep 08 2010 - 17:19:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:07 UTC