Don't access serial data register twice.
authorbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 26 Oct 2004 09:00:49 +0000 (09:00 +0000)
committerbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 26 Oct 2004 09:00:49 +0000 (09:00 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@261 38d2e660-2303-0410-9eaa-f027e97ec537

drv/ser_dsp56k.c

index efdb2e2bcc0a899526736d6782266fde753f02d6..38dd40b97222610458e9c5a92e154d96eec8f79c 100755 (executable)
@@ -15,6 +15,9 @@
 
 /*#*
  *#* $Log$
+ *#* Revision 1.8  2004/10/26 09:00:49  bernie
+ *#* Don't access serial data register twice.
+ *#*
  *#* Revision 1.7  2004/10/19 08:57:15  bernie
  *#* Bugfixes for DSP56K serial driver from scfirm.
  *#*
@@ -146,10 +149,10 @@ static void rx_isr(const struct SCI *hw)
                unsigned char data = regs->DR;
 
                if (fifo_isfull(&hw->serial->rxfifo))
-       if (fifo_isfull(&hw->serial->rxfifo))
-               hw->serial->status |= SERRF_RXFIFOOVERRUN;
-       else
-               fifo_push(&hw->serial->rxfifo, regs->DR);
+                       hw->serial->status |= SERRF_RXFIFOOVERRUN;
+               else
+                       fifo_push(&hw->serial->rxfifo, data);
+       }
 
        // Writing anything to the status register clear the error bits.
        regs->SR = 0;