1.\" Copyright (c) 1980, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)vp.4 8.1 (Berkeley) 06/05/93 7.\" 8.Dd 9.Dt VP 4 vax 10.Os BSD 4 11.Sh NAME 12.Nm vp 13.Nd Versatec interface 14.Sh SYNOPSIS 15.Cd "device vp0 at uba0 csr 0177510 vector vpintr vpintr" 16.Sh DESCRIPTION 17The Versatec printer/plotter is normally used with the 18line printer system. 19This description is designed for those who wish to drive the Versatec directly. 20.Pp 21To use the Versatec yourself, you must realize that you cannot open the 22device, 23.Pa /dev/vp0 24if there is a daemon active. 25You can see if there is a daemon active by doing a 26.Xr lpq 1 , 27and seeing if there are any files being sent. 28Printing should be turned off using 29.Xr lpc 8 . 30.Pp 31To set the Versatec into plot mode you should include 32.Aq Pa sys/vcmd.h 33and use the 34.Xr ioctl 2 35call 36.Bd -literal -offset indent 37ioctl(fileno(vp), VSETSTATE, plotmd); 38.Ed 39.Pp 40where 41.Em plotmd 42is defined to be 43.Bd -literal -offset indent 44int plotmd[] = { VPLOT, 0, 0 }; 45.Ed 46.Pp 47and 48.Em vp 49is the result of a call to 50.Xr fopen 51on stdio. 52When you finish using the Versatec in plot mode you should eject paper 53by sending it a 54.Tn EOT 55after putting it back into print mode, i.e. by 56.Bd -literal -offset indent 57int prtmd[] = { VPRINT, 0, 0 }; 58\&... 59fflush(vp); 60ioctl(fileno(vp), VSETSTATE, prtmd); 61write(fileno(vp), "\e04", 1); 62.Ed 63.Sh FILES 64.Bl -tag -width /dev/vp0xx -compact 65.It Pa /dev/vp0 66.El 67.Sh DIAGNOSTICS 68The following error numbers are significant at the 69time the device is opened. 70.Bl -tag -width [ENXIO] 71.It Bq Er ENXIO 72The device is already in use. 73.It Bq Er EIO 74The device is offline. 75.El 76.Sh SEE ALSO 77.Xr lpr 1 , 78.Xr vtroff 1 , 79.Xr va 4 80.Xr font 5 , 81.Xr lpd 8 , 82.Sh HISTORY 83A 84.Nm 85driver appeared in 86.At v7 . 87.Sh BUGS 88The configuration part of the driver assumes that the device is set up to 89vector print mode through 0174 and plot mode through 0200. 90As the configuration program can't be sure 91which vector interrupted at boot time, 92we specify that it has two interrupt vectors, 93and if an interrupt comes through 0200 it is reset to 0174. 94This is safe for devices with one or two vectors at these two addresses. 95Other configurations with 2 vectors may require changes in the driver. 96