gpiohandle_request

Information about a GPIO handle request

Members

Variables

consumer_label
char[32] consumer_label;

a desired consumer label for the selected GPIO line(s) such as "my-bitbanged-relay"

default_values
ubyte[GPIOHANDLES_MAX] default_values;

if the GPIOHANDLE_REQUEST_OUTPUT is set for a requested line, this specifies the default output value, should be 0 (low) or 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)

fd
int fd;

if successful this field will contain a valid anonymous file handle after a GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value means error

flags
uint flags;

desired flags for the desired GPIO lines, such as GPIOHANDLE_REQUEST_OUTPUT, GPIOHANDLE_REQUEST_ACTIVE_LOW etc, OR:ed together. Note that even if multiple lines are requested, the same flags must be applicable to all of them, if you want lines with individual flags set, request them one by one. It is possible to select a batch of input or output lines, but they must all have the same characteristics, i.e. all inputs or all outputs, all active low etc

lineoffsets
uint[GPIOHANDLES_MAX] lineoffsets;

an array desired lines, specified by offset index for the associated GPIO device

lines
uint lines;

number of lines requested in this request, i.e. the number of valid fields in the above arrays, set to 1 to request a single line

Suggestion Box / Bug Report