.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "PARPORT_WAIT_PERIPHERAL" "" "06 October 2005" "" ""
.SH NAME
parport_wait_peripheral \- wait for status lines to change in 35ms
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int parport_wait_peripheral (struct parport * \fIport\fB, unsigned char \fImask\fB, unsigned char \fIresult\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIport\fB\fR
port to watch
.TP
\fB\fImask\fB\fR
status lines to watch
.TP
\fB\fIresult\fB\fR
desired values of chosen status lines
.SH "DESCRIPTION"
.PP
This function waits until the masked status lines have the
desired values, or until 35ms have elapsed (see IEEE 1284-1994
page 24 to 25 for why this value in particular is hardcoded).
The \fImask\fR and \fIresult\fR parameters are bitmasks, with the bits
defined by the constants in parport.h: PARPORT_STATUS_BUSY,
and so on.
.PP
The port is polled quickly to start off with, in anticipation
of a fast response from the peripheral. This fast polling
time is configurable (using /proc), and defaults to 500usec.
If the timeout for this port (see \fBparport_set_timeout\fR) is
zero, the fast polling time is 35ms, and this function does
not call \fBschedule\fR\&.
.PP
If the timeout for this port is non-zero, after the fast
polling fails it uses \fBparport_wait_event\fR to wait for up to
10ms, waking up if an interrupt occurs.