summaryrefslogtreecommitdiff
path: root/share/man/man9/radio.9
diff options
context:
space:
mode:
authorGrigoriy Orlov <gluk@cvs.openbsd.org>2001-10-04 22:33:50 +0000
committerGrigoriy Orlov <gluk@cvs.openbsd.org>2001-10-04 22:33:50 +0000
commit05032fdcac4561c18f1e4cab0f9dd8af86b128bf (patch)
treeb56c40c272fa41bf3e41c5f893e6ba931c81160e /share/man/man9/radio.9
parente9087b984372550c9af3de2c6356418eb23a0f35 (diff)
Radio drivers and interfaces manuals.
From Vladimir Popov <jumbo@narod.ru> and Maxim Tsyplakov <tm@oganer.net>
Diffstat (limited to 'share/man/man9/radio.9')
-rw-r--r--share/man/man9/radio.993
1 files changed, 93 insertions, 0 deletions
diff --git a/share/man/man9/radio.9 b/share/man/man9/radio.9
new file mode 100644
index 00000000000..2e24657f076
--- /dev/null
+++ b/share/man/man9/radio.9
@@ -0,0 +1,93 @@
+.\" $OpenBSD: radio.9,v 1.1 2001/10/04 22:33:49 gluk Exp $
+.\"
+.\" Copyright (c) Maxim Tsyplakov <tm@oganer.net>
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 September 29, 2001
+.Dt RADIO 9
+.Os
+.Sh NAME
+.Nm radio
+.Nd interface between low and high level radio drivers
+.Sh DESCRIPTION
+The radio device driver is divided into a high level,
+hardware independent layer, and a low level hardware
+dependent layer.
+The interface between these is the
+.Va radio_hw_if
+structure.
+.Bd -literal
+struct radio_hw_if {
+ int *open(dev_t, int, int, struct proc *);
+ void *close(dev_t, int, int, struct proc *);
+ int *ioctl(dev_t, u_long, caddr_t, int, struct proc *);
+};
+
+.Ed
+.Pp
+
+The high level radio driver attaches to the low level driver
+when the latter calls
+.Va radio_attach_mi .
+This call should be
+.Bd -literal
+ void
+ radio_attach_mi(rhwp, hdlp, dev)
+ struct radio_hw_if *rhwp;
+ void *hdlp;
+ struct device *dev;
+.Ed
+.Pp
+The
+.Va radio_hw_if
+struct is as shown above.
+The
+.Va hdlp
+argument is a handle to some low level data structure.
+It is reserved field for future usage, and actually not used in any
+low-level driver functions.
+.Va radio_hw_if
+when the high level driver calls them.
+.Va dev
+is the device struct for the hardware device.
+.Pp
+
+The fields of
+.Va radio_hw_if
+are described in some more detail below.
+
+.Bd -literal
+int open (dev_t dev, int flags, int fmt, struct proc *p);
+ Is called when the radio device is opened.
+ Returns 0 on success, otherwise an error code.
+
+int close (dev_t dev, int flags, int fmt, struct proc *p);
+ Is called when the radio device is closed.
+ Returns 0 on success, otherwise an error code.
+
+int ioctl (dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p);
+ Is ioctl requests handler function.
+ Returns 0 on success, otherwise an error code.
+
+.Sh SEE ALSO
+.Xr radio 4