aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/avr8/lib/calc-baudrate.frt
blob: 015eb1075969568db28dde2b0f6868babb957361 (plain)
1
2
3
4
5
6
7
8
9
10
11
12

\ calculates the baudrate register values
\ the two bytes of the result should be
\ transferred in high - low order

\ ( baudrate -- baud-rate-register)
: calc-baudrate
    f_cpu
    d2/ d2/ d2/ d2/
    rot um/mod
    swap drop 1-
;