阅读:1208回复:2
版主大哥--LOGO
是这样,我用6.4的屏,当时遇到这样一个问题,就是我用IMAGE2LCD改的图片的数据太大,编不过,我想问的是这的数组编译后在什么地方,在EBOOT中么?还是NK中?那么大的数据.
当时我的屏原来是3.2的改成6.4的后会花屏,我只能在EBOOT中把向缓冲区拷图像的函数除掉了.这是我 的CFW.C中的static void InitDisplay()您给看看为什么花屏? { //int i, j; volatile IOPreg *s2410IOP; volatile LCDreg *s2410LCD; s2410IOP = (IOPreg *)IOP_BASE; s2410LCD = (LCDreg *)LCD_BASE; // LCD port initialize. s2410IOP->rGPCUP = 0xFFFFFFFF; s2410IOP->rGPCCON = 0xAAAAAAAA; s2410IOP->rGPCCON = 0xAAAAAAAA; s2410IOP->rGPDUP = 0xFFFFFFFF; s2410IOP->rGPDCON = 0xAAAAAAAA; s2410IOP->rGPGCON &= ~(3 << 8); /* Set LCD_PWREN as output */ s2410IOP->rGPGCON |= (1 << 8); s2410IOP->rGPGDAT |= (1 << 4); /* Backlight ON */ s2410LCD->rLCDCON1 = (1 << 8) | /* VCLK = HCLK / ((CLKVAL + 1) * 2) -> About 7 Mhz */ (1 << 7) | /* 0 : Each Frame */ (3 << 5) | /* TFT LCD Pannel */ (12 << 1) | /* 16bpp Mode */ (0 << 0) ; /* Disable LCD Output */ s2410LCD->rLCDCON2 = (32 << 24) | /* VBPD : 1 */ (LINEVAL_TFT << 14) | /* Virtical Size : 320 - 1 */ (10 << 6) | /* VFPD : 2 */ (2 << 0) ; /* VSPW : 1 */ s2410LCD->rLCDCON3 = (47 << 19) | /* HBPD : 6 */ (HOZVAL_TFT << 8) | /* HOZVAL_TFT : 240 - 1 */ (16 << 0) ; /* HFPD : 2 */ s2410LCD->rLCDCON4 = (13 << 8) | /* MVAL : 13 */ (96 << 0) ; /* HSPW : 4 */ s2410LCD->rLCDCON5 = (0 << 12) | /* BPP24BL : LSB valid */ (1 << 11) | /* FRM565 MODE : 5:6:5 Format */ (0 << 10) | /* INVVCLK : VCLK Falling Edge */ (1 << 9) | /* INVVLINE : Inverted Polarity */ (1 << 8) | /* INVVFRAME : Inverted Polarity */ (0 << 7) | /* INVVD : Normal */ (0 << 6) | /* INVVDEN : Normal */ (0 << 5) | /* INVPWREN : Normal */ (0 << 4) | /* INVENDLINE : Normal */ (1 << 3) | /* PWREN : Disable PWREN */ (0 << 2) | /* ENLEND : Disable LEND signal */ (0 << 1) | /* BSWP : Swap Disable */ (1 << 0) ; /* HWSWP : Swap Enable */ s2410LCD->rLCDSADDR1 = ((FRAMEBUF_DMA_BASE >> 22) << 21) | ((M5D(FRAMEBUF_DMA_BASE >> 1)) << 0); s2410LCD->rLCDSADDR2 = M5D((FRAMEBUF_DMA_BASE + (LCD_XSIZE_TFT * LCD_YSIZE_TFT * 2)) >> 1); s2410LCD->rLCDSADDR3 = (((LCD_XSIZE_TFT - LCD_XSIZE_TFT) / 1) << 11) | (LCD_XSIZE_TFT / 1); #if (BOARD_TYPE == 1) s2410LCD->rLPCSEL = 0;//|= 0x3; #else s2410LCD->rLPCSEL = 0;//|= 0x2; #endif s2410LCD->rLCDINTMSK |=(3); // MASK LCD Sub Interrupt s2410LCD->rTPAL = 0x0; s2410LCD->rLCDCON1 |= 1; RETAILMSG(1,(TEXT("rLCDCON1 : %x\r\n"), s2410LCD->rLCDCON1)); RETAILMSG(1,(TEXT("rLCDCON2 : %x\r\n"), s2410LCD->rLCDCON2)); RETAILMSG(1,(TEXT("rLCDCON3 : %x\r\n"), s2410LCD->rLCDCON3)); RETAILMSG(1,(TEXT("rLCDCON4 : %x\r\n"), s2410LCD->rLCDCON4)); RETAILMSG(1,(TEXT("rLCDCON5 : %x\r\n"), s2410LCD->rLCDCON5)); RETAILMSG(1,(TEXT("rLCDSADDR1 : %x\r\n"), s2410LCD->rLCDSADDR1)); RETAILMSG(1,(TEXT("rLCDSADDR2 : %x\r\n"), s2410LCD->rLCDSADDR2)); RETAILMSG(1,(TEXT("rLCDSADDR3 : %x\r\n"), s2410LCD->rLCDSADDR3)); RETAILMSG(1,(TEXT("rLCDINTMSK : %x\r\n"), s2410LCD->rLCDINTMSK)); RETAILMSG(1,(TEXT("rLPCSEL : %x\r\n"), s2410LCD->rLPCSEL)); RETAILMSG(1,(TEXT("rTPAL : %x\r\n"), s2410LCD->rTPAL)); memcpy((void *)FRAMEBUF_BASE, ScreenBitmap, ARRAY_SIZE_TFT_16BIT); 最后我用memcpy把ScreenBitmap里的图片数组传进缓冲区.但会花屏.不知其为什么? 另外听说在EBOOT中可以改,我是WINCE4.2,优龙给的BSP,EBOOT的MAIN.C里没有 InitDisplay(),难道要自已加?怎么弄?我看别人好像是把这个数组用一个循环扫描到缓冲区里,能不能再提示下? 请大哥指教!不胜感激! |
|
沙发#
发布于:2007-01-31 09:34
数组编译后可以放在eboot里,也可以放在flash随便一个什么空的位置,只要能找的到就可以了。
3.2变成6.4''分辨率会变,framebuffersize也要变,还有相应的写图片的函数也要改变,保证 图片写到正确的位置。数组编译后可作为头文件包含。 |
|
板凳#
发布于:2007-02-02 12:48
顶一下
|
|