NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GPIO programs for Raspberry Pi in Python and C



On 14 Jan 2021, at 15:22, Benny Siegert wrote:

On Thu, Jan 14, 2021 at 3:19 PM Rocky Hotas <rockyhotas%firemail.cc@localhost> wrote:
As an alternative, are there some C libraries available for NetBSD, to
manage the GPIO pins?

NetBSD uses the gpio(4) device to talk to the GPIO pins:
http://man.netbsd.org/gpio.4

So your program opens /dev/gpio and uses ioctl to do things. This
should be relatively straightforward in C (or perhaps in Go).

In support of Benny's claim, in the NetBSD 7 era I managed to figure out the GPIO basics despite not knowing much of anything about anything. This repo may help: https://github.com/schmonz/c-embedded-fundamentals

Home | Main Index | Thread Index | Old Index