From patchwork Thu Oct 20 05:38:44 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: 120722 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 A4DD7B6FAF for ; Thu, 20 Oct 2011 16:39:32 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 98BCD28E3D; Thu, 20 Oct 2011 07:39:24 +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 EONOFZfV9gUy; Thu, 20 Oct 2011 07:39:24 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6557E28D96; Thu, 20 Oct 2011 07:39:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BC7DB28801 for ; Thu, 20 Oct 2011 07:39:06 +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 MvzBK88nUM+X for ; Thu, 20 Oct 2011 07:39:06 +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-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by theia.denx.de (Postfix) with ESMTPS id C1C9428839 for ; Thu, 20 Oct 2011 07:39:03 +0200 (CEST) Received: by yxj19 with SMTP id 19so2388169yxj.3 for ; Wed, 19 Oct 2011 22:39:03 -0700 (PDT) Received: by 10.236.180.4 with SMTP id i4mr6828974yhm.18.1319089142898; Wed, 19 Oct 2011 22:39:02 -0700 (PDT) Received: from localhost.localdomain (weier.tpe.corp.google.com [172.30.210.5]) by mx.google.com with ESMTPS id w69sm12285070yhl.15.2011.10.19.22.39.01 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Oct 2011 22:39:02 -0700 (PDT) From: Che-Liang Chiou To: u-boot@lists.denx.de Date: Thu, 20 Oct 2011 13:38:44 +0800 Message-Id: <1319089126-7358-2-git-send-email-clchiou@chromium.org> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <1319089126-7358-1-git-send-email-clchiou@chromium.org> References: <1319089126-7358-1-git-send-email-clchiou@chromium.org> In-Reply-To: References: Subject: [U-Boot] [PATCH V4 1/3] lcd: 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 V4 Remove support of video device, which is untested and will leave to future work Changes in V3 Rebase to ToT Changes in V2 Fix style errors common/lcd.c | 16 ++++++++++------ include/lcd.h | 2 ++ 2 files changed, 12 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);