#include <ieee1284.h>
For ieee1284_data_dir the 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 drivers.
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 the timeout, for the data bits specified in mask to have the corresponding values in val.
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:
E1284_NOTAVAIL
E1284_INVALIDPORT
E1284_SYS
E1284_TIMEDOUT
Whereas ieee1284_read_data may 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 port.
Tim Waugh <twaugh@redhat.com>