1、发现问题,cubeMX 配置的touchGFX 的板子中,自己买的4.3寸 800*480 的液晶屏幕,移植原子歌的GT9147 发现只能触摸到一部分区域的显示,查阅相关资料发现是初始化配置没有配置对
2、解决问题 换掉480*4722的配置参数,然后touchGFX能传入坐标值,但是触摸液晶屏幕无反应,查看底层发现touchGFX的控件坐标与当前触摸控件位置坐标不同
代码中图片的位置
3、修改参数配置文件 特别注意版本号的问题!!!
/*****************************************
* 注:配置800*480触摸芯片的参数 正常显示
* y 0x65!!为版本号
* * 一定要大于或
* **** 等于前一个版本号
* *
* *
* * *
* *********** x
* *
*****************************************/
#if 0
const u8 GT9147_CFG_TBL[]=
{
0x65,0xe0,0x01,0x20,0x03,0x05,0x34,0xc0,0x01,0x08,
0x28,0x0f,0x50,0x32,0x03,0x05,0x00,0x00,0x00,0x00,
0x00,0x00,0x06,0x16,0x16,0x1f,0x14,0x89,0x28,0x0a,
0x17,0x15,0x31,0x0d,0x00,0x00,0x08,0x22,0x04,0x11,
0x00,0x00,0x00,0x00,0x00,0x03,0x82,0x08,0x08,0x00,
0x00,0x0f,0x2c,0x94,0xc5,0x02,0x07,0x00,0x00,0x04,
0x9d,0x10,0x00,0x84,0x14,0x00,0x70,0x19,0x00,0x5f,
0x20,0x00,0x55,0x27,0x00,0x54,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x00,0x00,0x1a,0x18,0x16,0x14,0x12,0x10,0x0e,0x0c,
0x0a,0x08,0x00,0x00,0x00,0x00,0x1f,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0x00,0x00,0x02,0x04,0x05,0x06,0x08,0x0a,0x0c,
0x0e,0x1d,0x1e,0x1f,0x20,0x22,0x24,0x28,0x29,0xff,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf6,
0xff,0xff,0xff,0xff,
};
#endif
/*****************************************
* 注:配置800*480触摸芯片的参数 y轴反向
* * 0x65!!为版本号
* ***************** x 一定要大于或
* * * 等于前一个版本号
* *
* *
* ****
* *
* y
*****************************************/
#if 0
const u8 GT9147_CFG_TBL[]=
{
0x65,0x20,0x03,0xe0,0x01,0x05,0x0C,0x00,0x01,0x08,
0x28,0x05,0x50,0x32,0x03,0x05,0x00,0x00,0xff,0xff,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x89,0x28,0x0a,
0x17,0x15,0x31,0x0d,0x00,0x00,0x02,0x9b,0x03,0x25,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x00,0x00,
0x00,0x0f,0x94,0x94,0xc5,0x02,0x07,0x00,0x00,0x04,
0x8d,0x13,0x00,0x5c,0x1e,0x00,0x3c,0x30,0x00,0x29,
0x4c,0x00,0x1e,0x78,0x00,0x1e,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x08,0x0a,0x0c,0x0e,0x10,0x12,0x14,0x16,
0x18,0x1a,0x00,0x00,0x00,0x00,0x1f,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0x00,0x02,0x04,0x05,0x06,0x08,0x0a,0x0c,
0x0e,0x1d,0x1e,0x1f,0x20,0x22,0x24,0x28,0x29,0xff,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
};
#endif
/********************************************
* 注:配置 480*272 触摸芯片的参数 正常显示
* y 0x65!!为版本号
* * 一定要大于或
* **** 等于前一个版本号
* *
* *
* * *
* *********** x
* *
*****************************************/
#if 0
const u8 GT9147_CFG_TBL[]=
{
0x65,0x20,0x03,0xE0,0x01,0x05,0x0F,0x00,0x01,0x08,
0x28,0x05,0x50,0x32,0x03,0x05,0x00,0x00,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x89,0x28,0x0A,
0x17,0x15,0x31,0x0D,0x00,0x00,0x02,0x9B,0x03,0x25,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x00,0x00,
0x00,0x0F,0x94,0x94,0xC5,0x02,0x07,0x00,0x00,0x04,
0x8D,0x13,0x00,0x5C,0x1E,0x00,0x3C,0x30,0x00,0x29,
0x4C,0x00,0x1E,0x78,0x00,0x1E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x08,0x0A,0x0C,0x0E,0x10,0x12,0x14,0x16,
0x18,0x1A,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0x00,0x02,0x04,0x05,0x06,0x08,0x0A,0x0C,
0x0E,0x1D,0x1E,0x1F,0x20,0x22,0x24,0x28,0x29,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0x1D,0x01,
};
#endif
/*****************************************
* 注:配置480*272 触摸芯片的参数 y轴反向
* * 0x65!!为版本号
* ***************** x 一定要大于或
* * * 等于前一个版本号
* *
* *
* ****
* *
* y
*****************************************/
#if 1
const u8 GT9147_CFG_TBL[]=
{
0x65,0xe0,0x01,0x10,0x01,0x05,0x0C,0x00,0x01,0x08,
0x28,0x05,0x50,0x32,0x03,0x05,0x00,0x00,0xff,0xff,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x89,0x28,0x0a,
0x17,0x15,0x31,0x0d,0x00,0x00,0x02,0x9b,0x03,0x25,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x00,0x00,
0x00,0x0f,0x94,0x94,0xc5,0x02,0x07,0x00,0x00,0x04,
0x8d,0x13,0x00,0x5c,0x1e,0x00,0x3c,0x30,0x00,0x29,
0x4c,0x00,0x1e,0x78,0x00,0x1e,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x08,0x0a,0x0c,0x0e,0x10,0x12,0x14,0x16,
0x18,0x1a,0x00,0x00,0x00,0x00,0x1f,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0x00,0x02,0x04,0x05,0x06,0x08,0x0a,0x0c,
0x0e,0x1d,0x1e,0x1f,0x20,0x22,0x24,0x28,0x29,0xff,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
};
#endif
|