Skip to content

Commit 87b6cc9

Browse files
author
chentan
committed
update readme doc desc
1 parent e09999f commit 87b6cc9

File tree

3 files changed

+24
-12
lines changed

3 files changed

+24
-12
lines changed

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,21 @@ TSLIB_INC_DIR = ""
3939

4040
> 详情可以看 scons help,或者可以通过 scons EXPORT_DEFINE_FILE=./awtk_config_define.py 导出一个完整的 awtk_config_define.py 文件。
4141
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+
5157
**备注:**
5258
可通过 "hexdump /dev/input/xx" 命令识别正确的触摸或鼠标设备文件名。触摸设备也可以通过tslib自带的命令测试,如 "ts_test"、"ts_print"。
5359

config/readme.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
# 驱动配置文件说明
1+
# 设备配置文件说明
22

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 指定输入设备的文件路径及对应的设备类型。
58

69
```json
710
{

docs/changes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# 最新动态
22

3+
2023/11/17
4+
* 为兼容老的使用习惯,删除config/devices.json文件改为模板文件devices.json.in,并增加使用说明(感智明提供补丁)
5+
36
2023/08/28
47
* 重构scons脚本支持awtk_config_define.py和命令行参数,可以用scons help查看命令,注意要配合最新awtk使用(感智明提供补丁)
58

0 commit comments

Comments
 (0)