1 // SPDX-License-Identifier: GPL-2.0+
5 * Copyright 2022 Google LLC
6 * Written by Simon Glass <sjg@chromium.org>
13 #include <video_console.h>
15 static int do_video_setcursor(struct cmd_tbl *cmdtp, int flag, int argc,
18 unsigned int col, row;
24 if (uclass_first_device_err(UCLASS_VIDEO_CONSOLE, &dev))
25 return CMD_RET_FAILURE;
26 col = dectoul(argv[1], NULL);
27 row = dectoul(argv[2], NULL);
28 vidconsole_position_cursor(dev, col, row);
33 static int do_video_puts(struct cmd_tbl *cmdtp, int flag, int argc,
42 if (uclass_first_device_err(UCLASS_VIDEO_CONSOLE, &dev))
43 return CMD_RET_FAILURE;
44 ret = vidconsole_put_string(dev, argv[1]);
46 ret = video_sync(dev->parent, false);
48 return ret ? CMD_RET_FAILURE : 0;
52 setcurs, 3, 1, do_video_setcursor,
53 "set cursor position within screen",
54 " <col> <row> in character"
58 lcdputs, 2, 1, do_video_puts,
59 "print string on video framebuffer",