Deleted Added
full compact
usb.4 (115284) usb.4 (119893)
1.\" Copyright (c) 1997, 1998
2.\" Nick Hibma <n_hibma@FreeBSD.org>. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 11 unchanged lines hidden (view full) ---

20.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
26.\" THE POSSIBILITY OF SUCH DAMAGE.
27.\"
1.\" Copyright (c) 1997, 1998
2.\" Nick Hibma <n_hibma@FreeBSD.org>. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 11 unchanged lines hidden (view full) ---

20.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
26.\" THE POSSIBILITY OF SUCH DAMAGE.
27.\"
28.\" $FreeBSD: head/share/man/man4/usb.4 115284 2003-05-24 18:28:18Z hmp $
28.\" $FreeBSD: head/share/man/man4/usb.4 119893 2003-09-08 19:57:22Z ru $
29.\"
30.Dd February 21, 1999
31.Dt USB 4
32.Os
33.Sh NAME
34.Nm usb
35.Nd Universal Serial Bus
36.Sh SYNOPSIS

--- 112 unchanged lines hidden (view full) ---

149.Tn USB
150driver can attach.
151.El
152.Sh USB CONTROLLER INTERFACE
153Use the following to get access to the
154.Tn USB
155specific structures and defines.
156.Pp
29.\"
30.Dd February 21, 1999
31.Dt USB 4
32.Os
33.Sh NAME
34.Nm usb
35.Nd Universal Serial Bus
36.Sh SYNOPSIS

--- 112 unchanged lines hidden (view full) ---

149.Tn USB
150driver can attach.
151.El
152.Sh USB CONTROLLER INTERFACE
153Use the following to get access to the
154.Tn USB
155specific structures and defines.
156.Pp
157.In dev/usb/usb.h
158.Pp
159The
160.Pa /dev/usb Ns Ar N
161can be opened and a few operations can be performed on it.
162The
163.Xr poll 2
164system call will say that I/O is possible on the controller device when a
165.Tn USB
166device has been connected or disconnected to the bus.

--- 109 unchanged lines hidden (view full) ---

276This command can be used to execute arbitrary requests on the control pipe.
277This is
278.Em DANGEROUS
279and should be used with great care since it
280can destroy the bus integrity.
281.El
282.Pp
283The include file
157The
158.Pa /dev/usb Ns Ar N
159can be opened and a few operations can be performed on it.
160The
161.Xr poll 2
162system call will say that I/O is possible on the controller device when a
163.Tn USB
164device has been connected or disconnected to the bus.

--- 109 unchanged lines hidden (view full) ---

274This command can be used to execute arbitrary requests on the control pipe.
275This is
276.Em DANGEROUS
277and should be used with great care since it
278can destroy the bus integrity.
279.El
280.Pp
281The include file
284.Aq Pa dev/usb/usb.h
282.In dev/usb/usb.h
285contains definitions for the types used by the various
286.Xr ioctl 2
287calls.
288The naming convention of the fields for the various
289.Tn USB
290descriptors exactly follows the naming in the
291.Tn USB
292specification.
293Byte sized fields can be accessed directly, but word (16 bit)
294sized fields must be access by the
295.Fn UGETW field
296and
297.Fn USETW field value
298macros to handle byte order and alignment properly.
299.Pp
300The include file
283contains definitions for the types used by the various
284.Xr ioctl 2
285calls.
286The naming convention of the fields for the various
287.Tn USB
288descriptors exactly follows the naming in the
289.Tn USB
290specification.
291Byte sized fields can be accessed directly, but word (16 bit)
292sized fields must be access by the
293.Fn UGETW field
294and
295.Fn USETW field value
296macros to handle byte order and alignment properly.
297.Pp
298The include file
301.Aq Pa dev/usb/usbhid.h
299.In dev/usb/usbhid.h
302similarly contains the definitions for
303Human Interface Devices
304.Pq Tn HID .
305.Sh USB EVENT INTERFACE
306All
307.Tn USB
308events are reported via the
309.Pa /dev/usb

--- 118 unchanged lines hidden ---
300similarly contains the definitions for
301Human Interface Devices
302.Pq Tn HID .
303.Sh USB EVENT INTERFACE
304All
305.Tn USB
306events are reported via the
307.Pa /dev/usb

--- 118 unchanged lines hidden ---