My aim is to access the port pins of PCF8575 I/O Expander or GPIO from userspace .. In the code, in order to write a value i am using system command like this :
sprintf("ucaa_buf","%s %d %s","echo > 0 /sys/class/gpio/gpio",gpionum,"/value");
system(ucaa_buf);
And i dont have any idea, how to read a value from the port pin using the system command as above..
Is there any alternative other than system command??
How to read value of a port pin from userspace??