|

楼主 |
发表于 2017-10-14 15:08:54
|
显示全部楼层
void Tft_Ili9325_ColorBox(u16 xStart,u16 yStart,u16 xLong,u16 yLong,u16 Color)
{
u32 temp;
Tft_Ili9325_Block_Write(xStart,xStart+xLong-1,yStart,yStart+yLong-1);
for (temp=0; temp<xLong*yLong; temp++)
{
*(__IO u16 *) (Bank1_LCD_D) = Color;
}
}
static void Tft_Ili9325_Block_Write(unsigned int Xstart, unsigned int Xend, unsigned int Ystart, unsigned int Yend)
{
Tft_Ili9325_Write_Comm(0x2a);
Tft_Ili9325_Write_Data(Xstart>>8);
Tft_Ili9325_Write_Data(Xstart&0xff);
Tft_Ili9325_Write_Data(Xend>>8);
Tft_Ili9325_Write_Data(Xend&0xff);
Tft_Ili9325_Write_Comm(0x2b);
Tft_Ili9325_Write_Data(Ystart>>8);
Tft_Ili9325_Write_Data(Ystart&0xff);
Tft_Ili9325_Write_Data(Yend>>8);
Tft_Ili9325_Write_Data(Yend&0xff);
Tft_Ili9325_Write_Comm(0x2c);
}
这样实现的。 |
|