Commit Graph

43 Commits

Author SHA1 Message Date
mav
ad37555d42 MFprojects/hid:
- 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
2011-07-30 13:22:44 +00:00
hselasky
5b550686a5 - 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.
- This also fixes buildworld breakage since r213852.
2010-10-16 11:20:53 +00:00
thompsa
1518781968 Use fixed width integer types for parsing the binary hid data.
PR:		usb/146367
Submitted by:	Hans Petter Selasky
2010-05-13 02:03:00 +00:00
thompsa
f7f314b3e7 Support getting signed and unsigned HID data.
Submitted by:	Alex Deiter
Reviewed by:	Hans Petter Selaksy
2010-05-12 22:50:23 +00:00
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
kensmith
9c2c634ee9 Bump the version of all non-symbol-versioned shared libraries in
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)
2009-07-19 17:25:24 +00:00
thompsa
19b8da41e5 Fix missed change from usb2_gen_descriptor to usb_gen_descriptor 2009-05-28 20:21:01 +00:00
thompsa
1e203e5f95 Fix HID_COMPAT7 handling around the USB_GET_REPORT_DESC ioctl.
Submitted by:	daichi
Pointy hat:	me
2009-02-27 15:30:42 +00:00
thompsa
67f51fe4b6 Build fixups for the new USB stack. 2009-02-23 18:36:54 +00:00
alfred
cbd30dee28 src/usr.bin/usbhidaction/usbhidaction.c
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
2009-02-02 00:49:39 +00:00
deischen
ff36458e08 Bump library versions in preparation for 7.0.
Ok'd by:	kan
2007-05-21 02:49:08 +00:00
ru
af47fb2f88 Fix prototypes. 2005-11-24 11:26:36 +00:00
kensmith
f97f77429f Bump the shared library version number of all libraries that have not
been bumped since RELENG_5.

Reviewed by:	ru
Approved by:	re (not needed for commit check but in principle...)
2005-07-22 17:19:05 +00:00
schweikh
c1ecf2fe86 Release n_hibma's maintainership due to his ENOTIME.
Discussed with, okayed, authorized, requested by, on behalf of:	n_hibma (MAINTAINER)
2005-06-04 10:58:39 +00:00
ru
ed72feddcb Sort sections. 2005-01-20 09:17:07 +00:00
des
477bef801b Add __BEGIN_DECLS / __END_DECLS so this can be used in C++ code.
MFC after:	1 week
2004-06-03 15:04:24 +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
rushani
38a3a575b5 Correct URI to USB specs.
Submitted by:	Lukas Ertl <l.ertl@univie.ac.at>
PR:		docs/60457
2003-12-21 14:30:23 +00:00
ru
1c23ef339b mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
ru
9bcac8799e Assorted mdoc(7) fixes.
Approved by:	re (blanket)
2003-05-22 13:02:28 +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
peter
0a7f0ba37e Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00
ru
0d8542c78f mdoc(7) police: Tidy up the markup. 2002-05-30 12:16:01 +00:00
joe
3f16f46fdb Install libusbhid, and use it instead of libusb.
MFC after:	6 days
2002-03-28 18:44:25 +00:00
joe
d64659ecab Update the documentation to reflect the change from libusb to libusbhid.
MFC after:	6 days
2002-03-28 18:22:33 +00:00
joe
49f5bd3fed Finish the libusb.h -> libusbhid.h migration.
MFC after:	7 days
2002-03-28 11:42:45 +00:00
joe
7d051d542a Rename libusb.h to libusbhid.h, via a repocopy.
MFC after:	7 days
2002-03-28 01:42:36 +00:00
obrien
fd9d7ac0ed Remove __P() usage. 2002-03-21 23:54:04 +00:00
alfred
7b6d78ef23 Prefix structure members to protect them against clashes with eg.
c++ keywords.

This keeps us in sync with NetBSD because they actually committed
my delta first.

Ok'd by: lennard
2002-02-20 20:47:21 +00:00
ru
623da62a5a mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
dillon
35945dc1b7 Add __FBSDID()s to libusb 2001-09-30 22:30:55 +00:00
ru
2b577fc318 mdoc(7) police: Fixed broken xrefs. 2001-08-22 14:16:31 +00:00
ru
25ef23ac1c MAN[1-9] -> MAN. 2001-03-27 17:27:19 +00:00
bde
55aff82fbc Fixed prototypes. About half of them were wrong (mainly due to const
poisoning having not reached here).
2001-02-06 01:02:59 +00:00
bde
41bcb6a4a0 Added used include of <sys/cdefs.h>.
Declare all the interfaces documented in usb.3 (2 were missing).
2001-02-06 00:54:00 +00:00
ru
eb8c554f56 mdoc(7) police: use certified section headers wherever possible. 2000-11-17 11:44:16 +00:00
ben
bd39d53f34 Remove fullstops from the end of .Xr lines in SEE ALSO section. 2000-11-15 14:40:14 +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
23d99a41e2 Sync with NetBSD:
Print unknown usages with 4 digits.
Mask in page extraction.
2000-08-26 13:53:27 +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