summaryrefslogtreecommitdiff
path: root/test/touch.c
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@bitmath.org>2010-07-26 13:51:34 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-08-05 22:48:38 +0200
commitb76660d71e2ea77752025089bd71deffad64e325 (patch)
treec19adf132087edcdc1e721446d4975f37899239e /test/touch.c
parenteb896e11aacab5f53e3915a8d19ffffd92ce8e10 (diff)
Test implementation of grail api
This patch introduces the grail API, and a program to test it (evlink). Signed-off-by: Henrik Rydberg <rydberg@bitmath.org>
Diffstat (limited to 'test/touch.c')
-rw-r--r--test/touch.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/touch.c b/test/touch.c
index 1f9213d..bc10b54 100644
--- a/test/touch.c
+++ b/test/touch.c
@@ -22,7 +22,7 @@
22 * 22 *
23 ****************************************************************************/ 23 ****************************************************************************/
24 24
25#include <grail.h> 25#include <grail-touch.h>
26#include <string.h> 26#include <string.h>
27#include <stdio.h> 27#include <stdio.h>
28#include <unistd.h> 28#include <unistd.h>
@@ -34,7 +34,8 @@ static void tp_event(struct touch_engine *engine,
34 fprintf(stderr, "event %d %d %d\n", ev->type, ev->code, ev->value); 34 fprintf(stderr, "event %d %d %d\n", ev->type, ev->code, ev->value);
35} 35}
36 36
37static void tp_sync(struct touch_engine *engine) 37static void tp_sync(struct touch_engine *engine,
38 const struct input_event *syn)
38{ 39{
39 struct touch_frame *frame = &engine->frame; 40 struct touch_frame *frame = &engine->frame;
40 int slot, i; 41 int slot, i;
@@ -62,7 +63,7 @@ int main(int argc, char *argv[])
62 struct touch_dev dev; 63 struct touch_dev dev;
63 int fd; 64 int fd;
64 if (argc < 2) { 65 if (argc < 2) {
65 fprintf(stderr, "Usage: mtdev <device>\n"); 66 fprintf(stderr, "Usage: %s <device>\n", argv[0]);
66 return -1; 67 return -1;
67 } 68 }
68 fd = open(argv[1], O_RDONLY | O_NONBLOCK); 69 fd = open(argv[1], O_RDONLY | O_NONBLOCK);