openwifi/user_space/set_dbg_ch2.sh

21 lines
297 B
Bash
Raw Normal View History

#!/bin/bash
home_dir=$(pwd)
if test -d "/sys/devices/platform/fpga-axi@0/fpga-axi@0:sdr"; then
cd /sys/devices/platform/fpga-axi@0/fpga-axi@0:sdr
else
cd /sys/devices/soc0/fpga-axi\@0/fpga-axi\@0\:sdr
fi
# set
if [[ -n $1 ]]; then
echo $1 > dbg_ch2
fi
# show
cat dbg_ch2
cd $home_dir