1 .\" $NetBSD: uhid.4,v 1.13 2001/12/29 14:41:59 augustss Exp $
3 .\" Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Lennart Augustsson.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
37 .Nd USB generic HID support
39 To compile this driver into the kernel,
40 place the following line in your
41 kernel configuration file:
42 .Bd -ragged -offset indent
46 Alternatively, to load the driver as a
47 module at boot time, place the following line in
49 .Bd -literal -offset indent
55 driver provides support for all HID (Human Interface Device) interfaces
56 in USB devices that do not have a special driver.
58 The device handles the following
61 .Bl -tag -width indent
62 .It Dv USB_GET_REPORT_ID Pq Vt int
63 Get the report identifier used by this HID report.
64 .It Dv USB_GET_REPORT_DESC Pq Vt "struct usb_gen_descriptor"
65 Get the HID report descriptor.
68 bytes of the report descriptor data into the memory
73 is set to the number of bytes copied.
75 this descriptor the exact layout and meaning of data to/from
76 the device can be found.
77 The report descriptor is delivered
78 without any processing.
80 struct usb_gen_descriptor {
84 uint8_t ugd_report_type;
88 .It Dv USB_SET_IMMED Pq Vt int
89 Sets the device in a mode where each
91 will return the current value of the input report.
95 will only return the data that the device reports on its
97 This call may fail if the device does not support
99 .It Dv USB_GET_REPORT Pq Vt "struct usb_gen_descriptor"
100 Get a report from the device without waiting for data on
104 bytes of the report data into the memory specified by
108 is set to the number of bytes copied.
111 field indicates which report is requested.
113 .Dv UHID_INPUT_REPORT ,
114 .Dv UHID_OUTPUT_REPORT ,
116 .Dv UHID_FEATURE_REPORT .
117 This call may fail if the device does not support this feature.
118 .It Dv USB_SET_REPORT Pq Vt "struct usb_gen_descriptor"
119 Set a report in the device.
122 field indicates which report is to be set.
124 .Dv UHID_INPUT_REPORT ,
125 .Dv UHID_OUTPUT_REPORT ,
127 .Dv UHID_FEATURE_REPORT .
128 The value of the report is specified by the
133 This call may fail if the device does not support this feature.
138 to get data from the device.
139 Data should be read in chunks of the
140 size prescribed by the report descriptor.
144 to send data to the device.
145 Data should be written in chunks of the
146 size prescribed by the report descriptor.
148 The following variables are available as both
153 .Bl -tag -width indent
154 .It Va hw.usb.uhid.debug
155 Debug output level, where 0 is debugging disabled and larger values increase
156 debug message verbosity.
159 .Bl -tag -width ".Pa /dev/uhid?"
171 This manual page was adopted from
174 .An Tom Rhodes Aq Mt trhodes@FreeBSD.org