mode_cardemu: mask the USART status register with mask register

otherwise it might be reacting on stale bits in CSR, which actually are
no longer able to cause any interrupts.
This commit is contained in:
Harald Welte committed 2016-03-17 21:14:04 +01:00
1 parent 3d27c84635
commit da15ca01bf
1 file changed
+1 -1
+1 -1
View File
@@ -145,7 +145,7 @@ void usart_irq_rx(uint8_t uart)
if (uart == 1)
ci = &cardem_inst[1];
#endif
csr = usart->US_CSR;
csr = usart->US_CSR & usart->US_IMR;
if (csr & US_CSR_RXRDY) {
byte = (usart->US_RHR) & 0xFF;