arch/arm/src/tiva: Modify preprocessor logic to support configs with no UART. Now similar to logic for other archs, such as arch/arm/src/a1x/a1x_lowputc.c and arch/arm/src/am335x/am335x_lowputc.c. This change eliminates compiler errors and warnings that were breaking the build with "No CONFIG_UARTn_SERIAL_CONSOLE Setting" when no UARTs / console were configured.
This commit is contained in:
parent
a584865b47
commit
223722d6d3
@ -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:
|
||||
*
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user