1#!/bin/bash 2 3home_dir=$(pwd) 4 5if test -d "/sys/devices/platform/fpga-axi@0/fpga-axi@0:sdr"; then 6 cd /sys/devices/platform/fpga-axi@0/fpga-axi@0:sdr 7else 8 cd /sys/devices/soc0/fpga-axi\@0/fpga-axi\@0\:sdr 9fi 10 11# set 12if [[ -n $1 ]]; then 13 echo $1 > stat_enable 14else 15 echo 1 > stat_enable 16fi 17 18# show 19cat stat_enable 20 21cd $home_dir 22 23