1 // SPDX-License-Identifier: GPL-2.0+
5 * Copyright 2022 Google LLC
12 #include <video_console.h>
14 static int do_video_setcursor(struct cmd_tbl *cmdtp, int flag, int argc,
17 unsigned int col, row;
23 if (uclass_first_device_err(UCLASS_VIDEO_CONSOLE, &dev))
24 return CMD_RET_FAILURE;
25 col = dectoul(argv[1], NULL);
26 row = dectoul(argv[2], NULL);
27 vidconsole_position_cursor(dev, col, row);
32 static int do_video_puts(struct cmd_tbl *cmdtp, int flag, int argc,
41 if (uclass_first_device_err(UCLASS_VIDEO_CONSOLE, &dev))
42 return CMD_RET_FAILURE;
43 ret = vidconsole_put_string(dev, argv[1]);
45 ret = video_sync(dev->parent, false);
47 return ret ? CMD_RET_FAILURE : 0;
51 setcurs, 3, 1, do_video_setcursor,
52 "set cursor position within screen",
53 " <col> <row> in character"
57 lcdputs, 2, 1, do_video_puts,
58 "print string on video framebuffer",