| 1 |
.. |
| 2 |
SPDX-License-Identifier: CC-BY-SA-4.0 |
| 3 |
SPDX-FileCopyrightText: 2024-2025 Bartosz Golaszewski <[email protected]> |
| 4 |
|
| 5 |
.. |
| 6 |
This file is part of libgpiod. |
| 7 |
|
| 8 |
libgpiod documentation master file. |
| 9 |
|
| 10 |
Welcome to libgpiod's documentation! |
| 11 |
==================================== |
| 12 |
|
| 13 |
The **libgpiod** project provides a low-level C library, bindings to high-level |
| 14 |
languages and tools for interacting with the GPIO (General Purpose Input/Output) |
| 15 |
lines on Linux systems. |
| 16 |
|
| 17 |
It replaces the older, **legacy GPIO sysfs interface**, which has been |
| 18 |
deprecated in the Linux kernel. The newer **GPIO character device** interface |
| 19 |
(introduced in **Linux kernel version 4.8**) provides a more flexible and |
| 20 |
efficient way to interact with GPIO lines, and libgpiod is the **primary tool** |
| 21 |
for working with this interface. |
| 22 |
|
| 23 |
The character device interface guarantees all allocated resources are freed |
| 24 |
after closing the device file descriptor and adds several new features that |
| 25 |
are not present in the obsolete sysfs interface (like reliable event polling, |
| 26 |
setting/reading multiple values at once or open-source and open-drain GPIOs). |
| 27 |
|
| 28 |
Unfortunately interacting with the linux device file can no longer be done |
| 29 |
using only standard command-line tools. This is the reason for creating a |
| 30 |
library encapsulating the cumbersome, ioctl-based kernel-userspace interaction |
| 31 |
in a set of convenient functions and opaque data structures. |
| 32 |
|
| 33 |
.. toctree:: |
| 34 |
:maxdepth: 1 |
| 35 |
:caption: Contents |
| 36 |
|
| 37 |
building |
| 38 |
core_api |
| 39 |
bindings |
| 40 |
gpio_tools |
| 41 |
dbus |
| 42 |
testing |
| 43 |
contributing |