Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Mar 2010 22:11:14 +0100
From:      Kai Wang <kaiwang27@gmail.com>
To:        freebsd-usb@freebsd.org
Subject:   [CFT] usbhid(3) improvements
Message-ID:  <20100320211114.GB2798@viskning>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100320211114.GB2798>