Blob Blame History Raw
.\"     Title: ieee1284_data
.\"    Author: Tim Waugh <>
.\" Generator: DocBook XSL Stylesheets v1.72.0 <>
.\"      Date: 09/18/2007
.\"    Manual: Functions
.\"    Source: 
.TH "IEEE1284_DATA" "3" "09/18/2007" "" "Functions"
.\" disable hyphenation
.\" disable justification (adjust text to left margin only)
.ad l
ieee1284_read_data, ieee1284_write_data, ieee1284_data_dir, ieee1284_wait_data \- control the data lines
.ft B
#include <ieee1284.h>
.HP 23
.BI "int ieee1284_read_data(struct\ parport\ *" "port" ");"
.HP 25
.BI "void ieee1284_write_data(struct\ parport\ *" "port" ", unsigned\ char\ " "dt" ");"
.HP 22
.BI "int ieee1284_data_dir(struct\ parport\ *" "port" ", int\ " "reverse" ");"
.HP 23
.BI "int ieee1284_wait_data(struct\ parport\ *" "port" ", unsigned\ char\ " "mask" ", unsigned\ char\ " "val" ", struct\ timeval\ *" "timeout" ");"
These functions manipulate the data lines of the parallel port associated with
(which must have been claimed using
\fBieee1284_claim\fR(3)). The lines are represented by an 8\-bit number (one line per bit) and a direction. The data lines are driven as a group; they may be all host\-driven (forward
direction) or not (reverse
direction). When the peripheral is driving them the host must not.
parameter should be zero to turn the data line drivers on and non\-zero to turn them off. Some port types may be unable to switch off the data line drivers.
Setting the data lines may have side effects on some port types (for example, some Amiga ports pulse nStrobe).
waits, up until the
\fItimeout\fR, for the data bits specified in
to have the corresponding values in
returns the 8\-bit number representing the data lines unless it is not possible to return such a value with this port type, in which case it returns an error code. Possible error codes:
.RS 4
Bi\-directional data lines are not available on this system.
.RS 4
parameter is invalid (perhaps it has not been claimed, for instance).
.RS 4
There was an error at the operating system level, and
has been set accordingly.
.RS 4
has elapsed.
may return
on its first invocation on the port, if it does not do so then it cannot until
is called for that port.
\fBTim Waugh\fR <\&\&>
.sp -1n
.IP "" 4
Copyright \(co 2001\-2003 Tim Waugh