summaryrefslogtreecommitdiffstats
path: root/lib/libusbhid/parse.c
Commit message (Collapse)AuthorAgeFilesLines
* Restore handling of the third argument (id) of hid_start_parse(), same asmav2012-09-201-4/+19
| | | | | | | | | | | | it is done in NetBSD/OpenBSD, and as it was here before r205728. I personally think this API or its implementation is incorrect, as it is not correct to filter collections based on report ID, as they are orthogonal in general case, but I see no harm from supporting this feature. PR: usb/171810 Submitted by: Vitaly Magerya <vmagerya@gmail.com> MFC after: 1 month
* HID Report ID is unsigned value, so clear the rest of bits from possiblemav2012-05-161-1/+1
| | | | sign expansion.
* MFprojects/hid:mav2011-09-281-12/+14
| | | | | | | | | | | | | | Import the rest of HID improvements from the branch: - improve report descriptor parser in libusbhid to handle several kinds of reports same time; - add to the libusbhid API two functions wrapping respective kernel IOCTLs for reading and writing reports; - tune uhid IOCTL interface to allow reading and writing arbitrary report, when multiple supported by the device; - teach usbhidctl to set output and feature reports; - make usbhidaction support all the same item names as bhidctl. Sponsored by: iXsystems, inc.
* MFprojects/hid:mav2011-07-301-5/+7
| | | | | | | | | | | | - Fix usbhidctl and usbhidaction to handle HID devices with multiple report ids, such as multimedia keyboards. - Add collection type and report id to the `usbhidctl -r` output. They are important for proper device understanding and debugging. - Fix usbhidaction tool to properly handle items having report_count more then 1. Approved by: re (kib) MFC after: 2 weeks
* Merge improvements from kernel HID parser to the userland usbhid(3)kaiw2010-03-271-207/+329
| | | | | | | | | | | | | | | | | | | | 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
* Do not cast dval.emax2004-02-111-2/+1
| | | | | | Make global _usage_page unsigned. Reviewed by: imp (mentor)
* The report size is not a local item, so don't clear it when clearing local ↵emax2004-01-281-1/+0
| | | | | | | | items. PR: misc/58971 Reviewed by: imp (mentor), mdodd Obtained from: NetBSD
* Sync with NetBSD.mdodd2003-04-091-44/+93
| | | | | | | | | | | | | | - 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.
* MF NetBSD:mdodd2003-04-071-0/+1
| | | | | | | | | | - 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().
* Finish the libusb.h -> libusbhid.h migration.joe2002-03-281-1/+1
| | | | MFC after: 7 days
* Add __FBSDID()s to libusbdillon2001-09-301-3/+3
|
* Sync with NetBSD:n_hibma2000-10-161-34/+38
| | | | | | | | | | 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.
* Remove DIAGASSERTn_hibma2000-07-071-17/+0
|
* The USB library from NetBSD by Lennart Augustsson <lennart@augustsson.net>.n_hibma2000-06-111-0/+405
OpenPOWER on IntegriCloud