1*61601Sbostic.\" Copyright (c) 1980, 1991, 1993 2*61601Sbostic.\" The Regents of the University of California. All rights reserved. 320699Smckusick.\" 447674Scael.\" %sccs.include.redist.man% 520699Smckusick.\" 6*61601Sbostic.\" @(#)vp.4 8.1 (Berkeley) 06/05/93 747674Scael.\" 847674Scael.Dd 947674Scael.Dt VP 4 vax 1047674Scael.Os BSD 4 1147674Scael.Sh NAME 1247674Scael.Nm vp 1347674Scael.Nd Versatec interface 1447674Scael.Sh SYNOPSIS 1547674Scael.Cd "device vp0 at uba0 csr 0177510 vector vpintr vpintr" 1647674Scael.Sh DESCRIPTION 1728180SbloomThe Versatec printer/plotter is normally used with the 1828180Sbloomline printer system. 1920699SmckusickThis description is designed for those who wish to drive the Versatec directly. 2047674Scael.Pp 2120699SmckusickTo use the Versatec yourself, you must realize that you cannot open the 2220699Smckusickdevice, 2347674Scael.Pa /dev/vp0 2420699Smckusickif there is a daemon active. 2520699SmckusickYou can see if there is a daemon active by doing a 2647674Scael.Xr lpq 1 , 2720700Smckusickand seeing if there are any files being sent. 2828180SbloomPrinting should be turned off using 2947674Scael.Xr lpc 8 . 3047674Scael.Pp 3120700SmckusickTo set the Versatec into plot mode you should include 3247674Scael.Aq Pa sys/vcmd.h 3320700Smckusickand use the 3447674Scael.Xr ioctl 2 3520699Smckusickcall 3647674Scael.Bd -literal -offset indent 3720699Smckusickioctl(fileno(vp), VSETSTATE, plotmd); 3847674Scael.Ed 3947674Scael.Pp 4020699Smckusickwhere 4147674Scael.Em plotmd 4220699Smckusickis defined to be 4347674Scael.Bd -literal -offset indent 4447674Scaelint plotmd[] = { VPLOT, 0, 0 }; 4547674Scael.Ed 4647674Scael.Pp 4720699Smckusickand 4847674Scael.Em vp 4920699Smckusickis the result of a call to 5047674Scael.Xr fopen 5120699Smckusickon stdio. 5220699SmckusickWhen you finish using the Versatec in plot mode you should eject paper 5347674Scaelby sending it a 5447674Scael.Tn EOT 5547674Scaelafter putting it back into print mode, i.e. by 5647674Scael.Bd -literal -offset indent 5747674Scaelint prtmd[] = { VPRINT, 0, 0 }; 5847674Scael\&... 5947674Scaelfflush(vp); 6047674Scaelioctl(fileno(vp), VSETSTATE, prtmd); 6147674Scaelwrite(fileno(vp), "\e04", 1); 6247674Scael.Ed 6347674Scael.Sh FILES 6447674Scael.Bl -tag -width /dev/vp0xx -compact 6547674Scael.It Pa /dev/vp0 6647674Scael.El 6747674Scael.Sh DIAGNOSTICS 6820700SmckusickThe following error numbers are significant at the 6920700Smckusicktime the device is opened. 7047674Scael.Bl -tag -width [ENXIO] 7147674Scael.It Bq Er ENXIO 7220700SmckusickThe device is already in use. 7347674Scael.It Bq Er EIO 7420700SmckusickThe device is offline. 7547674Scael.El 7647674Scael.Sh SEE ALSO 7747674Scael.Xr lpr 1 , 7847674Scael.Xr vtroff 1 , 7947674Scael.Xr va 4 8047674Scael.Xr font 5 , 8147674Scael.Xr lpd 8 , 8247674Scael.Sh HISTORY 8347674ScaelA 8447674Scael.Nm 8547674Scaeldriver appeared in 8647674Scael.At v7 . 8747674Scael.Sh BUGS 8820700SmckusickThe configuration part of the driver assumes that the device is set up to 8920700Smckusickvector print mode through 0174 and plot mode through 0200. 9020700SmckusickAs the configuration program can't be sure 9120700Smckusickwhich vector interrupted at boot time, 9220700Smckusickwe specify that it has two interrupt vectors, 9320700Smckusickand if an interrupt comes through 0200 it is reset to 0174. 9420700SmckusickThis is safe for devices with one or two vectors at these two addresses. 9520700SmckusickOther configurations with 2 vectors may require changes in the driver. 96