VP(4) | Device Drivers Manual (vax) | VP(4) |
vp
—
vp0 at uba0 csr 0177510 vector vpintr vpintr
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.
To use the Versatec yourself, you must realize that you cannot open the device, /dev/vp0 if there is a daemon active. You can see if there is a daemon active by doing a vax/lpq(1), and seeing if there are any files being sent. Printing should be turned off using vax/lpc(8).
To set the Versatec into plot mode you should include
<sys/vcmd.h>
and use the
ioctl(2) call
ioctl(fileno(vp), VSETSTATE, plotmd);
where plotmd is defined to be
int plotmd[] = { VPLOT, 0, 0 };
and vp is the result of a call to fopen(3) on stdio. When you finish using the Versatec in plot mode you should eject paper by sending it a EOT after putting it back into print mode, i.e. by
int prtmd[] = { VPRINT, 0, 0 }; ... fflush(vp); ioctl(fileno(vp), VSETSTATE, prtmd); write(fileno(vp), "\04", 1);
ENXIO
]EIO
]vp
driver appeared in
Version 7 AT&T UNIX.
February 17, 2017 | NetBSD 9.4 |