Skip to main content

Module gpio

Module gpio 

Source
Expand description

GPIO line control contract (/devices/gpio/<name>).

§Control commands (kind b'g')

NumberCommandDirectionInputOutputEffect
0x00CONFIGUREWriteConfigureAbiVersionAbiReleases the line, then requests it as input/output.
0x01RELEASEWriteVersionAbiVersionAbiReleases the line, returning it to high impedance.
0x02GET_CAPABILITIESReadVersionAbiCapabilitiesAbiReports what the line supports.

Every struct starts with a version field equal to ABI_VERSION and its reserved fields must be zero; otherwise the command fails with InvalidArgument. Field values outside their documented range are InvalidArgument. A controller refusal to take the line (unsupported option, line already in use) is reported as InputOutput.

Structs§

CONFIGURE
CapabilitiesAbi
Line capabilities; each flag is 0 or 1.
ConfigureAbi
Requested configuration of the line.
GET_CAPABILITIES
RELEASE
VersionAbi
Carries only the ABI version. Used as input of commands without payload and as output of commands that report success.

Constants§

ABI_VERSION
Version of every GPIO control ABI struct in this module.