1 .\" Copyright (c) 1997, 1998
2 .\" Nick Hibma <n_hibma@FreeBSD.org>. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the author nor the names of any co-contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY NICK HIBMA AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL NICK HIBMA OR THE VOICES IN HIS HEAD
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.
28 .\" Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
30 .\" Redistribution and use in source and binary forms, with or without
31 .\" modification, are permitted provided that the following conditions
33 .\" 1. Redistributions of source code must retain the above copyright
34 .\" notice, this list of conditions and the following disclaimer.
35 .\" 2. Redistributions in binary form must reproduce the above copyright
36 .\" notice, this list of conditions and the following disclaimer in the
37 .\" documentation and/or other materials provided with the distribution.
39 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
40 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
41 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
42 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
43 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
44 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
45 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
46 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
47 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
48 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 .Nd Universal Serial Bus
60 To compile this driver into the kernel,
61 place the following line in your
62 kernel configuration file:
63 .Bd -ragged -offset indent
67 Alternatively, to load the driver as a
68 module at boot time, place the following line in
70 .Bd -literal -offset indent
73 .Sh USERLAND PROGRAMMING
74 USB functions can be accessed from userland through the libusb library.
80 provides machine-independent bus support and drivers for
82 devices in host and device side mode.
86 driver has three layers:
88 .It USB Controller (Bus)
93 The controller attaches to a physical bus
98 bus attaches to the controller, and the root hub attaches
100 Any devices attached to the bus will attach to the root hub
101 or another hub attached to the
107 device will always be present as it is needed for the
109 .Sh INTRODUCTION TO USB
112 is a system where external devices can be connected to a PC.
113 The most common USB speeds are:
115 .It Low Speed (1.5MBit/sec)
116 .It Full Speed (12MBit/sec)
117 .It High Speed (480MBit/sec)
122 has a USB controller that is the master of the bus.
123 The physical communication is simplex which means the host controller only communicates with one USB device at a time.
125 There can be up to 127 devices connected to an USB HUB tree.
126 The addresses are assigned
127 dynamically by the host when each device is attached to the bus.
129 Within each device there can be up to 16 endpoints.
131 is individually addressed and the addresses are static.
132 Each of these endpoints will communicate in one of four different modes:
133 .Em control , isochronous , bulk ,
136 A device always has at least one endpoint.
137 This endpoint has address 0 and is a control
138 endpoint and is used to give commands to and extract basic data,
139 such as descriptors, from the device.
140 Each endpoint, except the control endpoint, is unidirectional.
142 The endpoints in a device are grouped into interfaces.
143 An interface is a logical unit within a device; e.g.\&
144 a compound device with both a keyboard and a trackball would present
145 one interface for each.
146 An interface can sometimes be set into different modes,
147 called alternate settings, which affects how it operates.
148 Different alternate settings can have different endpoints
151 A device may operate in different configurations.
153 configuration, the device may present different sets of endpoints
156 The bus enumeration of the
158 bus proceeds in several steps:
161 Any interface specific driver can attach to the device.
163 If none is found, generic interface class drivers can attach.
168 specifications can be found at:
170 .D1 Pa http://www.usb.org/developers/docs/
198 module complies with the USB 2.0 standard.
202 module has been inspired by the NetBSD USB stack initially written by
203 Lennart Augustsson. The
205 module was written by
206 .An Hans Petter Selasky Aq hselasky@freebsd.org .