audio, ccid, disk, ether, kb, print, probe, serial, usbeject,
usbfat: – Universal Serial Bus device drivers|
usb/kb [ –dkm ] [ –a accel ] [ dev ... ] |
usb/disk [ –Dd ] [ –m mnt ] [ –s srv ] [ dev ... ]
usbfat: [ disk ... ]
usbeject [ disk ... ]
usb/audio [ –dpV ] [ –m mnt ] [ –s srv ] [ –v vol ] [ dev ]
usb/ether [ –Dd ] [ –m mnt ] [ –s srv ] [ dev ... ]
usb/serial [ –Dd ] [ –m mnt ] [ –s srv ] [ dev ... ]
usb/print [ –d ] [ dev ... ]
usb/ccid [ –d ] usb/probe
These programs drive USB devices of specific classes via usb(3).
Usually they are started by usbd(4) upon attachment of the device
to the bus. Less often, users start them manually, depending on
usbd(4)'s configuration. Usually, kb and disk are started by usbd
and other programs are started by hand. |
Without arguments, the drivers handle all the devices (of the appropriate USB class) found on the bus. To make a driver handle only certain devices, supply as arguments the paths for the directories of the devices (actually of their zero endpoints).
Drivers that provide file systems accept options –s and –m to instruct them to post a 9P connection at srv(3) with the given name and/or to mount themselves at mnt. When embedded into usbd these options may not be used. In this case, the file tree supplied by the device driver is available through the file system provided by usbd, usually mounted at /dev and reachable through the 9P connection posted at /srv/usb.
Options –d and –D present on most drivers trigger debug diagnostics and file system debugging diagnostics. Repeating any one of these may increase verbosity.
To help locate devices of interest, probe lists all the USB devices
available, including those with no driver started.
Keyboards and mice
The following options are understood:
The storage device directory contains the usual files served by sd(3): data, raw, and ctl.
The ctl file supplies the device geometry when read.
The script usbfat: mounts the FAT file systems in the DOS partitions
of the named disks; if none, it mounts those file systems found
at /dev/sdU*.*/data. When more than one partition is found, a
suffix is appended to the disk name to identify the partition
number. The script usbeject undoes the effect. If
no argument is given, it unmounts all USB disks. An argument sdUN
unmounts all partitions from disk with USB target N.
Serial and JTAG ports
JTAG ports are similar but the files are named jtag and jtagctl.
The –V option (verbose) causes audio to print information about the device on startup. The –s option specifies a name for a file descriptor to be posted in /srv. The –v options sets initial volume.
Reading volume or audioctl yields the device's settings. The data
format of volume is compatible with the Soundblaster and produces
output in this format:
The file audioctl provides more information, using up to 6 columns of 12 characters each. From left to right, the fields are: control name, in or out, current value, minimum value, maximum, and resolution. There are 3, 5, or 6 columns present. Maxima and resolution are omitted when they are not available or not applicable. The resolution for speed is reported as 1 (one) if the sampling frequency is continuously variable. It is absent if it is settable at a fixed number of discrete values only.
When all values from audioctl have been read, a zero–length buffer is returned (the usual end–of–file indication). A new read will then block until one of the settings changes, then report its new value.
The file audioctl can be written like volume.
Audio data is written to audio and read from audioin. The data
format is little–endian, samples ordered primarily by time and
secondarily by channel. Samples occupy the minimum integral number
of bytes. Read and write operations of arbitrary size are allowed.
The driver takes care of powering the card adequately, based on its ATR, and tunnelling the RPCs through the USB device. Only slot 0 is supported.
When the smartcard disappears, all reads and write fail until
the file is reopened and a new ATR is written to it.
kbin(3), mouse(3), sd(3), uart(3), usb(3), usbd(4), partfs(8)|
The various device drivers are generic USB drivers and may work
only for certain devices on each class. |
USB ATA storage devices are not supported.
The Ethernet device works only for certain ASIX–based cards and for CDC devices. Both the Ethernet and printer drivers have not been tested and it is likely they will fail.
The serial driver works only for the Prolific chip and Ftdi, and
control of the dcd and dsr signals and some of the extra features
are unimplemented. For Ftdi, only the Sheevaplug and Guruplug
have been tried. There is support for the EHCI debug port, but
it loses bytes.