初级会员

- 积分
- 142
- 金钱
- 142
- 注册时间
- 2017-7-24
- 在线时间
- 66 小时
|
发表于 2018-5-26 22:05:44
|
显示全部楼层
楼主,再次麻烦下你,我想请问下我想在LCD的固定区间写入相应的数据然后显示出来,但为什么我下面那个函数是一个填充的矩形?
void GUI_data(unsigned char x0,unsigned char y0,unsigned char x1,unsigned char y1,unsigned char data)
{
uint32 i,j,k,y;
unsigned char data5,data6;
INT8U TempData = 0;
//点交换
if(x0>x1)
{ i = x0;
x0 = x1;
x1 = i;
}
//点交换
if(y0>y1)
{ i = y0;
y0 = y1;
y1 = i;
}
//画点
for(x0 = x0;x0<=x1;x0++)
{
for(y = y0;y <= y1;y++)
{
data6 = data;
for(j = 0;j < 8;j++)
{
data5 = (data6 >> j) & 0x01;
if(data5) GUI_Point(x0,y,1);
else GUI_Point(x0,y,0);
}
}
}
} |
|