summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2025-04-02 06:29:42 +1300
committerTom Rini <trini@konsulko.com>2025-05-02 13:40:25 -0600
commitcb32266d4aeca4a730c1f8b85c981a8793d768c4 (patch)
tree4b39ca010379be73965bfc1e0d0f77ad6c0af503 /include
parent7320a2cb9439c8bab3b8612ec37406cad5bb646c (diff)
video: Allow console output to be silenced
When using expo we want to be able to control the information on the display and avoid other messages (such as USB scanning) appearing. Add a 'quiet' flag for the console, to help with this. The test is a little messy since stdio is still using the original vidconsole create on start-up. So take care to use the same. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/video_console.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/video_console.h b/include/video_console.h
index e4fc776e2d3..8f3f58f3aa9 100644
--- a/include/video_console.h
+++ b/include/video_console.h
@@ -53,6 +53,7 @@ enum {
* @row_saved: Saved Y position in pixels (0=top)
* @escape_buf: Buffer to accumulate escape sequence
* @utf8_buf: Buffer to accumulate UTF-8 byte sequence
+ * @quiet: Suppress all output from stdio
*/
struct vidconsole_priv {
struct stdio_dev sdev;
@@ -77,6 +78,7 @@ struct vidconsole_priv {
int col_saved;
char escape_buf[32];
char utf8_buf[5];
+ bool quiet;
};
/**
@@ -584,4 +586,12 @@ void vidconsole_list_fonts(struct udevice *dev);
*/
int vidconsole_get_font_size(struct udevice *dev, const char **name, uint *sizep);
+/**
+ * vidconsole_set_quiet() - Select whether the console should output stdio
+ *
+ * @dev: vidconsole device
+ * @quiet: true to suppress stdout/stderr output, false to enable it
+ */
+void vidconsole_set_quiet(struct udevice *dev, bool quiet);
+
#endif