触摸屏使能 GUI_SUPPORT_TOUCH
根据AD结果配置触摸屏坐标极限值(与你AD采样结果相呼应):
#define GUI_TOUCH_AD_LEFT 72
#define GUI_TOUCH_AD_RIGHT 985
#define GUI_TOUCH_AD_TOP 880
#define GUI_TOUCH_AD_BOTTOM 116
配置几个函数:
int GUI_TOUCH_X_MeasureX(void)
{
return xdata ; //返回触摸坐标x
}
int GUI_TOUCH_X_MeasureY(void)
{
return ydata; //返回触摸坐标x
}
int xdata,ydata;//存储将AD结果转换为触摸屏坐标数值 |