arch/arm/src/dm320/dm320_serial.c: Appease nxstyle

This commit is contained in:
YAMAMOTO Takashi 2020-11-10 08:42:40 +09:00 committed by Xiang Xiao
parent b380760eb1
commit 63320733cc

View File

@ -1,7 +1,8 @@
/****************************************************************************
* arch/arm/src/dm320/dm320_serial.c
*
* Copyright (C) 2007-2009, 2012-2013, 2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2012-2013, 2017 Gregory Nutt.
* All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -178,7 +179,7 @@ static uart_dev_t g_uart1port =
{
.size = CONFIG_UART1_TXBUFSIZE,
.buffer = g_uart1txbuffer,
},
},
.ops = &g_uart_ops,
.priv = &g_uart1priv,
};
@ -212,7 +213,8 @@ static inline uint16_t up_serialin(struct up_dev_s *priv, uint32_t offset)
* Name: up_serialout
****************************************************************************/
static inline void up_serialout(struct up_dev_s *priv, uint32_t offset, uint16_t value)
static inline void up_serialout(struct up_dev_s *priv, uint32_t offset,
uint16_t value)
{
putreg16(value, priv->uartbase + offset);
}
@ -410,14 +412,15 @@ static void up_shutdown(struct uart_dev_s *dev)
* Name: up_attach
*
* Description:
* Configure the UART to operation in interrupt driven mode. This method is
* called when the serial port is opened. Normally, this is just after the
* Configure the UART to operation in interrupt driven mode. This method
* is called when the serial port is opened. Normally, this is just after
* the setup() method is called, however, the serial console may operate in
* a non-interrupt driven mode during the boot phase.
*
* RX and TX interrupts are not enabled when by the attach method (unless the
* hardware supports multiple levels of interrupt enabling). The RX and TX
* interrupts are not enabled until the txint() and rxint() methods are called.
* RX and TX interrupts are not enabled when by the attach method (unless
* the hardware supports multiple levels of interrupt enabling). The RX
* and TX interrupts are not enabled until the txint() and rxint() methods
* are called.
*
****************************************************************************/
@ -437,6 +440,7 @@ static int up_attach(struct uart_dev_s *dev)
up_enable_irq(priv->irq);
}
return ret;
}
@ -445,8 +449,8 @@ static int up_attach(struct uart_dev_s *dev)
*
* Description:
* Detach UART interrupts. This method is called when the serial port is
* closed normally just before the shutdown method is called. The exception is
* the serial console which is never shutdown.
* closed normally just before the shutdown method is called. The
* exception is the serial console which is never shutdown.
*
****************************************************************************/
@ -619,6 +623,7 @@ static void up_rxint(struct uart_dev_s *dev, bool enable)
{
priv->msr &= ~UART_MSR_RFTIE;
}
up_serialout(priv, UART_MSR, priv->msr);
}
@ -671,6 +676,7 @@ static void up_txint(struct uart_dev_s *dev, bool enable)
{
priv->msr &= ~UART_MSR_TFTIE;
}
up_serialout(priv, UART_MSR, priv->msr);
}
@ -799,7 +805,6 @@ static inline void up_waittxready(void)
for (tmp = 1000 ; tmp > 0 ; tmp--)
{
if ((getreg16(DM320_REGISTER_BASE + UART_SR) & UART_SR_TFTI) != 0)
{
break;