Skip to content
Snippets Groups Projects
Commit a202c5bd authored by Hannes Petermaier's avatar Hannes Petermaier Committed by Anatolij Gustschin
Browse files

common/lcd_console: ask only one-time for bg/fg-color per call


Don't call the lcd_getfgcolor and lcd_getbgcolor within the "draw-loop", this
only wastes time.

Signed-off-by: default avatarHannes Petermaier <hannes.petermaier@br-automation.com>
Signed-off-by: default avatarHannes Petermaier <oe5hpm@oevsv.at>
Acked-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
parent 97562c12
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,8 @@ static void lcd_putc_xy(ushort x, ushort y, char c) ...@@ -59,7 +59,8 @@ static void lcd_putc_xy(ushort x, ushort y, char c)
{ {
uchar *dest; uchar *dest;
ushort row; ushort row;
int fg_color, bg_color; int fg_color = lcd_getfgcolor();
int bg_color = lcd_getbgcolor();
int i; int i;
dest = (uchar *)(lcd_console_address + dest = (uchar *)(lcd_console_address +
...@@ -73,10 +74,6 @@ static void lcd_putc_xy(ushort x, ushort y, char c) ...@@ -73,10 +74,6 @@ static void lcd_putc_xy(ushort x, ushort y, char c)
#else #else
uchar *d = dest; uchar *d = dest;
#endif #endif
fg_color = lcd_getfgcolor();
bg_color = lcd_getbgcolor();
uchar bits; uchar bits;
bits = video_fontdata[c * VIDEO_FONT_HEIGHT + row]; bits = video_fontdata[c * VIDEO_FONT_HEIGHT + row];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment