\" $NetBSD: lptctl.8,v 1.14 2017/07/04 07:10:06 wiz Exp $
\"
\" Copyright (c) 2004 The NetBSD Foundation, Inc.
\" All rights reserved.
\"
\" 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.
\"
\" 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.
\"
Dd February 2, 2004
Dt LPTCTL 8
Os
Sh NAME
Nm lptctl
Nd manipulate lpt devices
Sh SYNOPSIS
Nm lptctl Ar device Op Ar command Op Ar ...
Sh DESCRIPTION
Nm
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
is printed to standard output.
The status information is also output after commands are carried out.
Sh DEVICE COMMANDS
Multiple command-argument pairs can be specified.
Available commands are:
Bl -item
It
Cm mode
Ar standard | nibble | ps2 | fast | ecp | epp
Pp
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).
It
Cm dma
Ar yes | no
Pp
Enables or disables DMA.
Note DMA is only used in some advanced
modes such as ECP, and only if interrupts are enabled too.
It
Cm ieee
Ar yes | no
Pp
Enables or disables the use of
Tn IEEE 1284
negotiations during mode changes and channel direction changes.
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
on device open.
Note the initialization sequence is never done
on open of control lpt device.
It
Cm autolf
Ar yes | no
Pp
Enables or disables (default) automatic LF on CR for data transfers.
El
Sh FILES
Bl -item
It
Pa /dev/lpt?ctl
- printer port control devices
It
Pa /dev/lpt?
- printer ports
El
Sh EXIT STATUS
Ex -std lptctl
Sh SEE ALSO
Xr ioctl 2 ,
Xr lpt 4 ,
Xr ppbus 4
Sh HISTORY
A similar utility called
Nm lptcontrol
exists in
Fx
to control the
Xr lpt 4
device.
While similar in concept, the implementations are independent.
Nm
was added in
Nx 2.0 .
Sh AUTHORS
This man page and the
Nm
utility were written by
An Gary Thorpe .