X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=clock.lisp;h=11543e047467540847727163dcd79fb016e6b45d;hb=370336b6237c186a7e475f8549c4a9f5704db007;hp=4289a5310f1d7b57e9b4ede64b0c577a70e5decd;hpb=24df75e86a93050a15a806dea45bd209cc3a37a2;p=cluck.git diff --git a/clock.lisp b/clock.lisp index 4289a53..11543e0 100644 --- a/clock.lisp +++ b/clock.lisp @@ -105,14 +105,14 @@ controllers, 32-bit timers use 8-bit prescalers" (dolist (width '(8 16)) (ms-timer-width ms f-cpu *10-bit-prescalars* width))) -(defparameter *baud-rates* '(300 600 1200 2400 4800 9600 14400 19200 28800 +(defconstant* +baud-rates+ '(300 600 1200 2400 4800 9600 14400 19200 28800 38400 56000 57600 76800 115200 128000 250000 256000 500000)) (defun avr-uart-divisors (&optional (f-cpu *f-cpu*) (view-below-percent nil)) "Displays the divisor UBRR and error percent for various baud rates for F_CPU. UBBR is limited to 12 bits." - (dolist (baud *baud-rates*) + (dolist (baud +baud-rates+) (let* ((ubrr (min 4096 (max 0 (round (- (/ f-cpu 16 baud) 1))))) (ubrr2 (min 4096 @@ -130,7 +130,7 @@ rates for F_CPU. UBBR is limited to 12 bits." (defun pic-uart-divisors (&optional (fcy *f-cpu*) (view-below-percent nil)) "Displays the divisor BRG and error percent for various baud rates for Fcy. BRG is limited to 16 bits." - (dolist (baud *baud-rates*) + (dolist (baud +baud-rates+) (let* ((brg (min 65536 (max 0 (round (- (/ fcy 16 baud) 1))))) (actual-baud (/ fcy 16 (1+ brg)))