summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVic Yang <victoryang@google.com>2012-02-01 17:25:01 +0800
committerVic Yang <victoryang@google.com>2012-02-07 10:23:59 +0800
commit730f099c83b67861a269560e2bb5da1bd6bee503 (patch)
treef31cbcfcc2eeac7f387e7c11a53aa3960c28c28c /include
parentd3e1de758cfa3a7dd990f0fb63eddbb1ae870418 (diff)
downloadchrome-ec-730f099c83b67861a269560e2bb5da1bd6bee503.tar.gz
Handle up/down arrow keys for UART console.
Record commands used previously and use up/down arrow key to navigate in the command history. Also removed the command '.' of repeating last command as we can use up arrow key now. Also changed the behaviour of uart_write_char() to be blocking on transmit FIFO full, so that we do not lose echoed character and do not need to flush. BUG=chrome-os-partner:7815 TEST=Type 'help' and enter. Then type 'aaaa' and up arrow key, should show 'help', and pressing enter prints help. Type 'hellp' and enter. Then type 'aaaaaa' and up arrow key, should show 'hellp'. Should be able to use left/right arrow key and backspace to correct it to 'help', and pressing enter prints help. Type 'help' and enter. Then type 'aaa', up arrow key, and down arrow key. Should show 'aaa'. Change-Id: I65c615d61bf63acb31bea329aa91a3202d4db0ad
Diffstat (limited to 'include')
-rw-r--r--include/uart.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uart.h b/include/uart.h
index 163dce5726..334ee624bb 100644
--- a/include/uart.h
+++ b/include/uart.h
@@ -123,6 +123,7 @@ int uart_rx_available(void);
/**
* Sends a character to the UART data register.
+ * If the transmit FIFO is full, this function blocks until there is space.
*
* c : byte to send.
*/