drivers/serial/uart_16550.c: Fix UART 16550 warning when disable HAVE_16550_CONSOLE.

This commit is contained in:
Xiang Xiao 2018-08-26 11:28:57 -06:00 committed by Gregory Nutt
parent 1cbaae77cc
commit b426e35ed2

View File

@ -1092,14 +1092,16 @@ static bool u16550_txempty(struct uart_dev_s *dev)
* *
****************************************************************************/ ****************************************************************************/
#ifdef HAVE_16550_CONSOLE
static void u16550_putc(FAR struct u16550_s *priv, int ch) static void u16550_putc(FAR struct u16550_s *priv, int ch)
{ {
while ((u16550_serialin(priv, UART_LSR_OFFSET) & UART_LSR_THRE) == 0); while ((u16550_serialin(priv, UART_LSR_OFFSET) & UART_LSR_THRE) == 0);
u16550_serialout(priv, UART_THR_OFFSET, (uart_datawidth_t)ch); u16550_serialout(priv, UART_THR_OFFSET, (uart_datawidth_t)ch);
} }
#endif
/**************************************************************************** /****************************************************************************
* Public Funtions * Public Functions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************