All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Petermaier <oe5hpm@oevsv.at>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] common/lcd: Add command for writing to lcd-display
Date: Tue,  3 Feb 2015 13:19:19 +0100	[thread overview]
Message-ID: <1422965980-3545-3-git-send-email-oe5hpm@oevsv.at> (raw)
In-Reply-To: <1422965980-3545-1-git-send-email-oe5hpm@oevsv.at>

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>

---
Changes for v2:
  - better understandable commit-message
  - rename "puts" into "lcdputs"
  - move code from lcd.c to lcd_console.c
---
 common/lcd_console.c |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

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>"
+);
+
-- 
1.7.10.4

  parent reply	other threads:[~2015-02-03 12:19 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03 12:19 [U-Boot] [PATCH v2] drivers/video/am335x-fb: Add possibility to wait for stable power/picture Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] common/lcd: Add command for setting cursor within lcd-console Hannes Petermaier
2015-02-03 12:34   ` Hannes Petermaier
2015-02-03 12:19 ` Hannes Petermaier [this message]
2015-02-03 12:34   ` [U-Boot] [PATCH v2] common/lcd: Add command for writing to lcd-display Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/common: Take usage of am335x LCD-Display Hannes Petermaier
2015-02-03 12:34   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/common: try to setup cpsw mac-address from the devicetree Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: Enable HW-Watchdog Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: Enable U-Boot BOOTCOUNT feature Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: Enable EXT4 support Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: Change pinmux for GPIO2_28 from GPIO to PWM-Timeroutput Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: Chg pinmux - use free NAND Pins in non NAND-config as GPIO Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: Chg Pinmux - enable UART1 pins Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/common: Introduce Network Console and common environment for it Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/common: Enable CONFIG_CMD_TIME Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/common: Add support for displaying BMP on LCD Hannes Petermaier
2015-02-03 12:36   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: Rework default-environment settings Hannes Petermaier
2015-02-03 12:36   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: cosmetic changes Hannes Petermaier
2015-02-03 12:36   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/kwb: switch to board HW-Rev3 Hannes Petermaier
2015-02-03 12:36   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/kwb: Support booting Linux Hannes Petermaier
2015-02-03 12:36   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/kwb: Redesign default-environment Hannes Petermaier
2015-02-03 12:36   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/kwb: Form a bootline for vxWorks Hannes Petermaier
2015-02-03 12:37   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/kwb: Support modify bootcmd through reset-controller Hannes Petermaier
2015-02-03 12:37   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] intern: disable lcd-stdout Hannes Petermaier
2015-02-03 12:37   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] intern: Add specific offset do FAT-Filesystem Hannes Petermaier
2015-02-03 12:37   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] intern: Add copy scripts and target specific helpers Hannes Petermaier
2015-02-03 12:37   ` Hannes Petermaier
2015-02-03 12:47     ` Heiko Schocher
2015-02-04  7:10       ` Hannes Petermaier
2015-02-04  7:33         ` Heiko Schocher
2015-02-04  7:50           ` Hannes Petermaier
2015-02-03 12:34 ` [U-Boot] [PATCH v2] drivers/video/am335x-fb: Add possibility to wait for stable power/picture Hannes Petermaier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1422965980-3545-3-git-send-email-oe5hpm@oevsv.at \
    --to=oe5hpm@oevsv.at \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.