BV UART: discard input used to interrupt a process
This commit is contained in:
parent
478e8dafb6
commit
867aef09e3
|
@ -307,6 +307,9 @@ static void busvoodoo_uart_generic_write(uint8_t value)
|
|||
// display data send
|
||||
printf("write: '%c'/0x%02x\n", value, value);
|
||||
}
|
||||
if (user_input_available) { // user interrupted flow
|
||||
user_input_get(); // discard user input
|
||||
}
|
||||
if (busvoodoo_uart_generic_specific->tx_post) {
|
||||
(*busvoodoo_uart_generic_specific->tx_post)();
|
||||
}
|
||||
|
@ -346,6 +349,9 @@ static void busvoodoo_uart_generic_read(void)
|
|||
printf(" error)");
|
||||
}
|
||||
printf("\n");
|
||||
if (user_input_available) { // user interrupted flow
|
||||
user_input_get(); // discard user input
|
||||
}
|
||||
if (busvoodoo_uart_generic_specific->rx_post) {
|
||||
(*busvoodoo_uart_generic_specific->rx_post)();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue