# The test procedure is as follows:
# Test buffer cache for ADC continuous acquisition
# First make sure iio_sysfs_trigger is enabled by the kernel
# The sampling frequency available in the driver is as follows:
206250 58098 29676 15000 7541
Currently test 58098 29676 15000 7541 available, 206250 will cause a stuck situation.
# The test procedure is as follows:
# 1. Jump to devices
cd /sys/bus/iio/devices
# 2. Create a trigger
echo 0 > iio_sysfs_trigger/add_trigger
# 3. trigger write
cat trigger0/name > iio:device0/trigger/current_trigger
# 4. Check the trigger
cat iio:device0/trigger/current_trigger
# 5. Enter the iio device
cd iio:device0
# 6, Change the sampling frequency (default sampling frequency is 58098)
echo 206250 > in_voltage_sampling_frequency
# 7. Check the sampling frequency
cat in_voltage_sampling_frequency
# 8. Enable scanning
echo 1 > scan_elements/in_voltage3_en
# 9. Check the scan
cat scan_elements/in_voltage3_en
# 10. Cache size settings
echo 1024 > buffer/length
# 11. Enable cache
echo 1 > buffer/enable
# 12. Close the cache
echo 0 > buffer/enable
# 13. Check available data
cat buffer/data_available
# 14. Print data
hexdump -e '"iio0 :" 8/2 "%04x " "\n"' /dev/iio:device0