标签:
1. uboot/include/lcd/tq3358_fb.h
#define TFT240320 1 #define TFT320240 2 #define TFT480272 3//T43(天嵌4.3寸屏) #define TFT800480_H50 4//H50(5寸高清屏) #define TFT800480 5//A70(群创7.0寸屏) #define TFT800600 6//A104(友达10.4寸屏) #define TFT1024600_H70 7//H70(7寸高清屏) #define DYNAMIC_CONFIG 8//动态配置LCD
typedef enum _LCD_TYPE{
X240Y320=0,
X320Y240,
X480Y272,
X640Y480,
X800Y480,
X800Y480_H50,
X800Y600,
X1024Y600_H70,
X1024Y768,
X1280Y800,
LCD_TYPE_MAX,
} LCD_TYPE;void lcd_menu_usage()
{
printf("\r\n##### LCD select Menu #####\r\n");
printf("[1] T43\" screen.\r\n");
printf("[2] A70\" screen.\r\n");
printf("[3] A104\" screen.\r\n");
printf("[4] H50\" screen.\r\n");
printf("[5] H70\" screen.\r\n");
printf("[6] A133\" screen.\r\n");
printf("[7] W35\" screen.\r\n");
printf("[8] VGA1280X800\" screen.\r\n");
printf("[r] Reboot u-boot\r\n");
// printf("[s] Reinitializtion lcd.\r\n");
printf("[q] Return Parameter Menu \r\n");
printf("Enter your selection: ");
}void lcd_menu_shell()
{
char c;
char cmd_buf[256];
while (1)
{
lcd_menu_usage();
c = getc();
printf("%c\n", c);
switch (c)
{
case ‘1‘:
{
sprintf(cmd_buf, "setenv lcdtype X480Y272;");
run_command(cmd_buf, 0);
run_command("saveenv;", 0);
break;
}
case ‘2‘:
{
sprintf(cmd_buf, "setenv lcdtype X800Y480;");
run_command(cmd_buf, 0);
run_command("saveenv;", 0);
break;
}
case ‘3‘:
{
sprintf(cmd_buf, "setenv lcdtype X800Y600;");
run_command(cmd_buf, 0);
run_command("saveenv;", 0);
break;
}
case ‘4‘:
{
sprintf(cmd_buf, "setenv lcdtype X800Y480_H50;");
run_command(cmd_buf, 0);
run_command("saveenv;", 0);
break;
}
case ‘5‘:
{
sprintf(cmd_buf, "setenv lcdtype X1024Y600_H70;");
run_command(cmd_buf, 0);
run_command("saveenv;", 0);
break;
break;
}
case ‘6‘:
{
sprintf(cmd_buf, "setenv lcdtype X1280Y800;");
run_command(cmd_buf, 0);
run_command("saveenv;", 0);
break;
break;
}
case ‘7‘:
{
sprintf(cmd_buf, "setenv lcdtype X320Y240;");
run_command(cmd_buf, 0);
run_command("saveenv;", 0);
break;
}
case ‘8‘:
{
sprintf(cmd_buf, "setenv lcdtype VGA1280X800;");
run_command(cmd_buf, 0);
run_command("saveenv;", 0);
break;
break;
}case ‘9‘: { sprintf(cmd_buf, "setenv lcdtype X1024Y768;"); run_command(cmd_buf, 0); run_command("saveenv;", 0); break; break; } case ‘R‘: case ‘r‘: { strcpy(cmd_buf, "reset"); run_command(cmd_buf, 0); break; } case ‘Q‘: case ‘q‘: { return; break; } } } }
标签:
原文地址:http://blog.csdn.net/mao0514/article/details/46445637