NetBSD/share/man/man4/man4.vax/vp.4

124 lines
4.0 KiB
Groff

.\" $NetBSD: vp.4,v 1.3 1996/03/03 17:14:16 thorpej Exp $
.\"
.\" Copyright (c) 1980, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" from: @(#)vp.4 6.3 (Berkeley) 3/27/91
.\"
.Dd March 27, 1991
.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.