论坛元老
 
- 积分
- 3084
- 金钱
- 3084
- 注册时间
- 2018-1-30
- 在线时间
- 239 小时
|
1金钱
u8 GT9147_Scan(u8 mode)
{ .....
tp_dev.x[4]=tp_dev.x[0];
tp_dev.y[4]=tp_dev.y[0];
for(i=0;i<5;i++)
{
if(tp_dev.sta&(1<<i))
{
GT9147_RD_Reg(GT9147_TPX_TBL,buf,4);
if(tp_dev.touchtype&0X01)
{
tp_dev.y=((u16)buf[1]<<8)+buf[0];
tp_dev.x=800-(((u16)buf[3]<<8)+buf[2]);
}else
{
tp_dev.x=((u16)buf[1]<<8)+buf[0];
tp_dev.y=((u16)buf[3]<<8)+buf[2];
}
}
}
....
}
请问:tp_dev.x[4]=tp_dev.x[0];tp_dev.y[4]=tp_dev.y[0];这两句有必要吗?为何还有保存tp_dev.x[0]和tp_dev.y[0],后面不是从新赋值了吗?为何还要保存呢
|
|