diff options
author | Yuval Peress <peress@chromium.org> | 2021-04-01 22:28:09 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-15 00:36:23 +0000 |
commit | 783543b32a03598228439affb257dfeeea38779e (patch) | |
tree | 5f8e5062fc547a8de7ab0490f6a41eb84550638e /include/console.h | |
parent | 483e42d53b0ffe78b1d24607d39eb31bc7e80c79 (diff) | |
download | chrome-ec-783543b32a03598228439affb257dfeeea38779e.tar.gz |
zephyr: use interrupt based RX buffering
Poll-based RX was technically incorrect since Zephyr was setting up
the UART to FIFO mode (instead of byte mode). This change replaces
polling the RX UART with interrupt based callbacks. When calling
uart_shell_stop(), the ISR will be replaced and will instead queue
items to a ring buffer which can be read from uart_getc() (it can
also be cleared via the uart_clear_input() function).
BRANCH=none
BUG=b:181352041
TEST=Build volteer, run, see expected 0xec07 from the GSC.
Cq-Depend: chromium:2730870, chromium:2730869
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I5d2b61e914b56f678a259b373969522da87e8df3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2728824
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'include/console.h')
-rw-r--r-- | include/console.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/console.h b/include/console.h index f517d3e074..91800103b6 100644 --- a/include/console.h +++ b/include/console.h @@ -23,11 +23,12 @@ * briefly taking control of the uart. */ #ifdef CONFIG_ZEPHYR -void uart_shell_stop(void); +int uart_shell_stop(void); void uart_shell_start(void); #else -static inline void uart_shell_stop(void) +static inline int uart_shell_stop(void) { + return 0; } static inline void uart_shell_start(void) { |