GPIO Libraries for QT application

Hi

I would like to ask if there are any GPIO libraries to be added to my QT application to access the GPIOs of the oard?
We would like to avoid directly accessing the file system of /sys/class/gpio directly.
Is there a library to be added so that we could call some APIs to write or read the GPIOs?

Hi @jaski.tx

Currently we are using BSP 2.8 built using OE-Core.
Is the library able to be used in our version?
If not, could the libgpiod library able to be cross compiled?

No, libgpiod is not integrated in Bsp 2.8, but you can get it from here to cross compile yourself.

Best regards,
Jaski

Hi @jy.teh

Thanks for writing to the Toradex Community!

Could you provide the software version of your module?

In our newest Bsp 3.0, you can use the libgpiod library.

Best regards,
Jaski

Hi Jaski

Is ther a how to guid to build the libgpiod?

I tried the steps in the README and i faced this error.

I tried both the 1.4.3 & 1.5.1 versions.

What did do wrong?

alt text

Hi

You need to install autoconf on your host.

Best regards,
Jaski

Hi Jaski

I managed to install autoconf.
But i meet another problem, it is unable to locate linux/gpio.h.
Which i double checked that it is present.

The command that i used to launch the script is :
./autogen.sh --enable-tools=yes --prefix=/home/jyteh/Desktop/LinuxImageBuild_Dec19/Kernel/linux-toradex

In the screenshot below you could see that the gpio.h file is present but the script complains that it is not present.

alt text

Hi

Did you configure the Toolchain correctly as explained here? I tested with libgpiod version 1.4.1. The compilation works well.

Best regards,
Jaski

Hi

I met another problem. Please find attached.

Regards
Teh Jingyang

You need to install the package autoconf-archive for your host.