summaryrefslogtreecommitdiff
path: root/lib/libusbhid
Commit message (Collapse)AuthorAgeFilesLines
* MFC r240762:Alexander Motin2012-11-153-9/+23
| | | | | | | | | | | | | | Restore handling of the third argument (id) of hid_start_parse(), same as 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 Notes: svn path=/stable/8/; revision=243059
* MFC r235510:Alexander Motin2012-05-241-1/+1
| | | | | | | | HID Report ID is unsigned value, so clear the rest of bits from possible sign expansion. Notes: svn path=/stable/8/; revision=235867
* MFC r225839:Alexander Motin2012-01-034-13/+61
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/stable/8/; revision=229389
* MFC r213920 (by hselasky):Alexander Motin2012-01-033-3/+25
| | | | | | | | | - Add support for libusbhid in 32-bit compatibility mode. - Add missing check for ugd_actlen being too small. - Add missing inclusion guard to usbvar.h header file. Notes: svn path=/stable/8/; revision=229388
* MFC r224511:Alexander Motin2011-08-151-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. Notes: svn path=/stable/8/; revision=224886
* MFC r205728Kai Wang2010-05-186-250/+405
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC r208023Andrew Thompson2010-05-182-5/+9
| | | | | | | Use fixed width integer types for parsing the binary hid data. Notes: svn path=/stable/8/; revision=208248
* MFC r208012Andrew Thompson2010-05-171-6/+10
| | | | | | | Support getting signed and unsigned HID data. Notes: svn path=/stable/8/; revision=208236
* Bump the version of all non-symbol-versioned shared libraries inKen Smith2009-07-191-1/+1
| | | | | | | | | | | preparation for 8.0-RELEASE. Add the previous version of those libraries to ObsoleteFiles.inc and bump __FreeBSD_Version. Reviewed by: kib Approved by: re (rwatson) Notes: svn path=/head/; revision=195767
* Fix missed change from usb2_gen_descriptor to usb_gen_descriptorAndrew Thompson2009-05-281-1/+1
| | | | Notes: svn path=/head/; revision=192992
* Fix HID_COMPAT7 handling around the USB_GET_REPORT_DESC ioctl.Andrew Thompson2009-02-271-2/+4
| | | | | | | | Submitted by: daichi Pointy hat: me Notes: svn path=/head/; revision=189108
* Build fixups for the new USB stack.Andrew Thompson2009-02-233-1/+11
| | | | Notes: svn path=/head/; revision=188945
* src/usr.bin/usbhidaction/usbhidaction.cAlfred Perlstein2009-02-026-7/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/usr.bin/usbhidctl/usbhid.c src/sys/dev/usb2/include/usb2_hid.h src/sys/dev/usb2/input/uhid2.c src/lib/libusbhid/Makefile src/lib/libusbhid/descr.c src/lib/libusbhid/descr_compat.c src/lib/libusbhid/usbhid.3 src/lib/libusbhid/usbhid.h src/lib/libusbhid/usbvar.h Patches to make libusbhid and HID userland utilities compatible with the new USB stack. All HID ioctls should go through the libusbhid library to ensure compatibility. I have found at least one piece of software in /usr/ports which needs to get updated before USB HID devices will work. This is the X joystick input driver. Reported and tested by: Daichi GOTO and Masanori OZAWA. src/sys/dev/usb2/core/usb2_process.c Correct USB process names. Reported by: Andre Guibert de Bruet src/sys/dev/usb2/serial/uftdi2.c Integrate changes from old USB stack. Submitted by: hps Notes: svn path=/head/; revision=187994
* Bump library versions in preparation for 7.0.Daniel Eischen2007-05-211-1/+1
| | | | | | | Ok'd by: kan Notes: svn path=/head/; revision=169807
* Fix prototypes.Ruslan Ermilov2005-11-241-6/+6
| | | | Notes: svn path=/head/; revision=152763
* Bump the shared library version number of all libraries that have notKen Smith2005-07-221-1/+1
| | | | | | | | | | been bumped since RELENG_5. Reviewed by: ru Approved by: re (not needed for commit check but in principle...) Notes: svn path=/head/; revision=148297
* Release n_hibma's maintainership due to his ENOTIME.Jens Schweikhardt2005-06-041-2/+0
| | | | | | | Discussed with, okayed, authorized, requested by, on behalf of: n_hibma (MAINTAINER) Notes: svn path=/head/; revision=146957
* Sort sections.Ruslan Ermilov2005-01-201-4/+4
| | | | Notes: svn path=/head/; revision=140505
* Add __BEGIN_DECLS / __END_DECLS so this can be used in C++ code.Dag-Erling Smørgrav2004-06-031-0/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=130030
* Do not cast dval.Maksim Yevmenkin2004-02-112-3/+2
| | | | | | | | | Make global _usage_page unsigned. Reviewed by: imp (mentor) Notes: svn path=/head/; revision=125716
* The report size is not a local item, so don't clear it when clearing local ↵Maksim Yevmenkin2004-01-281-1/+0
| | | | | | | | | | | items. PR: misc/58971 Reviewed by: imp (mentor), mdodd Obtained from: NetBSD Notes: svn path=/head/; revision=125121
* Correct URI to USB specs.Hideyuki KURASHINA2003-12-211-1/+1
| | | | | | | | Submitted by: Lukas Ertl <l.ertl@univie.ac.at> PR: docs/60457 Notes: svn path=/head/; revision=123705
* mdoc(7): Use the new feature of the .In macro.Ruslan Ermilov2003-09-081-1/+1
| | | | Notes: svn path=/head/; revision=119893
* Assorted mdoc(7) fixes.Ruslan Ermilov2003-05-221-9/+9
| | | | | | | Approved by: re (blanket) Notes: svn path=/head/; revision=115225
* Sync with NetBSD.Matthew N. Dodd2003-04-098-186/+130
| | | | | | | | | | | | | | | | | - 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-074-13/+24
| | | | | | | | | | | | | - 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
* Zap now-unused SHLIB_MINORPeter Wemm2002-09-281-1/+0
| | | | Notes: svn path=/head/; revision=104073
* mdoc(7) police: Tidy up the markup.Ruslan Ermilov2002-05-301-29/+37
| | | | Notes: svn path=/head/; revision=97586
* Install libusbhid, and use it instead of libusb.Josef Karthauser2002-03-282-2/+2
| | | | | | | MFC after: 6 days Notes: svn path=/head/; revision=93351
* Update the documentation to reflect the change from libusb to libusbhid.Josef Karthauser2002-03-283-221/+11
| | | | | | | MFC after: 6 days Notes: svn path=/head/; revision=93350
* Finish the libusb.h -> libusbhid.h migration.Josef Karthauser2002-03-286-8/+8
| | | | | | | MFC after: 7 days Notes: svn path=/head/; revision=93331
* Rename libusb.h to libusbhid.h, via a repocopy.Josef Karthauser2002-03-282-102/+1
| | | | | | | MFC after: 7 days Notes: svn path=/head/; revision=93309
* Remove __P() usage.David E. O'Brien2002-03-213-45/+45
| | | | Notes: svn path=/head/; revision=92917
* Prefix structure members to protect them against clashes with eg.Alfred Perlstein2002-02-201-2/+2
| | | | | | | | | | | | c++ keywords. This keeps us in sync with NetBSD because they actually committed my delta first. Ok'd by: lennard Notes: svn path=/head/; revision=90996
* mdoc(7) police: Use the new .In macro for #include statements.Ruslan Ermilov2001-10-012-2/+2
| | | | Notes: svn path=/head/; revision=84306
* Add __FBSDID()s to libusbMatthew Dillon2001-09-304-11/+12
| | | | Notes: svn path=/head/; revision=84224
* mdoc(7) police: Fixed broken xrefs.Ruslan Ermilov2001-08-222-2/+2
| | | | Notes: svn path=/head/; revision=82139
* MAN[1-9] -> MAN.Ruslan Ermilov2001-03-271-1/+1
| | | | Notes: svn path=/head/; revision=74870
* Fixed prototypes. About half of them were wrong (mainly due to constBruce Evans2001-02-062-20/+20
| | | | | | | poisoning having not reached here). Notes: svn path=/head/; revision=72066
* Added used include of <sys/cdefs.h>.Bruce Evans2001-02-063-0/+12
| | | | | | | Declare all the interfaces documented in usb.3 (2 were missing). Notes: svn path=/head/; revision=72065
* mdoc(7) police: use certified section headers wherever possible.Ruslan Ermilov2000-11-172-2/+2
| | | | Notes: svn path=/head/; revision=68854
* Remove fullstops from the end of .Xr lines in SEE ALSO section.Ben Smithurst2000-11-152-2/+2
| | | | Notes: svn path=/head/; revision=68751
* Sync with NetBSD:Nick Hibma2000-10-168-73/+170
| | | | | | | | | | | | | 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-264-9/+9
| | | | | | | | Print unknown usages with 4 digits. Mask in page extraction. Notes: svn path=/head/; revision=65116
* Remove DIAGASSERTNick Hibma2000-07-073-25/+0
| | | | Notes: svn path=/head/; revision=62757
* The USB library from NetBSD by Lennart Augustsson <lennart@augustsson.net>.Nick Hibma2000-06-1111-0/+1504
Notes: svn path=/head/; revision=61560