sbitxdev / sbitx

1 stars 0 forks source link

Enhancement: Replace WiringPi with gpiod #3

Open mpapple-swift opened 5 months ago

mpapple-swift commented 5 months ago

WiringPi (https://github.com/WiringPi/WiringPi)is abandonware and must be replaced immediately. The go-to replacement is gpiod (https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/). @rafael2k has a solution @ https://github.com/Rhizomatica/sbitx-core/tree/gpiolib.

Quoting @rafael2k: "I re-wrote all the GPIO code using gpiolib here: https://github.com/Rhizomatica/sbitx-core/tree/gpiolib

i2c is also done using libi2c and kernel-mode i2c bit-banging."

We should review @rafael2k's changes and incorporate a suitable replacement for WiringPi as soon as possible.

rafael2k commented 5 months ago

Btw, this is not libgpiod, but gpiolib: https://github.com/raspberrypi/utils/tree/master/pinctrl

mpapple-swift commented 5 months ago

Thank you for the correction, although specifically this is a 'subproject' (pinctrl) within the utils library, part of the official Raspberry Pi Github project. I also see this code was copied wholesale from the aforementioned repository, which is incompatible with OSS licensing and current practices for keeping the code updated. We will need to review the pinctrl subproject vs using libgpiod.