Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5066

General programming discussion • Re: libgpiod library

$
0
0
But the point of my book is to show what's going on at the machine level. For example, I give a programming construct, say a while loop, in C and then show what it looks like in assembly language.
If you want to describe bare metal access to peripherals then I question whether Linux on the Pi is the appropriate platform - unless you want to explore the kernel drivers. Anything you do to the hardware directly may contend with the kernel drivers, so not something I would suggest for beginners.
I'm trying to keep things simple for beginners, so I'll probably have to stay with libgpiod v1. I maintain a companion website, so when RPi OS moves to v2, I can post upgrades there.
Again, the v1 and v2 APIs are very different, so sticking with v1 looks like creating confusion and work to me.
It really is worth switching to v2, which IMHO has a cleaner API, even it that means having to coach beginners through installing it - it isn't actually that hard, only a few commands to install the requisite packages, fetch the sources and perform the build.
And the Python bindings are already available on PyPi, so you can just pip install them.

Statistics: Posted by warthog618 — Sun Mar 17, 2024 1:54 am



Viewing all articles
Browse latest Browse all 5066

Trending Articles