#define TOUCH_MAX_X 1000 // 950
#define TOUCH_MIN_X 30 // 90
#define TOUCH_MAX_Y 980 // 960 // 910
#define TOUCH_MIN_Y 30 // 70 //50
#define TOUCH_X 800
#define TOUCH_Y 480
VOID Touch_CoordinateConversion(INT *px, INT *py)
{
INT TmpX, TmpY;
INT TmpX0, TmpY0;
TmpX0 = *px; TmpY0 = *py;
TmpX = (*px >= TOUCH_MAX_X) ? (TOUCH_MAX_X-1) : *px;
TmpY = (*py >= TOUCH_MAX_Y) ? (TOUCH_MAX_Y-1) : *py;
TmpX -= TOUCH_MIN_X;
TmpY -= TOUCH_MIN_Y;
//#ifdef YC_2440_SUPPORT
#ifndef YC_2440_SUPPORT
TmpX = (TmpX >= 0) ? TmpX : 0;
TmpY = (TmpY >= 0) ? TmpY : 0;
#else
TmpX = (TmpX) ? TmpX : 0;
TmpY = (TmpY) ? TmpY : 0;
#endif
*px = ((TmpX * TOUCH_X) / (TOUCH_MAX_X-TOUCH_MIN_X))*4;
*py = ((TmpY * TOUCH_Y) / (TOUCH_MAX_Y-TOUCH_MIN_Y))*4;
请教朋友们,这里面的TOUCH_MAX_X,TOUCH_MIN_X,TOUCH_Max_y,TOUCH_MIN_y的值是触摸屏的顶点坐标值,这里面得转换有个四倍关系,但是取值怎么都这么小呀,#define TOUCH_MAX_X 1000 // 950 TOUCH_MAX_X怎么不是#define TOUCH_X 800 touch_x的四倍3200呀!!!