]> git.lizzy.rs Git - plan9front.git/blob - sys/man/4/nusb
nusb/kb: remove mouse acceleration -a flag
[plan9front.git] / sys / man / 4 / nusb
1 .TH NUSB 4
2 .SH NAME
3 audio,
4 disk,
5 ether,
6 kb,
7 serial,
8 ptp,
9 usbd - Universal Serial Bus drivers
10 .SH SYNOPSIS
11 .B nusb/audio
12 .I devid
13 .PP
14 .B nusb/disk
15 [
16 .B -d
17 ]
18 .I devid
19 .PP
20 .B nusb/ether
21 [
22 .B -dD
23 ] [
24 .B -t
25 .I ethertype
26 ] [
27 .B -a
28 .I addr
29 ]
30 .I devid
31 .PP
32 .B nusb/kb
33 [
34 .B -d
35 ]
36 .I devid
37 .PP
38 .B nusb/serial
39 [
40 .B -d
41 ]
42 .I devid
43 .PP
44 .B nusb/ptp
45 [
46 .B -dD
47 ]
48 .I devid
49 .PP
50 .B nusb/usbd
51 .SH DESCRIPTION
52 These programs drive USB devices of specific classes via
53 .IR usb (3).
54 Usually they are started by
55 .IR nusbrc (8)
56 upon attachment of the device to the bus. All drivers except
57 .I usbd
58 take the decimal usb 
59 .I devid
60 of the device they should handle as ther last argument. A
61 driver's instance handles only one device at a time.
62 .PP
63 Drivers that provide file systems make them available as shares under
64 .B /shr
65 (see
66 .IR shr (3))
67 or
68 .BR /shr/usb
69 (wich is bound after
70 .BR /dev
71 by
72 .IR nusbrc (8)). 
73 .PP
74 Options
75 .B \-d
76 and
77 .B \-D
78 trigger debug diagnostics and file system debugging
79 diagnostics for most drivers. Repeating any one of these may
80 increase verbosity.
81 .SS Hubs
82 .I Usbd
83 enumerates the tree of USB hubs and configures the device on
84 attachment. It provides a filesystem with the the file
85 .B usbevent
86 (usualy seen as
87 .BR /dev/usbevent )
88 which, when read, returns a 5 column, space separated line of
89 text, one for each event. The columns are:
90 .B attach
91 or
92 .B detach
93 .I devid
94 .I vid
95 .I did
96 and
97 .I csp .
98 All but
99 .I devid
100 are formated as 4 digit hexadecimal. This file is read by
101 .IR nusbrc (8)
102 and the
103 .I devid
104 is passed to a suitable driver.
105 .SS Keyboards and mice
106 .I Kb
107 supports USB keyboards and mice either as separate USB devices
108 or as a single combined USB device.
109 Scan codes from the keyboard are sent to
110 .B /dev/kbin
111 to let
112 .IR kbdfs (8)
113 process them.
114 Mouse events are sent to
115 .BR /dev/mousein
116 in the same way.
117 .SS Disks
118 .I Disk
119 configures and manages USB mass storage devices. It
120 provides a file system (usually seen under
121 .BR /dev )
122 that includes one directory per storage device, named
123 .BI sdU N . M
124 in correspondence with the usb device number and the storage
125 unit number (or LUN).
126 For example, LUN number 2 on
127 .B /dev/usb/ep3.0
128 can be accessed through
129 .BR /dev/sdU3.2 .
130 .PP
131 The storage device directory contains the usual files
132 served by
133 .IR sd (3):
134 .BR data ,
135 .BR raw ,
136 and
137 .BR ctl .
138 .PP
139 The
140 .B ctl
141 file supplies the device geometry and partitions when read.
142 .SS Ethernet
143 .I Ether
144 handles USB ethernet devices. The file system provided is
145 compatible to
146 .IR ether (3)
147 and added to the share
148 .B usbnet
149 (see
150 .IR shr (3))
151 wich is bound after
152 .B /net
153 by
154 .IR nusbrc (8)
155 so the device will appear as
156 .BI /net/etherU N .
157 Without specifying the
158 .B -t
159 option, the device is assumed to be a CDC compliant ethernet
160 communication device. Other devices might require setting an
161 explicit
162 .IR ethertype
163 such as
164 .BR smsc ,
165 .B a88772
166 or
167 .B a88178
168 see
169 .IR nusbrc (8).
170 On devices that support it, the mac address can be set using
171 the
172 .B -a
173 .IR addr
174 option.
175 .SS Serial and JTAG ports
176 .I Serial
177 provides a file system (usually seen under
178 .BR /dev )
179 that includes one directory per USB serial port, named
180 .BI eiaU N
181 or
182 .BI eiaU N . M.
183 In this directory there are two files,
184 .BR eiaU ,
185 similar to
186 .BI eia N
187 in
188 .IR uart (3),
189 and
190 .BR eiaUctl ,
191 which admits writes in the same format as
192 .BI eia N ctl
193 in
194 .IR uart (3).
195 Reading from
196 .B eiaUctl
197 gives the serial port's settings in the same format as
198 .BI eia N status
199 in
200 .IR uart (3).
201 Options are similar to those of
202 .IR disk .
203 .PP
204 JTAG ports are similar
205 but the files are named
206 .B jtag
207 and
208 .BR jtagctl .
209 .
210 .SS Audio devices
211 .I Audio
212 configures and manages a USB audio device.
213 It implements a file system, (normally seen under
214 .BI /dev )
215 compatible to
216 .IR audio (3).
217 .SH SOURCE
218 .B /sys/src/cmd/nusb
219 .SH "SEE ALSO"
220 .IR audio (3),
221 .IR ether (3),
222 .IR mouse (3),
223 .IR sd (3),
224 .IR uart (3),
225 .IR usb (3),
226 .IR shr (3),
227 .IR nusbrc (8),
228 .IR kbdfs (8)
229 .SH BUGS
230 The various device drivers are generic USB drivers and
231 may work only for certain devices of each class.
232 .PP
233 USB ATA storage devices are not supported.
234 .PP
235 The serial driver works only for the Prolific chip and Ftdi,
236 and control of the
237 .B dcd
238 and
239 .B dsr
240 signals and some of the extra features are not implemented.
241 For Ftdi, only the Sheevaplug and Guruplug have been tried.
242 There is support for the EHCI debug port, but it loses bytes.