1.\" Copyright (c) 1980, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 3. All advertising materials mentioning features or use of this software 13.\" must display the following acknowledgement: 14.\" This product includes software developed by the University of 15.\" California, Berkeley and its contributors. 16.\" 4. Neither the name of the University nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)vp.4 8.1 (Berkeley) 6/5/93 33.\" 34.Dd June 5, 1993 35.Dt VP 4 vax 36.Os BSD 4 37.Sh NAME 38.Nm vp 39.Nd Versatec interface 40.Sh SYNOPSIS 41.Cd "device vp0 at uba0 csr 0177510 vector vpintr vpintr" 42.Sh DESCRIPTION 43The Versatec printer/plotter is normally used with the 44line printer system. 45This description is designed for those who wish to drive the Versatec directly. 46.Pp 47To use the Versatec yourself, you must realize that you cannot open the 48device, 49.Pa /dev/vp0 50if there is a daemon active. 51You can see if there is a daemon active by doing a 52.Xr lpq 1 , 53and seeing if there are any files being sent. 54Printing should be turned off using 55.Xr lpc 8 . 56.Pp 57To set the Versatec into plot mode you should include 58.Aq Pa sys/vcmd.h 59and use the 60.Xr ioctl 2 61call 62.Bd -literal -offset indent 63ioctl(fileno(vp), VSETSTATE, plotmd); 64.Ed 65.Pp 66where 67.Em plotmd 68is defined to be 69.Bd -literal -offset indent 70int plotmd[] = { VPLOT, 0, 0 }; 71.Ed 72.Pp 73and 74.Em vp 75is the result of a call to 76.Xr fopen 77on stdio. 78When you finish using the Versatec in plot mode you should eject paper 79by sending it a 80.Tn EOT 81after putting it back into print mode, i.e. by 82.Bd -literal -offset indent 83int prtmd[] = { VPRINT, 0, 0 }; 84\&... 85fflush(vp); 86ioctl(fileno(vp), VSETSTATE, prtmd); 87write(fileno(vp), "\e04", 1); 88.Ed 89.Sh FILES 90.Bl -tag -width /dev/vp0xx -compact 91.It Pa /dev/vp0 92.El 93.Sh DIAGNOSTICS 94The following error numbers are significant at the 95time the device is opened. 96.Bl -tag -width [ENXIO] 97.It Bq Er ENXIO 98The device is already in use. 99.It Bq Er EIO 100The device is offline. 101.El 102.Sh SEE ALSO 103.Xr lpr 1 , 104.Xr vtroff 1 , 105.Xr va 4 106.Xr font 5 , 107.Xr lpd 8 , 108.Sh HISTORY 109A 110.Nm 111driver appeared in 112.At v7 . 113.Sh BUGS 114The configuration part of the driver assumes that the device is set up to 115vector print mode through 0174 and plot mode through 0200. 116As the configuration program can't be sure 117which vector interrupted at boot time, 118we specify that it has two interrupt vectors, 119and if an interrupt comes through 0200 it is reset to 0174. 120This is safe for devices with one or two vectors at these two addresses. 121Other configurations with 2 vectors may require changes in the driver. 122