void Paint(unsigned char ch[]){
int y, x, t = 0;
for(y = 0; y < LCD_YSIZE; y++)
for(x = 0; x < LCD_XSIZE; x++){
LCD_BUFFER[y][x] = (ch[t]<<16)|(ch[t+1]<<8)|(ch[t+2]); //因为是24位真彩,所将3个字节赋值到一个像素点上
t = t + 3;
}
}
void Paint_background(U32 c){
unsigned int i, j;
for(j = 0; j < LCD_YSIZE; j++)
for(i = 0; i < LCD_XSIZE; i++)
LCD_BUFFER[j][ i] = c;
}
int LcdMain(){
Init_LCD();
Paint_background(0xFFFFFF);
Paint(picture); //picture是从图片中提取出来的数组
while(1);
}