AnsweredAssumed Answered

one shot conversion of mxs-lradc iio interface only seems to occur when the file is opened, is this expected behavior?

Question asked by Tyler Arnold on Dec 3, 2014
Latest reply on Dec 15, 2014 by alejandrolozano

if I cat the iio file  , I get a different sample every time. For example:

{noformat}

~ # cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw

3471

~ # cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw

3489

~ # cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw

3385

{noformat}

 

however, if I have a user space program (in C) and I open that file for reading and read it multiple times, the sample stays the same, making me think the file open is triggering the sample, and not the read.

Is this expected? I will dig through the code a bit more but I expect so. Is there a way to configure this driver so I can get samples triggered on each read?

 

thanks!

-Tyler

Outcomes