diff mbox

[U-Boot,1/2] lcd: video: add clear and draw bitmap declaration

Message ID 11c2761c2883cf217a6efae98dccb83d19606927.1317715598.git.clchiou@chromium.org
State Superseded
Delegated to: Anatolij Gustschin
Headers show

Commit Message

Che-liang Chiou Oct. 4, 2011, 8:16 a.m. UTC
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>
---
 common/lcd.c    |   15 +++++++++------
 include/lcd.h   |    2 ++
 include/video.h |    2 ++
 3 files changed, 13 insertions(+), 6 deletions(-)

Comments

Wolfgang Denk Oct. 6, 2011, 6:34 p.m. UTC | #1
Dear Che-Liang Chiou,

In message <11c2761c2883cf217a6efae98dccb83d19606927.1317715598.git.clchiou@chromium.org> you wrote:
> 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>
> ---
>  common/lcd.c    |   15 +++++++++------
>  include/lcd.h   |    2 ++
>  include/video.h |    2 ++
>  3 files changed, 13 insertions(+), 6 deletions(-)

Please run through checkpatch and fix the errors and warnings.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/common/lcd.c b/common/lcd.c
index d9cb8ca..d6e3188 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -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,13 @@  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 +399,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 +416,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 */
diff --git a/include/lcd.h b/include/lcd.h
index 0e098d9..fba4ec2 100644
--- a/include/lcd.h
+++ b/include/lcd.h
@@ -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);
diff --git a/include/video.h b/include/video.h
index efcc682..6cd6f72 100644
--- a/include/video.h
+++ b/include/video.h
@@ -15,5 +15,7 @@  int	video_init	(void *videobase);
 void	video_putc	(const char c);
 void	video_puts	(const char *s);
 void	video_printf	(const char *fmt, ...);
+void	video_clear	(void);
+int	video_display_bitmap(ulong bmp_image, int x, int y);
 
 #endif