GPIO line definitions

class gpiod.line.Value(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)

Logical line states.

ACTIVE

Line is logically active.

INACTIVE

Line is logically inactive.

class gpiod.line.Direction(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)

Direction settings.

AS_IS

Request the line(s), but don’t change direction.

INPUT

Direction is input - for reading the value of an externally driven GPIO line.

OUTPUT

Direction is output - for driving the GPIO line.

class gpiod.line.Bias(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)

Internal bias settings.

AS_IS

Don’t change the bias setting when applying line config.

DISABLED

The internal bias is disabled.

PULL_DOWN

The internal pull-down bias is enabled.

PULL_UP

The internal pull-up bias is enabled.

UNKNOWN

The internal bias state is unknown.

class gpiod.line.Drive(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)

Drive settings.

OPEN_DRAIN

Line output is open-drain.

OPEN_SOURCE

Line output is open-source.

PUSH_PULL

Drive setting is push-pull.

class gpiod.line.Edge(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)

Edge detection settings.

BOTH

Line detects both rising and falling edge events.

FALLING

Line detects falling edge events.

NONE

Line edge detection is disabled.

RISING

Line detects rising edge events.

class gpiod.line.Clock(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)

Event clock settings.

HTE

Line uses the hardware timestamp engine for event timestamps.

MONOTONIC

Line uses the monotonic clock for edge event timestamps.

REALTIME

Line uses the realtime clock for edge event timestamps.