2004-02-04 17:25:13 +03:00
|
|
|
.\" $NetBSD: lptctl.8,v 1.9 2004/02/04 14:25:13 wiz Exp $
|
2004-01-20 02:22:23 +03:00
|
|
|
.\"
|
2004-01-28 20:54:03 +03:00
|
|
|
.\" Copyright (c) 2004 The NetBSD Foundation, Inc.
|
|
|
|
.\" All rights reserved.
|
2004-01-20 02:22:23 +03:00
|
|
|
.\"
|
2004-01-28 20:54:03 +03:00
|
|
|
.\" This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
.\" by Gary Thorpe.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the NetBSD
|
|
|
|
.\" Foundation, Inc. and its contributors.
|
|
|
|
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
|
|
.\" contributors may be used to endorse or promote products derived
|
|
|
|
.\" from this software without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
2004-02-04 00:32:02 +03:00
|
|
|
.Dd February 2, 2004
|
2004-01-20 02:22:23 +03:00
|
|
|
.Dt LPTCTL 8
|
2004-01-23 22:51:26 +03:00
|
|
|
.Os
|
2004-01-20 02:22:23 +03:00
|
|
|
.Sh NAME
|
2004-01-23 22:51:26 +03:00
|
|
|
.Nm lptctl
|
2004-01-20 02:22:23 +03:00
|
|
|
.Nd manipulate lpt devices
|
|
|
|
.Sh SYNOPSIS
|
2004-02-04 00:32:02 +03:00
|
|
|
.Nm lptctl Ar device Op Ar command Op Ar ...
|
2004-01-20 02:22:23 +03:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2004-01-23 22:56:07 +03:00
|
|
|
is used to manipulate lpt devices so that a user can change how a
|
|
|
|
printer that is attached to a parallel port works.
|
|
|
|
If no command-argument pairs are specified, the status of the device
|
2004-02-04 00:32:02 +03:00
|
|
|
is printed to standard output.
|
2004-01-20 02:22:23 +03:00
|
|
|
The status information is also output after commands are carried out.
|
2004-01-23 22:51:26 +03:00
|
|
|
.Sh DEVICE COMMANDS
|
2004-02-04 00:32:02 +03:00
|
|
|
Multiple command-argument pairs can be specified.
|
2004-01-23 22:56:07 +03:00
|
|
|
Available commands are:
|
2004-01-20 02:22:23 +03:00
|
|
|
.Bl -item
|
|
|
|
.It
|
2004-01-23 22:51:26 +03:00
|
|
|
.Cm mode
|
2004-02-04 00:32:02 +03:00
|
|
|
.Ar standard | nibble | ps2 | fast | ecp | epp
|
2004-01-20 02:22:23 +03:00
|
|
|
.Pp
|
2004-01-23 22:56:07 +03:00
|
|
|
Sets port to use a mode of operation: standard centronics mode
|
|
|
|
(standard), nibble mode, bidirectional mode (ps2), fast centronics
|
|
|
|
mode (fast), enhanced capabilities port mode (ecp), or enhanced
|
|
|
|
parallel port mode (epp).
|
2004-01-20 02:22:23 +03:00
|
|
|
.It
|
2004-02-04 00:50:27 +03:00
|
|
|
.Cm dma
|
|
|
|
.Ar yes | no
|
|
|
|
.Pp
|
2004-02-04 17:25:13 +03:00
|
|
|
Enables or disables DMA.
|
|
|
|
Note DMA is only used in some advanced
|
2004-02-04 00:50:27 +03:00
|
|
|
modes such as ECP, and only if interrupts are enabled too.
|
|
|
|
.It
|
2004-01-23 22:51:26 +03:00
|
|
|
.Cm ieee
|
2004-01-20 02:22:23 +03:00
|
|
|
.Ar yes | no
|
|
|
|
.Pp
|
2004-01-23 22:56:07 +03:00
|
|
|
Enables or disables the use of
|
|
|
|
.Tn IEEE 1284
|
|
|
|
negotiations during mode changes and channel direction changes.
|
2004-02-04 00:32:02 +03:00
|
|
|
.It
|
|
|
|
.Cm intr
|
|
|
|
.Ar yes | no
|
|
|
|
.Pp
|
|
|
|
Enables or disables use of interrupts for port operation.
|
|
|
|
If interrupts are disabled, polling is used for data transfers.
|
|
|
|
Default setting depends on device, but polling is commonly preferred.
|
|
|
|
.It
|
|
|
|
.Cm prime
|
|
|
|
.Ar yes | no
|
|
|
|
.Pp
|
|
|
|
Enables (default) or disables printer initialization sequence
|
2004-02-04 17:25:13 +03:00
|
|
|
on device open.
|
|
|
|
Note the initialization sequence is never done
|
2004-02-04 00:32:02 +03:00
|
|
|
on open of control lpt device.
|
|
|
|
.It
|
|
|
|
.Cm autolf
|
|
|
|
.Ar yes | no
|
|
|
|
.Pp
|
|
|
|
Enables or disables (default) automatic LF on CR for data transfers.
|
2004-01-20 02:22:23 +03:00
|
|
|
.El
|
|
|
|
.Sh EXIT STATUS
|
2004-01-23 22:51:26 +03:00
|
|
|
.Nm
|
2004-01-23 22:56:07 +03:00
|
|
|
returns 0 on success, \*[Gt]0 on failure.
|
2004-01-20 02:22:23 +03:00
|
|
|
.Sh FILES
|
|
|
|
.Bl -item
|
|
|
|
.It
|
2004-02-04 00:32:02 +03:00
|
|
|
.Pa /dev/lpt?ctl
|
|
|
|
- printer port control devices
|
2004-01-20 02:22:23 +03:00
|
|
|
.It
|
2004-02-04 00:32:02 +03:00
|
|
|
.Pa /dev/lpt?
|
|
|
|
- printer ports
|
2004-01-20 02:22:23 +03:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr ioctl 2 ,
|
|
|
|
.Xr lpt 4 ,
|
|
|
|
.Xr ppbus 4
|
|
|
|
.Sh HISTORY
|
2004-01-23 22:51:26 +03:00
|
|
|
A similar utility called
|
2004-01-20 02:22:23 +03:00
|
|
|
.Nm lptcontrol
|
2004-01-23 22:56:07 +03:00
|
|
|
exists in
|
|
|
|
.Fx
|
|
|
|
to control the
|
|
|
|
.Xr lpt 4
|
|
|
|
device.
|
|
|
|
While similar in concept, the implementations are independent.
|
2004-01-20 02:32:42 +03:00
|
|
|
.Nm
|
|
|
|
was added in
|
|
|
|
.Nx 2.0 .
|
2004-01-20 02:22:23 +03:00
|
|
|
.Sh AUTHORS
|
2004-01-23 22:51:26 +03:00
|
|
|
This man page and the
|
2004-01-20 02:22:23 +03:00
|
|
|
.Nm
|
|
|
|
utility were written by Gary Thorpe.
|