xref: /netbsd-src/usr.sbin/lptctl/lptctl.8 (revision b1c86f5f087524e68db12794ee9c3e3da1ab17a0)
1.\"	$NetBSD: lptctl.8,v 1.10 2008/04/30 13:11:02 martin Exp $
2.\"
3.\" Copyright (c) 2004 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Gary Thorpe.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd February 2, 2004
31.Dt LPTCTL 8
32.Os
33.Sh NAME
34.Nm lptctl
35.Nd manipulate lpt devices
36.Sh SYNOPSIS
37.Nm lptctl Ar device Op Ar command Op Ar ...
38.Sh DESCRIPTION
39.Nm
40is used to manipulate lpt devices so that a user can change how a
41printer that is attached to a parallel port works.
42If no command-argument pairs are specified, the status of the device
43is printed to standard output.
44The status information is also output after commands are carried out.
45.Sh DEVICE COMMANDS
46Multiple command-argument pairs can be specified.
47Available commands are:
48.Bl -item
49.It
50.Cm mode
51.Ar standard | nibble | ps2 | fast | ecp | epp
52.Pp
53Sets port to use a mode of operation: standard centronics mode
54(standard), nibble mode, bidirectional mode (ps2), fast centronics
55mode (fast), enhanced capabilities port mode (ecp), or enhanced
56parallel port mode (epp).
57.It
58.Cm dma
59.Ar yes | no
60.Pp
61Enables or disables DMA.
62Note DMA is only used in some advanced
63modes such as ECP, and only if interrupts are enabled too.
64.It
65.Cm ieee
66.Ar yes | no
67.Pp
68Enables or disables the use of
69.Tn IEEE 1284
70negotiations during mode changes and channel direction changes.
71.It
72.Cm intr
73.Ar yes | no
74.Pp
75Enables or disables use of interrupts for port operation.
76If interrupts are disabled, polling is used for data transfers.
77Default setting depends on device, but polling is commonly preferred.
78.It
79.Cm prime
80.Ar yes | no
81.Pp
82Enables (default) or disables printer initialization sequence
83on device open.
84Note the initialization sequence is never done
85on open of control lpt device.
86.It
87.Cm autolf
88.Ar yes | no
89.Pp
90Enables or disables (default) automatic LF on CR for data transfers.
91.El
92.Sh EXIT STATUS
93.Nm
94returns 0 on success, \*[Gt]0 on failure.
95.Sh FILES
96.Bl -item
97.It
98.Pa /dev/lpt?ctl
99- printer port control devices
100.It
101.Pa /dev/lpt?
102- printer ports
103.El
104.Sh SEE ALSO
105.Xr ioctl 2 ,
106.Xr lpt 4 ,
107.Xr ppbus 4
108.Sh HISTORY
109A similar utility called
110.Nm lptcontrol
111exists in
112.Fx
113to control the
114.Xr lpt 4
115device.
116While similar in concept, the implementations are independent.
117.Nm
118was added in
119.Nx 2.0 .
120.Sh AUTHORS
121This man page and the
122.Nm
123utility were written by Gary Thorpe.
124