summaryrefslogtreecommitdiff
path: root/share/man/man9
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
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')
-rw-r--r--share/man/man9/Makefile4
-rw-r--r--share/man/man9/radio.993
2 files changed, 95 insertions, 2 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index ab6ef683fcf..6ad8170411a 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.41 2001/07/27 09:55:07 niklas Exp $
+# $OpenBSD: Makefile,v 1.42 2001/10/04 22:33:49 gluk Exp $
# $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
@@ -11,7 +11,7 @@ MAN= altq.9 audio.9 boot.9 bus_dma.9 bus_space.9 copy.9 crypto.9 ctxsw.9 \
kthread.9 malloc.9 mbuf_tags.9 md5.9 microtime.9 \
panic.9 pfind.9 physio.9 \
pool.9 powerhook_establish.9 ppsratecheck.9 printf.9 psignal.9 \
- ratecheck.9 resettodr.9 random.9 \
+ ratecheck.9 resettodr.9 radio.9 random.9 \
shutdownhook_establish.9 sleep.9 spl.9 startuphook_establish.9 \
store.9 style.9 \
time.9 timeout.9 uvm.9 \
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