From 54d1ef12eabbc8386845a6df3cba50d594be748c Mon Sep 17 00:00:00 2001 From: skarg Date: Wed, 3 Jun 2009 14:54:24 +0000 Subject: [PATCH] Corrected serial port initialization for second USART. Thanks, Jason! --- bacnet-stack/ports/bdk-atxx4-mstp/serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bacnet-stack/ports/bdk-atxx4-mstp/serial.c b/bacnet-stack/ports/bdk-atxx4-mstp/serial.c index 1d30c289..f04417e4 100644 --- a/bacnet-stack/ports/bdk-atxx4-mstp/serial.c +++ b/bacnet-stack/ports/bdk-atxx4-mstp/serial.c @@ -38,7 +38,7 @@ static FIFO_BUFFER Receive_Buffer; static void serial_receiver_enable( void) { - UCSR0B = _BV(TXEN0) | _BV(RXEN0) | _BV(RXCIE0); + UCSR1B = _BV(TXEN1) | _BV(RXEN1) | _BV(RXCIE1); } ISR(USART1_RX_vect) @@ -161,7 +161,7 @@ static void serial_usart_init( /* Set Stop Bit Select: USBSn = 0 for 1 stop bit */ /* Set Character Size: UCSZn2 UCSZn1 UCSZn0 = 011 for 8-bit */ /* Clock Polarity: UCPOLn = 0 when asynchronous mode is used. */ - UCSR0C = _BV(UCSZ11) | _BV(UCSZ10); + UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); /* Clear Power Reduction */ BIT_CLEAR(PRR, PRUSART1); }