URL:
<http://savannah.nongnu.org/patch/?5343>
Summary: Add a util/setbaud.h "helper" file
Project: AVR C Runtime Library
Submitted by: clawson
Submitted on: Tuesday 29/08/06 at 09:13
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
_______________________________________________________
Details:
This is a header file to aid the setting of UBRR for an AVR UART. Rather than
calculating the UBRR value to use based on F_CPU and BAUD (which is prone to
rounding errors) it uses a look up table for popular F_CPU and BAUD values. A
further advantage is that ONLY baud rates that can operate with less than
+/-2% error are offered. Attempts to use an out of range baud rate will just
produce a #error. The file also know when a selected baud rate can only be
achieved using U2X=1 mode and in this case it defines a USE_2X value so that
code to set U2X=1 mode can be wrapped in a #ifdef USE_2X/#endif
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tuesday 29/08/06 at 09:13 Name: setbaud.h Size: 10.64KB By: clawson
V1.1 header to set UBRR from given F_CPU/BAUD values
<http://savannah.nongnu.org/patch/download.php?file_id=10626>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?5343>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
_______________________________________________
AVR-libc-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev