video: Add video command with subcommands

Add a new 'video' command with 'setcursor' and 'puts' subcommands that
provide an alternative interface to the existing setcurs and lcdputs
commands.

Update the test is updated to test both the legacy commands and the new
'video' command.

Series-changes: 2
- Correct confusing output text which should be 16 instead of 10
- Improve docs for row and col

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-10-01 13:43:57 -06:00
parent a85820f86c
commit 8db8f801ae
6 changed files with 88 additions and 0 deletions

View File

@@ -58,3 +58,11 @@ U_BOOT_CMD(
"print string on video framebuffer",
" <string>"
);
U_BOOT_LONGHELP(video,
"setcursor <col> <row> - Set cursor position\n"
"video puts <string> - Write string at current position");
U_BOOT_CMD_WITH_SUBCMDS(video, "Video commands", video_help_text,
U_BOOT_SUBCMD_MKENT(setcursor, 3, 1, do_video_setcursor),
U_BOOT_SUBCMD_MKENT(puts, 2, 1, do_video_puts));