[CFT] usbhid(3) improvements
Kai Wang
kaiwang27 at gmail.com
Sat Mar 20 21:11:18 UTC 2010
Hi list,
I've prepared a patch that merges some kernel USB HID parser
improvements back to the userland usbhid(3) library. The patch is
available here:
http://people.freebsd.org/~kaiw/usbhid.diff
To apply and reinstall usbhid(3) library:
# cd /usr/src/lib/libusbhid
# patch -p0 < path/to/usbhid.diff
# make clean && make && make install
The changes I've made:
* Merge multiple report ID support and other improvements from kernel
HID parser.
* Ignore rid argument in hid_start_parser, parse all the report items since
we now support multiple report ID.
* Skip report ID byte in hid_get_data and set report ID byte hid_set_data
if report ID is non-zero.
* Reimplement hid_get_report_id, instead get report id from uhid device
(which is always 0), try parsing the report descriptor and return the
first ID encountered.
The patch does not change the usbhid(3) API and should not break any
native or third party usbhid(3) application. Instead, it should make
them work better.
If you are using the usbhid(3) library, usbhidctl(1), usbhidaction(1)
or ports like devel/sdl12 etc, could you please help test if this
patch breaks anything?
Thanks,
Kai
More information about the freebsd-usb
mailing list