VP(4S)

NAME
vp - Ikon 10071-5 Versatec parallel printer interface

CONFIG — SUN-2 SYSTEM
device vp0 at mbio ? csr 0x400 priority 2

DESCRIPTION

This Sun interface to the Versatec printer/plotter is supported by the Ikon parallel interface board, a word DMA device, which is output only.

The Versatec is normally handled by the line printer spooling system and should not be accessed by the user directly.

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

The printer operates in either print or plot mode. To set the printer into plot mode you should include <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 (vp);
    f = fileno (vp);
    ioctl(f, VSETSTATE, prtmd);
    write(f, "\04", 1);

FILES
/dev/vp0

SEE ALSO
ioctl(2)

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

Writes must start on even byte boundaries and be an even number of bytes in length.