AM3358--Uboot支援LCD輸出1024*768,am3358--ubootlcd

來源:互聯網
上載者:User

AM3358--Uboot支援LCD輸出1024*768,am3358--ubootlcd

1. uboot/include/lcd/tq3358_fb.h

#define TFT2403201#define TFT3202402#define TFT4802723//T43(天嵌4.3寸屏)#define TFT800480_H504//H50(5寸高清屏)#define TFT8004805//A70(群創7.0寸屏)#define TFT8006006//A104(友達10.4寸屏)#define TFT1024600_H707//H70(7寸高清屏)#define DYNAMIC_CONFIG8//動態配置LCD

typedef enum _LCD_TYPE{X240Y320=0,X320Y240,X480Y272,X640Y480,X800Y480,X800Y480_H50,X800Y600,X1024Y600_H70,X1024Y768,X1280Y800,LCD_TYPE_MAX,} LCD_TYPE;

2. uboot\common\cmd_menu.c


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("[9] X1024Y768\" 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;}}}}

3. include\configs\tq3358.h  ub0ot預設設定
#ifdef CONFIG_TQ3358
#define CONFIG_IPADDR192.168.1.6
#define CONFIG_SERVERIP192.168.1.8
#define CONFIG_NETMASK255.255.255.0
#define CONFIG_ETHADDR00:40:5c:26:0a:52
#define CONFIG_GATEWAYIP192.168.1.2
#ifdef CONFIG_NAND
#define CONFIG_EXTRA_ENV_SETTINGS \
"mloimgname=MLO\0"\
"ubootimgname=u-boot.bin\0"\
"kernelimgname=zImage.bin\0"\
"rootimgname=root.bin\0"\
"lcdtype=X800Y480\0" \
"uart1_d_can=uart1\0" \
"uart2_i2c2=uart2\0" \
"kloadaddr=0x80008000\0" \
"cpaddr=0x81000000\0"\
"loadaddr=0x80200000\0" \
"console=ttySAC0,115200n8\0" \
"yaffs_root=/dev/mtdblock9\0" \
"yaffs_root_fs_type=yaffs2 rw rootwait=1\0" \
"ubi_root=ubi0:rootfs\0" \
"ubi_root_fs_type=ubifs ubi.mtd=9,2048 rw rootwait=1\0" \
"nfsserverip=192.168.1.7\0" \
"nfsipaddr=192.168.1.6\0" \

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.