.. _io.gpiod1.Line: ============== io.gpiod1.Line ============== ----------- Description ----------- .. _io.gpiod1.Line Description: Represents a single GPIO line on a chip. .. _io.gpiod1.Line Properties: ---------- Properties ---------- .. _io.gpiod1.Line:Offset: io.gpiod1.Line:Offset ^^^^^^^^^^^^^^^^^^^^^ :: Offset readable u Uniquely identifies the line on the chip. .. _io.gpiod1.Line:Name: io.gpiod1.Line:Name ^^^^^^^^^^^^^^^^^^^ :: Name readable s Name of the GPIO line as represented in the kernel. .. _io.gpiod1.Line:Used: 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: io.gpiod1.Line:Consumer ^^^^^^^^^^^^^^^^^^^^^^^ :: Consumer readable s Name of the consumer of the line. .. _io.gpiod1.Line:Direction: io.gpiod1.Line:Direction ^^^^^^^^^^^^^^^^^^^^^^^^ :: Direction readable s Direction of the line. Returns "input" or "output". .. _io.gpiod1.Line:EdgeDetection: io.gpiod1.Line:EdgeDetection ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :: EdgeDetection readable s Edge detection settings of the line. Returns: "none", "falling", "rising" or "both". .. _io.gpiod1.Line:Bias: io.gpiod1.Line:Bias ^^^^^^^^^^^^^^^^^^^ :: Bias readable s Bias setting of the line. Returns: "unknown", "disabled, "pull-up" or "pull-down". .. _io.gpiod1.Line:Drive: io.gpiod1.Line:Drive ^^^^^^^^^^^^^^^^^^^^ :: Drive readable s Drive setting of the line. Returns "push-pull", "open-source" or "open-drain". .. _io.gpiod1.Line:ActiveLow: io.gpiod1.Line:ActiveLow ^^^^^^^^^^^^^^^^^^^^^^^^ :: ActiveLow readable b True if the line is active-low. False for active-high. .. _io.gpiod1.Line:Debounced: 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: 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: 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: io.gpiod1.Line:Managed ^^^^^^^^^^^^^^^^^^^^^^ :: Managed readable b True if the line is managed by gpio-manager. .. _io.gpiod1.Line:RequestPath: 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. .. _io.gpiod1.Line Signals: ------- Signals ------- .. _io.gpiod1.Line::EdgeEvent: 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.