PARPORT_POLL_PERIPHERAL

Section: ()
Updated: 06 October 2005
Index Return to Main Contents

 

NAME

parport_poll_peripheral - poll status lines  

SYNOPSIS

"SYNOPSIS"

int parport_poll_peripheral (struct parport * port, unsigned char mask, unsigned char result, int usec);  

ARGUMENTS

port
port to watch
mask
status lines to watch
result
desired values of chosen status lines
usec
timeout
 

DESCRIPTION

This function busy-waits until the masked status lines have the desired values, or until the timeout period elapses. The mask and result parameters are bitmasks, with the bits defined by the constants in parport.h: PARPORT_STATUS_BUSY, and so on.

This function does not call schedule; instead it busy-waits using udelay. It currently has a resolution of 5usec.

If the status lines take on the desired values before the timeout period elapses, parport_poll_peripheral 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.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 07:07:21 GMT, October 06, 2005