[其它]

ILI9325驱动设置

[复制链接]
7063|0
手机看帖
扫描二维码
随时随地手机跟帖
2486689142|  楼主 | 2021-4-26 09:23 | 显示全部楼层 |阅读模式
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)这个一直用不了?

实在没有想明白,基本上一样的呀

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

8

帖子

0

粉丝