GPIO_GET_STATUS(3D)
NAME
gpio_get_status − return status lines of GPIO card
SYNOPSIS
int gpio_get_status (eid)
int eid;
HP-UX COMPATIBILITY
Level: Device I/O Library − HP-UX/EXTENDED
Origin: HP
DESCRIPTION
Gpio_get_status enables you to read the status register of the GPIO interface associated with the entity ID, 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.
HARDWARE DEPENDENCIES
Series 500:
For the current GPIO card, x is 2.
RETURN VALUE
Gpio_get_status returns the value of the status register of the GPIO interface associated with eid, and −1 if an error was encountered.
DIAGNOSTICS
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 — last mod. May 11, 2021