AnsweredAssumed Answered

IIO buffer and trigger mechanisms

Question asked by on Jun 1, 2015
Latest reply on Jun 5, 2015 by
Branched to a new discussion

Hi ,


I want to develop an IIO driver with buffer and trigger mechanism. However after going through certain online documents, I have some doubts about IIO buffer and trigger mechanism.


1. What is difference between ring buffer and FIFO buffer. Both looks to be same. Kindly Let me know how they are different form kernel point of view.

2. How data is captured in buffer by trigger mechanism?

If we assign trigger name as xyz. so in order to capture data in buffer, we need to do

echo xyz > /sys/bus/devices/iio:deviceX/trigger/current_trigger

echo 100 > /sys/bus/devices/iio:deviceX/length

echo 1 > /sys/bus/devices/iio:deviceX/enable

echo 0 > /sys/bus/devices/iio:deviceX/enable

is it correct?

3. Also let me know steps how we can capture data through sysfs

Kindly Help me in understanding above querries