diff options
Diffstat (limited to 'common/uart_buffering.c')
-rw-r--r-- | common/uart_buffering.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/uart_buffering.c b/common/uart_buffering.c index 2b83cb7cfc..86d9f1df92 100644 --- a/common/uart_buffering.c +++ b/common/uart_buffering.c @@ -219,6 +219,14 @@ void uart_process_input(void) console_has_input(); } +void uart_clear_input(void) +{ + int scratch __attribute__ ((unused)); + while (uart_rx_available()) + scratch = uart_read_char(); + rx_buf_head = rx_buf_tail = 0; +} + #endif /* !CONFIG_UART_RX_DMA */ int uart_putc(int c) |