void LCD_Clear(u32 color)
{
u32 index=0;
seng_cmd_dat(0x0050, 0x0000); // Horizontal GRAM Start Address
seng_cmd_dat(0x0051, 0x00EF); // Horizontal GRAM End Address
seng_cmd_dat(0x0052, 0x0000); // Vertical GRAM Start Address
seng_cmd_dat(0x0053, 0x013F);
LCD_SetCursor(0x00,0x0000); //设置光标位置
ILI_Write_Cmd (lcddev.wramcmd);
for(index=0;index<lcddev.width*lcddev.height;index++)ILI_Write_Data(color);
}
void LCD_Fill(u16 sx, u16 sy,u16 ex,u16 ey,u16 color)
{
u32 i = 0;
u16 w ;
u16 h ;
seng_cmd_dat(0x0050, sx); // Horizontal GRAM Start Address
seng_cmd_dat(0x0051, ex); // Horizontal GRAM End Address
seng_cmd_dat(0x0052, sy); // Vertical GRAM Start Address
seng_cmd_dat(0x0053, ey);
h = (ey-sy+1);
w = (ex-sx+1);
LCD_SetCursor (sx,sy);
ILI_Write_Cmd (lcddev.wramcmd);
for(i=sx;i<(w*h);i++)ILI_Write_Data(color);
}
各位大神,能帮我看看不?
为什么 void LCD_Clear(u32 color) 这个函数能用
void LCD_Fill(u16 sx, u16 sy,u16 ex,u16 ey,u16 color)这个一直用不了?
实在没有想明白,基本上一样的呀
|