Beispiel #1
0
/*
************************************************************************************************************
*
*                                             function
*
*    name          :
*
*    parmeters     :
*
*    return        :
*
*    note          :
*
*
************************************************************************************************************
*/
int board_display_show(int display_source)
{
    board_display_layer_para_set();
	board_display_layer_open();

	return 0;
}
Beispiel #2
0
/*
************************************************************************************************************
*
*                                             function
*
*    name          :
*
*    parmeters     :
*
*    return        :
*
*    note          :
*
*
************************************************************************************************************
*/
int board_display_show_until_lcd_open(int display_source)
{
    if(!display_source)
    {
    	board_display_wait_lcd_open();
    }
    board_display_layer_para_set();
	board_display_layer_open();

	return 0;
}
Beispiel #3
0
/*
************************************************************************************************************
*
*                                             function
*
*    name          :
*
*    parmeters     :
*
*    return        :
*
*    note          :
*
*
************************************************************************************************************
*/
int board_display_show_until_lcd_open(int display_source)
{
		printf("%s\n", __func__);
    if(!display_source)
    {
    	board_display_wait_lcd_open();
    }
    board_display_layer_para_set();
	board_display_layer_open();

	return 0;
}
Beispiel #4
0
/*
************************************************************************************************************
*
*                                             function
*
*    name          :	sprite_cartoon_screen_set
*
*    parmeters     :
*
*    return        :
*
*    note          :
*
*
************************************************************************************************************
*/
int sprite_cartoon_screen_set(void)
{
#ifdef CONFIG_FPGA
    return 0;
#else
	/* 初始化图形参数 */
	sprite_source.screen_width  = borad_display_get_screen_width(); 
	sprite_source.screen_height = borad_display_get_screen_height();

	if((sprite_source.screen_width < 40) || (sprite_source.screen_height < 40))
	{
		printf("sunxi cartoon error: invalid screen width or height\n");

		return -1;
	}
	sprite_source.screen_size   = sprite_source.screen_width * sprite_source.screen_height * 4;
    sprite_source.screen_buf 	= malloc(sprite_source.screen_size);
	sprite_source.color         = SPRITE_CARTOON_GUI_GREEN;

    if(!sprite_source.screen_buf)
    {
        return -1;
    }
    memset(sprite_source.screen_buf, 0, sprite_source.screen_size);

	board_display_framebuffer_set(sprite_source.screen_width, sprite_source.screen_height, 32, (void *)sprite_source.screen_buf);
#if defined(CONFIG_VIDEO_SUNXI_V3)
				disp_layer_config *layer_para;
				layer_para = (disp_layer_config *)gd->layer_para;
				layer_para->info.alpha_mode = 0;
				board_display_layer_para_set();
#elif defined(CONFIG_VIDEO_SUNXI_V2)
				disp_layer_info *layer_para;
				layer_para = (disp_layer_info *)gd->layer_para;
				layer_para->alpha_mode = 0;
#else
				__disp_layer_info_t *layer_para;
				layer_para = (__disp_layer_info_t *)gd->layer_para;
				layer_para->alpha_en = 0;
#endif
				__msdelay(5);
    return 0;
#endif
}