Ignore temp script

This commit is contained in:
Kristian Sloth Lauszus 2013-07-15 03:21:55 +02:00
parent 0fd8e153ff
commit 15e5f67f85
2 changed files with 1 additions and 32 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
baudcheck.tmp.sh

View File

@ -1,32 +0,0 @@
# 1 "baudcheck.c"
# 1 "/Users/Lauszus/Dropbox/Arduino/hardware/optiboot-v5.0a/bootloaders/optiboot//"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "baudcheck.c"
# 20 "baudcheck.c"
bpsx=115200
bps=${bpsx/L/}
fcpux=16000000L
fcpu=${fcpux/L/}
BAUD_SETTING=$(( ( ($fcpu + $bps * 4) / (($bps * 8))) - 1 ))
BAUD_ACTUAL=$(( ($fcpu/(8 * (($BAUD_SETTING)+1))) ))
BAUD_ERROR=$(( (( 100*($bps - $BAUD_ACTUAL) ) / $bps) ))
ERR_TS=$(( ((( 1000*($bps - $BAUD_ACTUAL) ) / $bps) - $BAUD_ERROR * 10) ))
ERR_TENTHS=$(( ERR_TS > 0 ? ERR_TS: -ERR_TS ))
echo BAUD RATE CHECK: Desired: $bps, Real: $BAUD_ACTUAL, UBRRL = $BAUD_SETTING, Error=$BAUD_ERROR.$ERR_TENTHS\%