Intel NetStructure® MPCBL0001 High Performance Single Board Computer
Contents
if [ $#
fi
LOC=$1 # Location to read from
SEL_FILENAME="$LOC.txt" echo
echo "Serial Buffer from $LOC will be saved as $SEL_FILENAME" echo
rm
declare val
OFFSET_LSB=0
OFFSET_MSB=0
TOTAL_BYTES=0 while true; do
# Read some bytes
val=(`cmmset
#If no bytes were read, it is an error if [ "${#val}"
echo "Error accessing $LOC" exit 1
elif [ "${val[0]}"
#No more bytes to read. Finished. echo ""
echo "Read $TOTAL_BYTES bytes of Serial Buffer" exit 0
fi
#Output a dot to show progress echo
#Output the data bytes as ASCII characters
#skipping the first 2 bytes (comp code and length) OutAscii 2 ${val[*]} >> $SEL_FILENAME
#Increment the offset bytes
lsb=$(( $OFFSET_LSB + ${val[1]} ))
OFFSET_MSB=$(( $OFFSET_MSB + ( $lsb / 256 ) ))
OFFSET_LSB=$(( $lsb % 256 ))
TOTAL_BYTES=$(( $TOTAL_BYTES + ${val[1]} ))
else
#Completion Code
echo "Error: Completion Code `DecToHex ${val[0]}`h received" exit 1
fi
done echo
# ***** end of file *****
Technical Product Specification | 79 |
Order #273817 |
|