.\" 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_POLL_PERIPHERAL" "" "06 October 2005" "" "" .SH NAME parport_poll_peripheral \- poll status lines .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp int parport_poll_peripheral (struct parport * \fIport\fB, unsigned char \fImask\fB, unsigned char \fIresult\fB, int \fIusec\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 .TP \fB\fIusec\fB\fR timeout .SH "DESCRIPTION" .PP This function busy-waits until the masked status lines have the desired values, or until the timeout period elapses. 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 This function does not call \fBschedule\fR; instead it busy-waits using \fBudelay\fR\&. It currently has a resolution of 5usec. .PP If the status lines take on the desired values before the timeout period elapses, \fBparport_poll_peripheral\fR returns zero immediately. A zero return value greater than zero indicates a timeout. An error code (less than zero) indicates an error, most likely a signal that arrived, and the caller should finish what it is doing as soon as possible.