xref: /csrg-svn/share/man/man4/man4.vax/vp.4 (revision 47674)
1*47674Scael.\" Copyright (c) 1980, 1991 Regents of the University of California.
2*47674Scael.\" All rights reserved.
320699Smckusick.\"
4*47674Scael.\" %sccs.include.redist.man%
520699Smckusick.\"
6*47674Scael.\"     @(#)vp.4	6.3 (Berkeley) 03/27/91
7*47674Scael.\"
8*47674Scael.Dd
9*47674Scael.Dt VP 4 vax
10*47674Scael.Os BSD 4
11*47674Scael.Sh NAME
12*47674Scael.Nm vp
13*47674Scael.Nd Versatec interface
14*47674Scael.Sh SYNOPSIS
15*47674Scael.Cd "device vp0 at uba0 csr 0177510 vector vpintr vpintr"
16*47674Scael.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.
20*47674Scael.Pp
2120699SmckusickTo use the Versatec yourself, you must realize that you cannot open the
2220699Smckusickdevice,
23*47674Scael.Pa /dev/vp0
2420699Smckusickif there is a daemon active.
2520699SmckusickYou can see if there is a daemon active by doing a
26*47674Scael.Xr lpq 1 ,
2720700Smckusickand seeing if there are any files being sent.
2828180SbloomPrinting should be turned off using
29*47674Scael.Xr lpc 8 .
30*47674Scael.Pp
3120700SmckusickTo set the Versatec into plot mode you should include
32*47674Scael.Aq Pa sys/vcmd.h
3320700Smckusickand use the
34*47674Scael.Xr ioctl 2
3520699Smckusickcall
36*47674Scael.Bd -literal -offset indent
3720699Smckusickioctl(fileno(vp), VSETSTATE, plotmd);
38*47674Scael.Ed
39*47674Scael.Pp
4020699Smckusickwhere
41*47674Scael.Em plotmd
4220699Smckusickis defined to be
43*47674Scael.Bd -literal -offset indent
44*47674Scaelint plotmd[] = { VPLOT, 0, 0 };
45*47674Scael.Ed
46*47674Scael.Pp
4720699Smckusickand
48*47674Scael.Em vp
4920699Smckusickis the result of a call to
50*47674Scael.Xr fopen
5120699Smckusickon stdio.
5220699SmckusickWhen you finish using the Versatec in plot mode you should eject paper
53*47674Scaelby sending it a
54*47674Scael.Tn EOT
55*47674Scaelafter putting it back into print mode, i.e. by
56*47674Scael.Bd -literal -offset indent
57*47674Scaelint prtmd[] = { VPRINT, 0, 0 };
58*47674Scael\&...
59*47674Scaelfflush(vp);
60*47674Scaelioctl(fileno(vp), VSETSTATE, prtmd);
61*47674Scaelwrite(fileno(vp), "\e04", 1);
62*47674Scael.Ed
63*47674Scael.Sh FILES
64*47674Scael.Bl -tag -width /dev/vp0xx -compact
65*47674Scael.It Pa /dev/vp0
66*47674Scael.El
67*47674Scael.Sh DIAGNOSTICS
6820700SmckusickThe following error numbers are significant at the
6920700Smckusicktime the device is opened.
70*47674Scael.Bl -tag -width [ENXIO]
71*47674Scael.It Bq Er ENXIO
7220700SmckusickThe device is already in use.
73*47674Scael.It Bq Er EIO
7420700SmckusickThe device is offline.
75*47674Scael.El
76*47674Scael.Sh SEE ALSO
77*47674Scael.Xr lpr 1 ,
78*47674Scael.Xr vtroff 1 ,
79*47674Scael.Xr va 4
80*47674Scael.Xr font 5 ,
81*47674Scael.Xr lpd 8 ,
82*47674Scael.Sh HISTORY
83*47674ScaelA
84*47674Scael.Nm
85*47674Scaeldriver appeared in
86*47674Scael.At v7 .
87*47674Scael.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