1IEEE1284_GET_IRQ_FD(3) Functions IEEE1284_GET_IRQ_FD(3)
2
3
4
6 ieee1284_get_irq_fd, ieee1284_clear_irq - interrupt notification
7
9 #include <ieee1284.h>
10
11 int ieee1284_get_irq_fd(struct parport *port);
12
13 int ieee1284_clear_irq(struct parport *port, unsigned int *count);
14
16 If the port has a configured interrupt line and the port type supports
17 interrupt notification, it is possible to obtain a file descriptor that
18 may be used for select(2) or poll(2). Any event (readable, writable or
19 exception) means that an interrupt has been triggered. No operations
20 other than select or poll may be performed on the file descriptor.
21
22 The port must be open in order to call ieee1284_get_irq_fd, and must be
23 claimed when using select or poll.
24
25 The caller must not close the file descriptor, and may not use it at
26 all when the port is not claimed.
27
28 When an interrupt has been detected, the caller must call
29 ieee1284_clear_irq to clear the interrupt condition, at which point the
30 number of interrupts raised can be obtained by supplying a non-NULL
31 count.
32
34 For ieee1284_get_irq_fd: If the return value is negative then it is an
35 error code listed below. Otherwise it is a valid file descriptor.
36
37 E1284_NOTAVAIL
38 No such file descriptor is available.
39
40 E1284_INVALIDPORT
41 The port parameter is invalid (for instance, perhaps the port is
42 not open).
43
44 For ieee1284_clear_irq:
45
46 E1284_OK
47 The interrupt has been cleared. If count was not NULL the count of
48 interrupts has been atomically stored to count and reset.
49
50 E1284_NOTAVAIL
51 The count parameter was not NULL but interrupt counting is not
52 supported on this type of port. The interrupt has been cleared.
53
54 E1284_SYS
55 There was a problem clearing the interrupt.
56
57 E1284_INVALIDPORT
58 The port parameter is invalid (for instance, perhaps the port is
59 not claimed).
60
62 Tim Waugh <twaugh@redhat.com>
63 Author.
64
66 Copyright © 2001-2003 Tim Waugh
67
68
69
70[FIXME: source] 01/26/2021 IEEE1284_GET_IRQ_FD(3)