u8 TP_Read_XY(u16 *x,u16 *y) { u16 xtemp,ytemp; xtemp=TP_Read_XOY(CMD_RDX); ytemp=TP_Read_XOY(CMD_RDY); //if(xtemp<100||ytemp<100)return 0;//读数失败 *x=xtemp; *y=ytemp; return 1;//读数成功 }
unsigned short read_ad_y(void) { if(PEN==0) { return TP_Read_XOY(CMD_RDX); } else { return 0; } }
int GUI_TOUCH_X_MeasureY(void) { int32_t yvalue; if((lcddev.id == 0X5510) || (lcddev.id == 0X1963))//电容屏的触摸值获取(使用NT5510和SSD1963芯片的4.3寸和7寸屏都是电容屏) { tp_dev.scan(0); yvalue = tp_dev.y[0]; return yvalue; }else //电阻屏 { return TP_Read_XOY(0X90); //CMD_RDX=0XD0 } }