Fixed bug #558.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7706 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
e068671a36
commit
e6c4363ddb
|
@ -165,11 +165,16 @@ static void serve_interrupt(SerialDriver *sdp) {
|
||||||
|
|
||||||
/* Data available.*/
|
/* Data available.*/
|
||||||
osalSysLockFromISR();
|
osalSysLockFromISR();
|
||||||
while (sr & USART_SR_RXNE) {
|
while (sr & (USART_SR_RXNE | USART_SR_ORE | USART_SR_NE | USART_SR_FE |
|
||||||
|
USART_SR_PE)) {
|
||||||
|
uint8_t b;
|
||||||
|
|
||||||
/* Error condition detection.*/
|
/* Error condition detection.*/
|
||||||
if (sr & (USART_SR_ORE | USART_SR_NE | USART_SR_FE | USART_SR_PE))
|
if (sr & (USART_SR_ORE | USART_SR_NE | USART_SR_FE | USART_SR_PE))
|
||||||
set_error(sdp, sr);
|
set_error(sdp, sr);
|
||||||
sdIncomingDataI(sdp, u->DR);
|
b = u->DR;
|
||||||
|
if (sr & USART_SR_RXNE)
|
||||||
|
sdIncomingDataI(sdp, b);
|
||||||
sr = u->SR;
|
sr = u->SR;
|
||||||
}
|
}
|
||||||
osalSysUnlockFromISR();
|
osalSysUnlockFromISR();
|
||||||
|
|
Loading…
Reference in New Issue