in_voltageX_raw fails with Resource temporarily unavailable

13 views
Skip to first unread message

Alan Hails

unread,
Nov 18, 2019, 9:23:53 AM11/18/19
to BeagleBoard
After reboot, command line: cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw works fine and returns correct 0-4095 ADC values.  But as soon as I try to read those values from a compiled C program I get the "Resource temporarily unavailable" error response.  After giving up on open() and fopen() C commands I've reverted to:
Enter code here...
{value= system("cat  /sys/bus/iio/devices/iio:device0/in_voltage0_raw");}

And after that the manual read in linux command line, cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw, fails the same way:  "Resource temporarily unavailable"

my "uname -a" returns:  Linux arm 4.14.108-ti-r104 #1 SMP PREEMPT Tue Apr 9 18:45:06 UTC 2019 armv7l armv7l armv7l GNU/Linux

Alan



Alan Hails

unread,
Nov 18, 2019, 11:52:02 AM11/18/19
to BeagleBoard


On Monday, November 18, 2019 at 9:23:53 AM UTC-5, Alan Hails wrote:
After reboot, command line: cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw works fine and returns correct 0-4095 ADC values.  But as soon as I try to read those values from a compiled C program I get the "Resource temporarily unavailable" error response.  After giving up on open() and fopen() C commands I've reverted to:
Enter code here...value= system("cat  /sys/bus/iio/devices/iio:device0/in_voltage0_raw");
Reply all
Reply to author
Forward
0 new messages