中级会员
 
- 积分
- 214
- 金钱
- 214
- 注册时间
- 2019-7-15
- 在线时间
- 30 小时
|

楼主 |
发表于 2020-2-13 09:49:09
|
显示全部楼层
楼上说的那个PLL_VIDEO寄存器在LCD显示时候就已经改了,然后我这边屏幕显示时候xy轴反了,互换了一下(修改了一下gt_9147.c里面读取xy坐标轴的程序)
if(tp_dev.sta&(1<<i)) //触摸有效?
{
GT9147_RD_Reg(GT9147_TPX_TBL,buf,4); //读取XY坐标值
if(tp_dev.touchtype&0X01)//横屏这里使用的是tp_dev.touchtype=0
{
tp_dev.y=((u16)buf[1]<<8)+buf[0];
tp_dev.x=800-(((u16)buf[3]<<8)+buf[2]);
}else
{
tp_dev.y=480-(((u16)buf[1]<<8)+buf[0]);
tp_dev.x=800-(((u16)buf[3]<<8)+buf[2]);
}
//printf("x[%d]:%d,y[%d]:%d\r\n",i,tp_dev.x,i,tp_dev.y);
} |
|