1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

dm: video: Add basic ANSI escape sequence support

Really just the subset that is needed by efi_console.  Perhaps more will
be added later, for example color support would be useful to implement
efi_cout_set_attribute().

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Rob Clark
2017-09-13 18:12:21 -04:00
committed by Anatolij Gustschin
parent 889808da9b
commit a085aa1f27
5 changed files with 135 additions and 3 deletions

View File

@@ -29,6 +29,9 @@
* @xsize_frac: Width of the display in fractional units
* @xstart_frac: Left margin for the text console in fractional units
* @last_ch: Last character written to the text console on this line
* @escape: TRUE if currently accumulating an ANSI escape sequence
* @escape_len: Length of accumulated escape sequence so far
* @escape_buf: Buffer to accumulate escape sequence
*/
struct vidconsole_priv {
struct stdio_dev sdev;
@@ -42,6 +45,14 @@ struct vidconsole_priv {
int xsize_frac;
int xstart_frac;
int last_ch;
/*
* ANSI escape sequences are accumulated character by character,
* starting after the ESC char (0x1b) until the entire sequence
* is consumed at which point it is acted upon.
*/
int escape;
int escape_len;
char escape_buf[32];
};
/**