File tree Expand file tree Collapse file tree 3 files changed +24
-12
lines changed Expand file tree Collapse file tree 3 files changed +24
-12
lines changed Original file line number Diff line number Diff line change @@ -39,15 +39,21 @@ TSLIB_INC_DIR = ""
39
39
40
40
> 详情可以看 scons help,或者可以通过 scons EXPORT_DEFINE_FILE=./awtk_config_define.py 导出一个完整的 awtk_config_define.py 文件。
41
41
42
- * 3 . 修改输入设备名字的方法有两个:
43
- 1 . 配置 awtk-linux-fb\config\devices.json 文件,详情请看 awtk-linux-fb\config\readme.md 文档。
44
- 2 . 编辑 awtk-port/main\_ loop\_ linux.c 修改输入设备的文件名(这个方法将来会弃用,如果同时有 devices.json 文件,则优先使用 devices.json 文件的配置)
45
- ```
46
- #define FB_DEVICE_FILENAME "/dev/fb0"
47
- #define TS_DEVICE_FILENAME "/dev/input/event0"
48
- #define KB_DEVICE_FILENAME "/dev/input/event1"
49
- #define MICE_DEVICE_FILENAME "/dev/input/mouse0"
50
- ```
42
+ * 3 . 配置设备文件路径,方法二选一:
43
+ 1 . 配置 config/devices.json 文件,详情请看 config/readme.md 文档。
44
+
45
+ 2 . 修改 awtk-port/main\_ loop\_ linux.c 文件设置输入输出设备的文件名。
46
+
47
+ ``` c
48
+ // main_loop_linux.c
49
+ // 这个方法将来会弃用,如果运行时有 devices.json 文件则会优先使用 devices.json 的配置
50
+ //
51
+ #define FB_DEVICE_FILENAME "/dev/fb0"
52
+ #define TS_DEVICE_FILENAME "/dev/input/event0"
53
+ #define KB_DEVICE_FILENAME "/dev/input/event1"
54
+ #define MICE_DEVICE_FILENAME "/dev/input/mouse0"
55
+ ```
56
+
51
57
**备注:**
52
58
可通过 "hexdump /dev/input/xx" 命令识别正确的触摸或鼠标设备文件名。触摸设备也可以通过tslib自带的命令测试,如 "ts_test"、"ts_print"。
53
59
Original file line number Diff line number Diff line change 1
- # 驱动配置文件说明
1
+ # 设备配置文件说明
2
2
3
- 1 . 把 devices.json.in 文件名修改为 devices.json 。(如果不修改名字则使用默认驱动配置或者宏配置)
4
- 2 . 编辑 devices.json 修改输入设备的文件名,该配置文件会随后续打包命令一起部署
3
+ 1 . 复制模板文件 devices.json.in 并改名为 devices.json,该配置文件会随后续打包命令一起部署。
4
+
5
+ (如果运行时没有 devices.json 文件则使用 main_loop_linux.c 默认设备宏配置)
6
+
7
+ 2 . 编辑 devices.json 指定输入设备的文件路径及对应的设备类型。
5
8
6
9
``` json
7
10
{
Original file line number Diff line number Diff line change 1
1
# 最新动态
2
2
3
+ 2023/11/17
4
+ * 为兼容老的使用习惯,删除config/devices.json文件改为模板文件devices.json.in,并增加使用说明(感智明提供补丁)
5
+
3
6
2023/08/28
4
7
* 重构scons脚本支持awtk_config_define.py和命令行参数,可以用scons help查看命令,注意要配合最新awtk使用(感智明提供补丁)
5
8
You can’t perform that action at this time.
0 commit comments