io.gpiod1.Line

Description

Represents a single GPIO line on a chip.

Properties

io.gpiod1.Line:Offset

Offset readable u

Uniquely identifies the line on the chip.

io.gpiod1.Line:Name

Name readable s

Name of the GPIO line as represented in the kernel.

io.gpiod1.Line:Used

Used readable b

True if line is busy.

Line can be used by gpio-manager, another user-space process, a kernel driver or is hogged. The exact reason a line is busy cannot be determined from user-space unless it’s known to be managed by gpio-manager (see: the Managed property of this interface).

io.gpiod1.Line:Consumer

Consumer readable s

Name of the consumer of the line.

io.gpiod1.Line:Direction

Direction readable s

Direction of the line. Returns “input” or “output”.

io.gpiod1.Line:EdgeDetection

EdgeDetection readable s

Edge detection settings of the line. Returns: “none”, “falling”, “rising” or “both”.

io.gpiod1.Line:Bias

Bias readable s

Bias setting of the line. Returns: “unknown”, “disabled, “pull-up” or “pull-down”.

io.gpiod1.Line:Drive

Drive readable s

Drive setting of the line. Returns “push-pull”, “open-source” or “open-drain”.

io.gpiod1.Line:ActiveLow

ActiveLow readable b

True if the line is active-low. False for active-high.

io.gpiod1.Line:Debounced

Debounced readable b

True if line is being debounced on interrupts. Can only be true with edge-detection enabled.

io.gpiod1.Line:DebouncePeriodUs

DebouncePeriodUs readable t

Debounce period in microseconds. 0 if the line is not debounced. Can only be non-zero with edge-detection enabled.

io.gpiod1.Line:EventClock

EventClock readable s

System clock used to timestamp edge events on this line. Returns: “monotonic”, “realtime”, “hte” or “unknown”. New types may be added in the future. Clients should interpret other types they don’t recognize as “unknown”.

io.gpiod1.Line:Managed

Managed readable b

True if the line is managed by gpio-manager.

io.gpiod1.Line:RequestPath

RequestPath readable o

If this line is managed by gpio-manager then this property will contain the DBus object path pointing to the managing request object.

Signals

io.gpiod1.Line::EdgeEvent

EdgeEvent (
  event_data (ittt)
)

If the line is managed by the gpio-manager and is requested with edge detection enabled then this signal will be emitted for every edge event registered on this line.

D-Bus EdgeEvent signals are designed for low-to-medium frequency interrupts. If you performance better than the order of tens of HZ, you should probably access the line directly using the kernel uAPI.

The edge contains 1 for rising and 0 for falling. The timestamp is expressed in nanoseconds.

event_data

Edge, timestamp and the global & line-local sequence numbers.