天嵌二次封装库使用手册
V1.0
tq_getinput.h
浏览该文件的文档.
1
2
#ifndef _TQ_GETINPUT_H_
3
#define _TQ_GETINPUT_H_
4
20
#include <stdint.h>
21
#include <unistd.h>
22
#include <stdio.h>
23
#include <stdlib.h>
24
#include <string.h>
25
#include <getopt.h>
26
#include <fcntl.h>
27
#include <sys/ioctl.h>
28
#include <linux/types.h>
29
/*
30
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
31
N: Name="gpio-keys"
32
P: Phys=gpio-keys/input0
33
S: Sysfs=/devices/platform/gpio-keys/input/input0
34
U: Uniq=
35
H: Handlers=kbd event0
36
B: PROP=0
37
B: EV=3
38
B: KEY=1000 0 0 0 0 10000002
39
40
I: Bus=0019 Vendor=abce Product=ecba Version=0100
41
N: Name="tq_hs0038"
42
P: Phys=tq_hs0038/input1
43
S: Sysfs=/devices/virtual/input/input1
44
U: Uniq=
45
H: Handlers=kbd event1
46
B: PROP=0
47
B: EV=3
48
B: KEY=80 100100 68 40000800 1c1ec0 0 2000800 1000dffc
49
50
I: Bus=0018 Vendor=0ee0 Product=0021 Version=0000
51
N: Name="Capacitance_ts"
52
P: Phys=I2C
53
S: Sysfs=/devices/virtual/input/input2
54
U: Uniq=
55
H: Handlers=mouse0 event2
56
B: PROP=0
57
B: EV=b
58
B: KEY=400 1 0 0 0 0 0 0 0 0 0
59
B: ABS=6618000 1000003
60
61
I: Bus=0018 Vendor=0000 Product=0000 Version=0000
62
N: Name="Resistance_ts"
63
P: Phys=0-0048/input0
64
S: Sysfs=/devices/virtual/input/input3
65
U: Uniq=
66
H: Handlers=mouse1 event3
67
B: PROP=0
68
B: EV=b
69
B: KEY=400 0 0 0 0 0 0 0 0 0 0
70
B: ABS=1000003
71
* */
72
73
#ifdef __cplusplus
74
extern
"C"
75
{
76
#endif
77
83
int
tq_getinput
(
char
*touch_type,
char
*dev_name);
84
89
int
tq_getinput_test
();
90
#ifdef __cplusplus
91
}
92
#endif
93
#endif
tq_getinput_test
int tq_getinput_test()
对tq_getinput()函数进行测试
tq_getinput
int tq_getinput(char *touch_type, char *dev_name)
传入字符串判断触摸是哪个设备,将设备名写入指针地址
tqgetinput
tq_getinput.h
制作者
1.8.11