Using GPIO from Qt-Application


i want to use the GPIO´s/ADC´s from the Apalis IMX6 in a Qt-Application.

I used the following link, and it works fine in the console.

In the next Step i write a linux-script to control the GPIOs and execute the script from the Qt-App with QProcess. It works, but there is a little delay if i had to toggle the GPIO´s quickly. Is there another solution to use the GPIO´s direct from a Qt-Application? A special LIB or something else?



libsoc library provides a nice abstraction for accessing GPIOs and can be added to the image with OpenEmbedded. You may also use simple file operations like open, read, write on GPIO sysfs paths to access GPIOs.

How to Add libsoc to image ?

You need to create a custom image and include libsoc by adding the following in local.conf in it.

IMAGE_INSTALL_append = " libsoc"

Best regards, Jaski