r11774: make baud rates constant
authorKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 26 Jul 2007 23:58:21 +0000 (23:58 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 26 Jul 2007 23:58:21 +0000 (23:58 +0000)
clock.lisp

index 4289a5310f1d7b57e9b4ede64b0c577a70e5decd..11543e047467540847727163dcd79fb016e6b45d 100644 (file)
@@ -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)))