summaryrefslogtreecommitdiff
path: root/nuttx/arch
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-05 14:46:11 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-05 14:46:11 +0000
commit91387e8c28071c7acd6c960529998723e7764bdd (patch)
treef3238028b05195e6ea6acac29e0cae01217c56ca /nuttx/arch
parent7a62df3f8bd9b5cbaed24b5b4dc294b3140db6f5 (diff)
downloadpx4-nuttx-91387e8c28071c7acd6c960529998723e7764bdd.tar.gz
px4-nuttx-91387e8c28071c7acd6c960529998723e7764bdd.tar.bz2
px4-nuttx-91387e8c28071c7acd6c960529998723e7764bdd.zip
Fix compile errors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1851 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch')
-rw-r--r--nuttx/arch/arm/src/str71x/chip.h2
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_serial.c20
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_uart.h2
3 files changed, 11 insertions, 13 deletions
diff --git a/nuttx/arch/arm/src/str71x/chip.h b/nuttx/arch/arm/src/str71x/chip.h
index de69c43cd..abd9c5e26 100644
--- a/nuttx/arch/arm/src/str71x/chip.h
+++ b/nuttx/arch/arm/src/str71x/chip.h
@@ -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
diff --git a/nuttx/arch/arm/src/str71x/str71x_serial.c b/nuttx/arch/arm/src/str71x/str71x_serial.c
index 2b816101c..5617edab0 100644
--- a/nuttx/arch/arm/src/str71x/str71x_serial.c
+++ b/nuttx/arch/arm/src/str71x/str71x_serial.c
@@ -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);
diff --git a/nuttx/arch/arm/src/str71x/str71x_uart.h b/nuttx/arch/arm/src/str71x/str71x_uart.h
index c835757b2..eced989f0 100644
--- a/nuttx/arch/arm/src/str71x/str71x_uart.h
+++ b/nuttx/arch/arm/src/str71x/str71x_uart.h
@@ -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