From 9de734f2b4321570ac13051c26f1120a79b17849 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 21 Mar 2007 23:06:29 +0000 Subject: Progress with DM320 git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@117 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/drivers/serial.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) (limited to 'nuttx/drivers') diff --git a/nuttx/drivers/serial.c b/nuttx/drivers/serial.c index fd0e5b1b7..29bfa27d7 100644 --- a/nuttx/drivers/serial.c +++ b/nuttx/drivers/serial.c @@ -90,24 +90,6 @@ struct file_operations g_serialops = * Private Functions ************************************************************************************/ -/************************************************************************************ - * Name: uart_waittxfifonotfull - ************************************************************************************/ - -#if defined(CONFIG_SUPPRESS_INTERRUPTS) || defined(CONFIG_SUPPRESS_SERIAL_INTS) -static inline void uart_waittxfifonotfull(uart_dev_t *dev) -{ - int tmp; - for (tmp = 1000 ; tmp > 0 ; tmp--) - { - if (uart_txfifonotfull(dev)) - { - break; - } - } -} -#endif - /************************************************************************************ * Name: uart_takesem ************************************************************************************/ @@ -155,23 +137,6 @@ static void uart_putxmitchar(uart_dev_t *dev, int ch) } else { -#if defined(CONFIG_SUPPRESS_INTERRUPTS) || defined(CONFIG_SUPPRESS_SERIAL_INTS) - /* Transfer some characters with interrupts disabled */ - - uart_xmitchars(dev); - - /* If we unsuccessful in making room in the buffer. - * then transmit the characters with interrupts - * enabled and wait for result. - */ - - if (nexthead == dev->xmit.tail) - { - /* Still no space */ - - uart_waittxfifonotfull(dev); - } -#else /* Inform the interrupt level logic that we are waiting */ dev->xmitwaiting = TRUE; @@ -185,7 +150,6 @@ static void uart_putxmitchar(uart_dev_t *dev, int ch) uart_enabletxint(dev); uart_takesem(&dev->xmitsem); uart_disabletxint(dev); -#endif } } } @@ -275,11 +239,7 @@ static ssize_t uart_write(struct file *filep, const char *buffer, size_t buflen) if (dev->xmit.head != dev->xmit.tail) { -#if defined(CONFIG_SUPPRESS_INTERRUPTS) || defined(CONFIG_SUPPRESS_SERIAL_INTS) - uart_xmitchars(dev); -#else uart_enabletxint(dev); -#endif } uart_givesem(&dev->xmit.sem); @@ -446,10 +406,8 @@ static int uart_open(struct file *filep) /* Attache and enabled the IRQ */ -#ifndef CONFIG_SUPPRESS_SERIAL_INTS ret = irq_attach(dev->irq, dev->ops->handler); if (ret == OK) -#endif { /* Mark the io buffers empty */ @@ -460,9 +418,7 @@ static int uart_open(struct file *filep) /* Finally, enable interrupts */ -#ifndef CONFIG_SUPPRESS_SERIAL_INTS up_enable_irq(dev->irq); -#endif uart_enablerxint(dev); } irqrestore(flags); -- cgit v1.2.3