I am writing an Arduino-like library for the raspberryPi in golang. There are 2 main ways to interface with the GPIO linux kernel ABI one using /sys/class/gpio/*
(deprecated) or /dev/gpiochip[0-9]*
. I would like to use the latter because well, the former is deprecated.
I took a look at a library called libgpiod. The code was simple to understand but the usage of ioctl
made it difficult to port to Golang (especially because I am beginner).
I would like to be able to port this line:
rv = ioctl(fd, GPIO_GET_CHIPINFO_IOCTL, &info); //from libgpio lib/core.c ln:273.