diff --git a/arch/arm/src/tiva/common/tiva_lowputc.c b/arch/arm/src/tiva/common/tiva_lowputc.c index 9a495c87a9c..39518cbeba2 100644 --- a/arch/arm/src/tiva/common/tiva_lowputc.c +++ b/arch/arm/src/tiva/common/tiva_lowputc.c @@ -118,12 +118,12 @@ # define TIVA_CONSOLE_BITS CONFIG_UART7_BITS # define TIVA_CONSOLE_PARITY CONFIG_UART7_PARITY # define TIVA_CONSOLE_2STOP CONFIG_UART7_2STOP -#elif !defined(CONFIG_NO_SERIAL_CONSOLE) +#elif defined(HAVE_SERIAL_CONSOLE) # error "No CONFIG_UARTn_SERIAL_CONSOLE Setting" #endif /* Get LCRH settings */ -#ifndef CONFIG_NO_SERIAL_CONSOLE +#ifdef HAVE_SERIAL_CONSOLE # if TIVA_CONSOLE_BITS == 5 # define UART_LCRH_NBITS UART_LCRH_WLEN_5BITS @@ -155,7 +155,7 @@ # define UART_LCRH_VALUE (UART_LCRH_NBITS|UART_LCRH_PARITY|UART_LCRH_NSTOP|UART_LCRH_FEN) -#endif /* !CONFIG_NO_SERIAL_CONSOLE */ +#endif /* HAVE_SERIAL_CONSOLE */ /* Calculate BAUD rate from the SYS clock: * diff --git a/arch/arm/src/tiva/common/tiva_serial.c b/arch/arm/src/tiva/common/tiva_serial.c index d2bca961c87..9535f40425b 100644 --- a/arch/arm/src/tiva/common/tiva_serial.c +++ b/arch/arm/src/tiva/common/tiva_serial.c @@ -66,6 +66,12 @@ * Pre-processor Definitions ****************************************************************************/ +/* If we are not using the serial driver for the console, then we + * still must provide some minimal implementation of up_putc. + */ + +#ifdef USE_SERIALDRIVER + /* Some sanity checks *******************************************************/ /* Is there a UART enabled? */ @@ -76,12 +82,6 @@ # error "No UARTs enabled" #endif -/* If we are not using the serial driver for the console, then we - * still must provide some minimal implementation of up_putc. - */ - -#ifdef USE_SERIALDRIVER - /* Which UART with be tty0/console and which tty1-7? The console will always * be ttyS0. If there is no console then will use the lowest numbered UART. */ diff --git a/arch/arm/src/tiva/tiva_lowputc.h b/arch/arm/src/tiva/tiva_lowputc.h index 1c21ef46318..d4654768242 100644 --- a/arch/arm/src/tiva/tiva_lowputc.h +++ b/arch/arm/src/tiva/tiva_lowputc.h @@ -151,18 +151,7 @@ # undef CONFIG_UART5_SERIAL_CONSOLE # undef CONFIG_UART6_SERIAL_CONSOLE # define HAVE_SERIAL_CONSOLE 1 -#elif defined(CONFIG_NO_SERIAL_CONSOLE) -# undef CONFIG_UART0_SERIAL_CONSOLE -# undef CONFIG_UART1_SERIAL_CONSOLE -# undef CONFIG_UART2_SERIAL_CONSOLE -# undef CONFIG_UART3_SERIAL_CONSOLE -# undef CONFIG_UART4_SERIAL_CONSOLE -# undef CONFIG_UART5_SERIAL_CONSOLE -# undef CONFIG_UART6_SERIAL_CONSOLE -# undef CONFIG_UART7_SERIAL_CONSOLE -# undef HAVE_SERIAL_CONSOLE #else -# warning "No valid CONFIG_UARTn_SERIAL_CONSOLE Setting" # undef CONFIG_UART0_SERIAL_CONSOLE # undef CONFIG_UART1_SERIAL_CONSOLE # undef CONFIG_UART2_SERIAL_CONSOLE