//----初始化触摸屏模块--------------------------------------------------------- //功能: //参数: display_dev_name:本触摸屏对应的显示器名(资源名) // touch_dev_name:触摸屏设备名. //返回: 无 //----------------------------------------------------------------------------- bool_t ModuleInstall_TOUCH_TWR_K70(struct tagGkWinRsc *desktop,const char *touch_dev_name) { static struct tagSingleTouchPrivate touch_dev; ts_xsize =desktop->right-desktop->left; ts_ysize =desktop->bottom-desktop->top; ts_cal_ref_pos[0][0] =TS_CAL_LU_XPOS; ts_cal_ref_pos[0][1] =TS_CAL_LU_YPOS; ts_cal_ref_pos[1][0] =TS_CAL_RU_XPOS; ts_cal_ref_pos[1][1] =TS_CAL_RU_YPOS; ts_cal_ref_pos[2][0] =TS_CAL_RD_XPOS; ts_cal_ref_pos[2][1] =TS_CAL_RD_YPOS; ts_cal_ref_pos[3][0] =TS_CAL_LD_XPOS; ts_cal_ref_pos[3][1] =TS_CAL_LD_YPOS; if(!touch_hard_init()) { return false; } touch_ratio_adjust(desktop); touch_dev.read_touch = read_touch_data; Touch_InstallDevice(touch_dev_name,&touch_dev); return true; }
//----初始化触摸屏模块--------------------------------------------------------- //功能: //参数: display_name,本触摸屏对应的显示器名(资源名) //返回: 无 //----------------------------------------------------------------------------- ptu32_t ModuleInstall_TouchWindows(ptu32_t para) { static struct tagSingleTouchPrivate windows_touch; windows_touch.read_touch = read_touch_windows; Touch_InstallDevice((char*)para,&windows_touch); return 1; }