summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorHannes Petermaier <oe5hpm@oevsv.at>2015-02-03 13:22:25 +0100
committerTom Rini <trini@konsulko.com>2015-03-05 20:13:16 -0500
commit1b7caf1123facf67816b03675952a5c700d0db9e (patch)
treee8e3fefc30286b4b4ea700f4fed47ce28cd31c01 /common
parentd38d0c6a33c0ef087e030ca1731e485e854c05fa (diff)
downloadu-boot-imx-1b7caf1123facf67816b03675952a5c700d0db9e.zip
u-boot-imx-1b7caf1123facf67816b03675952a5c700d0db9e.tar.gz
u-boot-imx-1b7caf1123facf67816b03675952a5c700d0db9e.tar.bz2
common/lcd: Add command for writing to lcd-display
Sometimes we do not want redirect u-boot's console to screen but anyway we want write out some status information out of a u-boot script to the display. So we cannot use the normal "echo ....", instead we write explicitly using "lcdputs ..." for writing to the actual cursor position on LCD. Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
Diffstat (limited to 'common')
-rw-r--r--common/lcd_console.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/common/lcd_console.c b/common/lcd_console.c
index 5363232..8bf83b9 100644
--- a/common/lcd_console.c
+++ b/common/lcd_console.c
@@ -225,8 +225,26 @@ static int do_lcd_setcursor(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
+static int do_lcd_puts(cmd_tbl_t *cmdtp, int flag, int argc,
+ char *const argv[])
+{
+ if (argc != 2)
+ return CMD_RET_USAGE;
+
+ lcd_puts(argv[1]);
+
+ return 0;
+}
+
U_BOOT_CMD(
setcurs, 3, 1, do_lcd_setcursor,
"set cursor position within screen",
" <col> <row> in character"
);
+
+U_BOOT_CMD(
+ lcdputs, 2, 1, do_lcd_puts,
+ "print string on lcd-framebuffer",
+ " <string>"
+);
+