'\" t .\" Title: parport_wait_peripheral .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Parallel Port Devices .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "PARPORT_WAIT_PERIPHE" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "Parallel Port Devices" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" parport_wait_peripheral \- wait for status lines to change in 35ms .SH "SYNOPSIS" .HP \w'int\ parport_wait_peripheral('u .BI "int parport_wait_peripheral(struct\ parport\ *\ " "port" ", unsigned\ char\ " "mask" ", unsigned\ char\ " "result" ");" .SH "ARGUMENTS" .PP \fIport\fR .RS 4 port to watch .RE .PP \fImask\fR .RS 4 status lines to watch .RE .PP \fIresult\fR .RS 4 desired values of chosen status lines .RE .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: \fBPARPORT_STATUS_BUSY\fR, 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\&. .SH "COPYRIGHT" .br