skyeye 0.8.5 模拟ep7321 lcd是不是有问
skyeye 0.8.5 模拟ep7321 lcd是不是有问题呀?我根据ep7312的datesheet,设置320*240 4 deph 的屏结果显示的是320*120 8deth,代码:
void delay(long delay_factor)
{
while(delay_factor>0)
{
delay_factor--;
}
}
void hello(void)
{
int i;
int lcd_width=320,lcd_height=240,lcd_depth=4;
long lcd_con_len,lcd_con_pixpre,lcd_con_vbuf;
long lcd_con_tmp;
char n=0;
long* paddr=(long*)0x80000480;
long* rtcaddr=(long *)0x800003c0;
long* lcd_con=(long *)0x800002c0;
long* lcd_pal_lsb=(long *)0x80000580;
long* lcd_pal_msb=(long *)0x80000540;
long* lcd_frame=(long *)0x80001000;
long* lcd_dat=(long *)0xc0000000;
long* pic_rom_addr=(long *)0xb0000000;
lcd_con_vbuf=lcd_width*lcd_height*lcd_depth/128-1;
lcd_con_vbuf&=0x1fff;
lcd_con_len=lcd_width/16-1;
lcd_con_len&=0x3f;
lcd_con_pixpre=360000/70/lcd_width/lcd_height;
lcd_con_pixpre&=0x3f;
lcd_con_tmp=lcd_con_pixpre;
lcd_con_tmp<<=20;
lcd_con_tmp|=lcd_con_len;
lcd_con_tmp<<=13;
lcd_con_tmp|=lcd_con_vbuf;
lcd_con_tmp|=0xf0000000;
*lcd_con=lcd_con_tmp;/*0xf02a695f;*/
*lcd_pal_lsb=0x76543210;
*lcd_pal_msb=0xfecdba98;
*lcd_frame=0xd;
while(1)
{
*lcd_con=lcd_con_tmp;
n=n+1;
if (n%2==0)
{
lcd_dat=0xc0000000;
pic_rom_addr=0xb0000000;
for(i=0;i<0x9600;i++)
{
/** paddr=(char)(*rtcaddr);*rrllostr;*/
*lcd_dat=*pic_rom_addr;
/* *lcd_dat<<=8;
*lcd_dat|=n;
*lcd_dat<<=8;
*lcd_dat|=n;
*lcd_dat<<=8;
*lcd_dat|=n;*/
lcd_dat++;
pic_rom_addr++;
}
}
else
{
lcd_dat=0xc0000000;
for(i=0;i<=0x12c00;i++)
{
*lcd_dat=n;
lcd_dat++;
}
}
delay(0xfffff);
}
return ;
}
运行图如下
页:
[1]