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>
59 lines
906 B
ReStructuredText
59 lines
906 B
ReStructuredText
.. SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
.. index::
|
|
single: lcdputs (command)
|
|
|
|
lcdputs command
|
|
===============
|
|
|
|
Synopsis
|
|
--------
|
|
|
|
::
|
|
|
|
lcdputs <string>
|
|
|
|
Description
|
|
-----------
|
|
|
|
The lcdputs command prints a string to the video framebuffer at the current
|
|
cursor position.
|
|
|
|
string
|
|
Text string to display on the video console
|
|
|
|
Examples
|
|
--------
|
|
|
|
Print a simple string::
|
|
|
|
=> lcdputs "Hello World"
|
|
|
|
Combine with setcurs to position text::
|
|
|
|
=> setcurs 10 5
|
|
=> lcdputs "Positioned text"
|
|
|
|
Print multiple lines::
|
|
|
|
=> setcurs 0 0
|
|
=> lcdputs "Line 1"
|
|
=> setcurs 0 1
|
|
=> lcdputs "Line 2"
|
|
|
|
Configuration
|
|
-------------
|
|
|
|
The lcdputs command is available if CONFIG_CMD_VIDEO=y.
|
|
|
|
See also
|
|
--------
|
|
|
|
* :doc:`video` - video command with subcommands
|
|
* :doc:`setcurs` - set cursor position
|
|
|
|
Return value
|
|
------------
|
|
|
|
The return value $? is 0 (true) on success, 1 (false) on failure.
|