Registry / other / libgpiod

libgpiod

JSON →
library2.1.3vcpkgunverified

C library and tools for interacting with the linux GPIO character device.

vcpkg install libgpiod
INSTALL
IMPORT
SIG · LIBGPIOD
L
libgpiod
othercppv2.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gpiod.h
#include <gpiod.h>

Open GPIO chip, set line 17 high

#include <gpiod.h> #include <iostream> int main() { struct gpiod_chip *chip = gpiod_chip_open_by_name("gpiochip0"); if (!chip) { std::cerr << "Failed to open chip\n"; return 1; } struct gpiod_line *line = gpiod_chip_get_line(chip, 17); gpiod_line_request_output(line, "example", 0); gpiod_line_set_value(line, 1); gpiod_chip_close(chip); return 0; }
Debug
Known issues
gotchaRequires Linux kernel with GPIO character device support (CONFIG_GPIOLIB and CONFIG_GPIO_CDEV).
fix
Ensure kernel is compiled with these options or use a recent distribution.
affects: all
Upgrade
Version history
2.1.3latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources

No resource links recorded.

libgpiod — pip install libgpiod · libregistry