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.\" 28953cd93fSNicolas Souchu.Dd February 14, 1999 29953cd93fSNicolas Souchu.Dt LPT 4 303d45e180SRuslan Ermilov.Os 31953cd93fSNicolas Souchu.Sh NAME 32953cd93fSNicolas Souchu.Nm lpt 33eb083802SRuslan Ermilov.Nd generic printer device driver 34953cd93fSNicolas Souchu.Sh SYNOPSIS 35547d4262SKazutaka YOKOTA.Cd "device ppc" 366b713d58SJeroen Ruigrok van der Werven.Cd "device ppbus" 376b713d58SJeroen Ruigrok van der Werven.Cd "device lpt" 38953cd93fSNicolas Souchu.Sh DESCRIPTION 39953cd93fSNicolas SouchuThe current 40953cd93fSNicolas Souchu.Em lpt 41953cd93fSNicolas Souchudriver is the port of the original lpt driver to the 42953cd93fSNicolas Souchu.Xr ppbus 4 43953cd93fSNicolas Souchusystem. 44953cd93fSNicolas Souchu.Pp 45953cd93fSNicolas SouchuOne purpose of this port was to allow parallel port sharing with other 466d249eeeSSheldon Hearnparallel devices. 476d249eeeSSheldon HearnSecondly, inb()/outb() calls have been replaced by ppbus 486d249eeeSSheldon Hearnfunction calls. 496d249eeeSSheldon Hearnlpt is now arch-independent thanks to the ppbus interface. 506d249eeeSSheldon HearnSee 51953cd93fSNicolas Souchu.Xr ppbus 4 52953cd93fSNicolas Souchufor more info about the ppbus system. 53953cd93fSNicolas Souchu.Pp 54953cd93fSNicolas SouchuThe parallel port bus is allocated by lpt when the printer device is opened 55953cd93fSNicolas Souchuand released only when the transfer is completed: either when the device 56953cd93fSNicolas Souchuis closed or when the entire buffer is sent in interrupt driven mode. 57953cd93fSNicolas Souchu.Pp 58953cd93fSNicolas SouchuThe driver can be configured to be either interrupt-driven, or 59b5e7e999SRuslan Ermilovto poll the printer. 60b5e7e999SRuslan ErmilovPorts that are configured to be 61953cd93fSNicolas Souchuinterrupt-driven can be switched to polled mode by using the 62953cd93fSNicolas Souchu.Xr lptcontrol 8 63953cd93fSNicolas Souchucommand. 64953cd93fSNicolas Souchu.Pp 65953cd93fSNicolas SouchuDepending on your hardware, extended capabilities may be configured with the 66953cd93fSNicolas Souchu.Xr lptcontrol 8 676d249eeeSSheldon Hearncommand. 686d249eeeSSheldon HearnWith an ECP/ISA port, you can take advantage 69953cd93fSNicolas Souchuof FIFO and DMA. 70e3ded6e2SNicolas Souchu.Pp 71e3ded6e2SNicolas SouchuIn order to retrieve printer info from /dev/lpt0, just apply the 72e3ded6e2SNicolas Souchu.Nm cat 736d249eeeSSheldon Hearncommand to the device. 746d249eeeSSheldon HearnIf the printer supports IEEE1284 nibble mode and has 75423ac680SRuslan Ermilovdata to send to the host, you will get it. 769cbda590SRuslan Ermilov.Sh FILES 779cbda590SRuslan Ermilov.Bl -tag -width Pa -compact 789cbda590SRuslan Ermilov.It Pa /dev/lpt0 799cbda590SRuslan Ermilovfirst parallel port driver 809cbda590SRuslan Ermilov.El 81953cd93fSNicolas Souchu.Sh SEE ALSO 82953cd93fSNicolas Souchu.Xr ppbus 4 , 83547d4262SKazutaka YOKOTA.Xr ppc 4 , 84953cd93fSNicolas Souchu.Xr lptcontrol 8 85953cd93fSNicolas Souchu.Sh HISTORY 86953cd93fSNicolas SouchuThis driver replaces the functionality of the lpa 87953cd93fSNicolas Souchudriver, which is now defunct. 88953cd93fSNicolas Souchu.Sh BUGS 89953cd93fSNicolas SouchuThere are lots of them, especially in cheap parallel port implementations. 90953cd93fSNicolas Souchu.Pp 91953cd93fSNicolas SouchuIt is only possible to open a lpt port when a printer is connected and 92953cd93fSNicolas Souchuon-line, making it impossible to run 93953cd93fSNicolas Souchu.Xr lptcontrol 8 94953cd93fSNicolas Souchuwhen there is no printer connected. 95953cd93fSNicolas Souchu.Pp 96953cd93fSNicolas SouchuThis driver could still stand a rewrite. 97