October 2017
Intermediate to advanced
586 pages
14h 8m
English
Capturing data using the sysfs trigger consists of sending a set of command few sysfs files. Let's enumerate what we should do to achieve that:
# echo 0 > /sys/devices/iio_sysfs_trigger/add_trigger
Here, 0 corresponds to the index we need to assign to the trigger. After this command, the trigger directory will be available under /sys/bus/iio/devices/, as trigger0.
# echo sysfstrig0 > /sys/bus/iio/devices/iio:device0/trigger/current_trigger ...