Changes: new file: - board/samsung/common/misc.c depends on: CONFIG_MISC_COMMON - move draw_logo() to misc.c configs: trats, trats2, universal: - enable CONFIG_MISC_COMMON, - enable CONFIG_MISC_INIT_R, - add misc_init_r() and call draw_logo() in it. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>master
parent
7f39b06782
commit
679549d180
@ -0,0 +1,41 @@ |
||||
/*
|
||||
* Copyright (C) 2013 Samsung Electronics |
||||
* Przemyslaw Marczak <p.marczak@samsung.com> |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0+ |
||||
*/ |
||||
|
||||
#include <common.h> |
||||
#include <lcd.h> |
||||
#include <libtizen.h> |
||||
#include <samsung/misc.h> |
||||
|
||||
#ifdef CONFIG_CMD_BMP |
||||
void draw_logo(void) |
||||
{ |
||||
int x, y; |
||||
ulong addr; |
||||
|
||||
addr = panel_info.logo_addr; |
||||
if (!addr) { |
||||
error("There is no logo data."); |
||||
return; |
||||
} |
||||
|
||||
if (panel_info.vl_width >= panel_info.logo_width) { |
||||
x = ((panel_info.vl_width - panel_info.logo_width) >> 1); |
||||
} else { |
||||
x = 0; |
||||
printf("Warning: image width is bigger than display width\n"); |
||||
} |
||||
|
||||
if (panel_info.vl_height >= panel_info.logo_height) { |
||||
y = ((panel_info.vl_height - panel_info.logo_height) >> 1); |
||||
} else { |
||||
y = 0; |
||||
printf("Warning: image height is bigger than display height\n"); |
||||
} |
||||
|
||||
bmp_display(addr, x, y); |
||||
} |
||||
#endif /* CONFIG_CMD_BMP */ |
@ -0,0 +1,8 @@ |
||||
#ifndef __SAMSUNG_MISC_COMMON_H__ |
||||
#define __SAMSUNG_MISC_COMMON_H__ |
||||
|
||||
#ifdef CONFIG_CMD_BMP |
||||
void draw_logo(void); |
||||
#endif |
||||
|
||||
#endif /* __SAMSUNG_MISC_COMMON_H__ */ |
Loading…
Reference in new issue