summaryrefslogtreecommitdiffstats
path: root/nuttx/arch/arm/src/lm3s
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2009-05-19 20:50:47 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2009-05-19 20:50:47 +0000
commit612dbbc99abcc08237ce67c1585e8f9fc0dff9a4 (patch)
treeb423e431381cec6487eb2fad488db919401b1f27 /nuttx/arch/arm/src/lm3s
parent7341eecfca624f268636e23dcb3ce07ec53e2846 (diff)
Add lm3s6918 NSH configuration
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@1802 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/arch/arm/src/lm3s')
-rw-r--r--nuttx/arch/arm/src/lm3s/lm3s_serial.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/nuttx/arch/arm/src/lm3s/lm3s_serial.c b/nuttx/arch/arm/src/lm3s/lm3s_serial.c
index 42cf0fe23d..b490e4ad40 100644
--- a/nuttx/arch/arm/src/lm3s/lm3s_serial.c
+++ b/nuttx/arch/arm/src/lm3s/lm3s_serial.c
@@ -54,6 +54,7 @@
#include "chip.h"
#include "up_arch.h"
#include "up_internal.h"
+#include "os_internal.h"
/****************************************************************************
* Definitions
@@ -95,7 +96,7 @@
# define TTYS0_DEV g_uart0port /* UART0 is ttyS0 */
# ifndef CONFIG_UART1_DISABLE
# define TTYS1_DEV g_uart1port /* UART1 is ttyS1 */
-# elif
+# else
# undef TTYS1_DEV /* No ttyS1 */
# endif
#elif defined(CONFIG_UART1_SERIAL_CONSOLE)
@@ -103,7 +104,7 @@
# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */
# ifndef CONFIG_UART0_DISABLE
# define TTYS1_DEV g_uart0port /* UART0 is ttyS1 */
-# elif
+# else
# undef TTYS1_DEV /* No ttyS1 */
# endif
#elif !defined(CONFIG_UART0_DISABLE)
@@ -111,7 +112,7 @@
# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */
# ifndef CONFIG_UART1_DISABLE
# define TTYS1_DEV g_uart1port /* UART1 is ttyS1 */
-# elif
+# else
# undef TTYS1_DEV /* No ttyS1 */
# endif
#elif !defined(CONFIG_UART1_DISABLE)
@@ -356,9 +357,9 @@ static int up_setup(struct uart_dev_s *dev)
/* Disable the UART by clearing the UARTEN bit in the UART CTL register */
- ctl = getreg32(LM3S_CONSOLE_BASE+LM3S_UART_CTL_OFFSET);
+ ctl = up_serialin(priv, LM3S_UART_CTL_OFFSET);
ctl &= ~UART_CTL_UARTEN;
- putreg32(ctl, LM3S_CONSOLE_BASE+LM3S_UART_CTL_OFFSET);
+ up_serialout(priv, LM3S_UART_CTL_OFFSET, ctl);
/* Calculate BAUD rate from the SYS clock:
*
@@ -399,7 +400,7 @@ static int up_setup(struct uart_dev_s *dev)
den = priv->baud << 16;
brdi = SYSCLK_FREQUENCY / den;
- remainder = priv->baud - den * brdi
+ remainder = priv->baud - den * brdi;
divfrac = ((remainder << 6) + (den >> 1)) / den;
up_serialout(priv, LM3S_UART_IBRD_OFFSET, brdi);
@@ -460,15 +461,15 @@ static int up_setup(struct uart_dev_s *dev)
* yet because the interrupt is still disabled at the interrupt controller.
*/
- serial_out(priv, LM3S_UART_IM_OFFSET, UART_IM_RXIM|UART_IM_RTIM);
+ up_serialout(priv, LM3S_UART_IM_OFFSET, UART_IM_RXIM|UART_IM_RTIM);
/* Enable the FIFOs */
#ifndef CONFIG_SUPPRESS_UART_CONFIG
- lrch = up_serialin(priv, LM3S_UART_LCRH_OFFSET);
+ lcrh = up_serialin(priv, LM3S_UART_LCRH_OFFSET);
#endif
lcrh |= UART_LCRH_FEN;
- serial_out(priv, LM3S_UART_LCRH_OFFSET, lcrh);
+ up_serialout(priv, LM3S_UART_LCRH_OFFSET, lcrh);
/* Enable Rx, Tx, and the UART */
@@ -638,7 +639,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)
@@ -873,7 +873,7 @@ int up_putc(int ch)
{
#ifdef HAVE_CONSOLE
struct up_dev_s *priv = (struct up_dev_s*)CONSOLE_DEV.priv;
- ubyte im;
+ uint32 im;
up_disableuartint(priv, &im);
up_waittxnotfull(priv);