From b33af6547d6b364063605f6faec4e91a84baafaf Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Thu, 26 Jul 2007 23:58:21 +0000 Subject: [PATCH] r11774: make baud rates constant --- clock.lisp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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))) -- 2.34.1