ieee1284_write_data (3) - Linux Manuals
ieee1284_write_data: control the data lines
ieee1284_read_data, ieee1284_write_data, ieee1284_data_dir, ieee1284_wait_data - control the data lines
int ieee1284_read_data(struct parport
void ieee1284_write_data(struct parport
*port, unsigned char dt);
int ieee1284_data_dir(struct parport
*port, int reverse);
int ieee1284_wait_data(struct parport
*port, unsigned char mask, unsigned char val, struct timeval *timeout);
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_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.
- The port parameter is invalid (perhaps it has not been claimed, for instance).
- There was an error at the operating system level, and errno has been set accordingly.
- The timeout has elapsed.
Tim Waugh <twaugh [at] redhat.com>
Copyright © 2001-2003 Tim Waugh