Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MODSERIAL by
Diff: ISR_RX.cpp
- Revision:
- 4:28de979b77cf
- Parent:
- 2:b936b4acbd92
- Child:
- 8:775f860e94d3
--- 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