diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-21 23:06:29 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-21 23:06:29 +0000 |
commit | 9de734f2b4321570ac13051c26f1120a79b17849 (patch) | |
tree | c2d052a021a8b305c51d697e86ed09856a46350a /nuttx/drivers | |
parent | f895e2fefee423d37285d8af1697c7f91d211aed (diff) | |
download | px4-nuttx-9de734f2b4321570ac13051c26f1120a79b17849.tar.gz px4-nuttx-9de734f2b4321570ac13051c26f1120a79b17849.tar.bz2 px4-nuttx-9de734f2b4321570ac13051c26f1120a79b17849.zip |
Progress with DM320
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@117 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers')
-rw-r--r-- | nuttx/drivers/serial.c | 44 |
1 files changed, 0 insertions, 44 deletions
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 @@ -91,24 +91,6 @@ struct file_operations g_serialops = ************************************************************************************/ /************************************************************************************ - * 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); |