From patchwork Tue Oct 18 09:15:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Che-liang Chiou X-Patchwork-Id: 120387 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 29BDAB6FD7 for ; Tue, 18 Oct 2011 20:16:14 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1CD86291B9; Tue, 18 Oct 2011 11:16:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UV59r2aKmZ3U; Tue, 18 Oct 2011 11:16:07 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BB5A02917F; Tue, 18 Oct 2011 11:15:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 94E8E29185 for ; Tue, 18 Oct 2011 11:15:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HbJfspWQej5p for ; Tue, 18 Oct 2011 11:15:53 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by theia.denx.de (Postfix) with ESMTPS id 5B73E2917F for ; Tue, 18 Oct 2011 11:15:51 +0200 (CEST) Received: by gyh20 with SMTP id 20so349571gyh.3 for ; Tue, 18 Oct 2011 02:15:50 -0700 (PDT) Received: by 10.150.72.35 with SMTP id u35mr1268057yba.9.1318929350383; Tue, 18 Oct 2011 02:15:50 -0700 (PDT) Received: from localhost.localdomain (weier.tpe.corp.google.com [172.30.210.5]) by mx.google.com with ESMTPS id l8sm4224990anb.1.2011.10.18.02.15.49 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Oct 2011 02:15:50 -0700 (PDT) From: Che-Liang Chiou To: u-boot@lists.denx.de Date: Tue, 18 Oct 2011 17:15:35 +0800 Message-Id: <39395a5290253231d2b9fceb0318bba47baa5abb.1318928915.git.clchiou@chromium.org> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: References: In-Reply-To: References: Subject: [U-Boot] [PATCH V3 1/4] lcd: video: add clear and draw bitmap declaration X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- Changes in V3 Rebase to ToT Changes in V2 Fix style errors common/lcd.c | 16 ++++++++++------ include/lcd.h | 2 ++ include/video.h | 2 ++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/common/lcd.c b/common/lcd.c index d9cb8ca..20e97b9 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,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 */ diff --git a/include/lcd.h b/include/lcd.h index 0e098d9..39af14a 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..280bb76 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