This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PCF8575 GPIOs

Other Parts Discussed in Thread: PCF8575

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??