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

@@ -1097,6 +1097,11 @@ static int dm_test_video_cmd(struct unit_test_state *uts)
ut_asserteq(187, video_compress_fb(uts, dev, false));
ut_assertok(video_check_copy_fb(uts, dev));
ut_assertok(run_command("video setcursor 0 0", 0));
ut_assertok(run_command("video puts \"Top left\"", 0));
ut_asserteq(272, video_compress_fb(uts, dev, false));
ut_assertok(video_check_copy_fb(uts, dev));
return 0;
}
DM_TEST(dm_test_video_cmd, UTF_SCAN_PDATA | UTF_SCAN_FDT);