NetBSD/share/man/man4/usb.4
1998-07-12 20:56:23 +00:00

123 lines
4.5 KiB
Groff

.\" $NetBSD: usb.4,v 1.2 1998/07/12 20:56:23 augustss Exp $
.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd July 12, 1998
.Dt USB 4
.Os
.Sh NAME
.Nm usb
.Nd introduction to USB support
.Sh SYNOPSIS
.Cd "uhci* at pci? function?"
.Cd "ohci* at pci? function?"
.Cd "usb* at uhci?"
.Cd "usb* at ohci?"
.Cd "uhub* at usb?"
.Cd "uhub* at uhub? port ?"
.Cd "XX* at uhub? port ?"
.Pp
.Sh INTRODUCTION
.Nx
provides machine-independent bus support and
drivers for USB devices.
.Pp
The
.Nx
driver has three layers (like
.Xr scsi 4
and
.Xr pcmcia 4 ):
the controller, the bus, and the device layer.
The controller attaches to a physical bus (like
.Xr pci 4 ).
The USB bus attaches to the controller and the root hub attaches
to the controller. Further devices, which includes further hubs,
attach to other hubs. The attachment forms the same tree structure
as the physical USB device tree.
For each USB device there may be further drivers attached to it.
.Pp
The
.Cm uhub
device controls USB hubs and must always be present (since there
is at least a root hub in any USB system).
.Pp
.Sh INTRODUCTION TO USB
The USB is a 12Mb/s serial bus (1.5 Mb/s for low speed devices).
Each USB bus has a host controller that is the master of the bus;
all other devices on the bus only speak when spoken to.
.Pp
There can be up to 127 devices (apart from the host controller)
on a bus each with its own address. The addresses are assigned
dynamically by the host when the device is attached to the bus.
.Pp
Within each device there can be up to 16 endpoints. Each endpoint
is individually addressed and the addresses are static.
Each of these endpoints will communicate in one of four different modes:
control, isochronous, bulk, or interrupt. A device always has
at least one endpoint. This endpoint has address 0 and is a control
endpoint and is used to give commands to and extract basic data
such as descriptors from the device.
Each endpoint, except control endpoints, is unidirectional.
.Pp
The endpoints in a device are grouped into interfaces. An interface
is a logical unit within a device. E.g., a compound device with
both a keyboard and a trackball would present one interface for
each. An interface can sometimes be set into different modes,
called alternate settings, which affects how it operates.
Different alternate settings can have different endpoints
within it.
.Pp
A device may operate in different configurations. Depending on the
configuration the device may present different sets of endpoints
and interfaces.
.Pp
.\" The USB controller has a device that supports
.\" .Xr ioctl 2
.\" to manipulate it.
.Sh SEE ALSO
.Xr pci 4 ,
.Xr uaudio 4 ,
.Xr ugen 4 ,
.Xr uhid 4 ,
.Xr ukbd 4 ,
.Xr ulpt 4 ,
.Xr ums 4 ,
.Xr usbd 8 ,
.Xr usbdevs 8
.Sh HISTORY
The
.Nm
driver
appeared in
.Nx 1.4 .