From: Nikita Kiryanov <nikita@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/4] common/lcd_console: move single static variables into common (static) structure
Date: Sun, 15 Mar 2015 20:57:08 +0200 [thread overview]
Message-ID: <5505D604.8080702@compulab.co.il> (raw)
In-Reply-To: <1426078645-4901-4-git-send-email-oe5hpm@oevsv.at>
Hi Hannes,
On 03/11/2015 02:57 PM, Hannes Petermaier wrote:
> From: Hannes Petermaier <hannes.petermaier@br-automation.com>
>
> For coming implementation of lcd_console rotation, we will need some more
> variables for holding information about framebuffer size, rotation, ...
>
> For better readability we catch all them into a common structure.
>
> Signed-off-by: Hannes Petermaier <hannes.petermaier@br-automation.com>
> Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
> ---
>
> common/lcd_console.c | 76 +++++++++++++++++++++++++-------------------------
> 1 file changed, 38 insertions(+), 38 deletions(-)
>
> diff --git a/common/lcd_console.c b/common/lcd_console.c
> index b7dda7a..cac77be 100644
> --- a/common/lcd_console.c
> +++ b/common/lcd_console.c
> @@ -11,48 +11,49 @@
> #include <video_font.h> /* Get font data, width and height */
>
> #define CONSOLE_ROW_SIZE (VIDEO_FONT_HEIGHT * lcd_line_length)
> -#define CONSOLE_ROW_FIRST lcd_console_address
> -#define CONSOLE_SIZE (CONSOLE_ROW_SIZE * console_rows)
> +#define CONSOLE_ROW_FIRST cons.lcd_address
> +#define CONSOLE_SIZE (CONSOLE_ROW_SIZE * cons.rows)
>
> -static short console_curr_col;
> -static short console_curr_row;
> -static short console_cols;
> -static short console_rows;
> -static void *lcd_console_address;
> +struct console_t {
> + short curr_col, curr_row;
> + short cols, rows;
> + void *lcd_address;
Can this be void *base_address? I think that's a bit more descriptive.
Other than that,
Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
> +};
--
Regards,
Nikita Kiryanov
next prev parent reply other threads:[~2015-03-15 18:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 12:57 [U-Boot] [PATCH 0/4] Introduce lcd_console rotation Hannes Petermaier
2015-03-11 12:57 ` [U-Boot] [PATCH 1/4] common/lcd_console: cleanup lcd_drawchars/lcd_putc_xy Hannes Petermaier
2015-03-15 18:56 ` Nikita Kiryanov
2015-03-11 12:57 ` [U-Boot] [PATCH 2/4] common/lcd_console: ask only one-time for bg/fg-color per call Hannes Petermaier
2015-03-15 18:54 ` Nikita Kiryanov
2015-03-11 12:57 ` [U-Boot] [PATCH 3/4] common/lcd_console: move single static variables into common (static) structure Hannes Petermaier
2015-03-15 18:57 ` Nikita Kiryanov [this message]
2015-03-16 6:32 ` Hannes Petermaier
2015-03-11 12:57 ` [U-Boot] [PATCH 4/4] common/lcd_console: introduce display/framebuffer rotation Hannes Petermaier
2015-03-12 12:26 ` Igor Grinberg
2015-03-12 16:46 ` Hannes Petermaier
2015-03-15 8:34 ` Igor Grinberg
2015-03-16 8:32 ` Hannes Petermaier
2015-03-16 11:35 ` Igor Grinberg
2015-03-16 16:48 ` Nikita Kiryanov
2015-03-15 18:56 ` Nikita Kiryanov
2015-03-16 6:47 ` 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=5505D604.8080702@compulab.co.il \
--to=nikita@compulab.co.il \
--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.