1IEEE1284_DATA(3)                   Functions                  IEEE1284_DATA(3)
2
3
4

NAME

6       ieee1284_read_data, ieee1284_write_data, ieee1284_data_dir,
7       ieee1284_wait_data - control the data lines
8

SYNOPSIS

10       #include <ieee1284.h>
11
12       int ieee1284_read_data(struct parport *port);
13
14       void ieee1284_write_data(struct parport *port, unsigned char dt);
15
16       int ieee1284_data_dir(struct parport *port, int reverse);
17
18       int ieee1284_wait_data(struct parport *port, unsigned char mask,
19                              unsigned char val, struct timeval *timeout);
20

DESCRIPTION

22       These functions manipulate the data lines of the parallel port
23       associated with port (which must have been claimed using
24       ieee1284_claim(3)). The lines are represented by an 8-bit number (one
25       line per bit) and a direction. The data lines are driven as a group;
26       they may be all host-driven (forward direction) or not (reverse
27       direction). When the peripheral is driving them the host must not.
28
29       For ieee1284_data_dir the reverse parameter should be zero to turn the
30       data line drivers on and non-zero to turn them off. Some port types may
31       be unable to switch off the data line drivers.
32
33       Setting the data lines may have side effects on some port types (for
34       example, some Amiga ports pulse nStrobe).
35
36       ieee1284_wait_data waits, up until the timeout, for the data bits
37       specified in mask to have the corresponding values in val.
38

RETURN VALUE

40       ieee1284_read_data returns the 8-bit number representing the data lines
41       unless it is not possible to return such a value with this port type,
42       in which case it returns an error code. Possible error codes:
43
44       E1284_NOTAVAIL
45           Bi-directional data lines are not available on this system.
46
47       E1284_INVALIDPORT
48           The port parameter is invalid (perhaps it has not been claimed, for
49           instance).
50
51       E1284_SYS
52           There was an error at the operating system level, and errno has
53           been set accordingly.
54
55       E1284_TIMEDOUT
56           The timeout has elapsed.
57
58       Whereas ieee1284_read_data may return E1284_NOTAVAIL on its first
59       invocation on the port, if it does not do so then it cannot until
60       ieee1284_close is called for that port.
61

AUTHOR

63       Tim Waugh <twaugh@redhat.com>
64           Author.
65
67       Copyright © 2001-2003 Tim Waugh
68
69
70
71[FIXME: source]                   07/22/2010                  IEEE1284_DATA(3)
Impressum