如果移植lvgl时只能用打点的方式来实现画图的话可以试下我下面的代码
void LCD_Color_Fill(u16 sx,u16 sy,u16 ex,u16 ey,u16 *color)
{
u16 height,width,j;
u32 index;
width=ex-sx+1; //得到填充的宽度
height=ey-sy+1; //高度
LCD_Set_Window(sx,sy,width,height); //设置窗口
LCD_WriteRAM_Prepare(); //开始写入GRAM
LCD_RS=1;
LCD_CS=0;
for(index=0; index<height; index++)
{
for(j=0; j<width; j++)
{
SPI1_ReadWriteByte(*color>>8);
SPI1_ReadWriteByte(*color);
color++;
}
}
LCD_CS=1;
}
是改的lcd_clear的代码