Module v2

Source
Expand description

This module implements GPIO ABI v2 which is the current version of the ABI, released in Linux v5.10.

Structs§

ChipInfo
Information about a particular GPIO chip.
Errno
An error number returned by a kernel ioctl call.
LineAttribute
A configurable attribute of a line.
LineAttributes
The set of potential configuration attributes for a line.
LineConfig
Configuration for a set of requested lines.
LineConfigAttribute
A configuration attribute associated with one or more of the requested lines.
LineConfigAttributes
The set of additional configuration attributes for a line request.
LineEdgeEvent
Information about an edge event on a requested line.
LineFlags
Flags indicating the configuration of a line.
LineInfo
Information about a certain GPIO line.
LineInfoChangeEvent
An event indicating a change to the info for a line.
LineRequest
Information about a request for GPIO lines.
LineValues
Values of GPIO lines.
Name
A uAPI name string, common to ABI v1 and v2.
Offsets
A collection of line offsets.
UnderReadError
A failure to read sufficient bytes to construct an object.
ValidationError
A failure to validate a struct returned from a system call.

Enums§

Error
Errors returned by gpiocdev_uapi functions.
LineAttributeKind
An identifier for which field of the LineAttributeValueUnion is in use.
LineAttributeValue
The attribute value contained within a LineAttribute.
LineEdgeEventKind
The trigger identifier for a LineEdgeEvent.
LineInfoChangeKind
The trigger identifier for a LineInfoChangeEvent.

Constants§

NAME_LEN_MAX
The maximum number of bytes stored in a Name.
NUM_ATTRS_MAX
The capacity of LineAttributes and LineConfigAttributes arrays.
NUM_LINES_MAX
The maximum number of lines that may be requested in a single request.

Functions§

get_chip_info
Get the publicly available information for a chip.
get_line
Request a line or set of lines for exclusive access.
get_line_info
Get the publicly available information for a line.
get_line_values
Read values of requested lines.
has_event
Check if the file has an event available to read.
read_event
Read an event from a chip or request file descriptor.
set_line_config
Update the configuration of an existing line request.
set_line_values
Set values of requested output lines.
unwatch_line_info
Remove any watch on changes to the LineInfo for a line.
wait_event
Wait for the file to have an event available to read.
watch_line_info
Add a watch on changes to the LineInfo for a line.

Type Aliases§

Offset
An identifier for a line on a particular chip.
Result
The result returned by gpiocdev_uapi functions.
ValidationResult
Result returned by struct validators.

Unions§

LineAttributeValueUnion
The value of a particular line attribute.