触摸屏测试程序怎么编写
来源:百度知道 编辑:UC知道 时间:2024/06/17 09:18:37
#include <stdio.h>
typedef struct {
unsigned short pressure;
unsigned short x;
unsigned short y;
unsigned short pad;
} TS_EVENT;
static TS_EVENT ts_event;
static int ts;
int main()
{
ts = open ("/dev/ts", 0);
if (ts < 0) {
fprintf (stderr, "2410: Can not open touch screen!\n");
return 0;
}