Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ igpiostat(3) — HP-UX Instrument Control Library G.03.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

igpioctrl(3)

igpiosetwidth(3)

IGPIOSTAT(3)

HP-UX

NAME

igpiostat − returns the status of a GPIO interface

SYNOPSIS

#include <sicl.h>

int igpiostat (id, request, result);
INST id;
int request;
unsigned long *result;

DESCRIPTION

 
The igpiostat function is used to determine the current state of various GPIO modes and lines.  The request parameter can be one of the following:
 

­I_GPIO_CTRL The result is a mask representing the state of all "Control" lines. 
 
The E2074 interface has two Control lines, so only the two least-significant bits have meaning for that interface.  These can be represented by the following defines.  All other bits in the result mask are 0. 
 

  I_GPIO_CTRL_CTL0   The CTL0 line.
  I_GPIO_CTRL_CTL1   The CTL1 line.

­I_GPIO_DATA The result is a mask representing the state of all "Data In" lines.  The E2074 interface has either 8 or 16 Data In lines, depending upon the setting specified by igpiosetwidth. 
 
Note that this function reads the data lines asynchronously, without any type of handshake.  It is intended for programs that implement their own handshake explicitly.
 
An igpiostat function from one process will proceed even if another process has a lock on the interface.  Ordinarily, this does not alter or disrupt any hardware states.  Reading the Data In lines is one exception.  A data read causes an "input" indication on the I/O line (pin 20).  In rare cases, that change might be unexpected, or undesirable, to the session that owns the lock. 

­I_GPIO_INFO The result is a mask representing the the following information about the device and the E2074 interface:
 

  I_GPIO_PSTS       State of the PSTS line.
   I_GPIO_EIR        State of the EIR line.
   I_GPIO_READY      True if ready for a handshake.
   I_GPIO_AUTO_HDSK  True if Auto Handshake mode is
                    enabled.
   I_GPIO_CHK_PSTS   True if the PSTS line is to be
                    checked before each block of data
                    is transferred.  False if PSTS is
                    to be ignored during data
                    transfers.
   I_GPIO_ENH_MODE   True if the E2074 data ports are
                    configured in Enhanced (bi-
                    directional) mode.  False if
                    the ports are configured in
                    98622-compatibility mode.

­I_GPIO_READ_EOI The result is the value of the current END pattern being used for read operations.  If the result is I_GPIO_EOI_NONE, then no END pattern matching is being used.  Any other result is the END pattern. 

­I_GPIO_STAT The result is a mask representing the state of all "Status" lines. 
 
The E2074 interface has two Status lines, so only the two least-significant bits have meaning for that interface.  These can be represented by the following defines.  All other bits in the result mask are 0. 
 

  I_GPIO_STAT_STI0   The STI0 line.
  I_GPIO_STAT_STI1   The STI1 line.

 

RETURN VALUE

For C programs, this function returns zero (0) if successful, or a non-zero error number if an error occurs. 
 

SEE ALSO

igpioctrl(3), igpiosetwidth(3)
 

AUTHOR

igpiostat was developed by HP. 

Hewlett-Packard Comapny  —  September 29, 1999

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026