|
Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!
IEEE1284_TRANSFER(3) IEEE1284_TRANSFER(3)
NAME
ieee1284_nibble_read, ieee1284_compat_write, ieee1284_byte_read,
ieee1284_epp_read_data, ieee1284_epp_write_data,
ieee1284_epp_read_addr, ieee1284_epp_write_addr,
ieee1284_ecp_read_data, ieee1284_ecp_write_data,
ieee1284_ecp_read_addr, ieee1284_ecp_write_addr - data transfer func-
tions
SYNOPSIS
#include <ieee1284.h>
ssize_t ieee1284_nibble_read (struct parport *port, int flags,
char *buffer, size_t len);
ssize_t ieee1284_compat_write (struct parport *port, int flags,
const char *buffer, size_t len);
ssize_t ieee1284_byte_read (struct parport *port, int flags,
char *buffer, size_t len);
ssize_t ieee1284_epp_read_data (struct parport *port, int flags,
char *buffer, size_t len);
ssize_t ieee1284_epp_write_data (struct parport *port, int flags,
const char *buffer, size_t len);
ssize_t ieee1284_epp_read_addr (struct parport *port, int flags,
char *buffer, size_t len);
ssize_t ieee1284_epp_write_addr (struct parport *port, int flags,
const char *buffer, size_t len);
ssize_t ieee1284_ecp_read_data (struct parport *port, int flags,
char *buffer, size_t len);
ssize_t ieee1284_ecp_write_data (struct parport *port, int flags,
const char *buffer, size_t len);
ssize_t ieee1284_ecp_read_addr (struct parport *port, int flags,
char *buffer, size_t len);
ssize_t ieee1284_ecp_write_addr (struct parport *port, int flags,
const char *buffer, size_t len);
DESCRIPTION
This set of functions is for tranferring bytes in the relevant transfer
mode. For ECP and EPP modes two types of transfer are possible: data
and address (usually referred to as channel in ECP).
The supplied port must be a claimed port.
The supplied buffer must be at least len bytes long. When reading, the
transferred data is stored in the buffer; when writing the data to be
transferred is taken from the buffer.
For reads (peripheral to host): if no data is available and F1284_NON-
BLOCK is not in effect, the inactivity timer is started. If data be-
comes available before the inactivity time-out elapses it is read; oth-
erwise the return value will be E1284_TIMEDOUT.
For writes (host to peripheral): if the peripheral is not willing to
accept data and F1284_NONBLOCK is not in effect, the inactivity timer
is started. If the peripheral indicates that it is willing to accept
data before the inactivity time-out elapses it is sent; otherwise the
return value will be E1284_TIMEDOUT
The flags may alter the behaviour slightly:
F1284_NONBLOCK
For reads (peripheral to host): if no data is available, return
immediately (with E1284_TIMEDOUT).
For writes (host to peripheral): if the peripheral is not will-
ing to accept data, return immediately (with E1284_TIMEDOUT).
F1284_SWE
Don't use hardware assistance for the transfer, but instead set
the parallel port pins according to the wire protocol.
F1284_RLE (for ECP only)
Use run length encoding. If the peripheral is in ECP mode with
RLE, calls to ieee1284_ecp_read_data must set this flag in or-
der for the RLE from the peripheral to be interpreted correctly,
and calls to ieee1284_ecp_write_data may set this flag in order
to take advantage of RLE.
F1284_FASTEPP (for EPP only)
Use multi-byte transfers. Several bytes at a time are trans-
ferred using hardware assistance, if supporting hardware is
present. The price of this increased speed is that the return
value will be less reliable when this flag is used.
For ECP mode, a given direction is in force at any particular time, and
it is up to the application to ensure that it is only writing when in
forward mode, and reading when in reverse mode.
RETURN VALUE
The return value is the number of bytes successfully transferred or, if
negative, one of:
E1284_NOTIMPL
This transfer mode and flags combination is not yet implemented
in libieee1284.
E1284_TIMEDOUT
Timed out waiting for peripheral to handshake.
E1284_NOMEM
Not enough memory is available.
E1284_SYS
There was a problem at the operating system level. The global
variable errno has been set appropriately.
E1284_INVALIDPORT
The port parameter is invalid (for instance, perhaps the port is
not claimed).
If any bytes are successfully transferred, that number is returned. An
error is returned only if no bytes are transferred.
For host-to-peripheral transfers, all data is at the peripheral by the
time the call returns.
SEE ALSO
ieee1284_ecp_fwd_to_rev(3)
AUTHOR
Tim Waugh <twaugh@redhat.com>.
IEEE1284_TRANSFER(3)
Man(1) output converted with
man2html and wrapped by fishsponge
This page was generated on Sat Sep 8 16:37:14 GMT 2007
|
Your favourite pages:
No pages logged yet. Trying to save cookie... Top 10 most popular pages:
svn man page (6142 hits) (FreeBSD 6.2)
sqlite3 man page (5592 hits) (openSUSE 10.2)
adv_cap_autoneg man page (5041 hits) (Solaris 10 11_06)
CPAN man page (4787 hits) (Suse Linux 10.1)
ssh man page (4438 hits) (Suse Linux 10.1)
ssh-socks5-proxy-connect man page (3506 hits) (Solaris 10 11_06)
signal man page (3363 hits) (Suse Linux 10.1)
netcat man page (3359 hits) (Suse Linux 10.1)
pprosetup man page (2876 hits) (Solaris 10 11_06)
startproc man page (2732 hits) (Suse Linux 10.1)
|