summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>1999-08-13 14:47:51 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>1999-08-13 14:47:51 +0000
commit45c8272e1d70ed9c938dae7dda29ef428ec723ad (patch)
tree7da0343ee155ef501f8e8748ac4d9447f9231d8a /share
parent7e7913fa79a22806194e17f821190f0d758d87e4 (diff)
some repairs
Diffstat (limited to 'share')
-rw-r--r--share/man/man4/ugen.471
-rw-r--r--share/man/man4/uhid.410
-rw-r--r--share/man/man4/usb.450
3 files changed, 72 insertions, 59 deletions
diff --git a/share/man/man4/ugen.4 b/share/man/man4/ugen.4
index 43fc0fb5b37..aa60bf587fa 100644
--- a/share/man/man4/ugen.4
+++ b/share/man/man4/ugen.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ugen.4,v 1.1 1999/08/13 06:34:59 fgsch Exp $
+.\" $OpenBSD: ugen.4,v 1.2 1999/08/13 14:47:50 aaron Exp $
.\" $NetBSD: ugen.4,v 1.7 1999/07/30 01:32:05 augustss Exp $
.\"
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -56,8 +56,8 @@ Each USB device can have up to 16 endpoints. Each of these endpoints
will communicate in one of four different modes: control, isochronous,
bulk, or interrupt. Each of the endpoints will have a different
device node. The four least significant bits in the minor device
-number determines which endpoint the device accesses and the rest
-of the bits determines which USB device.
+number determine which endpoint the device accesses and the rest
+of the bits determine which USB device.
.Pp
If an endpoint address is used both for input and output the device
can be opened for both read or write, but an
@@ -66,25 +66,24 @@ cannot specify
.Dv O_RDWR
mode; the endpoint must be opened once for each direction.
.Pp
-To find out what endpoints that exist there are a series of
+To find out what endpoints exist there are a series of
.Xr ioctl 2
-operation on the control endpoint that returns the USB descriptors
+operations available for the control endpoint that return the USB descriptors
of the device, configurations, interfaces, and endpoints.
.Pp
-The control transfer mode can only happen on the control endpoint
-which is always endpoint 0. The control endpoint accepts request
-and may respond with an answer to such request. Control request
+The control transfer mode can only happen on the control endpoint,
+which is always endpoint 0. Control requests
are issued by
.Xr ioctl 2
calls.
.\" .Pp
.\" The isochronous transfer mode can be in or out depending on the
-.\" endpoint. To perform IO on an isochronous endpoint
+.\" endpoint. To perform I/O on an isochronous endpoint
.\" .Xr read 2
.\" and
.\" .Xr write 2
.\" should be used.
-.\" Before any IO operations can take place the transfer rate in
+.\" Before any I/O operations can take place the transfer rate in
.\" bytes/second has to be set. This is done with
.\" .Xr ioctl 2
.\" .Dv USB_SET_ISO_RATE .
@@ -92,12 +91,12 @@ calls.
.\" about 1 second of data.
.Pp
The bulk transfer mode can be in or out depending on the
-endpoint. To perform IO on a bulk endpoint
+endpoint. To perform I/O on a bulk endpoint
.Xr read 2
and
.Xr write 2
should be used.
-All IO operations on a bulk endpoint are unbuffered.
+All I/O operations on a bulk endpoint are unbuffered.
.Pp
The interrupt transfer mode can only be in.
To perform input from an interrupt endpoint
@@ -114,18 +113,20 @@ calls:
Allow short read transfer. Normally a transfer from the device
which is shorter than the request specified is reported as an
error.
+.Pp
.It Dv USB_GET_CONFIG (int)
Get the device configuration number.
+.Pp
.It Dv USB_SET_CONFIG (int)
Set the device into the given configuration number.
-.br
This operation can only be performed when the control endpoint
is the sole open endpoint.
+.Pp
.It Dv USB_GET_ALTINTERFACE (struct usb_alt_interface)
Get the alternative setting number for the interface with the given
index.
The
-.Dv config_index
+.Fa config_index
is ignored in this call.
.Bd -literal
struct usb_alt_interface {
@@ -138,17 +139,20 @@ struct usb_alt_interface {
Set the alternative setting to the given number in the interface with the
given index.
The
-.Dv config_index
+.Fa config_index
is ignored in this call.
-.br
+.Pp
This operation can only be performed when no endpoints for the interface
are open.
+.Pp
.It Dv USB_GET_NO_ALT (struct usb_alt_interface)
Return the number of different alternate settings in the
-.Dv alt_no
+.Fa alt_no
field.
+.Pp
.It Dv USB_GET_DEVICE_DESC (usb_device_descriptor_t)
Return the device descriptor.
+.Pp
.It Dv USB_GET_CONFIG_DESC (struct usb_config_desc)
Return the descriptor for the configuration with the given index.
For convenience the current configuration can be specified by
@@ -159,6 +163,7 @@ struct usb_config_desc {
usb_config_descriptor_t desc;
};
.Ed
+.Pp
.It Dv USB_GET_INTERFACE_DESC (struct usb_interface_desc)
Return the interface descriptor for an interface specified by its
configuration index, interface index, and alternative index.
@@ -172,6 +177,7 @@ struct usb_interface_desc {
usb_interface_descriptor_t desc;
};
.Ed
+.Pp
.It Dv USB_GET_ENDPOINT_DESC (struct usb_endpoint_desc)
Return the endpoint descriptor for the endpoint specified by its
configuration index, interface index, alternative index, and
@@ -185,6 +191,7 @@ struct usb_endpoint_desc {
usb_endpoint_descriptor_t desc;
};
.Ed
+.Pp
.It Dv USB_GET_FULL_DESC (struct usb_full_desc)
Return all the descriptors for the given configuration.
.Bd -literal
@@ -194,15 +201,17 @@ struct usb_full_desc {
u_char *data;
};
.Ed
+.Pp
The
-.Dv data
+.Fa data
field should point to a memory area of of the size given in the
-.Dv size
+.Fa size
field. The proper size can be determined by first issuing a
.Dv USB_GET_CONFIG_DESC
and inspecting the
-.Dv wTotalLength
+.Fa wTotalLength
field.
+.Pp
.It Dv USB_GET_STRING_DESC (struct usb_string_desc)
Get a string descriptor for the given language id and
string index.
@@ -213,14 +222,15 @@ struct usb_string_desc {
usb_string_descriptor_t desc;
};
.Ed
+.Pp
.It Dv USB_DO_REQUEST
Send a USB request to the device on the control endpoint.
Any data sent to/from the device is located at
-.Dv data .
+.Fa data .
The size of the transferred data is determined from the
-.Dv request .
+.Fa request .
The
-.Dv addr
+.Fa addr
field is ignored in this call.
.Bd -literal
struct usb_ctl_request {
@@ -232,6 +242,7 @@ struct usb_ctl_request {
This is a dangerous operation in that it can perform arbitrary operations
on the device. Some of the most dangerous (e.g., changing the device
address) are not allowed.
+.Pp
.It Dv USB_GET_DEVICEINFO (struct usb_device_info)
Get an information summary for the device. This call will not
issue any USB transactions.
@@ -247,19 +258,19 @@ use the index, getting and setting typically uses numbers.
Example:
All endpoints (except the control endpoint) for the current configuration
can be found by iterating the
-.Dv interface_index
+.Fa interface_index
from 0 to
-.Dv config_desc->bNumInterface-1
+.Fa config_desc->bNumInterface-1
and for each of these iterating the
-.Dv endpoint_index
+.Fa endpoint_index
from 0 to
-.Dv interface_desc->bNumEndpoints .
+.Fa interface_desc->bNumEndpoints .
The
-.Dv config_index
+.Fa config_index
should set to
.Dv USB_CURRENT_CONFIG_INDEX
and
-.Dv alt_index
+.Fa alt_index
should be set to
.Dv USB_CURRENT_ALT_INDEX .
.Sh SEE ALSO
@@ -269,6 +280,6 @@ The
.Nm
driver
appeared in
-.Ox 2.5 .
+.Ox 2.6 .
.Sh BUGS
The driver is not yet finished; there is no access to isochronous endpoints.
diff --git a/share/man/man4/uhid.4 b/share/man/man4/uhid.4
index be9bb902fed..22ec29a5e1e 100644
--- a/share/man/man4/uhid.4
+++ b/share/man/man4/uhid.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: uhid.4,v 1.1 1999/08/13 06:34:59 fgsch Exp $
+.\" $OpenBSD: uhid.4,v 1.2 1999/08/13 14:47:50 aaron Exp $
.\" $NetBSD: uhid.4,v 1.6 1999/05/11 21:05:09 augustss Exp $
.\"
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@ this feature.
.It Dv USB_GET_REPORT (struct usb_ctl_report)
Get a report from the device without waiting for data on
the interrupt pipe. The
-.Dv report
+.Fa report
field indicates which report is requested. It should be
.Dv UHID_INPUT_REPORT ,
.Dv UHID_OUTPUT_REPORT ,
@@ -104,12 +104,12 @@ Use
send data to the device. Data should be written in chunks of the
size prescribed by the report descriptor.
.Sh SEE ALSO
+.Xr usbhidctl 1 ,
.Xr usb 3 ,
-.Xr usb 4 ,
-.Xr usbhidctl 1
+.Xr usb 4
.Sh HISTORY
The
.Nm
driver
appeared in
-.Ox 2.5 .
+.Ox 2.6 .
diff --git a/share/man/man4/usb.4 b/share/man/man4/usb.4
index 81192ef0489..17d1c2895da 100644
--- a/share/man/man4/usb.4
+++ b/share/man/man4/usb.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: usb.4,v 1.1 1999/08/13 06:52:43 fgsch Exp $
+.\" $OpenBSD: usb.4,v 1.2 1999/08/13 14:47:50 aaron Exp $
.\" $NetBSD: usb.4,v 1.15 1999/07/29 14:20:32 augustss Exp $
.\"
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -54,8 +54,8 @@
.Cd "#include <dev/usb/usbhid.h>"
.Sh INTRODUCTION
.Ox
-provides machine-independent bus support and drivers for
-.Tn USB
+provides machine-independent bus support and drivers for Universal Serial Bus
+.Pq Tn USB
devices.
.Pp
The
@@ -85,7 +85,7 @@ The
.Cm uhub
device controls
.Tn USB
-hubs and must always be present since there is at least a root hub in any
+hubs and must always be present since there is at least one root hub in any
.Tn USB
system.
.Pp
@@ -109,13 +109,13 @@ 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,
+This is a control endpoint at address 0
+and is used to give commands to the device and extract basic data,
such as descriptors, from the device.
Each endpoint, except the control endpoint, is unidirectional.
.Pp
The endpoints in a device are grouped into interfaces.
-An interface is a logical unit within a device; e.g.
+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,
@@ -133,21 +133,21 @@ Each device located on a hub has several
locators:
.Bl -tag -compact -width xxxxxxx
.It Cd port
-this is the number of the port on closest upstream hub.
+Number of the port on closest upstream hub.
.It Cd configuration
-this is the configuration the device must be in for this driver to attach.
+Configuration the device must be in for this driver to attach.
This locator does not set the configuration; it is iterated by the bus
enumeration.
.It Cd interface
-this is the interface number within a device that an interface driver
-attaches to.
+Interface number within a device that an interface driver attaches to.
.It Cd vendor
-this is the 16 bit vendor id of the device.
+16-bit vendor ID of the device.
.It Cd product
-this is the 16 bit product id of the device.
+16-bit product ID of the device.
.It Cd release
-this is the 16 bit release (revision) number of the device.
+16-bit release (revision) number of the device.
.El
+.Pp
The first locator can be used to pin down a particular device
according to its physical position in the device tree.
The last three locators can be used to pin down a particular
@@ -175,14 +175,14 @@ driver can attach.
.Sh USB CONTROLLER INTERFACE
Use the following to get access to the
.Tn USB
-specific structurs and defines.
+specific structures and defines.
.Bd -literal
#include <sys/dev/usb.h>
.Ed
.Pp
The
.Pa /dev/usbN
-can be opened and a few operations can be performed on it.
+device can be opened and a few operations can be performed on it.
The
.Xr poll 2
system call will say that I/O is possible on the controller device when a
@@ -292,7 +292,7 @@ The naming convention of the fields for the various
descriptors exactly follows the naming in the
.Tn USB
specification.
-Byte sized fields can be accessed directly, but word (16 bit)
+Byte sized fields can be accessed directly, but word (16-bit)
sized fields must be access by the
.Fn UGETW field
and
@@ -309,11 +309,7 @@ There should be a serial number locator, but
.Ox
does not have string valued locators.
.Sh SEE ALSO
-The
-.Tn USB
-specifications can be found at
-.Dv http://www.usb.org/developers/docs.htm .
-.Pp
+.Xr usb 3 ,
.Xr pci 4 ,
.\".Xr uaudio 4 ,
.Xr ugen 4 ,
@@ -321,12 +317,18 @@ specifications can be found at
.\".Xr ukbd 4 ,
.\".Xr ulpt 4 ,
.\".Xr ums 4 ,
-.Xr usb 3 ,
.Xr usbd 8 ,
.Xr usbdevs 8
+.Pp
+The
+.Tn USB
+specifications can be found at:
+.Pp
+.Dl http://www.usb.org/developers/docs.htm
+.Pp
.Sh HISTORY
The
.Nm
driver
appeared in
-.Ox 2.5 .
+.Ox 2.6 .