Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: u-boot use Splash Screen function,help
PostPosted: Fri Aug 05, 2011 5:05 am 
Offline

Joined: Fri Aug 05, 2011 4:45 am
Posts: 1
my board type "at91sam9261ek".
now, I want to use the Splash Screen function in u-boot software.
I define "CONFIG_SPLASH_SCREEN" in the ../include/configs/at91sam9261ek.h file.
and I changes the ../common/lcd.c file as :
static void *lcd_logo (void)
{
#ifdef CONFIG_LCD_INFO
char info[80];
char temp[32];
#ifdef CONFIG_ATMEL_LCD
int i;
ulong dest;
ulong dram_size, nand_size;
#endif
#endif /* CONFIG_LCD_INFO */

#ifdef CONFIG_SPLASH_SCREEN
char *s;
int rc;
ulong bmp_addr;
char *bmp_s;
char *bmp_dest;
ulong addr;
static int do_splash = 1;

if (do_splash && (s = getenv("splashimage")) != NULL) {

addr = simple_strtoul(s, NULL, 16);

do_splash = 0;

#ifdef CONFIG_VIDEO_BMP_GZIP
bmp_image_t *bmp = (bmp_image_t *)addr;
unsigned long len;

if (!((bmp->header.signature[0]=='B') &&
(bmp->header.signature[1]=='M'))) {
addr = (ulong)gunzip_bmp(addr, &len);
}
#endif

if((bmp_dest = getenv("bmp_dest")) != NULL)
{
dest = simple_strtoul(bmp_dest, NULL, 16);
if((bmp_s = getenv("bmp_size")) != NULL)
{
bmp_addr = simple_strtoul(bmp_s, NULL, 16);
rc = read_dataflash(addr, bmp_addr, (char *) dest);

if (lcd_display_bitmap (dest, 0, 0) == 0) {
return ((void *)lcd_base);
}
}
}
}
#endif /* CONFIG_SPLASH_SCREEN */
...
...
}
and, I set the env in u-boot cmd line.
setenv splashimage 0xC0040000
setenv bmp_size size //(size = bmp picture size)
setenv bmp_dest addr //(addr = SDRAM addr)
saveenv

reset the cpu.
the bmp picture is screen on the lcd.
but the bmp is in incline.
I do not know how to do with followed.

please help me for this problem, thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: