All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Petermaier <Hannes.Petermaier@br-automation.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 02/21] common/lcd: Add command for setting cursor within lcd-framework
Date: Mon, 2 Feb 2015 08:32:52 +0100	[thread overview]
Message-ID: <OF9057F6F7.D05A601D-ONC1257DE0.0028B9A8-C1257DE0.00297674@br-automation.com> (raw)
In-Reply-To: <54CE3CD3.1030206@compulab.co.il>

"U-Boot" <u-boot-bounces@lists.denx.de> schrieb am 01.02.2015 15:48:51:

> From: Nikita Kiryanov <nikita@compulab.co.il>
> To: Hannes Petermaier <oe5hpm@oevsv.at>, u-boot at lists.denx.de
> Date: 01.02.2015 15:49
> Subject: Re: [U-Boot] [PATCH 02/21] common/lcd: Add command for setting 
cursor
> within lcd-framework
> Sent by: "U-Boot" <u-boot-bounces@lists.denx.de>
> 
> Hi Hannes,
Hi Nikita,

> 
> On 01/30/2015 03:25 PM, Hannes Petermaier wrote:
> > We need this function if we want to make some outputs i.e position the 
writing
> > cursor out of u-boot scripts.
> 
> This commit message is inaccurate. Positioning the writing cursor is not 
in 
> itself output.
> Also, what is the use case for such a command?
> 
I want to set the "cursor" on the screen to a specific position and write 
there something
with "puts".

For example:

setcurs 1 9;            sets the cursor to first column and 9th row
puts "Hello World!"     writes the text to the cursor.

> >
> > Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
> > ---
> >   common/lcd.c |   21 +++++++++++++++++++++
> >   1 file changed, 21 insertions(+)
> >
> > diff --git a/common/lcd.c b/common/lcd.c
> > index cc34b8a..f418da9 100644
> > --- a/common/lcd.c
> > +++ b/common/lcd.c
> > @@ -279,12 +279,33 @@ static int do_lcd_clear(cmd_tbl_t *cmdtp, int 
flag, int argc,
> >      return 0;
> >   }
> >
> > +static int do_lcd_setcursor(cmd_tbl_t *cmdtp, int flag, int argc,
> > +             char *const argv[])
> > +{
> > +   unsigned int col, row;
> > +
> > +   if (argc != 3)
> > +      return CMD_RET_USAGE;
> > +
> > +   col = simple_strtoul(argv[1], NULL, 10);
> > +   row = simple_strtoul(argv[2], NULL, 10);
> > +   lcd_position_cursor(col, row);
> > +
> > +   return 0;
> > +}
> > +
> >   U_BOOT_CMD(
> >      cls,   1,   1,   do_lcd_clear,
> >      "clear screen",
> >      ""
> >   );
> >
> > +U_BOOT_CMD(
> > +   setcurs, 3,   1,   do_lcd_setcursor,
> > +   "sets cursor for 'puts'",
> > +   "    <col> <row> in character"
> > +);
> > +
> 
> I think it would be better if the U_BOOT_CMD macros were adjacent to the 
functions they
> use. Also, I think this command is better suited for the lcd_console.c 
file.

You're maybe right. Only thing for decission was, that existing commands 
are allready defined within
lcd.c. But i've no problem to move it. What do you say? let's move?

> 
> > 
/*----------------------------------------------------------------------*/
> >
> >   static int lcd_init(void *lcdbase)
> >
> 
> -- 
> Regards,
> Nikita Kiryanov

best regards,
Hannes

  reply	other threads:[~2015-02-02  7:32 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30 13:25 [U-Boot] [PATCH 01/21] drivers/video/am335x-fb: Add possibility to wait for stable power/picture Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 02/21] common/lcd: Add command for setting cursor within lcd-framework Hannes Petermaier
2015-02-01 14:48   ` Nikita Kiryanov
2015-02-02  7:32     ` Hannes Petermaier [this message]
2015-02-03 11:52       ` Nikita Kiryanov
2015-01-30 13:25 ` [U-Boot] [PATCH 03/21] common/lcd: Add command for writing to lcd-display Hannes Petermaier
2015-02-01 14:53   ` Nikita Kiryanov
2015-02-02  7:37     ` Hannes Petermaier
2015-02-03 11:53       ` Nikita Kiryanov
2015-01-30 13:25 ` [U-Boot] [PATCH 04/21] board/BuR/common: Take usage of am335x LCD-Display Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 05/21] board/BuR/common: try to setup cpsw mac-address from the devicetree Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 06/21] board/BuR/tseries: Enable HW-Watchdog Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 07/21] board/BuR/tseries: Enable U-Boot BOOTCOUNT feature Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 08/21] board/BuR/tseries: Enable EXT4 support Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 09/21] board/BuR/tseries: Change pinmux for GPIO2_28 from GPIO to PWM-Timeroutput Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 10/21] board/BuR/tseries: Chg pinmux - use free NAND Pins in non NAND-config as GPIO Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 11/21] board/BuR/tseries: Chg Pinmux - enable UART1 pins Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 12/21] board/BuR/common: Introduce Network Console and common environment for it Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 13/21] board/BuR/common: Enable CONFIG_CMD_TIME Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 14/21] board/BuR/common: Add support for displaying BMP on LCD Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 15/21] board/BuR/tseries: Rework default-environment settings Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 16/21] board/BuR/tseries: cosmetic changes Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 17/21] board/BuR/kwb: switch to board HW-Rev3 Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 18/21] board/BuR/kwb: Support booting Linux Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 19/21] board/BuR/kwb: Redesign default-environment Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 20/21] board/BuR/kwb: Form a bootline for vxWorks Hannes Petermaier
2015-01-30 13:25 ` [U-Boot] [PATCH 21/21] board/BuR/kwb: Support modify bootcmd through reset-controller 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=OF9057F6F7.D05A601D-ONC1257DE0.0028B9A8-C1257DE0.00297674@br-automation.com \
    --to=hannes.petermaier@br-automation.com \
    --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.