Fix backward conditional compilation

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@581 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2008-01-29 13:13:04 +00:00
parent a49d7fea0c
commit cd3717700c

View File

@ -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) 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; struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
uint16 baud; uint16 baud;
ubyte lcr; ubyte lcr;
@ -302,11 +302,11 @@ static int up_setup(struct uart_dev_s *dev)
/* Set up the IER */ /* Set up the IER */
priv->ier = up_serialin(priv, LPC214X_UART_IER_OFFSET); priv->ier = up_serialin(priv, LPC214X_UART_IER_OFFSET);
/* Set up the LCR */ /* Set up the LCR */
lcr = 0; lcr = 0;
if (priv->bits == 7) if (priv->bits == 7)
{ {
lcr |= LPC214X_LCR_CHAR_7; lcr |= LPC214X_LCR_CHAR_7;
@ -320,7 +320,7 @@ static int up_setup(struct uart_dev_s *dev)
{ {
lcr |= LPC214X_LCR_STOP_2; lcr |= LPC214X_LCR_STOP_2;
} }
if (priv->parity == 1) if (priv->parity == 1)
{ {
lcr |= LPC214X_LCR_PAR_ODD; lcr |= LPC214X_LCR_PAR_ODD;
@ -331,15 +331,15 @@ static int up_setup(struct uart_dev_s *dev)
} }
/* Enter DLAB=1 */ /* Enter DLAB=1 */
up_serialout(priv, LPC214X_UART_LCR_OFFSET, (lcr | LPC214X_LCR_DLAB_ENABLE)); up_serialout(priv, LPC214X_UART_LCR_OFFSET, (lcr | LPC214X_LCR_DLAB_ENABLE));
/* Set the BAUD divisor */ /* Set the BAUD divisor */
baud = UART_BAUD(priv->baud); baud = UART_BAUD(priv->baud);
up_serialout(priv, LPC214X_UART_DLM_OFFSET, baud >> 8); up_serialout(priv, LPC214X_UART_DLM_OFFSET, baud >> 8);
up_serialout(priv, LPC214X_UART_DLL_OFFSET, baud & 0xff); up_serialout(priv, LPC214X_UART_DLL_OFFSET, baud & 0xff);
/* Clear DLAB */ /* Clear DLAB */
up_serialout(priv, LPC214X_UART_LCR_OFFSET, lcr); up_serialout(priv, LPC214X_UART_LCR_OFFSET, lcr);