Skip to content

A generic wiringPi-implementation for single-board computers.

License

Notifications You must be signed in to change notification settings

leso-kn/wiringpi-gpiod

Repository files navigation

wiringpi-gpiod

A generic wiringPi-implementation for single-board computers.

About

This is a lightweight re-implementation of the wiringPi-library based on gpiod – the linux kernel GPIO API.

This allows for wiringpi-gpiod to be used on any single-board computer, as long as the kernel recognizes the GPIO chip – the original wiringPi-library supported only a limited range of SBCs.

Compiling

> cmake -B build .
> cmake --build build
# produces build/libwiringpi-gpiod.[a|so]

# [optional]
> sudo cmake --install build

And linking against it

Linking a wiringPi-based project against wiringpi-gpiod is as simple as replacing -lwiringpi with -lwiringpi-gpiod in the compiler arguments.

In case you do not wish to install the library system-wide, add an additional -L/path/to/libwiringpi-gpiod.so.

Dependencies

Comparison to the original wiringPi-library

  • Runs on any single-board computer, as long as GPIO pins are recognized by the kernel
  • ! Pin numbers in wiringpi-gpiod follow the standard GPIOxx-numbering of your board (*not* the custom wiringPi-mapping)

Created by Lesosoftware in 2023