IPB
>  Man Pages > Linux > openSUSE 10.2 > Section 3 > ieee1284_read_control man page

ieee1284_read_control man page

Section 3 - openSUSE 10.2 Man Pages

Other operating system man pages available here


Advanced Search

Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!


IEEE1284_CONTROL(3)                                        IEEE1284_CONTROL(3)



NAME
       ieee1284_read_control,  ieee1284_write_control,  ieee1284_frob_control,
       ieee1284_do_nack_handshake - manipulate control lines

SYNOPSIS
       #include <ieee1284.h>


       int ieee1284_read_control (struct parport *port);

       void ieee1284_write_control (struct parport *port, unsigned char ct);

       void ieee1284_frob_control (struct parport *port, unsigned char mask,
                                   unsigned char val);

       int ieee1284_do_nack_handshake (struct parport *port,
                                       unsigned char ct_before,
                                       unsigned char ct_after,
                                       struct timeval *timeout);


DESCRIPTION
       There are four control lines, three of which are  usually  inverted  on
       PC-style  ports.  Where  they  differ, libieee1284 operates on the IEEE
       1284 values, not the PC-style inverted values. The  control  lines  are
       represented by the following enumeration:

       enum ieee1284_control_bits
       {
         C1284_NSTROBE   = 0x01,
         C1284_NAUTOFD   = 0x02,
         C1284_NINIT     = 0x04,
         C1284_NSELECTIN = 0x08,
         /* To convert those values into PC-style register values, use this: */
         C1284_INVERTED = (C1284_NSTROBE|
                           C1284_NAUTOFD|
                           C1284_NSELECTIN),
       };


       These  functions  all  act  on  the parallel port associated with port,
       which must be claimed.


       The current values on  the  control  lines  are  available  by  calling
       ieee1284_read_control,  and  may  be set by calling ieee1284_write_con-
       trol.


       To adjust the values on a set of control lines, use  ieee1284_frob_con-
       trol.  The  effect  of this can be expressed by: ctr = ((ctr & ~mask) ^
       val); that is, the bits in mask are unset, and then those  in  val  are
       inverted.


       The  special function ieee1284_do_nack_handshake is for responding very
       quickly in a protocol where the peripheral sets nAck and the host  must
       respond  by  setting a control line. Its operation, which relies on the
       host machine knowing which interrupt nAck generates, is as follows:


       1. Set the control lines as indicated in ct_before.

       2. Wait for nAck interrupt. If timeout elapses, return  E1284_TIMEDOUT.

       3. Set the control lines as indicated in ct_after.



       On Linux using the ppdev driver, this is performed by the device driver
       in the kernel, and so is faster than normally possible in a  user-space
       library.


RETURN VALUE
       The return value of ieee1284_read_control, if non-negative, is a number
       representing the value on the control lines.


       Possible error codes for ieee1284_read_control:


       E1284_NOTAVAIL
              The control lines of this port are not accessible by the  appli-
              cation.


       E1284_INVALIDPORT
              The  port  parameter is invalid (for instance, perhaps it is not
              claimed).


       Possible error codes for ieee1284_do_nack_handshake:


       E1284_OK
              The handshake was successful.


       E1284_NOTAVAIL
              This operation is not available on this  port  type  or  system.
              This  could be because port interrupts are not available, or be-
              cause the underlying device driver does not support  the  opera-
              tion.


       E1284_INVALIDPORT
              The  port  parameter is invalid (for instance, perhaps it is not
              claimed).


AUTHOR
       Tim Waugh <twaugh@redhat.com>.



                                                           IEEE1284_CONTROL(3)


Man(1) output converted with man2html and wrapped by fishsponge

This page was generated on Sat Sep 8 16:37:39 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)

Useful Links

Go Back

Visitor Statistics


Valid XHTML 1.0 Transitional     Valid CSS!

Partners: Cambridge Plus :: Pyrenees Mountain Holidays Contact Us :: Stainless Steel Footswitch :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum