diff options
author | Simon Glass | 2022-10-06 08:36:04 -0600 |
---|---|---|
committer | Anatolij Gustschin | 2022-10-30 09:53:47 +0100 |
commit | 6b6dc0d2fbf8b036d7ee278071036c7479074b32 (patch) | |
tree | b333e6f2bb40d90f2ba48686c1b7531e20858398 /include/video_console.h | |
parent | a032e4b55ea717fb931dd0d4754cf72b9bafe2f4 (diff) |
video: Provide a function to set the cursor position
Add an exported function which allows the cursor position to be set to
pixel granularity. Make use of this in the existing code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/video_console.h')
-rw-r--r-- | include/video_console.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/video_console.h b/include/video_console.h index 72edd419191..76c4b10acf6 100644 --- a/include/video_console.h +++ b/include/video_console.h @@ -219,6 +219,18 @@ int vidconsole_put_string(struct udevice *dev, const char *str); void vidconsole_position_cursor(struct udevice *dev, unsigned col, unsigned row); +/** + * vidconsole_set_cursor_pos() - set cursor position + * + * The cursor is set to the new position and the start-of-line information is + * updated to the same position, so that a newline will return to @x + * + * @dev: video console device to update + * @x: x position from left in pixels + * @y: y position from top in pixels + */ +void vidconsole_set_cursor_pos(struct udevice *dev, int x, int y); + #ifdef CONFIG_VIDEO_COPY /** * vidconsole_sync_copy() - Sync back to the copy framebuffer |