diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-06-04 00:47:33 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-06-04 00:47:33 +0000 |
commit | e424bb52533702da31fac82d26b87e39d3ea967b (patch) | |
tree | 7dba3ceb4a8a50ce589f324a0029987c1ff22964 /lib/libusbhid/usbhid.3 | |
parent | 48771c25397e21e90627c45ee910cc54d68b0030 (diff) |
knf + new interface: hid_start() is non-exit non-stderr spewing version of hid_init(); ok matthieu millert
Diffstat (limited to 'lib/libusbhid/usbhid.3')
-rw-r--r-- | lib/libusbhid/usbhid.3 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libusbhid/usbhid.3 b/lib/libusbhid/usbhid.3 index 49db00c8a4b..a152f3ce9e8 100644 --- a/lib/libusbhid/usbhid.3 +++ b/lib/libusbhid/usbhid.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: usbhid.3,v 1.6 2003/05/24 18:30:32 jmc Exp $ +.\" $OpenBSD: usbhid.3,v 1.7 2004/06/04 00:47:32 deraadt Exp $ .\" $NetBSD: usbhid.3,v 1.5 2002/02/07 07:00:52 ross Exp $ .\" .\" Copyright (c) 1999, 2001 Lennart Augustsson <augustss@netbsd.org> @@ -40,6 +40,7 @@ .Nm hid_locate , .Nm hid_usage_page , .Nm hid_usage_in_page , +.Nm hid_start , .Nm hid_init , .Nm hid_get_data , .Nm hid_set_data @@ -73,6 +74,8 @@ .Ft void .Fn hid_init "char *file" .Ft int +.Fn hid_start "char *file" +.Ft int .Fn hid_get_data "void *data" "hid_item_t *h" .Ft void .Fn hid_set_data "void *data" "hid_item_t *h" "u_int data" @@ -180,11 +183,14 @@ if it cannot be found. .Pp Before any of these functions can be called the usage table must be parsed, this is done by calling -.Fn hid_init +.Fn hid_start with the name of the table. Passing .Fa NULL to this function will cause it to use the default table. +A return value of -1 indicates that an error has occured, and +.Va errno +is set. .Ss DATA EXTRACTION FUNCTIONS Given the data obtained from a HID device and an item in the report descriptor the |