summaryrefslogtreecommitdiff
path: root/lib/libusbhid/usbhid.3
diff options
context:
space:
mode:
authorYojiro Uo <yuo@cvs.openbsd.org>2012-07-11 13:43:55 +0000
committerYojiro Uo <yuo@cvs.openbsd.org>2012-07-11 13:43:55 +0000
commit6d17cf6962cf8f7c9c0d01d649a0d3a09d259fb7 (patch)
treeaaf3837d63c984311ab4cf3aef1a1935ef112684 /lib/libusbhid/usbhid.3
parent601c20e821989aba859af7d3b8590d460941ee25 (diff)
- port multiple report ID support for HID parser from FreeBSD code
(rev. 205728, 224511 and 225839) - add hid_get_report_id(3) to get id of a descriptor. - crank the major in shlib_version 3.0 -> 4.0 ok deraadt@, mpi@
Diffstat (limited to 'lib/libusbhid/usbhid.3')
-rw-r--r--lib/libusbhid/usbhid.39
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libusbhid/usbhid.3 b/lib/libusbhid/usbhid.3
index ed883720e73..e8a812f8abe 100644
--- a/lib/libusbhid/usbhid.3
+++ b/lib/libusbhid/usbhid.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: usbhid.3,v 1.11 2012/02/19 15:48:48 stsp Exp $
+.\" $OpenBSD: usbhid.3,v 1.12 2012/07/11 13:43:54 yuo Exp $
.\" $NetBSD: usbhid.3,v 1.5 2002/02/07 07:00:52 ross Exp $
.\"
.\" Copyright (c) 1999, 2001 Lennart Augustsson <augustss@netbsd.org>
@@ -25,12 +25,13 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: February 19 2012 $
+.Dd $Mdocdate: July 11 2012 $
.Dt USBHID 3
.Os
.Sh NAME
.Nm usbhid ,
.Nm hid_get_report_desc ,
+.Nm hid_get_report_id ,
.Nm hid_use_report_desc ,
.Nm hid_dispose_report_desc ,
.Nm hid_start_parse ,
@@ -51,6 +52,8 @@
.Fd #include \*[Lt]usbhid.h\*[Gt]
.Ft report_desc_t
.Fn hid_get_report_desc "int file"
+.Ft int
+.Fn hid_get_report_id "int file"
.Ft report_desc_t
.Fn hid_use_report_desc "unsigned char *data" "unsigned int size"
.Ft void
@@ -97,6 +100,8 @@ The routines can be divided into four parts: extraction of the descriptor,
parsing of the descriptor, translating to/from symbolic names, and
data manipulation.
.Ss DESCRIPTOR FUNCTIONS
+The report descripor ID can be obtained by calling
+.Fn hid_get_report_id .
A report descriptor can be obtained by calling
.Fn hid_get_report_desc
with a file descriptor obtained by opening a