summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2012-04-27 04:41:16 +0000
committerAnatolij Gustschin <agust@denx.de>2012-05-25 09:15:10 +0200
commit0f999c49e5647ede23cfb1ee2b83da8d8a76297b (patch)
tree21f579bb1e4e63deaef95616d4f8b19479abd3fa
parent095407da5647053ec865437d02f2f5cc41ac31b3 (diff)
downloadu-boot-imx-0f999c49e5647ede23cfb1ee2b83da8d8a76297b.zip
u-boot-imx-0f999c49e5647ede23cfb1ee2b83da8d8a76297b.tar.gz
u-boot-imx-0f999c49e5647ede23cfb1ee2b83da8d8a76297b.tar.bz2
common/lcd.c: reduce some CONFIG_LCD_*_LOGO ifdefs
Move CONFIG_LCD_LOGO && !CONFIG_LCD_INFO_BELOW_LOGO ifdefs to lcd_drawchars() func. Signed-off-by: Anatolij Gustschin <agust@denx.de>
-rw-r--r--common/lcd.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/common/lcd.c b/common/lcd.c
index 0ea45d0..ab78525 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -216,6 +216,10 @@ static void lcd_drawchars (ushort x, ushort y, uchar *str, int count)
uchar *dest;
ushort row;
+#if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
+ y += BMP_LOGO_HEIGHT;
+#endif
+
#if LCD_BPP == LCD_MONOCHROME
ushort off = x * (1 << LCD_BPP) % 8;
#endif
@@ -271,22 +275,14 @@ static void lcd_drawchars (ushort x, ushort y, uchar *str, int count)
static inline void lcd_puts_xy (ushort x, ushort y, uchar *s)
{
-#if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
- lcd_drawchars (x, y+BMP_LOGO_HEIGHT, s, strlen ((char *)s));
-#else
- lcd_drawchars (x, y, s, strlen ((char *)s));
-#endif
+ lcd_drawchars(x, y, s, strlen((char *)s));
}
/*----------------------------------------------------------------------*/
static inline void lcd_putc_xy (ushort x, ushort y, uchar c)
{
-#if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
- lcd_drawchars (x, y+BMP_LOGO_HEIGHT, &c, 1);
-#else
- lcd_drawchars (x, y, &c, 1);
-#endif
+ lcd_drawchars(x, y, &c, 1);
}
/************************************************************************/