.\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" %sccs.include.redist.man% .\" .\" @(#)vp.4 8.1 (Berkeley) 06/05/93 .\" .Dd .Dt VP 4 vax .Os BSD 4 .Sh NAME .Nm vp .Nd Versatec interface .Sh SYNOPSIS .Cd "device vp0 at uba0 csr 0177510 vector vpintr vpintr" .Sh DESCRIPTION The Versatec printer/plotter is normally used with the line printer system. This description is designed for those who wish to drive the Versatec directly. .Pp To use the Versatec yourself, you must realize that you cannot open the device, .Pa /dev/vp0 if there is a daemon active. You can see if there is a daemon active by doing a .Xr lpq 1 , and seeing if there are any files being sent. Printing should be turned off using .Xr lpc 8 . .Pp To set the Versatec into plot mode you should include .Aq Pa sys/vcmd.h and use the .Xr ioctl 2 call .Bd -literal -offset indent ioctl(fileno(vp), VSETSTATE, plotmd); .Ed .Pp where .Em plotmd is defined to be .Bd -literal -offset indent int plotmd[] = { VPLOT, 0, 0 }; .Ed .Pp and .Em vp is the result of a call to .Xr fopen on stdio. When you finish using the Versatec in plot mode you should eject paper by sending it a .Tn EOT after putting it back into print mode, i.e. by .Bd -literal -offset indent int prtmd[] = { VPRINT, 0, 0 }; \&... fflush(vp); ioctl(fileno(vp), VSETSTATE, prtmd); write(fileno(vp), "\e04", 1); .Ed .Sh FILES .Bl -tag -width /dev/vp0xx -compact .It Pa /dev/vp0 .El .Sh DIAGNOSTICS The following error numbers are significant at the time the device is opened. .Bl -tag -width [ENXIO] .It Bq Er ENXIO The device is already in use. .It Bq Er EIO The device is offline. .El .Sh SEE ALSO .Xr lpr 1 , .Xr vtroff 1 , .Xr va 4 .Xr font 5 , .Xr lpd 8 , .Sh HISTORY A .Nm driver appeared in .At v7 . .Sh BUGS The configuration part of the driver assumes that the device is set up to vector print mode through 0174 and plot mode through 0200. As the configuration program can't be sure which vector interrupted at boot time, we specify that it has two interrupt vectors, and if an interrupt comes through 0200 it is reset to 0174. This is safe for devices with one or two vectors at these two addresses. Other configurations with 2 vectors may require changes in the driver.