2004-01-20 02:22:23 +03:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 1993 Christopher G. Demetriou
|
|
|
|
.\" Copyright (c) 1994 Geoffrey M. Rehmet
|
|
|
|
.\" Copyright (c) 1999 Nicolas Souchu
|
|
|
|
.\" 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 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 AUTHOR 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.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD: src/share/man/man4/lpt.4,v 1.9.2.2 2001/08/17 13:08:38 ru Exp $
|
|
|
|
.\"
|
|
|
|
.Dd December 24, 2003
|
|
|
|
.Dt LPT 4
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm lpt
|
|
|
|
.Nd generic printer device driver
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Cd "lpt* at ppbus?"
|
|
|
|
.Cd options LPT_DEBUG
|
|
|
|
.Cd options LPT_VERBOSE
|
|
|
|
.Sh DESCRIPTION
|
2004-01-23 18:33:13 +03:00
|
|
|
The
|
2004-01-20 02:22:23 +03:00
|
|
|
.Nm
|
|
|
|
driver is the port of the lpt driver to the
|
|
|
|
.Xr ppbus 4
|
|
|
|
system.
|
|
|
|
.Pp
|
|
|
|
One purpose of this port was to allow parallel port sharing with other
|
|
|
|
parallel devices.
|
|
|
|
Secondly, inb()/outb() calls have been replaced by ppbus
|
|
|
|
function calls.
|
|
|
|
lpt is now arch-independent thanks to the ppbus interface.
|
|
|
|
See
|
|
|
|
.Xr ppbus 4
|
|
|
|
for more information about the parallel port bus system.
|
|
|
|
.Pp
|
|
|
|
The parallel port bus is reserved by lpt when the printer device is opened
|
|
|
|
and released when the device is closed.
|
|
|
|
.Pp
|
2004-01-23 18:33:13 +03:00
|
|
|
Ports can be configured to use DMA, IEEE negotiations, and IEEE compliant
|
2004-01-20 02:22:23 +03:00
|
|
|
transfer modes by using the
|
|
|
|
.Xr lptctl 8
|
2004-01-23 18:33:13 +03:00
|
|
|
command, with modes depending on the hardware available.
|
2004-01-20 02:22:23 +03:00
|
|
|
.Pp
|
|
|
|
.Ss Minor bit
|
|
|
|
The minor bit selects some device features:
|
|
|
|
.Bl -column "Minor Bit" "Function" -offset indent
|
|
|
|
.It Em "Minor Bit" Function
|
|
|
|
.It 128 Do no use interrupts (polled accesses).
|
|
|
|
.It 64 Do not initialize printer when opened.
|
|
|
|
.It 32 Automatic LF on CR.
|
|
|
|
.El
|
|
|
|
.Pp
|
2004-01-23 18:33:13 +03:00
|
|
|
.Xr mknod 8
|
2004-01-20 02:22:23 +03:00
|
|
|
can be used to create such devices if necessary (see BUGS).
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width "/dev/lpt0xx" -compact
|
|
|
|
.It Pa /dev/lpt?
|
|
|
|
interrupt-driven ports (minor number 0)
|
|
|
|
.It Pa /dev/lpa?
|
2004-01-23 18:33:13 +03:00
|
|
|
polled ports (minor number 128)
|
2004-01-20 02:22:23 +03:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
2004-01-23 18:33:13 +03:00
|
|
|
.Xr atppc 4 ,
|
|
|
|
.Xr ppbus 4 ,
|
2004-01-20 02:22:23 +03:00
|
|
|
.Xr lptctl 8 ,
|
2004-01-23 18:33:13 +03:00
|
|
|
.Xr mknod 8
|
2004-01-20 02:22:23 +03:00
|
|
|
.Sh HISTORY
|
2004-01-23 18:33:13 +03:00
|
|
|
This driver is derived from drivers which appear in FreeBSD and NetBSD. The
|
|
|
|
FreeBSD driver is used for ppbus usage while the NetBSD driver's behavior is
|
2004-01-20 02:22:23 +03:00
|
|
|
emulated as much as possible for compatibility.
|
|
|
|
.Sh AUTHORS
|
2004-01-23 18:33:13 +03:00
|
|
|
This manual page was based on the FreeBSD
|
2004-01-20 02:22:23 +03:00
|
|
|
.Xr lpt 4
|
|
|
|
manual page. The information has been updated for NetBSD's port by Gary Thorpe.
|
|
|
|
.Sh BUGS
|
2004-01-23 18:33:13 +03:00
|
|
|
If a printer is not connected and on-line,
|
|
|
|
.Pa /dev/lpt?
|
|
|
|
and
|
|
|
|
.Pa /dev/lpa?
|
|
|
|
cannot be used with
|
2004-01-20 02:22:23 +03:00
|
|
|
.Xr lptctl 8 .
|
2004-01-23 18:33:13 +03:00
|
|
|
A lpt device with minor number
|
2004-01-20 02:22:23 +03:00
|
|
|
.Em 64
|
2004-01-23 18:33:13 +03:00
|
|
|
must be used in this case because it skips the initialization sequence.
|
2004-01-20 02:22:23 +03:00
|
|
|
.Pp
|
|
|
|
Testing has been limited by hardware availability.
|