summaryrefslogtreecommitdiff
path: root/common/uart_buffering.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-09-11 16:18:50 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-09-13 23:23:48 +0000
commit40f4d61266192f2ec439c943be7a945232efd388 (patch)
tree5bfa91bb3ec23da44134ac1af23ad92aae6cf198 /common/uart_buffering.c
parent6bfeb498552ea7f6f4dcbb670f291fd8c50e29bd (diff)
downloadchrome-ec-40f4d61266192f2ec439c943be7a945232efd388.tar.gz
Remove unused uart functions
Nothing ever called uart_flush_input() or uart_gets(), so remove them. They're dead code, and make implementing UART DMA input more complex. BUG=chrome-os-partner:20485 BRANCH=none TEST=build all platforms; pass unit tests Change-Id: I94c2c372ac3f326b98e819b2c89b8995311b2868 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/169345 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'common/uart_buffering.c')
-rw-r--r--common/uart_buffering.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/common/uart_buffering.c b/common/uart_buffering.c
index 3a55d10631..784e117503 100644
--- a/common/uart_buffering.c
+++ b/common/uart_buffering.c
@@ -240,21 +240,6 @@ void uart_flush_output(void)
uart_tx_flush();
}
-void uart_flush_input(void)
-{
- /* Disable interrupts */
- uart_disable_interrupt();
-
- /* Empty the hardware FIFO */
- uart_process_input();
-
- /* Clear the input buffer */
- rx_buf_tail = rx_buf_head;
-
- /* Re-enable interrupts */
- uart_enable_interrupt();
-}
-
int uart_getc(void)
{
int c;
@@ -278,33 +263,6 @@ int uart_getc(void)
return c;
}
-int uart_gets(char *dest, int size)
-{
- int got = 0;
- int c;
-
- /* Read characters */
- while (got < size - 1) {
- c = uart_getc();
-
- /* Stop on input buffer empty */
- if (c == -1)
- break;
-
- dest[got++] = c;
-
- /* Stop after newline */
- if (c == '\n')
- break;
- }
-
- /* Null-terminate */
- dest[got] = '\0';
-
- /* Return the length we got */
- return got;
-}
-
/*****************************************************************************/
/* Host commands */