Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

igpiogetwidth(3)

IGPIOSETWIDTH(3)

HP-UX

NAME

igpiosetwidth − sets the data width of a GPIO interface

SYNOPSIS

#include <sicl.h>

int igpiosetwidth (id, width);
INST id;
int width;

DESCRIPTION

 
The igpiosetwidth function is used to set the data width (in bits) of a GPIO interface.  For the E2074 interface, the acceptable values for width are 8 and 16. 
 
While in 16-bit width mode, all iwrite calls must send an even number of bytes.  When the bytes are converted into words, the first byte becomes the most-significant part of the word, and the second bytes becomes the least-significant part.  Also, all iread calls will return an even number of bytes. 
 
There are a couple notable details about GPIO width.  The "count" parameters for iread and iwrite always specify bytes, even when the interface has a 16-bit width.  For example, to send 100 words, specify 200 bytes.  The itermchr function always specifies an 8-bit character.  If a 16-bit width is set, only the lower 8 bits are used when checking for an itermchr match. 
 

RETURN VALUE

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

SEE ALSO

 
igpiogetwidth(3)
 

AUTHOR

igpiosetwidth was developed by HP. 
 

Hewlett-Packard Comapny  —  September 29, 1999

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