diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-01-29 13:13:04 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-01-29 13:13:04 +0000 |
commit | 47d740d94dc4d326cd4237603af74e17589b0759 (patch) | |
tree | 202528d870d754c537a2cd12dcc92a054ec2d067 /nuttx/arch/arm/src/lpc214x/lpc214x_serial.c | |
parent | 6ffda35c2c7ace322742e06b593f397a2fd964f8 (diff) | |
download | px4-nuttx-47d740d94dc4d326cd4237603af74e17589b0759.tar.gz px4-nuttx-47d740d94dc4d326cd4237603af74e17589b0759.tar.bz2 px4-nuttx-47d740d94dc4d326cd4237603af74e17589b0759.zip |
Fix backward conditional compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@581 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lpc214x/lpc214x_serial.c')
-rw-r--r-- | nuttx/arch/arm/src/lpc214x/lpc214x_serial.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c b/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c index b5ed8d85b..dc8a4accb 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c @@ -286,7 +286,7 @@ static inline void up_enablebreaks(struct up_dev_s *priv, boolean enable) static int up_setup(struct uart_dev_s *dev) { -#ifdef CONFIG_SUPPRESS_LPC214X_UART_CONFIG +#ifndef CONFIG_SUPPRESS_LPC214X_UART_CONFIG struct up_dev_s *priv = (struct up_dev_s*)dev->priv; uint16 baud; ubyte lcr; @@ -302,11 +302,11 @@ static int up_setup(struct uart_dev_s *dev) /* Set up the IER */ priv->ier = up_serialin(priv, LPC214X_UART_IER_OFFSET); - + /* Set up the LCR */ - + lcr = 0; - + if (priv->bits == 7) { lcr |= LPC214X_LCR_CHAR_7; @@ -320,7 +320,7 @@ static int up_setup(struct uart_dev_s *dev) { lcr |= LPC214X_LCR_STOP_2; } - + if (priv->parity == 1) { lcr |= LPC214X_LCR_PAR_ODD; @@ -331,15 +331,15 @@ static int up_setup(struct uart_dev_s *dev) } /* Enter DLAB=1 */ - + up_serialout(priv, LPC214X_UART_LCR_OFFSET, (lcr | LPC214X_LCR_DLAB_ENABLE)); - + /* Set the BAUD divisor */ baud = UART_BAUD(priv->baud); up_serialout(priv, LPC214X_UART_DLM_OFFSET, baud >> 8); up_serialout(priv, LPC214X_UART_DLL_OFFSET, baud & 0xff); - + /* Clear DLAB */ up_serialout(priv, LPC214X_UART_LCR_OFFSET, lcr); |