aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/Peripheral/Serial.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-05-07 11:12:23 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-05-07 11:12:23 +0000
commitc7aceb2c7f625b8256dfe4f80177beb63911979a (patch)
tree18304bbc8d1117bb3f33998801b831e962602dfa /LUFA/Drivers/Peripheral/Serial.c
parent938f86d06321c1a29cf87201000a9dae4e5a7c25 (diff)
downloadlufa-c7aceb2c7f625b8256dfe4f80177beb63911979a.tar.gz
lufa-c7aceb2c7f625b8256dfe4f80177beb63911979a.tar.bz2
lufa-c7aceb2c7f625b8256dfe4f80177beb63911979a.zip
Serial driver now correctly calculates the baud register value when in double speed mode.
Init function of the Serial driver is now static inline to product smaller code for the common-case of static init.
Diffstat (limited to 'LUFA/Drivers/Peripheral/Serial.c')
-rw-r--r--LUFA/Drivers/Peripheral/Serial.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/LUFA/Drivers/Peripheral/Serial.c b/LUFA/Drivers/Peripheral/Serial.c
index e1c744922..f9aa6a732 100644
--- a/LUFA/Drivers/Peripheral/Serial.c
+++ b/LUFA/Drivers/Peripheral/Serial.c
@@ -30,18 +30,6 @@
#include "Serial.h"
-void Serial_Init(const uint32_t BaudRate, const bool DoubleSpeed)
-{
- UCSR1A = ((DoubleSpeed) ? (1 << U2X1) : 0);
- UCSR1B = ((1 << RXEN1) | (1 << TXEN1));
- UCSR1C = ((1 << UCSZ11) | (1 << UCSZ10));
-
- DDRD |= (1 << 3);
- PORTD |= (1 << 2);
-
- UBRR1 = SERIAL_UBBRVAL(BaudRate);
-}
-
void Serial_TxString_P(const char *FlashStringPtr)
{
uint8_t CurrByte;