We need this function if we want to make some outputs out of u-boot scripts.

Signed-off-by: Hannes Petermaier <[email protected]>
---
 common/lcd.c |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/common/lcd.c b/common/lcd.c
index f418da9..755388f 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -279,6 +279,17 @@ static int do_lcd_clear(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;
+}
+
 static int do_lcd_setcursor(cmd_tbl_t *cmdtp, int flag, int argc,
                            char *const argv[])
 {
@@ -306,6 +317,12 @@ U_BOOT_CMD(
        "    <col> <row> in character"
 );
 
+U_BOOT_CMD(
+       puts,   2,      1,      do_lcd_puts,
+       "print string on lcd-framebuffer",
+       "    <string>"
+);
+
 /*----------------------------------------------------------------------*/
 
 static int lcd_init(void *lcdbase)
-- 
1.7.9.5

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to