aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass2023-10-01 19:15:23 -0600
committerTom Rini2023-12-13 18:39:05 -0500
commitcde03fa23e2fa47707ef81b9a91b1f4b631adbb7 (patch)
tree85b32c19c85c378aee63a32a4de70195671df265 /include
parentc0e708eb9f3f7b502c018d93f8d4daaaabb29fee (diff)
video: Add a function to clear the display
Move the code from the 'cls' command into the console file, so it can be called from elsewhere. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/console.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/console.h b/include/console.h
index ceb733b5cb6..e29817e57b0 100644
--- a/include/console.h
+++ b/include/console.h
@@ -156,6 +156,16 @@ int console_announce_r(void);
*/
void console_puts_select_stderr(bool serial_only, const char *s);
+/**
+ * console_clear() - Clear the console
+ *
+ * Uses an ANSI sequence to clear the display, failing back to clearing the
+ * video display directly if !CONFIG_VIDEO_ANSI
+ *
+ * Return: 0 if OK, -ve on error
+ */
+int console_clear(void);
+
/*
* CONSOLE multiplexing.
*/