diff options
author | Randall Spangler <rspangler@chromium.org> | 2011-12-09 13:55:27 -0800 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2011-12-12 14:12:09 -0800 |
commit | 70c3e30b633b530acb913a99d7cb602c9e8baf99 (patch) | |
tree | c431e759327c7740d9e2f2d7307a186305887652 /include | |
parent | 6995d4771f7c07b08948c867f4ec0de309ed925e (diff) | |
download | chrome-ec-70c3e30b633b530acb913a99d7cb602c9e8baf99.tar.gz |
Clean up UART code
LPC module no longer directly talks to UART registers, and vice-versa.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=none
TEST='ectool sertest' on target system
Change-Id: Id070c0d849bdfe91c752e0af651d357b695d2648
(cherry picked from commit ab8c3c2b8e3b08a4bf5573cda3a12dd3a384e67d)
Diffstat (limited to 'include')
-rw-r--r-- | include/lpc.h | 6 | ||||
-rw-r--r-- | include/uart.h | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/include/lpc.h b/include/lpc.h index 9fa68381a3..8cf87668f6 100644 --- a/include/lpc.h +++ b/include/lpc.h @@ -25,4 +25,10 @@ uint8_t *lpc_get_host_range(int slot); * commands, 1 for usermode-originated commands. */ void lpc_send_host_response(int slot, int status); +/* Returns non-zero if the COMx interface has received a character. */ +int lpc_comx_has_char(void); + +/* Returns the next character pending on the COMx interface. */ +int lpc_comx_get_char(void); + #endif /* __CROS_EC_LPC_H */ diff --git a/include/uart.h b/include/uart.h index 12ecf7a1a6..75ff43e9e7 100644 --- a/include/uart.h +++ b/include/uart.h @@ -109,4 +109,13 @@ int uart_gets(char *dest, int size); /* TODO: getc(), putc() equivalents? */ +/*****************************************************************************/ +/* COMx functions */ + +/* Returns non-zero if ok to put a character via uart_comx_putc(). */ +int uart_comx_putc_ok(void); + +/* Puts a character to the COMx interface. */ +void uart_comx_putc(int c); + #endif /* __CROS_EC_UART_H */ |