1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-21 15:25:17 +03:00

Add touch temporary debug

This commit is contained in:
3djc 2020-04-25 08:37:50 +02:00
parent d6f00d790c
commit e6b3326412

View file

@ -340,18 +340,20 @@ bool touchPanelInit(void)
delay_ms(50); delay_ms(50);
TRACE("Reading Touch registry");
GT911_RD_Reg(GT_PID_REG, tmp, 4); GT911_RD_Reg(GT_PID_REG, tmp, 4);
if (strcmp((char *) tmp, "911") == 0)//ID==9147 if (strcmp((char *) tmp, "911") == 0) //ID==9147
{ {
TRACE("GT911 chip detected");
tmp[0] = 0X02; tmp[0] = 0X02;
GT911_WR_Reg(GT_CTRL_REG, tmp, 1);// GT911_WR_Reg(GT_CTRL_REG, tmp, 1);
GT911_RD_Reg(GT_CFGS_REG, tmp, 1);// GT911_RD_Reg(GT_CFGS_REG, tmp, 1);
if (tmp[0] < 0X69)//ver if (tmp[0] < 0X69)//ver
{ {
//printf("Default Ver:%x\r\n",temp[0]); TRACE("Default Ver:%x\r\n",temp[0]);
GT911_Send_Cfg(1); // GT911_Send_Cfg(1);
} }
delay_ms(10); delay_ms(10);
@ -363,7 +365,7 @@ bool touchPanelInit(void)
return true; return true;
} }
TRACE("GT911 chip NOT FOUND");
return false; return false;
} }