Beaglebone Black Rev C , Linux ARM 4.14.108-ti-r104 April 9, 2019.
After reboot, command line cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw works fine returning 0 with AIN0 grounded to ADC_GND, 4095 when connected to VDD_ADC (1.8vdc), and around 3967 if left floating.
But trying to read that pin from a compiled C program always returns Resource temporarily unavailable. After giving up on open() and fopen() I've resorted to :
int value; value= system( "cat /sys/bus/iio/devices/iio:device0/in_voltage_raw"); //OR: value= system( "cat /sys/bus/iio/devices/iio\\:device0/in_voltage_raw");
This not only returns the Resource ...unavailable error message but also errors out later manual attempts from Linux command line to use the
cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw command, returning the Resource unavailable error there as well. After reboot the manual command line method works fine again.
This all I'm doing. No other ADC channels, no bluetooth. HDMI out to my monitor, USB to a hub for keyboard, mouse, and wifi adapter.