diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-02-12 05:01:11 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-02-12 05:01:11 +0000 |
commit | a71820b259577c3cb0efd6c04b5168551a16a6e1 (patch) | |
tree | 4ad9bf11ffc79847cde5512342dd94e767e94bd1 /LUFA | |
parent | d49cc0f7830319e701294e19937fae4de26ae8e2 (diff) | |
download | lufa-a71820b259577c3cb0efd6c04b5168551a16a6e1.tar.gz lufa-a71820b259577c3cb0efd6c04b5168551a16a6e1.tar.bz2 lufa-a71820b259577c3cb0efd6c04b5168551a16a6e1.zip |
Fixed accuracy of the SERIAL_UBBRVAL() and SERIAL_2X_UBBRVAL() macros for higher baudrates (thanks to Renaud Cerrato).
Diffstat (limited to 'LUFA')
-rw-r--r-- | LUFA/Drivers/Peripheral/Serial.h | 4 | ||||
-rw-r--r-- | LUFA/ManPages/ChangeLog.txt | 5 | ||||
-rw-r--r-- | LUFA/ManPages/FutureChanges.txt | 1 |
3 files changed, 5 insertions, 5 deletions
diff --git a/LUFA/Drivers/Peripheral/Serial.h b/LUFA/Drivers/Peripheral/Serial.h index ba466f314..d00f9c1c0 100644 --- a/LUFA/Drivers/Peripheral/Serial.h +++ b/LUFA/Drivers/Peripheral/Serial.h @@ -68,12 +68,12 @@ /** Macro for calculating the baud value from a given baud rate when the U2X (double speed) bit is
* not set.
*/
- #define SERIAL_UBBRVAL(baud) (((F_CPU / 16) / (baud)) - 1)
+ #define SERIAL_UBBRVAL(baud) ((((F_CPU / 16) + (baud / 2)) / (baud)) - 1)
/** Macro for calculating the baud value from a given baud rate when the U2X (double speed) bit is
* set.
*/
- #define SERIAL_2X_UBBRVAL(baud) (((F_CPU / 8) / (baud)) - 1)
+ #define SERIAL_2X_UBBRVAL(baud) ((((F_CPU / 8) + (baud / 2)) / (baud)) - 1)
/* Pseudo-Function Macros: */
#if defined(__DOXYGEN__)
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 1041865c5..c5dc91197 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -57,9 +57,10 @@ * - Fixed EEPROM and FLASH ISP programming in the AVRISP project
* - Fixed incorrect values of USB_CONFIG_ATTR_SELFPOWERED and USB_CONFIG_ATTR_REMOTEWAKEUP tokens (thanks to Claus Christensen)
* - Fixed SerialStream driver blocking while waiting for characters to be received instead of returning EOF
- * - Fixed SerialStream driver not setting stdin to the created serial stream
+ * - Fixed SerialStream driver not setting stdin to the created serial stream (thanks to Mike Alexander)
* - Fixed USB_GetHIDReportSize() returning the number of bits in the specified report instead of bytes
* - Fixed AVRISP project not extending the command delay after each successful page/word/byte program
+ * - Fixed accuracy of the SERIAL_UBBRVAL() and SERIAL_2X_UBBRVAL() macros for higher baudrates (thanks to Renaud Cerrato)
*
* \section Sec_ChangeLog091223 Version 091223
*
@@ -122,7 +123,7 @@ * - Fixed Still Image Host Class driver truncating the PIMA response code (thanks to Daniel Seibert)
* - Fixed USB_CurrentMode not being reset to USB_MODE_NONE when the USB interface is shut down and both Host and Device modes can be
* used (thanks to Daniel Levy)
- * - Fixed TeensyHID bootloader not enumerating to the host correctly
+ * - Fixed TeensyHID bootloader not enumerating to the host correctly (thanks to Clint Fisher)
* - Fixed AVRISP project timeouts not checking for the correct timeout period (thanks to Carl Ott)
* - Fixed STK525 Dataflash driver using incorrect bit-shifting for Dataflash addresses (thanks to Tim Mitchell)
*
diff --git a/LUFA/ManPages/FutureChanges.txt b/LUFA/ManPages/FutureChanges.txt index cb8dd7efd..38cbf0ccf 100644 --- a/LUFA/ManPages/FutureChanges.txt +++ b/LUFA/ManPages/FutureChanges.txt @@ -17,7 +17,6 @@ * -# Add ability to get number of bytes not written with pipe/endpoint write routines after an error
* -# Add standardized descriptor names to class driver structures
* -# Correct mishandling of error cases in Mass Storage demos
- * -# Add BOARD=NONE Option
* - Documentation/Support
* -# Remake AVRStudio project files
* -# Add detailed overviews of how each demo works
|