9
0
Fork 0

Fix compile errors

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@1851 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2009-06-05 14:46:11 +00:00
parent d06ee9f706
commit 02cec412d2
3 changed files with 11 additions and 13 deletions

View File

@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/chip.h
*
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without

View File

@ -52,6 +52,7 @@
#include "chip.h"
#include "up_arch.h"
#include "up_internal.h"
#include "os_internal.h"
#include "str71x_internal.h"
/****************************************************************************
@ -500,7 +501,7 @@ static int up_setup(struct uart_dev_s *dev)
cr |= STR71X_UARTCR_MODE9BIT;
}
if (parity == 1)
if (priv->parity == 1)
{
cr |= STR71X_UARTCR_PARITYODD;
}
@ -518,8 +519,8 @@ static int up_setup(struct uart_dev_s *dev)
/* Clear FIFOs */
up_serialout(priv, STR71X_UART2_TXRSTR_OFFSET, 0);
up_serialout(priv, SSTR71X_UART2_RXRSTR_OFFSET, 0);
up_serialout(priv, STR71X_UART_TXRSTR_OFFSET, 0);
up_serialout(priv, STR71X_UART_RXRSTR_OFFSET, 0);
/* We will take RX interrupts on either the FIFO half full or upon
* a timeout. The timeout is based upon BAUD rate ticks
@ -700,7 +701,6 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
{
struct inode *inode = filep->f_inode;
struct uart_dev_s *dev = inode->i_private;
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
int ret = OK;
switch (cmd)
@ -710,8 +710,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
struct up_dev_s *user = (struct up_dev_s*)arg;
if (!user)
{
*get_errno_ptr() = EINVAL;
ret = ERROR;
ret = -EINVAL;
}
else
{
@ -721,8 +720,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
break;
default:
*get_errno_ptr() = ENOTTY;
ret = ERROR;
ret = -ENOTTY;
break;
}
@ -942,11 +940,11 @@ int up_putc(int ch)
{
#ifdef HAVE_CONSOLE
struct up_dev_s *priv = (struct up_dev_s*)CONSOLE_DEV.priv;
ubyte ier;
uint16 ier;
up_disableuartint(priv, &ier);
up_waittxnotfull(priv);
up_serialout(priv, STR71X_UART_THR_OFFSET, (ubyte)ch);
up_serialout(priv, STR71X_UART_TXBUFR_OFFSET, (uint16)ch);
/* Check for LF */
@ -955,7 +953,7 @@ int up_putc(int ch)
/* Add CR */
up_waittxnotfull(priv);
up_serialout(priv, STR71X_UART_THR_OFFSET, '\r');
up_serialout(priv, STR71X_UART_TXBUFR_OFFSET, (uint16)'\r');
}
up_waittxnotfull(priv);

View File

@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/str71x/str71x_uart.h
*
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without