]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
lcd: add clear and draw bitmap declaration
authorChe-Liang Chiou <clchiou@chromium.org>
Thu, 20 Oct 2011 23:07:03 +0000 (23:07 +0000)
committerAnatolij Gustschin <agust@denx.de>
Tue, 15 Nov 2011 22:58:26 +0000 (23:58 +0100)
The functions for clearing and drawing bitmaps on the screen were not
exposed publicly and are made public in this patch in preparation for
implementing the display interface of api_public.h.

Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
common/cmd_bmp.c
common/lcd.c
include/lcd.h

index 23fc82fe4b4bff32a16365ac5d8a44219e5ae063..682f395b4d75f19173449581edced54ecc912845 100644 (file)
@@ -237,9 +237,7 @@ static int bmp_display(ulong addr, int x, int y)
        }
 
 #if defined(CONFIG_LCD)
-       extern int lcd_display_bitmap (ulong, int, int);
-
-       ret = lcd_display_bitmap ((unsigned long)bmp, x, y);
+       ret = lcd_display_bitmap((ulong)bmp, x, y);
 #elif defined(CONFIG_VIDEO)
        extern int video_display_bitmap (ulong, int, int);
 
index d9cb8cae73f3ecea5c7f21ad0a20e4ee47c17f76..20e97b9d250847f87e88934380c35f6d1d453850 100644 (file)
@@ -78,7 +78,6 @@ static inline void lcd_putc_xy (ushort x, ushort y, uchar  c);
 
 static int lcd_init (void *lcdbase);
 
-static int lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]);
 static void *lcd_logo (void);
 
 static int lcd_getbgcolor (void);
@@ -353,7 +352,14 @@ int drv_lcd_init (void)
 }
 
 /*----------------------------------------------------------------------*/
-static int lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static
+int do_lcd_clear(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+{
+       lcd_clear();
+       return 0;
+}
+
+void lcd_clear(void)
 {
 #if LCD_BPP == LCD_MONOCHROME
        /* Setting the palette */
@@ -394,12 +400,10 @@ static int lcd_clear (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]
 
        console_col = 0;
        console_row = 0;
-
-       return (0);
 }
 
 U_BOOT_CMD(
-       cls,    1,      1,      lcd_clear,
+       cls,    1,      1,      do_lcd_clear,
        "clear screen",
        ""
 );
@@ -413,7 +417,7 @@ static int lcd_init (void *lcdbase)
 
        lcd_ctrl_init (lcdbase);
        lcd_is_enabled = 1;
-       lcd_clear (NULL, 1, 1, NULL);   /* dummy args */
+       lcd_clear();
        lcd_enable ();
 
        /* Initialize the console */
index 89cc90c0b9327742135e91fb9f37b8025cf0eb1c..83b50f46a489f4d694ec7547f65e08d2b99f8630 100644 (file)
@@ -210,6 +210,8 @@ void        lcd_disable     (void);
 void   lcd_putc        (const char c);
 void   lcd_puts        (const char *s);
 void   lcd_printf      (const char *fmt, ...);
+void   lcd_clear(void);
+int    lcd_display_bitmap(ulong bmp_image, int x, int y);
 
 /* Allow boards to customize the information displayed */
 void lcd_show_board_info(void);