mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-30 11:01:33 +00:00
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>
This commit is contained in:
parent
095407da56
commit
0f999c49e5
1 changed files with 6 additions and 10 deletions
16
common/lcd.c
16
common/lcd.c
|
@ -216,6 +216,10 @@ static void lcd_drawchars (ushort x, ushort y, uchar *str, int count)
|
||||||
uchar *dest;
|
uchar *dest;
|
||||||
ushort row;
|
ushort row;
|
||||||
|
|
||||||
|
#if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
|
||||||
|
y += BMP_LOGO_HEIGHT;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if LCD_BPP == LCD_MONOCHROME
|
#if LCD_BPP == LCD_MONOCHROME
|
||||||
ushort off = x * (1 << LCD_BPP) % 8;
|
ushort off = x * (1 << LCD_BPP) % 8;
|
||||||
#endif
|
#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)
|
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, s, strlen((char *)s));
|
||||||
lcd_drawchars (x, y+BMP_LOGO_HEIGHT, s, strlen ((char *)s));
|
|
||||||
#else
|
|
||||||
lcd_drawchars (x, y, s, strlen ((char *)s));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------*/
|
||||||
|
|
||||||
static inline void lcd_putc_xy (ushort x, ushort y, uchar c)
|
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, &c, 1);
|
||||||
lcd_drawchars (x, y+BMP_LOGO_HEIGHT, &c, 1);
|
|
||||||
#else
|
|
||||||
lcd_drawchars (x, y, &c, 1);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
Loading…
Add table
Reference in a new issue