mirror of https://github.com/Lauszus/Sanguino.git
Ignore temp script
This commit is contained in:
parent
0fd8e153ff
commit
15e5f67f85
|
@ -0,0 +1 @@
|
|||
baudcheck.tmp.sh
|
|
@ -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\%
|
Loading…
Reference in New Issue