diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-08-01 14:36:43 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-08-02 17:32:26 -0700 |
commit | 889f7bdd3b77151dd5b749974c94a84ae8b2aeb8 (patch) | |
tree | 3973fd501c819b66d0504514fd7c6f2aada28b0e /board/link | |
parent | 078dfabb68be3573185bffdd79ef0f079002ee1e (diff) | |
download | chrome-ec-889f7bdd3b77151dd5b749974c94a84ae8b2aeb8.tar.gz |
Move input character processing from UART interrupt to console task
Previously, processing of arrow keys and control characters was done
in the interrupt handler itself. This increased the impact of UART
input on other interrupts and high-priority tasks. It also makes it
harder to implement DMA-based UART input on STM32L (in an imminent
CL), since the processing affected the circular UART input buffer
in-place.
This change turns uart_buffering.c back into a dumb I/O buffering
module, and puts all the command line editing and history support into
console.c.
Console history is done via a simple array of input lines instead of a
packed circular buffer of characters. This is a little less
RAM-efficient, but is easier to implement and read. History depth is
controlled via CONFIG_CONSOLE_HISTORY, and is 3 for STM32F and 8 for
other platforms. If we really need a greater history depth, we can
look into implementing a packed circular buffer again, but this time
at task time in console.c. Also added a 'history' command to print
the current console history.
BUG=chrome-os-partner:20485
BRANCH=none
TEST=console_edit unit test passes; 'history' command prints the last commands
Change-Id: I142a0be0d67718c58341e4569f4e2908f191d8b0
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/64363
Reviewed-by: Vic Yang <victoryang@chromium.org>
Diffstat (limited to 'board/link')
0 files changed, 0 insertions, 0 deletions