1953cd93fSNicolas Souchu.\" 2953cd93fSNicolas Souchu.\" Copyright (c) 1993 Christopher G. Demetriou 3953cd93fSNicolas Souchu.\" Copyright (c) 1994 Geoffrey M. Rehmet 4953cd93fSNicolas Souchu.\" Copyright (c) 1998 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.\" 29953cd93fSNicolas Souchu.Dd February 14, 1999 30953cd93fSNicolas Souchu.Dt LPT 4 31953cd93fSNicolas Souchu.Os FreeBSD 32953cd93fSNicolas Souchu.Sh NAME 33953cd93fSNicolas Souchu.Nm lpt 34953cd93fSNicolas Souchu.Nd 35953cd93fSNicolas SouchuGeneric printer device driver 36953cd93fSNicolas Souchu.Sh SYNOPSIS 37953cd93fSNicolas Souchu.Cd "controller ppbus" 38953cd93fSNicolas Souchu.Cd "device lpt at ppbus?" 39953cd93fSNicolas Souchu.Pp 40953cd93fSNicolas Souchu.Cd "controller ppc0 at isa? port" \&"IO_LPT1\&" tty irq 7 41953cd93fSNicolas Souchu.Cd "controller ppc1 at isa? port" \&"IO_LPT2\&" tty irq 7 42953cd93fSNicolas Souchu.Cd "controller ppc2 at isa? port" \&"IO_LPT3\&" tty irq 7 43953cd93fSNicolas Souchu.Pp 44953cd93fSNicolas SouchuFor BIOS-probed ports: 45953cd93fSNicolas Souchu.Cd "controller ppc0 at isa? port? tty irq 7" 46953cd93fSNicolas Souchu.Pp 47953cd93fSNicolas SouchuFor polled ports: 48953cd93fSNicolas Souchu.Cd "controller ppc0 at isa? port? tty" 49953cd93fSNicolas Souchu.Cd "controller ppc1 at isa? port" \&"IO_LPT2\&" tty 50953cd93fSNicolas Souchu.Pp 51953cd93fSNicolas SouchuFor DMA capable parallel port: 52953cd93fSNicolas Souchu.Cd "controller ppc0 at isa? port? tty irq 7 drq 1" 53953cd93fSNicolas Souchu.Sh DESCRIPTION 54953cd93fSNicolas SouchuThe current 55953cd93fSNicolas Souchu.Em lpt 56953cd93fSNicolas Souchudriver is the port of the original lpt driver to the 57953cd93fSNicolas Souchu.Xr ppbus 4 58953cd93fSNicolas Souchusystem. 59953cd93fSNicolas Souchu.Pp 60953cd93fSNicolas SouchuOne purpose of this port was to allow parallel port sharing with other 61953cd93fSNicolas Souchuparallel devices. Secondly, inb()/outb() calls have been replaced by ppbus 62953cd93fSNicolas Souchufunction calls. lpt is now arch-independent thanks to the ppbus interface. See 63953cd93fSNicolas Souchu.Xr ppbus 4 64953cd93fSNicolas Souchufor more info about the ppbus system. 65953cd93fSNicolas Souchu.Pp 66953cd93fSNicolas SouchuThe parallel port bus is allocated by lpt when the printer device is opened 67953cd93fSNicolas Souchuand released only when the transfer is completed: either when the device 68953cd93fSNicolas Souchuis closed or when the entire buffer is sent in interrupt driven mode. 69953cd93fSNicolas Souchu.Pp 70953cd93fSNicolas SouchuThe driver can be configured to be either interrupt-driven, or 71953cd93fSNicolas Souchuto poll the printer. Ports that are configured to be 72953cd93fSNicolas Souchuinterrupt-driven can be switched to polled mode by using the 73953cd93fSNicolas Souchu.Xr lptcontrol 8 74953cd93fSNicolas Souchucommand. 75953cd93fSNicolas Souchu.Pp 76953cd93fSNicolas SouchuDepending on your hardware, extended capabilities may be configured with the 77953cd93fSNicolas Souchu.Xr lptcontrol 8 78953cd93fSNicolas Souchucommand (use the -e option). With an ECP/ISA port, you can take advantage 79953cd93fSNicolas Souchuof FIFO and DMA. 80953cd93fSNicolas Souchu.Sh SEE ALSO 81953cd93fSNicolas Souchu.Xr ppbus 4 , 82953cd93fSNicolas Souchu.Xr lptcontrol 8 83953cd93fSNicolas Souchu.Sh HISTORY 84953cd93fSNicolas SouchuThis driver replaces the functionality of the lpa 85953cd93fSNicolas Souchudriver, which is now defunct. 86953cd93fSNicolas Souchu.Sh FILES 87953cd93fSNicolas Souchu.Bl -tag -width Pa -compact 88953cd93fSNicolas Souchu.It Pa /dev/lpt0 89953cd93fSNicolas Souchufirst parallel port driver 90953cd93fSNicolas Souchu.El 91953cd93fSNicolas Souchu.Sh BUGS 92953cd93fSNicolas SouchuThere are lots of them, especially in cheap parallel port implementations. 93953cd93fSNicolas Souchu.Pp 94953cd93fSNicolas SouchuIt is only possible to open a lpt port when a printer is connected and 95953cd93fSNicolas Souchuon-line, making it impossible to run 96953cd93fSNicolas Souchu.Xr lptcontrol 8 97953cd93fSNicolas Souchuwhen there is no printer connected. 98953cd93fSNicolas Souchu.Pp 99953cd93fSNicolas SouchuPlease, ensure the 100953cd93fSNicolas Souchu.Xr ppc 4 101953cd93fSNicolas Souchuentry in you MACHINE file has the tty interrupt mask. 102953cd93fSNicolas Souchu.Pp 103953cd93fSNicolas SouchuThis driver could still stand a rewrite. 104