(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
(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)))