From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Kiryanov Date: Sun, 01 Feb 2015 16:53:20 +0200 Subject: [U-Boot] [PATCH 03/21] common/lcd: Add command for writing to lcd-display In-Reply-To: <1422624324-15431-3-git-send-email-oe5hpm@oevsv.at> References: <1422624324-15431-1-git-send-email-oe5hpm@oevsv.at> <1422624324-15431-3-git-send-email-oe5hpm@oevsv.at> Message-ID: <54CE3DE0.7040801@compulab.co.il> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Hannes, On 01/30/2015 03:25 PM, Hannes Petermaier wrote: > We need this function if we want to make some outputs out of u-boot scripts. > I think this commit message is missing information. What makes this necessary? Why can't your script use regular echo commands with the lcd console enabled? > Signed-off-by: Hannes Petermaier > --- > 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( > " in character" > ); > > +U_BOOT_CMD( > + puts, 2, 1, do_lcd_puts, "puts" is too generic for an lcd specific function. I would expect to see something with an "lcd" prefix. Also, this code seems better suited for lcd_console.c > + "print string on lcd-framebuffer", > + " " > +); > + > /*----------------------------------------------------------------------*/ > > static int lcd_init(void *lcdbase) > -- Regards, Nikita Kiryanov