Hello All,
I use the official Debian image (Image V1.1.1.r10)
Is there any PIN based GPIO access library what is written in C/C++? Or how can I write/read to/from GPIO?
ty
Labi
Hello All,
I use the official Debian image (Image V1.1.1.r10)
Is there any PIN based GPIO access library what is written in C/C++? Or how can I write/read to/from GPIO?
ty
Labi
Hi Labi,
I take it you are looking to access the GPIOs using somthing similar to Wiring Pi, but for the MaaXBoard?
https://www.ics.com/blog/how-control-gpio-hardware-c-or-c
Unfortunatly I am unaware of any similar access library available for i.mx 8m. I'd reccomend taking the sysfs approach for GPIO control.
To find the GPIO address for each GPIO you must do the following
The GPIO pins number is from 1 to calculate for the CPU,and it is from 0 to mapped for the sysfs in Linux.
The address of GPIOx_IOy in sysfs is (x-1) * 32 + y, so the address of these gpio are as follows:
Pin Number Address
GPIO1_IO03 3
GPIO1_IO15 15
GPIO3_IO11 75
GPIO3_IO15 79
Does this make sense?
-Josh