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

Advanced users • Re: Is everyone happy with the quality of libgpiod?

$
0
0
gpioset and gpioget shouldn't be used in scripts, so a change in syntax between 1.6 and 2.1 in the command line debug tools makes no difference.
I may have replied to this indirectly already, but to be clear we, speaking on behalf of libgpiod, are fine with the gpiod tools being called from shell. That is a totally valid use case.

And yes, there is an API change between libgpiod v1 and v2, for both the library AND the tools.

For this reason we suggest migrating direct to v2 to avoid having to migrate from v1 to v2 later. Ideally v2 will be packaged into Raspberry Pi OS soon. In the meantime, for new developments, we strongly suggest downloading and building libgpiod v2 rather than writing for the packaged libgpiod v1 now, only to have to re-port to v2 later. That obviously isn't ideal, but that is where we are at.

Oh, and any existing developments using libgpiod v1 should consider migrating to libgpiod v2 at their earliest convenience. As with the sysfs interface, this has been obsoleted and will eventually be removed. And unlike v1, v2 has been designed to allow new features to be added without requiring a complete API change, so there should never be a v3 (famous last words, I know, but that is what we were aiming for with v2) . v1 will continue to be available in the meantime to provide time to migrate, but its eventual removal is a certainty. Consider yourself warned and don't come crying to us when it is eventually removed.

Statistics: Posted by warthog618 — Sat Jan 13, 2024 3:09 am



Viewing all articles
Browse latest Browse all 5349

Trending Articles