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