You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/16 13:47:32 UTC
[incubator-nuttx] 27/35: arch/arm/src/samd2l2/sam_serial.c: Appease
nxstyle
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 566ca63cee90ab4a85d56394c13838d8fd36dc59
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 13 14:54:02 2020 +0900
arch/arm/src/samd2l2/sam_serial.c: Appease nxstyle
---
arch/arm/src/samd2l2/sam_serial.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/arch/arm/src/samd2l2/sam_serial.c b/arch/arm/src/samd2l2/sam_serial.c
index 25fb58f..5fc2cf7 100644
--- a/arch/arm/src/samd2l2/sam_serial.c
+++ b/arch/arm/src/samd2l2/sam_serial.c
@@ -68,6 +68,7 @@
/****************************************************************************
* 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.
*/
@@ -477,7 +478,7 @@ static uart_dev_t g_usart4port =
{
.size = CONFIG_USART4_TXBUFSIZE,
.buffer = g_usart4txbuffer,
- },
+ },
.ops = &g_uart_ops,
.priv = &g_usart4priv,
};
@@ -510,7 +511,7 @@ static uart_dev_t g_usart5port =
{
.size = CONFIG_USART5_TXBUFSIZE,
.buffer = g_usart5txbuffer,
- },
+ },
.ops = &g_uart_ops,
.priv = &g_usart5priv,
};
@@ -848,7 +849,9 @@ static void sam_rxint(struct uart_dev_s *dev, bool enable)
if (enable)
{
- /* Receive an interrupt when their is anything in the Rx data register */
+ /* Receive an interrupt when their is anything in the Rx data
+ * register
+ */
#ifndef CONFIG_SUPPRESS_SERIAL_INTS
sam_serialout8(priv, SAM_USART_INTENSET_OFFSET, USART_INT_RXC);
@@ -871,7 +874,8 @@ static void sam_rxint(struct uart_dev_s *dev, bool enable)
static bool sam_rxavailable(struct uart_dev_s *dev)
{
struct sam_dev_s *priv = (struct sam_dev_s *)dev->priv;
- return ((sam_serialin8(priv, SAM_USART_INTFLAG_OFFSET) & USART_INT_RXC) != 0);
+ return ((sam_serialin8(priv, SAM_USART_INTFLAG_OFFSET) & USART_INT_RXC)
+ != 0);
}
/****************************************************************************
@@ -929,7 +933,9 @@ static void sam_txint(struct uart_dev_s *dev, bool enable)
}
else
{
- /* Disable the TX interrupt. Only disable DRE, TXC will disable itself! */
+ /* Disable the TX interrupt. Only disable DRE, TXC will disable
+ * itself!
+ */
sam_serialout8(priv, SAM_USART_INTENCLR_OFFSET, USART_INT_DRE);
}
@@ -948,7 +954,8 @@ static void sam_txint(struct uart_dev_s *dev, bool enable)
static bool sam_txempty(struct uart_dev_s *dev)
{
struct sam_dev_s *priv = (struct sam_dev_s *)dev->priv;
- return ((sam_serialin8(priv, SAM_USART_INTFLAG_OFFSET) & USART_INT_DRE) != 0);
+ return ((sam_serialin8(priv, SAM_USART_INTFLAG_OFFSET) & USART_INT_DRE)
+ != 0);
}
/****************************************************************************