]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - share/man/man4/lpt.4
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / share / man / man4 / lpt.4
1 .\"
2 .\" Copyright (c) 1993 Christopher G. Demetriou
3 .\" Copyright (c) 1994 Geoffrey M. Rehmet
4 .\" Copyright (c) 1999 Nicolas Souchu
5 .\" All rights reserved.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\" $FreeBSD$
29 .\"
30 .Dd February 14, 1999
31 .Dt LPT 4
32 .Os
33 .Sh NAME
34 .Nm lpt
35 .Nd generic printer device driver
36 .Sh SYNOPSIS
37 .Cd "device ppc"
38 .Cd "device ppbus"
39 .Cd "device lpt"
40 .Sh DESCRIPTION
41 The current
42 .Em lpt
43 driver is the port of the original lpt driver to the
44 .Xr ppbus 4
45 system.
46 .Pp
47 One purpose of this port was to allow parallel port sharing with other
48 parallel devices.
49 Secondly, inb()/outb() calls have been replaced by ppbus
50 function calls.
51 lpt is now arch-independent thanks to the ppbus interface.
52 See
53 .Xr ppbus 4
54 for more info about the ppbus system.
55 .Pp
56 The parallel port bus is allocated by lpt when the printer device is opened
57 and released only when the transfer is completed: either when the device
58 is closed or when the entire buffer is sent in interrupt driven mode.
59 .Pp
60 The driver can be configured to be either interrupt-driven, or
61 to poll the printer.
62 Ports that are configured to be
63 interrupt-driven can be switched to polled mode by using the
64 .Xr lptcontrol 8
65 command.
66 .Pp
67 Depending on your hardware, extended capabilities may be configured with the
68 .Xr lptcontrol 8
69 command.
70 With an ECP/ISA port, you can take advantage
71 of FIFO and DMA.
72 .Pp
73 In order to retrieve printer info from /dev/lpt0, just apply the
74 .Nm cat
75 command to the device.
76 If the printer supports IEEE1284 nibble mode and has
77 data to send to the host, you will get it.
78 .Sh FILES
79 .Bl -tag -width Pa -compact
80 .It Pa /dev/lpt0
81 first parallel port driver
82 .El
83 .Sh SEE ALSO
84 .Xr ppbus 4 ,
85 .Xr ppc 4 ,
86 .Xr lptcontrol 8
87 .Sh HISTORY
88 This driver replaces the functionality of the lpa
89 driver, which is now defunct.
90 .Sh BUGS
91 There are lots of them, especially in cheap parallel port implementations.
92 .Pp
93 It is only possible to open a lpt port when a printer is connected and
94 on-line, making it impossible to run
95 .Xr lptcontrol 8
96 when there is no printer connected.
97 .Pp
98 This driver could still stand a rewrite.