Date: Thu, 9 Sep 2010 08:56:48 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: freebsd-current@freebsd.org Cc: Maksim Yevmenkin <maksim.yevmenkin@gmail.com> Subject: Re: silly libusbhid question Message-ID: <201009090856.48132.hselasky@c2i.net> In-Reply-To: <AANLkTi=Te8Lwe_TOvm=6o6-OgEgR_WDAXSgH3yPK7D7x@mail.gmail.com> References: <AANLkTi=Te8Lwe_TOvm=6o6-OgEgR_WDAXSgH3yPK7D7x@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 08 September 2010 20:57:50 Maksim Yevmenkin wrote: > hello, > > [trying current@ 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 In kernel and userspace this is currently a feature in the HID libraries. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009090856.48132.hselasky>