📄 ts_read.c
字号:
/*
* tslib/src/ts_read.c
*
* Copyright (C) 2001 Russell King.
*
* This file is placed under the LGPL. Please see the file
* COPYING for more details.
*
* $Id: ts_read.c,v 1.2 2002/11/08 23:28:55 dlowder Exp $
*
* Read raw pressure, x, y, and timestamp from a touchscreen device.
*/
#include "config.h"
#include "tslib-private.h"
/* This array is used to prevent segfaults and memory overwrites
* that can occur if multiple events are returned from ts_read_raw
* for each event returned by ts_read
*/
/* We found this was not needed, and have gone back to the
* original implementation
*/
// static struct ts_sample ts_read_private_samples[1024];
int ts_read(struct tsdev *ts, struct ts_sample *samp, int nr)
{
int result;
// int i;
// result = ts->list->ops->read(ts->list, ts_read_private_samples, nr);
result = ts->list->ops->read(ts->list, samp, nr);
// for(i=0;i<nr;i++) {
// samp[i] = ts_read_private_samples[i];
// }
return result;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -