'\" t .\" Title: parport_read .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: Parallel Port Devices .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "PARPORT_READ" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "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_read \- read a block of data from a parallel port .SH "SYNOPSIS" .HP \w'ssize_t\ parport_read('u .BI "ssize_t parport_read(struct\ parport\ *\ " "port" ", void\ *\ " "buffer" ", size_t\ " "len" ");" .SH "ARGUMENTS" .PP \fIport\fR .RS 4 port to read from .RE .PP \fIbuffer\fR .RS 4 data buffer (in kernel space) .RE .PP \fIlen\fR .RS 4 number of bytes of data to transfer .RE .SH "DESCRIPTION" .PP This will read up to \fIlen\fR bytes of \fIbuffer\fR to the port specified, using the IEEE 1284 transfer mode most recently negotiated to (using \fBparport_negotiate\fR), as long as that mode supports reverse transfers (peripheral to host)\&. .PP It is the caller\*(Aqs responsibility to ensure that the first \fIlen\fR bytes of \fIbuffer\fR are available to write to\&. .PP This function returns the number of bytes transferred (if zero or positive), or else an error code\&. .SH "COPYRIGHT" .br