VersatecFace.mesa
Copyright Ó 1989, 1991 by Xerox Corporation. All rights reserved.
Dave Rumph, January 20, 1989 2:14:04 pm PST
PCedar2.0 Face for the Versatec "green sheet" interface. Currently implemented on both Suns and the softcard.
VersatecFace: CEDAR DEFINITIONS
~ BEGIN
Initialize: PROC RETURNS [ok: BOOL];
Do whatever setup is required before the Versatec port can be accessed.
Finalize: PROC;
Do whatever shutdown is required after the Versatec port access is done.
OnLine: PROC RETURNS [onLine: BOOL];
Ready: PROC RETURNS [ready: BOOL];
Reset: PROC;
Reset the Versatec printer.
Mode: TYPE ~ MACHINE DEPENDENT {print(0), plot(1), SPPPrint(2), SPPPlot(3), unused(WORD.LAST)};
SetMode: PROC [mode: Mode];
Set the mode.
RCommand: TYPE ~ MACHINE DEPENDENT {CLEAR(0), RESET(1), RLTER(2), RFFED(3), REOTR(4), unused(WORD.LAST)};
SendRCommand: PROC [cmd: RCommand] RETURNS [ok: BOOL];
A call to this procedure send a pulse on one of the remote command lines (the pulse length complies with the specs)
This procedure is waiting for the command to terminate or the printer go OFF Line before returning (OK is FALSE if the printer went OFF Line)
SendOneByte: PROC [data: BYTE] RETURNS [ok: BOOL];
Sends one byte to the interface, without waiting for completion. Return value of FALSE indicates the Versatec is offline.
BufferAddress: TYPE = LONG POINTER;
SendBuffer: PROC [addr: BufferAddress, bytes: CARD, dmaPerTransferCount: CARD ¬ 0] RETURNS [ok: BOOL];
Send count bytes of data starting at addr. On the softcard, it doesn't wait 'til the transfer is finished before returning, but does wait for a first transfer to finish before starting a second one. A value other than 0 for dmaPerTransferCount causes the dma transfers to occur in units of dmaPerTransferCount bytes. This is here to optimize smoothness of printing. Suggested use: either the scanline length or the page length (but the Sun hardware and kernel limit it to 63K!)
Abort: PROC;
Try to abort the transfer of data to the Versatec.
END.