1 .\" $NetBSD: uhid.4,v 1.13 2001/12/29 14:41:59 augustss Exp $
2 .\" $FreeBSD: src/share/man/man4/uhid.4,v 1.1.2.3 2002/08/16 05:02:25 trhodes Exp $
4 .\" Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
5 .\" All rights reserved.
7 .\" This code is derived from software contributed to The NetBSD Foundation
8 .\" by Lennart Augustsson.
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
13 .\" 1. Redistributions of source code must retain the above copyright
14 .\" notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\" notice, this list of conditions and the following disclaimer in the
17 .\" documentation and/or other materials provided with the distribution.
18 .\" 3. All advertising materials mentioning features or use of this software
19 .\" must display the following acknowledgment:
20 .\" This product includes software developed by the NetBSD
21 .\" Foundation, Inc. and its contributors.
22 .\" 4. Neither the name of The NetBSD Foundation nor the names of its
23 .\" contributors may be used to endorse or promote products derived
24 .\" from this software without specific prior written permission.
26 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 .\" POSSIBILITY OF SUCH DAMAGE.
43 .Nd USB generic HID support
45 .Cd "uhid* at uhidev? reportid ?"
49 driver provides support for all HID (Human Interface Device) interfaces
50 in USB devices that do not have a special driver.
52 The device handles the following
56 .Bl -tag -width indent -compact
57 .It Dv USB_GET_REPORT_ID (int)
58 Get the report identifier used by this HID report.
59 .It Dv USB_GET_REPORT_DESC (struct usb_ctl_report_desc)
60 Get the HID report descriptor. Using
61 this descriptor the exact layout and meaning of data to/from
62 the device can be found. The report descriptor is delivered
63 without any processing.
65 struct usb_ctl_report_desc {
67 u_char data[1024]; /* filled data size will vary */
70 .It Dv USB_SET_IMMED (int)
71 Sets the device in a mode where each
73 will return the current value of the input report. Normally
76 will only return the data that the device reports on its
77 interrupt pipe. This call may fail if the device does not support
79 .It Dv USB_GET_REPORT (struct usb_ctl_report)
80 Get a report from the device without waiting for data on
81 the interrupt pipe. The
83 field indicates which report is requested. It should be
84 .Dv UHID_INPUT_REPORT ,
85 .Dv UHID_OUTPUT_REPORT ,
87 .Dv UHID_FEATURE_REPORT .
88 This call may fail if the device does not support this feature.
90 struct usb_ctl_report {
92 u_char data[1024]; /* used data size will vary */
94 .It Dv USB_SET_REPORT (struct usb_ctl_report)
95 Set a report in the device. The
97 field indicates which report is to be set. It should be
98 .Dv UHID_INPUT_REPORT ,
99 .Dv UHID_OUTPUT_REPORT ,
101 .Dv UHID_FEATURE_REPORT .
102 This call may fail if the device does not support this feature.
108 to get data from the device. Data should be read in chunks of the
109 size prescribed by the report descriptor.
113 send data to the device. Data should be written in chunks of the
114 size prescribed by the report descriptor.
130 This manual page was adopted from
133 .An Tom Rhodes Aq trhodes@FreeBSD.org