#include <stdint.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/types.h>
浏览源代码.
- 作者
- zhengchuangyong (zheng.nosp@m.chua.nosp@m.ngyon.nosp@m.g@em.nosp@m.bedsk.nosp@m.y.ne.nosp@m.t)
- 版本
- 1.0
- 日期
- 2021-09-10
- 版权所有
- Copyright (c) 2023 广州省天嵌嵌入式技术股份有限公司
- 修改日志:
Date | Version | Author | Description |
2021-09-10 | 1.0 | zhengchuangyong | 第一次发布,将得到输入设备名的操作封装在一个函数中。 |
int tq_getinput |
( |
char * |
touch_type, |
|
|
char * |
dev_name |
|
) |
| |
传入字符串判断触摸是哪个设备,将设备名写入指针地址
- 参数
-
touch_type | 触摸类型,需要字符串,如:Capacitance_ts->电容触摸 |
dev_name | 写入设备名的空间指针 |
- 返回
- int 成功返回0,打开临时文件失败返回-1,读取临时文件失败返回-2
对tq_getinput()函数进行测试
- 返回
- int 成功返回0,打开Resistance_ts失败返回2,打开Capacitance_ts失败返回3