summaryrefslogtreecommitdiff
path: root/include/video_console.h
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2019-05-17 20:22:31 +0200
committerAnatolij Gustschin <agust@denx.de>2019-05-20 12:00:05 +0200
commite63168a9ffae18f807f59925bb5d9d4623633e46 (patch)
tree7dfc643cd5bb6cccc7725870098c36f25216b29c /include/video_console.h
parentb5e1a82e924d18d4134757e39a1f26e473f80e0b (diff)
video: Factor out vidconsole_put_string()
Pull the vidconsole_put_string() function from DM tests, make it available to e.g. boards that want to display information on the LCD on boot. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Reviewed-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'include/video_console.h')
-rw-r--r--include/video_console.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/video_console.h b/include/video_console.h
index 52a41ac200..0936ceaaf1 100644
--- a/include/video_console.h
+++ b/include/video_console.h
@@ -215,6 +215,22 @@ int vidconsole_set_row(struct udevice *dev, uint row, int clr);
int vidconsole_put_char(struct udevice *dev, char ch);
/**
+ * vidconsole_put_string() - Output a string to the current console position
+ *
+ * Outputs a string to the console and advances the cursor. This function
+ * handles wrapping to new lines and scrolling the console. Special
+ * characters are handled also: \n, \r, \b and \t.
+ *
+ * The device always starts with the cursor at position 0,0 (top left). It
+ * can be adjusted manually using vidconsole_position_cursor().
+ *
+ * @dev: Device to adjust
+ * @str: String to write
+ * @return 0 if OK, -ve on error
+ */
+int vidconsole_put_string(struct udevice *dev, const char *str);
+
+/**
* vidconsole_position_cursor() - Move the text cursor
*
* @dev: Device to adjust