ieee1284_read_data, ieee1284_write_data, ieee1284_data_dir, ieee1284_wait_data — control the data lines
These functions manipulate the data lines of the
parallel port associated with
(which must have been claimed using ieee1284_claim(3)). The lines are represented by an 8-bit
number (one line per bit) and a direction. The data lines
are driven as a group; they may be all host-driven
(forward direction) or not
(reverse direction). When the
peripheral is driving them the host must not.
reverse parameter should be zero to
turn the data line drivers on and non-zero to turn them off.
Some port types may be unable to switch off the data line
Setting the data lines may have side effects on some port types (for example, some Amiga ports pulse nStrobe).
ieee1284_wait_data waits, up until
timeout, for the data bits
mask to have the
corresponding values in
ieee1284_read_data returns the
8-bit number representing the data lines unless it is not
possible to return such a value with this port type, in which
case it returns an error code. Possible error codes:
Bi-directional data lines are not available on this system.
port parameter is
invalid (perhaps it has not been claimed, for
There was an error at the operating system level,
errno has been set
return E1284_NOTAVAIL on its first invocation on the port,
if it does not do so then it cannot until
ieee1284_close is called for that