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