MODSERIAL with support for more devices

Fork of MODSERIAL by Erik -

Revision:
4:28de979b77cf
Parent:
3:0f10f536456e
Child:
6:c8f77fe1cc10
--- a/ISR_TX.cpp	Sun Nov 21 13:58:53 2010 +0000
+++ b/ISR_TX.cpp	Sun Nov 21 14:44:02 2010 +0000
@@ -30,22 +30,20 @@
 {
     if (! _base ) return;
     
-    if (dmaInUse[TxIrq] == NotInUse ) {
-        while (! MODSERIAL_TX_BUFFER_EMPTY && MODSERIAL_THR_HAS_SPACE ) {
-            _THR = txc = (uint8_t)(buffer[TxIrq][buffer_out[TxIrq]]);
-            buffer_count[TxIrq]--;   
-            buffer_out[TxIrq]++;
-            if (buffer_out[TxIrq] >= buffer_size[TxIrq]) {
-                buffer_out[TxIrq] = 0;
-            }
-            _isr[TxIrq].call();
+    while (! MODSERIAL_TX_BUFFER_EMPTY && MODSERIAL_THR_HAS_SPACE ) {
+        _THR = txc = (uint8_t)(buffer[TxIrq][buffer_out[TxIrq]]);
+        buffer_count[TxIrq]--;   
+        buffer_out[TxIrq]++;
+        if (buffer_out[TxIrq] >= buffer_size[TxIrq]) {
+            buffer_out[TxIrq] = 0;
         }
+        _isr[TxIrq].call();
+    }
         
-        if ( MODSERIAL_TX_BUFFER_EMPTY && MODSERIAL_THR_HAS_SPACE ) {
-            _IER = 1;
-            _isr[TxEmpty].call();
-        }
-    }    
+    if ( MODSERIAL_TX_BUFFER_EMPTY && MODSERIAL_THR_HAS_SPACE ) {
+        _IER = 1;
+        _isr[TxEmpty].call();
+    }        
 }
 
 }; // namespace AjK ends