Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

igpiostat(3)

igpiosetwidth(3)

itermchr(3)

IGPIOCTRL(3)

HP-UX

NAME

igpioctrl − controls lines and modes of a GPIO interface

SYNOPSIS

#include <sicl.h>

int igpioctrl (id, request, setting);
INST id;
int request;
unsigned long setting;

DESCRIPTION

 
The igpioctrl function is used to control various lines and modes of the GPIO interface.  This function takes request and sets the interface to the specified setting.  The request parameter can be one of the following:
 

­I_GPIO_AUTO_HDSK If the setting parameter is non-zero, then the interface uses "Auto Handshake" mode (the default).  This gives the best performance for iread and iwrite operations.  If the setting parameter is zero, then Auto Handshake mode is canceled.  This is required for programs that implement their own handshake using I_GPIO_SET_PCTL. 

­I_GPIO_AUX The setting parameter is a mask containing the state of all "Auxiliary Control" lines.  A "1" bit asserts the corresponding line; a "0" bit clears the corresponding line. 
 
When configured in Enhanced mode, the E2074 interface has 16 Auxiliary Control lines.  In 98622-compatibility mode, it has none.  Attempting to use I_GPIO_AUX in 98622-compatibility mode results in the error: Operation not supported.

­I_GPIO_CHK_PSTS If the setting parameter is non-zero, then the PSTS line is checked before each block of data is transferred.  If the setting parameter is zero, then the PSTS line is ignored during data transfers.  If the PSTS line is checked and false, SICL reports the error:  Device not active or available. 

­I_GPIO_CTRL The setting parameter is a mask containing the state of all "Control" lines.  A "1" bit asserts the corresponding line; a "0" bit clears the corresponding line. 
 
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 setting mask are ignored. 
 

   I_GPIO_CTRL_CTL0   The CTL0 line.
   I_GPIO_CTRL_CTL1   The CTL1 line.

­I_GPIO_DATA The setting parameter is a mask containing the state of all "Data Out" lines.  A "1" bit asserts the corresponding line; a "0" bit clears the corresponding line.  The E2074 interface has either 8 or 16 Data Out lines, depending upon the setting specified by igpiosetwidth. 
 
Note that this function changes the data lines asynchronously, without any type of handshake.  It is intended for programs that implement their own handshake explicitly.

­I_GPIO_READ_EOI If the setting is I_GPIO_EOI_NONE, then END pattern matching is disabled for read operations.  Any other setting enables END pattern matching with the specified value.  If the current data width is 16 bits, then the lower 16 bits of setting are used.  If the current data width is 8 bits, then only the lower 8 bits of setting are used. 

­I_GPIO_SET_PCTL If the setting parameter is non-zero, then a GPIO handshake is initiated by setting the PCTL line.  Auto Handshake mode must be disabled to allow explicit control of the PCTL line.  Attempting to use I_GPIO_SET_PCTL in Auto Handshake mode results in the error: Operation not supported. 

 

RETURN VALUE

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

SEE ALSO

 
igpiostat(3), igpiosetwidth(3), itermchr(3)
 

AUTHOR

igpioctrl was developed by HP. 
 

Hewlett-Packard Comapny  —  September 29, 1999

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