Commit Graph

10 Commits

Author SHA1 Message Date
kaiw
28e4fb3b8e Merge improvements from kernel HID parser to the userland usbhid(3)
parser.  This merge does not change any API and should not break any
native or thirdparty applications.

Changes include:

* 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 in
  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 report ID encountered.

Reviewed by:	hps
Silent on:	-usb mailing list
2010-03-27 08:00:16 +00:00
emax
6b8ec0360c Do not cast dval.
Make global _usage_page unsigned.

Reviewed by:	imp (mentor)
2004-02-11 21:09:13 +00:00
emax
e8f29709eb The report size is not a local item, so don't clear it when clearing local items.
PR:	misc/58971
Reviewed by:	imp (mentor), mdodd
Obtained from:	NetBSD
2004-01-28 00:05:22 +00:00
mdodd
339cdd9fae Sync with NetBSD.
- Bump shared library version on libusbhid.
- Retire libusbhid.h; it is called usbhid.h now.
- hid_start_parse() takes a third argument.
- hid_locate() takes a fifth argument.
- hid_report_size() order of arguments changes.
- Other changes, including formatting and whitespace.

Bump __FreeBSD_version.

This change will break all third party applications that rely on previous
FreeBSD specific behavior.
2003-04-09 01:52:49 +00:00
mdodd
c60d47e32f MF NetBSD:
- Reduce diffs with NetBSD.
  - Formatting and explicit values for enum declaration.
  - Order of prototypes.
  - zero report_size in hid_clear_local()
  - errx() needs no newline
  - Don't initialie variable in declaration in hid_parse_usage_in_page().
- Use fmtcheck() in hid_usage_in_page().
2003-04-07 00:49:53 +00:00
joe
49f5bd3fed Finish the libusb.h -> libusbhid.h migration.
MFC after:	7 days
2002-03-28 11:42:45 +00:00
dillon
35945dc1b7 Add __FBSDID()s to libusb 2001-09-30 22:30:55 +00:00
n_hibma
ef4994a121 Sync with NetBSD:
K&R -> ANSI

Bugfix: 'Keep the bit position even when the report descriptor says POP.'

Add hid_use_report_desc, hid_parse_usage_page, hid_parse_usage_in_page.

Changed iface for hid_report_size.
2000-10-16 18:13:59 +00:00
n_hibma
7b59eeb53d Remove DIAGASSERT 2000-07-07 08:15:19 +00:00
n_hibma
74454ab778 The USB library from NetBSD by Lennart Augustsson <lennart@augustsson.net>. 2000-06-11 18:19:14 +00:00