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
AUTHOR
igpiosetwidth was developed by HP.
Hewlett-Packard Comapny — September 29, 1999