Bug fix release
Fork of MODSERIAL by
Diff: ISR_TX.cpp
- Revision:
- 8:775f860e94d3
- Parent:
- 6:c8f77fe1cc10
- Child:
- 12:8c7394e2ae7f
diff -r ffa4a7cb7f8d -r 775f860e94d3 ISR_TX.cpp --- a/ISR_TX.cpp Mon Nov 22 09:19:50 2010 +0000 +++ b/ISR_TX.cpp Mon Nov 22 09:58:34 2010 +0000 @@ -28,7 +28,10 @@ void MODSERIAL::isr_tx(bool doCallback) { - if (! _base ) return; + if (! _base || buffer_size[TxIrq] == 0 || buffer[TxIrq] == (char *)NULL) { + _isr[TxIrq].call(); + return; + } while (! MODSERIAL_TX_BUFFER_EMPTY && MODSERIAL_THR_HAS_SPACE ) { _THR = txc = (uint8_t)(buffer[TxIrq][buffer_out[TxIrq]]);