xref: /freebsd/share/man/man4/lpt.4 (revision b5e7e9995091a8dbcf193564b2ceaf886252fc9b)
1953cd93fSNicolas Souchu.\"
2953cd93fSNicolas Souchu.\" Copyright (c) 1993 Christopher G. Demetriou
3953cd93fSNicolas Souchu.\" Copyright (c) 1994 Geoffrey M. Rehmet
4e3ded6e2SNicolas Souchu.\" Copyright (c) 1999 Nicolas Souchu
5953cd93fSNicolas Souchu.\" All rights reserved.
6953cd93fSNicolas Souchu.\"
7953cd93fSNicolas Souchu.\" Redistribution and use in source and binary forms, with or without
8953cd93fSNicolas Souchu.\" modification, are permitted provided that the following conditions
9953cd93fSNicolas Souchu.\" are met:
10953cd93fSNicolas Souchu.\" 1. Redistributions of source code must retain the above copyright
11953cd93fSNicolas Souchu.\"    notice, this list of conditions and the following disclaimer.
12953cd93fSNicolas Souchu.\" 2. Redistributions in binary form must reproduce the above copyright
13953cd93fSNicolas Souchu.\"    notice, this list of conditions and the following disclaimer in the
14953cd93fSNicolas Souchu.\"    documentation and/or other materials provided with the distribution.
15953cd93fSNicolas Souchu.\"
16953cd93fSNicolas Souchu.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17953cd93fSNicolas Souchu.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18953cd93fSNicolas Souchu.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19953cd93fSNicolas Souchu.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20953cd93fSNicolas Souchu.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21953cd93fSNicolas Souchu.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22953cd93fSNicolas Souchu.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23953cd93fSNicolas Souchu.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24953cd93fSNicolas Souchu.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25953cd93fSNicolas Souchu.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26953cd93fSNicolas Souchu.\" SUCH DAMAGE.
27953cd93fSNicolas Souchu.\"
287f3dea24SPeter Wemm.\" $FreeBSD$
29953cd93fSNicolas Souchu.\"
30953cd93fSNicolas Souchu.Dd February 14, 1999
31953cd93fSNicolas Souchu.Dt LPT 4
323d45e180SRuslan Ermilov.Os
33953cd93fSNicolas Souchu.Sh NAME
34953cd93fSNicolas Souchu.Nm lpt
35eb083802SRuslan Ermilov.Nd generic printer device driver
36953cd93fSNicolas Souchu.Sh SYNOPSIS
37547d4262SKazutaka YOKOTA.Cd "device ppc"
386b713d58SJeroen Ruigrok van der Werven.Cd "device ppbus"
396b713d58SJeroen Ruigrok van der Werven.Cd "device lpt"
40953cd93fSNicolas Souchu.Sh DESCRIPTION
41953cd93fSNicolas SouchuThe current
42953cd93fSNicolas Souchu.Em lpt
43953cd93fSNicolas Souchudriver is the port of the original lpt driver to the
44953cd93fSNicolas Souchu.Xr ppbus 4
45953cd93fSNicolas Souchusystem.
46953cd93fSNicolas Souchu.Pp
47953cd93fSNicolas SouchuOne purpose of this port was to allow parallel port sharing with other
486d249eeeSSheldon Hearnparallel devices.
496d249eeeSSheldon HearnSecondly, inb()/outb() calls have been replaced by ppbus
506d249eeeSSheldon Hearnfunction calls.
516d249eeeSSheldon Hearnlpt is now arch-independent thanks to the ppbus interface.
526d249eeeSSheldon HearnSee
53953cd93fSNicolas Souchu.Xr ppbus 4
54953cd93fSNicolas Souchufor more info about the ppbus system.
55953cd93fSNicolas Souchu.Pp
56953cd93fSNicolas SouchuThe parallel port bus is allocated by lpt when the printer device is opened
57953cd93fSNicolas Souchuand released only when the transfer is completed: either when the device
58953cd93fSNicolas Souchuis closed or when the entire buffer is sent in interrupt driven mode.
59953cd93fSNicolas Souchu.Pp
60953cd93fSNicolas SouchuThe driver can be configured to be either interrupt-driven, or
61b5e7e999SRuslan Ermilovto poll the printer.
62b5e7e999SRuslan ErmilovPorts that are configured to be
63953cd93fSNicolas Souchuinterrupt-driven can be switched to polled mode by using the
64953cd93fSNicolas Souchu.Xr lptcontrol 8
65953cd93fSNicolas Souchucommand.
66953cd93fSNicolas Souchu.Pp
67953cd93fSNicolas SouchuDepending on your hardware, extended capabilities may be configured with the
68953cd93fSNicolas Souchu.Xr lptcontrol 8
696d249eeeSSheldon Hearncommand.
706d249eeeSSheldon HearnWith an ECP/ISA port, you can take advantage
71953cd93fSNicolas Souchuof FIFO and DMA.
72e3ded6e2SNicolas Souchu.Pp
73e3ded6e2SNicolas SouchuIn order to retrieve printer info from /dev/lpt0, just apply the
74e3ded6e2SNicolas Souchu.Nm cat
756d249eeeSSheldon Hearncommand to the device.
766d249eeeSSheldon HearnIf the printer supports IEEE1284 nibble mode and has
77e3ded6e2SNicolas Souchudata to send to the host, you'll get it.
78953cd93fSNicolas Souchu.Sh SEE ALSO
79953cd93fSNicolas Souchu.Xr ppbus 4 ,
80547d4262SKazutaka YOKOTA.Xr ppc 4 ,
81953cd93fSNicolas Souchu.Xr lptcontrol 8
82953cd93fSNicolas Souchu.Sh HISTORY
83953cd93fSNicolas SouchuThis driver replaces the functionality of the lpa
84953cd93fSNicolas Souchudriver, which is now defunct.
85953cd93fSNicolas Souchu.Sh FILES
86953cd93fSNicolas Souchu.Bl -tag -width Pa -compact
87953cd93fSNicolas Souchu.It Pa /dev/lpt0
88953cd93fSNicolas Souchufirst parallel port driver
89953cd93fSNicolas Souchu.El
90953cd93fSNicolas Souchu.Sh BUGS
91953cd93fSNicolas SouchuThere are lots of them, especially in cheap parallel port implementations.
92953cd93fSNicolas Souchu.Pp
93953cd93fSNicolas SouchuIt is only possible to open a lpt port when a printer is connected and
94953cd93fSNicolas Souchuon-line, making it impossible to run
95953cd93fSNicolas Souchu.Xr lptcontrol 8
96953cd93fSNicolas Souchuwhen there is no printer connected.
97953cd93fSNicolas Souchu.Pp
98953cd93fSNicolas SouchuThis driver could still stand a rewrite.
99