在线时间15 小时
UID3416482
注册时间2017-8-21
NXP金币0
该用户从未签到
注册会员

- 积分
- 75
- 最后登录
- 2017-10-27
|

楼主 |
发表于 2017-8-22 13:58:13
|
显示全部楼层
这是我基于lcdc_cursor这个demo修改的。
extern unsigned const char image[153600];//图像数据,320*240 16bpp RGB565 这两个函数自定义的,用于显示图像。
void lcd_SetPixel(int x, int y, unsigned int uicolor);
void lcd_DrawBmp (int ix0,int iy0, int iwidth, int iheight, unsigned short *pucBmp);//x显示图像,起始位置,图像大小,图像数据。
void lcd_SetPixel(int x, int y, unsigned int uicolor)
{
while(1)
{
if((x < LCD_WIDTH) && (y < LCD_HEIGHT))
{
s_frameBufs[y][x] = uicolor & 0xff;
s_frameBufs[y][x+1] = (uint8_t)uicolor >>8;
// s_frameBufs[y][x] = uicolor ;
}
}
}
void lcd_DrawBmp(int ix0,int iy0, int iwidth, int iheight, unsigned short *pucBmp)
{
uint16_t ix, iy;
uint16_t uicolor;
for (iy = iy0; iy < iheight + iy0; iy++)
{
for (ix = ix0; ix < iwidth + ix0; ix = ix+2)
{
uicolor = *pucBmp++;
lcd_SetPixel(ix, iy, uicolor);
}
}
}
3. 注释appfillbuffer这个函数,直接用lcd_drawbmp函数
// APP_FillBuffer((void *)(s_frameBufs));
lcd_DrawBmp(0,0,320,240,(unsigned short *)image);
lcd其中一个配置改为16bpp565
// lcdConfig.bpp = kLCDC_1BPP;
lcdConfig.bpp=kLCDC_16BPP565;
其他配置未修改。
LCD无任何显示
|
|