Add scripts to ease cw/max/min/difs/eifs/nav disable/enable

This commit is contained in:
Xianjun Jiao 2022-03-28 12:14:55 +02:00
parent 4eaae4b893
commit 0cfbe31c70
5 changed files with 105 additions and 0 deletions

21
user_space/cw_disable.sh Executable file
View File

@ -0,0 +1,21 @@
#!/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 -x
#set
if [[ -n $1 ]]; then
echo "3$1" > csma_cfg0
fi
# show
cat csma_cfg0
set +x
cd $home_dir

21
user_space/cw_max_min_cfg.sh Executable file
View File

@ -0,0 +1,21 @@
#!/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 -x
#set
if [[ -n $1 ]]; then
echo "$1" > cw_max_min_cfg
fi
# show
cat cw_max_min_cfg
set +x
cd $home_dir

21
user_space/difs_disable.sh Executable file
View File

@ -0,0 +1,21 @@
#!/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 -x
#set
if [[ -n $1 ]]; then
echo "1$1" > csma_cfg0
fi
# show
cat csma_cfg0
set +x
cd $home_dir

21
user_space/eifs_disable.sh Executable file
View File

@ -0,0 +1,21 @@
#!/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 -x
#set
if [[ -n $1 ]]; then
echo "2$1" > csma_cfg0
fi
# show
cat csma_cfg0
set +x
cd $home_dir

21
user_space/nav_disable.sh Executable file
View File

@ -0,0 +1,21 @@
#!/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 -x
#set
if [[ -n $1 ]]; then
echo "0$1" > csma_cfg0
fi
# show
cat csma_cfg0
set +x
cd $home_dir