GPIO_GET_STATUS(3I) — HP-UX
NAME
gpio_get_status − return status lines of GPIO card
SYNOPSIS
int gpio_get_status (eid)
int eid;
DESCRIPTION
Gpio_get_status enables you to read the status register of the GPIO interface associated with the device file identified by eid. Eid is an entity identifier of an open GPIO device file obtained from an open(2), dup(2), fcntl(2), or creat(2). The current state of each status line on the interface card is mapped to the value returned, with STS0 mapped to the least significant bit. Only x least-significant bits are used, where x is the number of status lines available on the hardware interface being used.
DEPENDENCIES
Series 300
Eid is an integer file descriptor (fildes) that identifies an open device special file.
For the current GPIO card, x is 2.
RETURNS
Gpio_get_status returns the value of the status register of the GPIO interface associated with eid, and −1 if an error was encountered.
ERRORS
Gpio_get_status fails under the following conditions and sets errno (see errno(2)) to the value in square brackets:
eid does not refer to an open file [EBADF];
eid does not refer to a GPIO device file [ENOTTY].
Hewlett-Packard Company — May 11, 2021