Post Go back to editing

Pin reading from adrv9361-Z7035 HDL design in bash script

I want to read a pin from HDL design in the bash script given below in order to make a decision. Guide me  about the procedure:

cd /sys/bus/iio/devices/iio\:device1/
pwd
for i in {1..8..1}
do
echo $((650000000 + $i * 100000000)) > out_altvoltage1_TX_LO_frequency
sleep 0.1
echo $i > out_altvoltage1_TX_LO_fastlock_store
echo $i > out_altvoltage1_TX_LO_fastlock_save
cat out_altvoltage1_TX_LO_fastlock_save
cat out_altvoltage1_TX_LO_frequency
done
for i in {9..16..1}
do
echo $((1000000000 + $i * 200000000)) > out_altvoltage1_TX_LO_frequency
echo $i > out_altvoltage1_TX_LO_fastlock_store
echo $i > out_altvoltage1_TX_LO_fastlock_save
cat out_altvoltage1_TX_LO_fastlock_save
cat out_altvoltage1_TX_LO_frequency
done
echo 1 150,0,0,0,0,65,23,7,238,85,111,221,115,252,12,160 > out_altvoltage1_TX_LO_fastlock_load
echo 2 85,0,0,0,0,114,31,15,238,85,111,221,114,221,43,183 > out_altvoltage1_TX_LO_fastlock_load
echo 3 95,0,0,0,0,113,16,16,238,85,111,221,114,204,217,166 > out_altvoltage1_TX_LO_fastlock_load
echo 4 105,0,0,0,0,113,31,15,238,85,127,221,114,204,154,176 > out_altvoltage1_TX_LO_fastlock_load
echo 5 115,0,0,0,0,97,29,13,238,85,111,221,114,204,108,192 > out_altvoltage1_TX_LO_fastlock_load
echo 6 125,0,0,0,0,97,27,11,238,85,111,221,114,236,73,160 > out_altvoltage1_TX_LO_fastlock_load
echo 7 135,0,0,0,0,65,25,9,238,85,111,221,114,252,44,198 > out_altvoltage1_TX_LO_fastlock_load
echo 8 145,0,0,0,0,65,23,7,238,68,110,238,114,252,22,166 > out_altvoltage1_TX_LO_fastlock_load
echo "recalling first 8 profiles"
for i in {1..8..1}
do
echo $i > out_altvoltage1_TX_LO_fastlock_recall
cat out_altvoltage1_TX_LO_frequency
done
echo 9 140,0,0,0,0,65,24,8,238,85,110,221,113,252,32,192 > out_altvoltage1_TX_LO_fastlock_load
echo 10 150,0,0,0,0,65,23,7,238,85,111,221,113,252,12,160 > out_altvoltage1_TX_LO_fastlock_load
echo 11 80,0,0,0,0,114,31,15,238,85,111,221,112,253,99,163 > out_altvoltage1_TX_LO_fastlock_load
echo 12 85,0,0,0,0,114,31,15,238,85,111,221,112,221,43,18 > out_altvoltage1_TX_LO_fastlock_load
echo 13 90,0,0,0,0,114,30,14,238,85,111,221,112,237,253,1824 > out_altvoltage1_TX_LO_fastlock_load
echo 14 95,0,0,0,0,113,16,16,238,85,111,221,112,204,217,166 > out_altvoltage1_TX_LO_fastlock_load
echo 15 100,0,0,0,0,113,31,15,238,85,111,221,112,204,183,176 > out_altvoltage1_TX_LO_fastlock_load
echo 16 105,0,0,0,0,113,31,15,238,85,127,221,112,204,155,176 > out_altvoltage1_TX_LO_fastlock_load
echo "recalling 9-16 profiles"
for i in {9..16..1}
do
echo $i > out_altvoltage1_TX_LO_fastlock_recall
cat out_altvoltage1_TX_LO_frequency
done