|
Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!
IEEE1284_STATUS(3) IEEE1284_STATUS(3)
NAME
ieee1284_read_status, ieee1284_wait_status - analyse status lines
SYNOPSIS
#include <ieee1284.h>
int ieee1284_read_status (struct parport *port);
int ieee1284_wait_status (struct parport *port, unsigned char mask,
unsigned char val, struct timeval *timeout);
DESCRIPTION
There are five status lines, one of which is usually inverted on
PC-style ports. Where they differ, libieee1284 operates on the IEEE
1284 values, not the PC-style inverted values. The status lines are
represented by the following enumeration:
enum ieee1284_status_bits
{
S1284_NFAULT = 0x08,
S1284_SELECT = 0x10,
S1284_PERROR = 0x20,
S1284_NACK = 0x40,
S1284_BUSY = 0x80,
/* To convert those values into PC-style register values, use this: */
S1284_INVERTED = S1284_BUSY,
};
These functions all act on the parallel port associated with port,
which must be claimed.
The purpose of ieee1284_wait_status is to wait until particular status
lines have specified values. Its timeout parameter may be modified on
return.
RETURN VALUE
For ieee1284_read_status, the return value is a non-negative integer
with bits set as appropriate representing the status lines. A negative
result indicates an error.
For ieee1284_wait_status, the return value is E1284_OK if the status
lines now reflect the desired values (i.e. status & mask is val), or a
negative result indicating an error.
Possible error codes:
E1284_NOTIMPL
The port lacks the required capability. This could be due to a
limitation of this version of libieee1284, or a hardware limita-
tion.
E1284_NOTAVAIL
Access to the status lines is not available on this port type.
E1284_TIMEDOUT
The timeout has elapsed.
E1284_INVALIDPORT
The port parameter is invalid (for instance, perhaps the port is
not claimed).
NOTES
The nAck pin is often able to trigger interrupts on the host machine.
With operating system help these interrupts may be visible to the ap-
plication via the file descriptor returned by ieee1284_get_irq_fd.
Under Linux, the conditions are that the parallel port driver knows
which interrupt line to use and is using it, and that the relevant
/dev/parport device node is accessible and backed by a device driver.
AUTHOR
Tim Waugh <twaugh@redhat.com>.
IEEE1284_STATUS(3)
Man(1) output converted with
man2html and wrapped by fishsponge
This page was generated on Sat Sep 8 16:38:19 GMT 2007
|
Your favourite pages:
No pages logged yet. Trying to save cookie... Top 10 most popular pages:
svn man page (6143 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)
|