Delayed LED control using bools to save input values
Fork of MODSERIAL by
Diff: ISR_RX.cpp
- Revision:
- 4:28de979b77cf
- Parent:
- 2:b936b4acbd92
- Child:
- 8:775f860e94d3
diff -r 0f10f536456e -r 28de979b77cf ISR_RX.cpp --- a/ISR_RX.cpp Sun Nov 21 13:58:53 2010 +0000 +++ b/ISR_RX.cpp Sun Nov 21 14:44:02 2010 +0000 @@ -30,26 +30,24 @@ { if (! _base ) return; - if ( dmaInUse[RxIrq] == NotInUse ) { - while( MODSERIAL_RBR_HAS_DATA ) { - rxc = (char)(_RBR & 0xFF); - if ( MODSERIAL_RX_BUFFER_FULL ) { - buffer_overflow[RxIrq] = rxc; // Oh dear, no room in buffer. - _isr[RxOvIrq].call(); - } - else { - if (buffer[RxIrq] != (char *)NULL) { - buffer[RxIrq][buffer_in[RxIrq]] = rxc; - buffer_count[RxIrq]++; - buffer_in[RxIrq]++; - if (buffer_in[RxIrq] >= buffer_size[RxIrq]) { - buffer_in[RxIrq] = 0; - } - } - _isr[RxIrq].call(); - } + while( MODSERIAL_RBR_HAS_DATA ) { + rxc = (char)(_RBR & 0xFF); + if ( MODSERIAL_RX_BUFFER_FULL ) { + buffer_overflow[RxIrq] = rxc; // Oh dear, no room in buffer. + _isr[RxOvIrq].call(); + } + else { + if (buffer[RxIrq] != (char *)NULL) { + buffer[RxIrq][buffer_in[RxIrq]] = rxc; + buffer_count[RxIrq]++; + buffer_in[RxIrq]++; + if (buffer_in[RxIrq] >= buffer_size[RxIrq]) { + buffer_in[RxIrq] = 0; + } + } + _isr[RxIrq].call(); } - } + } } }; // namespace AjK ends