VPC(4S)

NAME
vpc - Systech VPC-2200 Versatec printer/plotter and Centronics printer interface

CONFIG
device	vpc0 at vme16d16 ? csr 0x480 priority 2 vector vpcintr 0x80
device	vpc1 at vme16d16 ? csr 0x500 priority 2 vector vpcintr 0x81

AVAILABILITY

Sun-3, Sun-3/80 and Sun-4 systems only.

DESCRIPTION

This Sun interface to the Versatec printer/plotter and to Centronics printers is supported by the Systech parallel interface board, an output-only byte-wide DMA device. The device has one channel for Versatec devices and one channel for Centronics devices, with an optional long lines interface for Versatec devices.

Devices attached to this interface are normally handled by the line printer spooling system and should not be accessed by the user directly.

Opening the device /dev/vpc0 or /dev/lp0 may yield one of two errors: ENXIO indicates that the device is already in use; EIO indicates that the device is offline.

The Versatec printer/plotter operates in either print or plot mode. To set the printer into plot mode you should include <sys/vcmd.h> and use the ioctl(2) call:

    ioctl(f, VSETSTATE, plotmd);

where plotmd is defined to be

    int plotmd[] = { VPLOT, 0, 0 };

When going back into print mode from plot mode you normally eject paper by sending it an EOT after putting into print mode:

    int prtmd[] = { VPRINT, 0, 0 };
    ...
    fflush (vpc);
    f = fileno(vpc);
    ioctl(f, VSETSTATE, prtmd);
    write(f, "\04", 1);

FILES
/dev/vpc0
/dev/lp0

SEE ALSO
ioctl(2), setbuf(3V)

BUGS

If you use the standard I/O library on the Versatec, be sure to explicitly set a buffer using setbuf(3V), since the library will not use buffered output by default, and will run very slowly.