summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMarc Balmer <mbalmer@cvs.openbsd.org>2006-06-01 20:10:29 +0000
committerMarc Balmer <mbalmer@cvs.openbsd.org>2006-06-01 20:10:29 +0000
commit2f9088c66c46330f1e7e62bfa1a371ea7173c663 (patch)
treebebb5800f68000d396ad58f871fe416b8b6d2409 /share
parent3867065e49643137d0ce04043776039654c3ae36 (diff)
Add basic NMEA0183 support as a tty line discipline. The line discipline
decodes NMEA messages completely transparent to userland applications, i.e. userland can still use the NMEA stream and talk to the device. If data is received, a timedelta sensor suitable for ntpd is created. The timestamp is not very precise at the moment, use of this is experimental at best. "get it in or we see how well the swiss people can swim" deraadt@
Diffstat (limited to 'share')
-rw-r--r--share/man/man4/Makefile6
-rw-r--r--share/man/man4/nmea.450
-rw-r--r--share/man/man4/tty.48
3 files changed, 60 insertions, 4 deletions
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 06d4563fe15..9f5ba9984cc 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.362 2006/05/28 17:22:48 deraadt Exp $
+# $OpenBSD: Makefile,v 1.363 2006/06/01 20:10:28 mbalmer Exp $
MAN= aac.4 ac97.4 acphy.4 acpi.4 acpihpet.4 acpitimer.4 \
adc.4 addcom.4 admcts.4 admlc.4 admtemp.4 \
@@ -25,8 +25,8 @@ MAN= aac.4 ac97.4 acphy.4 acpi.4 acpihpet.4 acpitimer.4 \
lmc.4 lmenv.4 lmtemp.4 lo.4 lofn.4 lpt.4 lxtphy.4 luphy.4 \
maestro.4 maxds.4 maxtmp.4 midi.4 \
mii.4 mfi.4 mpi.4 mpt.4 mpu.4 mtd.4 mtdphy.4 multicast.4 mtio.4 ne.4 \
- neo.4 netintro.4 nfe.4 nge.4 noct.4 nofn.4 nsclpcsio.4 nsgphy.4 \
- nsphy.4 nsphyter.4 null.4 nviic.4 ohci.4 opl.4 options.4 \
+ neo.4 netintro.4 nfe.4 nge.4 nmea.4 noct.4 nofn.4 nsclpcsio.4 \
+ nsgphy.4 nsphy.4 nsphyter.4 null.4 nviic.4 ohci.4 opl.4 options.4 \
onewire.4 oosiop.4 osiop.4 owid.4 owtemp.4 \
pcagpio.4 pcdisplay.4 pchb.4 pci.4 pcib.4 pcfadc.4 \
pcfiic.4 pciide.4 pckbc.4 pckbd.4 pcmcia.4 pcn.4 pcppi.4 pcscp.4 \
diff --git a/share/man/man4/nmea.4 b/share/man/man4/nmea.4
new file mode 100644
index 00000000000..84bd3471ad3
--- /dev/null
+++ b/share/man/man4/nmea.4
@@ -0,0 +1,50 @@
+.\" $OpenBSD: nmea.4,v 1.1 2006/06/01 20:10:28 mbalmer Exp $
+.\"
+.\" Copyright (c) 2006 Marc Balmer <mbalmer@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd May 42, 2006
+.Dt NMEA 4
+.Os
+.Sh NAME
+.Nm nmea
+.Nd line discipline for NMEA0183 devices
+.Sh SYNOPSIS
+.Cd "pseudo-device nmea" Op Ar count
+.Sh DESCRIPTION
+This line discipline provides an interface to NMEA talking devices
+which are connected to a host through a serial line.
+.Pp
+The line discipline is enabled by a sequence:
+.Bd -literal -offset indent
+#include <sys/ttycom.h>
+int ldisc = NMEADISC, fildes; ...
+ioctl(fildes, TIOCSETD, &ldisc);
+.Ed
+.Pp
+While application program can still use the device as if it had the
+default (termios) line discipline attached, the lince discipline
+maintains a timedelta sensor in the kernel.
+.Sh SEE ALSO
+.Xr tty 4
+.Sh HISTORY
+The
+.Nm
+interface appeared in
+.Ox 4.0 .
+.Sh AUTHORS
+The
+.Nm
+line discpiline was written by
+.An Marc Balmer Aq mbalmer@openbsd.org .
diff --git a/share/man/man4/tty.4 b/share/man/man4/tty.4
index 92ab55c0dd6..072512a48d2 100644
--- a/share/man/man4/tty.4
+++ b/share/man/man4/tty.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tty.4,v 1.26 2006/04/27 19:30:27 deraadt Exp $
+.\" $OpenBSD: tty.4,v 1.27 2006/06/01 20:10:28 mbalmer Exp $
.\" $NetBSD: tty.4,v 1.4 1996/03/19 04:26:01 paulus Exp $
.\"
.\" Copyright (c) 1991, 1992, 1993
@@ -213,6 +213,8 @@ Serial IP line discipline.
Point to Point Protocol line discipline.
.It STRIPDISC
Starmode Radio IP line discipline.
+.It NMEADISC
+NMEA0183 line discipline.
.El
.Pp
.It Dv TIOCGETD Fa int *ldisc
@@ -495,3 +497,7 @@ controlling terminal, if any
.Xr getty 8
.Sh HISTORY
The cua support is inspired by similar support in SunOS.
+The NMEA0183 line discipline was added in
+.Ox 4.0
+by
+.An Marc Balmer Aq mbalmer@openbsd.org