LPC43: Rename HAVE_CONSOLE to HAVE_SERIAL_CONSOLE. We can, of course, always have a some console other than a serial console.
This commit is contained in:
parent
058f06cc94
commit
1474300276
@ -1,7 +1,7 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/lpc43xx/lpc43_config.h
|
* arch/arm/src/lpc43xx/lpc43_config.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2012, 2017 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -99,28 +99,28 @@
|
|||||||
# undef CONFIG_UART1_SERIAL_CONSOLE
|
# undef CONFIG_UART1_SERIAL_CONSOLE
|
||||||
# undef CONFIG_USART2_SERIAL_CONSOLE
|
# undef CONFIG_USART2_SERIAL_CONSOLE
|
||||||
# undef CONFIG_USART3_SERIAL_CONSOLE
|
# undef CONFIG_USART3_SERIAL_CONSOLE
|
||||||
# define HAVE_CONSOLE 1
|
# define HAVE_SERIAL_CONSOLE 1
|
||||||
#elif defined(CONFIG_UART1_SERIAL_CONSOLE)
|
#elif defined(CONFIG_UART1_SERIAL_CONSOLE)
|
||||||
# undef CONFIG_USART0_SERIAL_CONSOLE
|
# undef CONFIG_USART0_SERIAL_CONSOLE
|
||||||
# undef CONFIG_USART2_SERIAL_CONSOLE
|
# undef CONFIG_USART2_SERIAL_CONSOLE
|
||||||
# undef CONFIG_USART3_SERIAL_CONSOLE
|
# undef CONFIG_USART3_SERIAL_CONSOLE
|
||||||
# define HAVE_CONSOLE 1
|
# define HAVE_SERIAL_CONSOLE 1
|
||||||
#elif defined(CONFIG_USART2_SERIAL_CONSOLE)
|
#elif defined(CONFIG_USART2_SERIAL_CONSOLE)
|
||||||
# undef CONFIG_USART0_SERIAL_CONSOLE
|
# undef CONFIG_USART0_SERIAL_CONSOLE
|
||||||
# undef CONFIG_UART1_SERIAL_CONSOLE
|
# undef CONFIG_UART1_SERIAL_CONSOLE
|
||||||
# undef CONFIG_USART3_SERIAL_CONSOLE
|
# undef CONFIG_USART3_SERIAL_CONSOLE
|
||||||
# define HAVE_CONSOLE 1
|
# define HAVE_SERIAL_CONSOLE 1
|
||||||
#elif defined(CONFIG_USART3_SERIAL_CONSOLE)
|
#elif defined(CONFIG_USART3_SERIAL_CONSOLE)
|
||||||
# undef CONFIG_USART0_SERIAL_CONSOLE
|
# undef CONFIG_USART0_SERIAL_CONSOLE
|
||||||
# undef CONFIG_UART1_SERIAL_CONSOLE
|
# undef CONFIG_UART1_SERIAL_CONSOLE
|
||||||
# undef CONFIG_USART2_SERIAL_CONSOLE
|
# undef CONFIG_USART2_SERIAL_CONSOLE
|
||||||
# define HAVE_CONSOLE 1
|
# define HAVE_SERIAL_CONSOLE 1
|
||||||
#else
|
#else
|
||||||
# undef CONFIG_USART0_SERIAL_CONSOLE
|
# undef CONFIG_USART0_SERIAL_CONSOLE
|
||||||
# undef CONFIG_UART1_SERIAL_CONSOLE
|
# undef CONFIG_UART1_SERIAL_CONSOLE
|
||||||
# undef CONFIG_USART2_SERIAL_CONSOLE
|
# undef CONFIG_USART2_SERIAL_CONSOLE
|
||||||
# undef CONFIG_USART3_SERIAL_CONSOLE
|
# undef CONFIG_USART3_SERIAL_CONSOLE
|
||||||
# undef HAVE_CONSOLE
|
# undef HAVE_SERIAL_CONSOLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Check UART flow control (Only supported by UART1) */
|
/* Check UART flow control (Only supported by UART1) */
|
||||||
|
@ -340,7 +340,7 @@ static uart_dev_t g_usart3port =
|
|||||||
|
|
||||||
/* Assign the console device and ttyS0 */
|
/* Assign the console device and ttyS0 */
|
||||||
|
|
||||||
#ifdef HAVE_CONSOLE
|
#ifdef HAVE_SERIAL_CONSOLE
|
||||||
# if defined(CONFIG_USART0_SERIAL_CONSOLE)
|
# if defined(CONFIG_USART0_SERIAL_CONSOLE)
|
||||||
# define CONSOLE_DEV g_usart0port /* USART0=console */
|
# define CONSOLE_DEV g_usart0port /* USART0=console */
|
||||||
# define TTYS0_DEV g_usart0port /* USART0=ttyS0 */
|
# define TTYS0_DEV g_usart0port /* USART0=ttyS0 */
|
||||||
@ -1384,7 +1384,7 @@ void up_serialinit(void)
|
|||||||
|
|
||||||
int up_putc(int ch)
|
int up_putc(int ch)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_CONSOLE
|
#ifdef HAVE_SERIAL_CONSOLE
|
||||||
struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv;
|
struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv;
|
||||||
uint32_t ier;
|
uint32_t ier;
|
||||||
up_disableuartint(priv, &ier);
|
up_disableuartint(priv, &ier);
|
||||||
@ -1400,7 +1400,7 @@ int up_putc(int ch)
|
|||||||
}
|
}
|
||||||
|
|
||||||
up_lowputc(ch);
|
up_lowputc(ch);
|
||||||
#ifdef HAVE_CONSOLE
|
#ifdef HAVE_SERIAL_CONSOLE
|
||||||
up_restoreuartint(priv, ier);
|
up_restoreuartint(priv, ier);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined HAVE_UART && defined HAVE_CONSOLE
|
#ifdef HAVE_SERIAL_CONSOLE
|
||||||
/* Select UART parameters for the selected console */
|
/* Select UART parameters for the selected console */
|
||||||
|
|
||||||
# if defined(CONFIG_USART0_SERIAL_CONSOLE)
|
# if defined(CONFIG_USART0_SERIAL_CONSOLE)
|
||||||
@ -91,7 +91,7 @@
|
|||||||
# define CONSOLE_BITS CONFIG_USART3_BITS
|
# define CONSOLE_BITS CONFIG_USART3_BITS
|
||||||
# define CONSOLE_PARITY CONFIG_USART3_PARITY
|
# define CONSOLE_PARITY CONFIG_USART3_PARITY
|
||||||
# define CONSOLE_2STOP CONFIG_USART3_2STOP
|
# define CONSOLE_2STOP CONFIG_USART3_2STOP
|
||||||
# elif defined(HAVE_CONSOLE)
|
# elif defined(HAVE_SERIAL_CONSOLE)
|
||||||
# error "No CONFIG_UARTn_SERIAL_CONSOLE Setting"
|
# error "No CONFIG_UARTn_SERIAL_CONSOLE Setting"
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@ -105,7 +105,7 @@
|
|||||||
# define CONSOLE_LCR_WLS UART_LCR_WLS_7BIT
|
# define CONSOLE_LCR_WLS UART_LCR_WLS_7BIT
|
||||||
# elif CONSOLE_BITS == 8
|
# elif CONSOLE_BITS == 8
|
||||||
# define CONSOLE_LCR_WLS UART_LCR_WLS_8BIT
|
# define CONSOLE_LCR_WLS UART_LCR_WLS_8BIT
|
||||||
# elif defined(HAVE_CONSOLE)
|
# elif defined(HAVE_SERIAL_CONSOLE)
|
||||||
# error "Invalid CONFIG_UARTn_BITS setting for console "
|
# error "Invalid CONFIG_UARTn_BITS setting for console "
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@ -121,7 +121,7 @@
|
|||||||
# define CONSOLE_LCR_PAR (UART_LCR_PE|UART_LCR_PS_STICK1)
|
# define CONSOLE_LCR_PAR (UART_LCR_PE|UART_LCR_PS_STICK1)
|
||||||
# elif CONSOLE_PARITY == 4
|
# elif CONSOLE_PARITY == 4
|
||||||
# define CONSOLE_LCR_PAR (UART_LCR_PE|UART_LCR_PS_STICK0)
|
# define CONSOLE_LCR_PAR (UART_LCR_PE|UART_LCR_PS_STICK0)
|
||||||
# elif defined(HAVE_CONSOLE)
|
# elif defined(HAVE_SERIAL_CONSOLE)
|
||||||
# error "Invalid CONFIG_UARTn_PARITY setting for CONSOLE"
|
# error "Invalid CONFIG_UARTn_PARITY setting for CONSOLE"
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@ -156,7 +156,7 @@
|
|||||||
|
|
||||||
void up_lowputc(char ch)
|
void up_lowputc(char ch)
|
||||||
{
|
{
|
||||||
#if defined HAVE_UART && defined HAVE_CONSOLE
|
#ifdef HAVE_SERIAL_CONSOLE
|
||||||
/* Wait for the transmitter to be available */
|
/* Wait for the transmitter to be available */
|
||||||
|
|
||||||
while ((getreg32(CONSOLE_BASE+LPC43_UART_LSR_OFFSET) & UART_LSR_THRE) == 0);
|
while ((getreg32(CONSOLE_BASE+LPC43_UART_LSR_OFFSET) & UART_LSR_THRE) == 0);
|
||||||
@ -211,7 +211,7 @@ void lpc43_lowsetup(void)
|
|||||||
|
|
||||||
/* Configure the console (only) */
|
/* Configure the console (only) */
|
||||||
|
|
||||||
#if defined(HAVE_CONSOLE) && !defined(CONFIG_SUPPRESS_UART_CONFIG)
|
#if defined(HAVE_SERIAL_CONSOLE) && !defined(CONFIG_SUPPRESS_UART_CONFIG)
|
||||||
|
|
||||||
/* Clear fifos */
|
/* Clear fifos */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user