plot_ctrl_rop(3) CLIX plot_ctrl_rop(3)
NAME
plot_ctrl_rop: rplt_ctrl, rplt_ctrl_nw - Sends a control word to the
Raster Operation Processor (ROP) parallel port
LIBRARY
Intergraph Device Library (libix.a)
SYNOPSIS
#include <sys/types.h>
#include <sys/immu.h>
#include <sys/pop.h>
#include <sys/xio/xerr.h>
#include <sys/xio/xio.h>
int rplt_ctrl(
int interface ,
int status ,
int ctrl ,
int timeout ,
int pulse );
int rplt_ctrl_nw(
int interface ,
int status ,
int ctrl ,
int timeout ,
int pulse ,
struct xiosb *xiosb ,
int efn );
PARAMETERS
interface Represents an interface type. This value defines the signal
mapping for the target device, which must be one of the types
defined in <sys/pop.h>: CENTRONICS, VERSATEC, or
INTERGRAPH_DIFF.
status Specifies a three bit status mask. Bits set in the mask
indicate that the corresponding signals received from the
target device should be asserted in order for the clear-to-
send condition to be true. The format of the status mask is
as follows:
2/94 - Intergraph Corporation 1
plot_ctrl_rop(3) CLIX plot_ctrl_rop(3)
___________________________
| 2 | 1 | 0 |
|______|__________|________|
| ready| no error| online|
| h | h | h |
|______|__________|________|
ctrl Specifies the 16-bit value sent to the device when the clear-
to-send condition is true. Bits 0-7 are data and bits 8-15
correspond to the control mask:
______________________________________________________________
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
|_____|_______|_______|_______|_______|_______|_______|_______|
| NOT | RESET| RFFED| REOTR| RLTER| CLEAR| PICLK| PRINT|
| USED| H | H | H | H | H | H | H |
|_____|_______|_______|_______|_______|_______|_______|_______|
timeout Specifies the number of 1/60 second intervals to wait for the
clear-to-send condition, before aborting the request.
pulse Indicates whether bit 8 of the control mask (PRINT H) is
toggled as a control bit or interpreted as a data bit. If
pulse is nonzero, the bit is toggled as a control bit.
efn Specifies the event flag number associated with an
asynchronous request.
xiosb Points to an xiosb structure updated upon completion of an
asynchronous request. The xfcnt member of the structure is
not used.
DESCRIPTION
The rplt_ctrl() function provides a mechanism to send a single word,
specified by ctrl, to a target parallel device by means of the raster
operation processor (ROP) graphics board. When the clear-to-send
condition, specified by status, is true, the word is sent to the target
device. The clear-to-send condition may never become true, so a timeout
parameter is provided. The target device's interface type and interface
must agree for proper signal mapping. The pulse parameter is currently
used to control Intergraph multiplexer (MUX) devices.
The rplt_ctrl_nw() function is the asynchronous version of rplt_ctrl(),
providing the same capability without waiting for completion of the
request. The efn and xiosb parameters are necessary to support
asynchronous requests. (See intro(3) for more information on asynchronous
requests.)
EXAMPLES
To strobe all data and control bits of the ROP parallel port connected to
2 Intergraph Corporation - 2/94
plot_ctrl_rop(3) CLIX plot_ctrl_rop(3)
an Intergraph differential-type device:
void exit(), perror();
if (rplt_ctrl(INTERGRAPH_DIFF, 0, 0xffff, 0, 0) != NULL) {
perror("rplt_ctrl - setting all bits");
exit(2);
}
if (rplt_ctrl(INTERGRAPH_DIFF, 0, 0, 0, 0) != NULL) {
perror("rplt_ctrl - clearing all bits");
exit(2);
}
RETURN VALUES
If the synchronous request was not accepted by the XIO system, XIO_FAILURE
is returned. Upon completion of the synchronous request, if the clear-
to-send condition never became true, a negative status is returned and
bits 0-2 of the return value reflect the state of the status signals from
the target device. Otherwise, 0 is returned.
If the asynchronous request is accepted by the XIO system, a value of 0 is
returned. Otherwise, XIO_FAILURE is returned. Upon completion of the
asynchronous request, if the clear-to-send condition never became true, a
negative status is returned in the status member of the xiosb structure
and bits 0-2 reflect the state of the status signals from the target
device. Otherwise, 0 is returned in the status member.
ERRORS
The rplt_ctrl() and rplt_ctrl_nw() functions fail if the following is
true:
[XIO_FAILURE]
The system does not contain the driver needed to support this
request or efn is invalid.
RELATED INFORMATION
Functions: plt_data(3), intro(3)
Files: xplot(7)
2/94 - Intergraph Corporation 3