Skip to content
Snippets Groups Projects
Commit 8589b2fe authored by rswindell's avatar rswindell
Browse files

Bug-fix: if UART virtualization was disabled, input_thread would hang after the

first input character as it was attempting to use an uninitialized critical
section (mutex) while asserting the UART interrupt. As long as the UART
virtualization is enabled, this problem doesn't happen, even if don't actually
*use* the UART virtualization.
parent f68dcef8
No related branches found
No related tags found
No related merge requests found
......@@ -232,10 +232,13 @@ void _cdecl input_thread(void* arg)
continue;
}
RingBufWrite(&rdbuf,buf,count);
/* Set the "Data ready" bit in the LSR */
uart_lsr_reg |= UART_LSR_DATA_READY;
assert_interrupt(UART_IER_RX_DATA); /* assert rx data interrupt */
if(virtualize_uart) {
/* Set the "Data ready" bit in the LSR */
uart_lsr_reg |= UART_LSR_DATA_READY;
assert_interrupt(UART_IER_RX_DATA); /* assert rx data interrupt */
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment