pdi_write(3) CLIX pdi_write(3)
NAME
pdi_write, pdi_write_nw - Writes data from memory to a PDI port
LIBRARY
Intergraph Device Library (libix.a)
SYNOPSIS
#include <sys/xio/xerr.h>
#include <sys/xio/xio.h>
int pdi_write(
int channel ,
char *dbuf ,
int dcnt ,
int timeout ,
int *xfcnt );
int pdi_write_nw(
int channel ,
char *dbuf ,
int dcnt ,
int timeout ,
struct xiosb *xiosb ,
int efn );
PARAMETERS
channel An integer representing a PDI port
dbuf A pointer to a data buffer
dcnt The size of the data buffer
timeout The time limit in 1/60 second intervals for the data transfer
xfcnt The number of bytes transferred
xiosb A pointer to the xiosb structure updated upon completion of the
request
efn The event flag number associated with the request
DESCRIPTION
The pdi_write() function provides a mechanism for writing directly to the
Processed Data Interface (PDI) port on the Image System Interface (ISI)
board referenced by channel. The channel parameter must have been opened
2/94 - Intergraph Corporation 1
pdi_write(3) CLIX pdi_write(3)
with pdi_open().
The dbuf parameter points to the data buffer. The buffer must begin on a
longword boundary. The dcnt function contains the number of bytes to be
transferred.
The timeout parameter indicates the time limit in 1/60 second intervals
for the data transfer. Any transfer that takes longer is aborted and an
appropriate status is returned. A timeout value of 0 disables the timeout
function.
Upon completion of the synchronous request, xfcnt indicates the number of
bytes transferred.
The pdi_write_nw() function is the asynchronous version of pdi_write(),
providing the same capability without waiting for completion of the
request. The efn parameter is the event flag number associated with the
request. The xiosb parameter is a pointer to the xiosb structure updated
upon completion of the request (see intro(3)). The xfcnt member of the
xiosb structure indicates the number of bytes transferred.
RETURN VALUES
Upon successful completion of the synchronous request, a value of 0 is
returned. Otherwise, one of the following failure codes is returned.
If the asynchronous request is accepted by the XIO system, a value of 0
will be returned by the request. Otherwise, XIO_FAILURE will be returned.
Upon completion of an accepted request, the status member of the xiosb
structure will be set to either 0 if successful, or to one of the
following failure codes if unsuccessful.
ERRORS
The pdi_write() and pdi_write_nw() functions will fail if one of the
following is true:
[XIO_FAILURE]
The system does not contain the driver needed to support this
request or efn is invalid.
[ISI_CHANNEL_NOT_OPEN]
The specified channel is not open for this process.
[BAD_DATA_BUFFER_ADDRESS]
The data buffer is not longword aligned or points to an invalid
memory space.
[PAGE_LOCK_FAILED]
Not enough physical memory for this request is available at this
time.
2 Intergraph Corporation - 2/94
pdi_write(3) CLIX pdi_write(3)
[ISI_CANCELED]
The request was canceled with pdi_cancel() or pdi_close().
[ISI_PARITY_ERROR]
A parity error occurred on the transfer.
[ISI_CYCLE_ERROR]
A hardware handshake error occurred on the transfer.
[ISI_TIMEOUT]
The timeout expired before the transfer completed.
RELATED INFORMATION
Functions: pdi_open(3), pdi_close(3), pdi_setup(3), pdi_cancel(3),
intro(3)
Files: xpdi(7)
2/94 - Intergraph Corporation 3