From 8c171192c2de60763a079d0abdba19694eb7a76a Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 7 May 2010 02:32:56 +0000 Subject: Add LM3S6965 definition git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2654 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/arm/src/lm3s/lm3s_lowputc.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'nuttx/arch/arm/src/lm3s/lm3s_lowputc.c') diff --git a/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c b/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c index 70d37b0c0..81e312cf1 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c +++ b/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c @@ -1,7 +1,7 @@ /************************************************************************** * arch/arm/src/lm3s/lm3s_lowputc.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -54,17 +54,37 @@ /* Configuration **********************************************************/ +#if LM3S_NUARTS < 2 +# undef CONFIG_UART1_DISABLE +# undef CONFIG_UART1_SERIAL_CONSOLE +# define CONFIG_UART1_DISABLE 1 +#endif + +#if LM3S_NUARTS < 3 +# undef CONFIG_UART2_DISABLE +# undef CONFIG_UART2_SERIAL_CONSOLE +# define CONFIG_UART2_DISABLE 1 +#endif + /* Is there a serial console? */ #if defined(CONFIG_UART0_SERIAL_CONSOLE) && !defined(CONFIG_UART0_DISABLE) # undef CONFIG_UART1_SERIAL_CONSOLE +# undef CONFIG_UART2_SERIAL_CONSOLE # define HAVE_CONSOLE 1 #elif defined(CONFIG_UART1_SERIAL_CONSOLE) && !defined(CONFIG_UART1_DISABLE) # undef CONFIG_UART0_SERIAL_CONSOLE +# undef CONFIG_UART2_SERIAL_CONSOLE +# define HAVE_CONSOLE 1 +#elif defined(CONFIG_UART2_SERIAL_CONSOLE) && !defined(CONFIG_UART2_DISABLE) +# undef CONFIG_UART0_SERIAL_CONSOLE +# undef CONFIG_UART1_SERIAL_CONSOLE # define HAVE_CONSOLE 1 #else +# warning "No valid CONFIG_UARTn_SERIAL_CONSOLE Setting" # undef CONFIG_UART0_SERIAL_CONSOLE # undef CONFIG_UART1_SERIAL_CONSOLE +# undef CONFIG_UART2_SERIAL_CONSOLE # undef HAVE_CONSOLE #endif @@ -82,6 +102,12 @@ # define LM3S_CONSOLE_BITS CONFIG_UART1_BITS # define LM3S_CONSOLE_PARITY CONFIG_UART1_PARITY # define LM3S_CONSOLE_2STOP CONFIG_UART1_2STOP +#elif defined(CONFIG_UART2_SERIAL_CONSOLE) +# define LM3S_CONSOLE_BASE LM3S_UART2_BASE +# define LM3S_CONSOLE_BAUD CONFIG_UART2_BAUD +# define LM3S_CONSOLE_BITS CONFIG_UART2_BITS +# define LM3S_CONSOLE_PARITY CONFIG_UART2_PARITY +# define LM3S_CONSOLE_2STOP CONFIG_UART2_2STOP #else # error "No CONFIG_UARTn_SERIAL_CONSOLE Setting" #endif -- cgit v1.2.3