未验证 提交 b639876a 编写于 作者: O openharmony_ci 提交者: Gitee

!20702 [翻译完成】#I7CTD1

Merge pull request !20702 from Annie_wang/PR19311
...@@ -23,9 +23,7 @@ The input driver model consists of the following: ...@@ -23,9 +23,7 @@ The input driver model consists of the following:
- Common input drivers: provide common APIs that are applicable to different input devices (such as the common driver APIs for touchscreens). The APIs can be used to initialize board-specific hardware, handle hardware interrupts, and register input devices with the Input Device Manager. - Common input drivers: provide common APIs that are applicable to different input devices (such as the common driver APIs for touchscreens). The APIs can be used to initialize board-specific hardware, handle hardware interrupts, and register input devices with the Input Device Manager.
- Input chip drivers: provide differentiated APIs for the drivers form different vendors. You can use these APIs to develop your drivers with minimum modification. - Input chip drivers: provide differentiated APIs for the drivers form different vendors. You can use these APIs to develop your drivers with minimum modification.
- Event Hub: provides a unified channel for different input devices to report input events. - Event Hub: provides a unified channel for different input devices to report input events.
- HDF input config: parses and manages the board-specific and private configuration of input devices. - HDF input config: parses and manages the board-specific and private configuration of input devices.<br>The input driver model provides configuration files to help you quickly develop your drivers.
The input driver model provides configuration files to help you quickly develop your drivers.
## How to Develop ## How to Develop
...@@ -138,7 +136,7 @@ The following example describes how to develop the touchscreen driver for an RK3 ...@@ -138,7 +136,7 @@ The following example describes how to develop the touchscreen driver for an RK3
1. Configure device information. 1. Configure device information.
Configure the modules of the input driver model in **drivers/adapter/khdf/linux/hcs/device_info/device_info.hcs**. For details, see [Driver Development](../driver/driver-hdf-development.md). Then, the HDF loads the modules of the input model in sequence based on the configuration information. Configure the modules of the input driver model in **vendor/hihope/rk3568/hdf_config/khdf/device_info/device_info.hcs**. For details, see [Driver Development](../driver/driver-hdf-development.md). Then, the HDF loads the modules of the input model in sequence based on the configuration information.
```c ```c
input :: host { input :: host {
...@@ -183,7 +181,7 @@ The following example describes how to develop the touchscreen driver for an RK3 ...@@ -183,7 +181,7 @@ The following example describes how to develop the touchscreen driver for an RK3
2. Configure board-specific and private data for the touchscreen. 2. Configure board-specific and private data for the touchscreen.
Configure the data in **drivers/adapter/khdf/linux/hcs/input/input_config.hcs**. The following is an example. You can modify the configuration as required. Configure the data in **vendor/hihope/rk3568/hdf_config/khdf/input/input_config.hcs**. The following is an example. You can modify the configuration as required.
```c ```c
root { root {
...@@ -272,7 +270,9 @@ The following example describes how to develop the touchscreen driver for an RK3 ...@@ -272,7 +270,9 @@ The following example describes how to develop the touchscreen driver for an RK3
3. Add the touchscreen driver. 3. Add the touchscreen driver.
Implement the touchscreen-specific APIs in **divers/framework/model/input/driver/touchscreen/touch_gt911.c**. The following uses the APIs for obtaining and parsing device data as an example. You can implement the related APIs to match your development. Implement the touchscreen-specific APIs in **drivers/hdf_core/framework/model/input/driver/touchscreen/touch_gt911.c**.
The following uses the APIs for obtaining and parsing device data as an example. You can implement the related APIs to match your development.
```c ```c
/* Parse the touch reporting data read from the touchscreen into coordinates. */ /* Parse the touch reporting data read from the touchscreen into coordinates. */
...@@ -506,3 +506,4 @@ The following example describes how to develop the touchscreen driver for an RK3 ...@@ -506,3 +506,4 @@ The following example describes how to develop the touchscreen driver for an RK3
return 0; return 0;
} }
``` ```
<!--no_check-->
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册