⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmd_sm501mode.c

📁 F:worksip2440a board可启动u-boot-like.tar.gz F:worksip2440a board可启动u-boot-like.tar.gz
💻 C
字号:
/* * (C) Copyright 2002 * Detlev Zundel, DENX Software Engineering, dzu@denx.de. * * See file CREDITS for list of people who contributed to this * project. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA *//* * BMP handling routines */#include <common.h>#include <bmp_layout.h>#include <command.h>#if (CONFIG_COMMANDS & CFG_CMD_SM501)extern	int	sm501mode;extern	int sm501bpp;int set_sm501_mode(int mode, int bpp);int do_set_mode(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]){	int mode;	int bpp;	switch (argc) {	case 2:		/* use load_addr as default address */		break;	case 4:		/* use argument */		mode = simple_strtoul(argv[2], NULL, 10);		bpp = simple_strtoul(argv[3], NULL, 10);		break;	default:		printf ("Usage:\n%s\n", cmdtp->usage);		return 1;	}	/* Allow for short names	 * Adjust length if more sub-commands get added	 */	if (strncmp(argv[1],"info",1) == 0) 	{	printf("--------------------------------------------------------------------------\n");	printf("   H.	H.    H.     H.      V.   V.    V.    V.  Pixel   H.    V.\n");	printf("   tot.	disp. sync   sync   tot. disp. sync  sync clock  freq.  freq.\n");	printf("        end   start  wdth        end   start hght \n");	printf("--------------------------------------------------------------------------\n");	printf("1.  800,  640,  656,   96,  525, 480,  490,  2, 25175000, 31469, 60 \n"); 	printf("2.  832,  640,  664,   40,  520, 480,  489,  3, 31500000, 37861, 72 \n");	printf("3.  840,  640,  656,   64,  500, 480,  481,  3, 31500000, 37500, 75 \n");	printf("4.  832,  640,  696,   56,  509, 480,  481,  3, 36000000, 43269, 85 \n");	printf("5.  1024, 800,  824,   72,  625, 600,  601,  2, 36000000, 35156, 56 \n");	printf("6.  1056, 800,  840,  128,  628, 600,  601,  4, 40000000, 37879, 60 \n");	printf("7.  1040, 800,  856,  120,  666, 600,  637,  6, 50000000, 48077, 72 \n");	printf("8.  1056, 800,  816,   80,  625, 600,  601,  3, 49500000, 46875, 75 \n");	printf("9.  1048, 800,  832,   64,  631, 600,  601,  3, 56250000, 53674, 85 \n");	printf("10. 1344, 1024, 1048, 136,  806, 768,  771,  6, 65000000, 48363, 60 \n");	printf("11  1328, 1024, 1048, 136,  806, 768,  771,  6, 75000000, 56476, 70 \n");	printf("12. 1312, 1024, 1040,  96,  800, 768,  769,  3, 78750000, 60023, 75 \n");	printf("13. 1376, 1024, 1072,  96,  808, 768,  769,  3, 94500000, 68677, 85 \n");	} 	else if (strncmp(argv[1],"mode",1) == 0) 	{		if(!(mode >= 1 && mode <= 13))		{			printf("sm501 mode error, set sm501 mode to 1!\n");			sm501mode = 1;		}		else			sm501mode = mode;		if(bpp != 16)		{			printf("sm501 bpp error, only 16bpp valid, set sm501 bpp to 16!\n");			sm501bpp = 16;		}		else			sm501bpp = bpp;		drv_video_init ();		return 1;	} else {		printf ("Usage:\n%s\n", cmdtp->usage);		return 1;	}}U_BOOT_CMD(	sm501, 5,	1,	do_set_mode,	"sm501   - manipulate BMP image data\n",	"info <imageAddr>    - display valid mode\n"	"set <modenum>       - set display mode\n");#endif /* (CONFIG_COMMANDS & CFG_CMD_SM501) */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -