From c7aceb2c7f625b8256dfe4f80177beb63911979a Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 7 May 2009 11:12:23 +0000 Subject: 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. --- LUFA/Drivers/Peripheral/Serial.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'LUFA/Drivers/Peripheral/Serial.c') 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; -- cgit v1.2.3