summaryrefslogtreecommitdiff
path: root/lib/libusbhid/usage.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r205728Kai Wang2010-05-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. MFC r207812 hid_get_data() now expects that the hid data passed in always contains the report ID byte. Thus we should not skip the the report ID byte in hid_interrupt(). Also, if HUP_KEYBOARD usage is an array, do not try to modify the 'data' pointer, instead, increase the hid_item_t field 'pos' by 'report_size' before calling hid_get_data() during each iteration. Notes: svn path=/stable/8/; revision=208262
* Sync with NetBSD.Matthew N. Dodd2003-04-091-1/+2
| | | | | | | | | | | | | | | | | - 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. Notes: svn path=/head/; revision=113273
* MF NetBSD:Matthew N. Dodd2003-04-071-7/+9
| | | | | | | | | | | | | - 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(). Notes: svn path=/head/; revision=113193
* Finish the libusb.h -> libusbhid.h migration.Josef Karthauser2002-03-281-1/+1
| | | | | | | MFC after: 7 days Notes: svn path=/head/; revision=93331
* Add __FBSDID()s to libusbMatthew Dillon2001-09-301-3/+3
| | | | Notes: svn path=/head/; revision=84224
* Sync with NetBSD:Nick Hibma2000-10-161-2/+40
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=67217
* Sync with NetBSD:Nick Hibma2000-08-261-3/+3
| | | | | | | | Print unknown usages with 4 digits. Mask in page extraction. Notes: svn path=/head/; revision=65116
* The USB library from NetBSD by Lennart Augustsson <lennart@augustsson.net>.Nick Hibma2000-06-111-0/+197
Notes: svn path=/head/; revision=61560