---
name: "parport_wait_peripheral"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/parport_wait_peripheral"
---

# parport\_wait\_peripheral(9)

wait for status lines to change in 35ms

## NAME

parport\_wait\_peripheral - wait for status lines to change in 35ms

## SYNOPSIS

**int parport\_wait\_peripheral(struct parport \*** *port***, unsigned char** *mask***, unsigned char** *result***);**

## ARGUMENTS

*port*

port to watch

*mask*

status lines to watch

*result*

desired values of chosen status lines

## DESCRIPTION

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 *mask* and *result* parameters are bitmasks, with the bits defined by the constants in parport.h: **PARPORT\_STATUS\_BUSY**, and so on.

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 **parport\_set\_timeout**) is zero, the fast polling time is 35ms, and this function does not call **schedule**.

If the timeout for this port is non-zero, after the fast polling fails it uses **parport\_wait\_event** to wait for up to 10ms, waking up if an interrupt occurs.

## COPYRIGHT
