1PARPORT_WAIT_PERIPHE(9) Parallel Port Devices PARPORT_WAIT_PERIPHE(9)
2
3
4
6 parport_wait_peripheral - wait for status lines to change in 35ms
7
9 int parport_wait_peripheral(struct parport * port, unsigned char mask,
10 unsigned char result);
11
13 port
14 port to watch
15
16 mask
17 status lines to watch
18
19 result
20 desired values of chosen status lines
21
23 This function waits until the masked status lines have the desired
24 values, or until 35ms have elapsed (see IEEE 1284-1994 page 24 to 25
25 for why this value in particular is hardcoded). The mask and result
26 parameters are bitmasks, with the bits defined by the constants in
27 parport.h: PARPORT_STATUS_BUSY, and so on.
28
29 The port is polled quickly to start off with, in anticipation of a fast
30 response from the peripheral. This fast polling time is configurable
31 (using /proc), and defaults to 500usec. If the timeout for this port
32 (see parport_set_timeout) is zero, the fast polling time is 35ms, and
33 this function does not call schedule.
34
35 If the timeout for this port is non-zero, after the fast polling fails
36 it uses parport_wait_event to wait for up to 10ms, waking up if an
37 interrupt occurs.
38
40Kernel Hackers Manual 3.10 June 2019 PARPORT_WAIT_PERIPHE(9)