libgpiod python bindings misc

gpiod.is_gpiochip_device(path: str) bool

Check if the file pointed to by path is a GPIO chip character device.

Args:
path

Path to the file that should be checked.

Returns:

Returns true if so, False otherwise.

gpiod.request_lines(path: str, config: dict[Iterable[int | str] | int | str, LineSettings | None], consumer: str | None = None, event_buffer_size: int | None = None, output_values: dict[int | str, Value] | None = None) LineRequest

Open a GPIO chip pointed to by ‘path’, request lines according to the configuration arguments, close the chip and return the request object.

Args:
path

Path to the GPIO character device file.

config:

Dictionary mapping offsets or names (or tuples thereof) to LineSettings. If None is passed as the value of the mapping, default settings are used.

consumer:

Consumer string to use for this request.

event_buffer_size:

Size of the kernel edge event buffer to configure for this request.

output_values:

Dictionary mapping offsets or names to line.Value. This can be used to set the desired output values globally while reusing LineSettings for more lines.

Returns:

Returns a new LineRequest object.