Follow naming convention
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@106 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
0d8a9ffae2
commit
d22b2cae65
2 changed files with 30 additions and 30 deletions
|
@ -157,30 +157,30 @@
|
|||
/* Bits 31-7: Reserved */
|
||||
#define UART_LCR_BOC 0x00000040 /* Bit 6: Break Control */
|
||||
/* Bit 5: Parity Type 2 */
|
||||
#define UART_LCR_ParEven 0x00000010 /* Bit 4: Parity Type 1 */
|
||||
#define UART_LCR_ParOdd 0x00000000
|
||||
#define UART_LCR_ParEn 0x00000008 /* Bit 3: Paity Enable */
|
||||
#define UART_LCR_ParDis 0x00000000
|
||||
#define UART_LCR_2stop 0x00000004 /* Bit 2: Number of stop bits */
|
||||
#define UART_LCR_1stop 0x00000000
|
||||
#define UART_LCR_5bits 0x00000000 /* Bits 0-1: Word-length */
|
||||
#define UART_LCR_6bits 0x00000001
|
||||
#define UART_LCR_7bits 0x00000002
|
||||
#define UART_LCR_8bits 0x00000003
|
||||
#define UART_LCR_PAREVEN 0x00000010 /* Bit 4: Parity Type 1 */
|
||||
#define UART_LCR_PARODD 0x00000000
|
||||
#define UART_LCR_PAREN 0x00000008 /* Bit 3: Paity Enable */
|
||||
#define UART_LCR_PARDIS 0x00000000
|
||||
#define UART_LCR_2STOP 0x00000004 /* Bit 2: Number of stop bits */
|
||||
#define UART_LCR_1STOP 0x00000000
|
||||
#define UART_LCR_5BITS 0x00000000 /* Bits 0-1: Word-length */
|
||||
#define UART_LCR_6BITS 0x00000001
|
||||
#define UART_LCR_7BITS 0x00000002
|
||||
#define UART_LCR_8BITS 0x00000003
|
||||
|
||||
#define UART_FCR_FTL 0x00000000
|
||||
#define UART_FCR_FIFO_EN 0x00000001
|
||||
#define UART_FCR_TX_CLR 0x00000002
|
||||
#define UART_FCR_RX_CLR 0x00000004
|
||||
|
||||
#define UART_IER_RecvInt 0x00000001
|
||||
#define UART_IER_XmitInt 0x00000002
|
||||
#define UART_IER_LineStsInt 0x00000004
|
||||
#define UART_IER_ModemStsInt 0x00000008 /* IrDA UART only */
|
||||
#define UART_IER_XoffInt 0x00000020
|
||||
#define UART_IER_RtsInt 0x00000040 /* IrDA UART only */
|
||||
#define UART_IER_CtsInt 0x00000080 /* IrDA UART only */
|
||||
#define UART_IER_AllInts 0x000000ff
|
||||
#define UART_IER_RECVINT 0x00000001
|
||||
#define UART_IER_XMITINT 0x00000002
|
||||
#define UART_IER_LINESTSINT 0x00000004
|
||||
#define UART_IER_MODEMSTSINT 0x00000008 /* IrDA UART only */
|
||||
#define UART_IER_XOFFINT 0x00000020
|
||||
#define UART_IER_RTSINT 0x00000040 /* IrDA UART only */
|
||||
#define UART_IER_CTSINT 0x00000080 /* IrDA UART only */
|
||||
#define UART_IER_INTMASK 0x000000ff
|
||||
|
||||
#define BAUD_115200 0x00000001
|
||||
#define BAUD_57600 0x00000002
|
||||
|
|
|
@ -247,9 +247,9 @@ static inline void up_disableuartint(struct up_dev_s *priv, uint16 *ier)
|
|||
{
|
||||
if (ier)
|
||||
{
|
||||
*ier = priv->regs.ier & UART_IER_AllInts;
|
||||
*ier = priv->regs.ier & UART_IER_INTMASK;
|
||||
}
|
||||
priv->regs.ier &= ~UART_IER_AllInts;
|
||||
priv->regs.ier &= ~UART_IER_INTMASK;
|
||||
up_serialout(priv, UART_IER_OFFS, priv->regs.ier);
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ static inline void up_disableuartint(struct up_dev_s *priv, uint16 *ier)
|
|||
|
||||
static inline void up_restoreuartint(struct up_dev_s *priv, uint16 ier)
|
||||
{
|
||||
priv->regs.ier |= ier & (UART_IER_RecvInt|UART_IER_XmitInt);
|
||||
priv->regs.ier |= ier & (UART_IER_RECVINT|UART_IER_XMITINT);
|
||||
up_serialout(priv, UART_IER_OFFS, priv->regs.ier);
|
||||
}
|
||||
|
||||
|
@ -357,25 +357,25 @@ static int up_setup(struct uart_dev_s *dev)
|
|||
|
||||
if (priv->bits == 7)
|
||||
{
|
||||
cval = UART_LCR_7bits;
|
||||
cval = UART_LCR_7BITS;
|
||||
}
|
||||
else
|
||||
{
|
||||
cval = UART_LCR_8bits;
|
||||
cval = UART_LCR_8BITS;
|
||||
}
|
||||
|
||||
if (priv->stopbits2)
|
||||
{
|
||||
cval |= UART_LCR_2stop;
|
||||
cval |= UART_LCR_2STOP;
|
||||
}
|
||||
|
||||
if (priv->parity == 1) /* Odd parity */
|
||||
{
|
||||
cval |= (UART_LCR_ParEn|UART_LCR_ParOdd);
|
||||
cval |= (UART_LCR_PAREN|UART_LCR_PARODD);
|
||||
}
|
||||
else if (priv->parity == 2) /* Even parity */
|
||||
{
|
||||
cval |= (UART_LCR_ParEn|UART_LCR_ParEven);
|
||||
cval |= (UART_LCR_PAREN|UART_LCR_PAREVEN);
|
||||
}
|
||||
|
||||
/* Both the IrDA and MODEM UARTs support RESET and UART mode. */
|
||||
|
@ -645,13 +645,13 @@ static void up_rxint(struct uart_dev_s *dev, boolean enable)
|
|||
if (enable)
|
||||
{
|
||||
#ifndef CONFIG_SUPPRESS_SERIAL_INTS
|
||||
priv->regs.ier |= UART_IER_RecvInt;
|
||||
priv->regs.ier |= UART_IER_RECVINT;
|
||||
up_serialout(priv, UART_IER_OFFS, priv->regs.ier);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
priv->regs.ier &= ~UART_IER_RecvInt;
|
||||
priv->regs.ier &= ~UART_IER_RECVINT;
|
||||
up_serialout(priv, UART_IER_OFFS, priv->regs.ier);
|
||||
}
|
||||
}
|
||||
|
@ -698,13 +698,13 @@ static void up_txint(struct uart_dev_s *dev, boolean enable)
|
|||
if (enable)
|
||||
{
|
||||
#ifndef CONFIG_SUPPRESS_SERIAL_INTS
|
||||
priv->regs.ier |= UART_IER_XmitInt;
|
||||
priv->regs.ier |= UART_IER_XMITINT;
|
||||
up_serialout(priv, UART_IER_OFFS, priv->regs.ier);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
priv->regs.ier &= ~UART_IER_XmitInt;
|
||||
priv->regs.ier &= ~UART_IER_XMITINT;
|
||||
up_serialout(priv, UART_IER_OFFS, priv->regs.ier);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue