[PATCH v2 16/36] video: Export vidconsole_entry_start()

Simon Glass sjg at chromium.org
Mon Oct 2 03:13:20 CEST 2023


At present this is called only when a newline is detected, since this
indicates the start of a line of text being entered.

Export this function so it can be used by expo, which may start a new
text line itself, without first writing out a newline.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 drivers/video/vidconsole-uclass.c | 2 +-
 include/video_console.h           | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index 07427ba346b0..2f3f685a55c9 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -48,7 +48,7 @@ int vidconsole_set_row(struct udevice *dev, uint row, int clr)
 	return ops->set_row(dev, row, clr);
 }
 
-static int vidconsole_entry_start(struct udevice *dev)
+int vidconsole_entry_start(struct udevice *dev)
 {
 	struct vidconsole_ops *ops = vidconsole_get_ops(dev);
 
diff --git a/include/video_console.h b/include/video_console.h
index 28d65451889a..87f9a588575d 100644
--- a/include/video_console.h
+++ b/include/video_console.h
@@ -399,6 +399,15 @@ int vidconsole_move_rows(struct udevice *dev, uint rowdst, uint rowsrc,
  */
 int vidconsole_set_row(struct udevice *dev, uint row, int clr);
 
+/**
+ * vidconsole_entry_start() - Set the start position of a vidconsole line
+ *
+ * Marks the current cursor position as the start of a line
+ *
+ * @dev:	Device to adjust
+ */
+int vidconsole_entry_start(struct udevice *dev);
+
 /**
  * vidconsole_put_char() - Output a character to the current console position
  *
-- 
2.42.0.582.g8ccd20d70d-goog



More information about the U-Boot mailing list