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