From c1a208af8bb3ae5f869cab41d1557e8e1e6d6410 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 15 Jun 2011 16:09:23 +0000 Subject: [PATCH] Fix AVR parity setup git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3703 42af7a65-404d-4744-a932-0658087f49c3 --- arch/avr/src/at90usb/at90usb_lowconsole.c | 2 +- arch/avr/src/atmega/atmega_lowconsole.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/avr/src/at90usb/at90usb_lowconsole.c b/arch/avr/src/at90usb/at90usb_lowconsole.c index 5360eb44d52..bbba4478b92 100644 --- a/arch/avr/src/at90usb/at90usb_lowconsole.c +++ b/arch/avr/src/at90usb/at90usb_lowconsole.c @@ -199,7 +199,7 @@ void usart1_configure(void) #if CONFIG_USART1_PARITY == 1 ucsr1c |= ((1 << UPM11) | (1 << UPM10)); /* Odd parity */ -#else +#elif CONFIG_USART1_PARITY == 2 ucsr1c |= (1 << UPM11); /* Even parity */ #endif diff --git a/arch/avr/src/atmega/atmega_lowconsole.c b/arch/avr/src/atmega/atmega_lowconsole.c index bd49a04917a..c1fda62444a 100644 --- a/arch/avr/src/atmega/atmega_lowconsole.c +++ b/arch/avr/src/atmega/atmega_lowconsole.c @@ -280,7 +280,7 @@ void usart0_configure(void) #if CONFIG_USART0_PARITY == 1 ucsr0c |= ((1 << UPM01) | (1 << UPM00)); /* Odd parity */ -#else +#elif CONFIG_USART0_PARITY == 2 ucsr0c |= (1 << UPM00); /* Even parity */ #endif @@ -357,7 +357,7 @@ void usart1_configure(void) #if CONFIG_USART1_PARITY == 1 ucsr1c |= ((1 << UPM11) | (1 << UPM10)); /* Odd parity */ -#else +#elif CONFIG_USART1_PARITY == 2 ucsr1c |= (1 << UPM11); /* Even parity */ #endif