16bpp是这样写的:
unsigned short ( * frameBuffer16BitTft240320)[LCD_Width];//定义显存指针short型 16bit
frameBuffer16BitTft240320 = (unsigned short(*)[LCD_Width])LCD_BUF0;//把LCD_BUF0(硬件上SDRAM的地址赋值给显存)
接下来是画点,frameBuffer16BitTft240320[y][x] = color ;
=======================================================================
那么24bpp我这样写,显示出来是花屏。
unsigned int ( * frameBuffer16BitTft240320)[LCD_Width];//定义显存指针short型 24bit
frameBuffer16BitTft240320 = (unsigned int(*)[LCD_Width])LCD_BUF0;//把LCD_BUF0(硬件上SDRAM的地址赋值给显存)
接下来是画点,frameBuffer16BitTft240320[y][x] = color ; |