同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Functions of the Touchscreen driver
The Touchscreen driver is used to power on its integrated circuit (IC), configure and initialize hardware pins, register interrupts, configure Inter-Integrated Circuit (I2C) or SPI APIs, set input-related configurations, and download and update firmware.
Layers of the Touchscreen driver
This section describes how to develop the touchscreen driver based on the input driver model. Figure 1 shows an overall architecture of the touchscreen driver.
The input driver is developed based on the hardware driver foundation (HDF), platform APIs, and operating system abstraction layer (OSAL) APIs. It provides hardware driver capabilities through the input Hardware Driver Interfaces (HDIs) for upper-layer input services to control the touchscreen.
Figure 1 Architecture of the input driver model
Input driver model
The input driver model mainly consists of the device manager, common drivers, and chip drivers. The platform data channel provides capabilities for sending data generated by the touchscreen from the kernel to the user space. The driver model adapts to different touchscreen devices and hardware platforms via the configuration file, improving the efficiency of the touchscreen development. The description for each part of the input driver model is as follows:
Input device manager: provides various input device drivers with the APIs for registering or unregistering input devices and manages the input device list.
Input common driver: provides common abstract drivers (such as the touchscreen common driver) of various input devices for initializing the board-level hardware, processing hardware interrupts, and registering input devices with the input device manager.
Input chip driver: provides different chip drivers of each vendor. You can minimize the workload for the input chip driver development by calling differentiated APIs reserved by the input platform driver.
Event hub: provides a unified data reporting channel, which enables various input devices to report input events.
HDF input config: parses and manages the board-level configuration as well as the private configuration of input devices.
Advantages of developing drivers based on the HDF
The touchscreen driver is developed based on the HDF and is implemented via calls to the OSAL and platform APIs, including bus APIs and OS native APIs (such as memory, lock, thread, and timer). The OSAL and platform APIs hide the differences of underlying hardware, so that the touchscreen driver can be migrated across platforms and OSs. In this regard, you can develop the touchscreen driver only once but deploy it on multiple devices.
Based on the attributes of the pins, interfaces on the touchscreens can be classified into the following types:
Figure 2 Common pins of the touchscreen
The interfaces shown in the figure are described as follows:
Power interfaces
LDO_1P8: 1.8 V digital circuits
LDO_3P3: 3.3 V analog circuits
Generally, the touchscreen driver IC is separated from the LCD driver IC. In this case, the touchscreen driver IC requires both 1.8 V and 3.3 V power supplies. Nowadays, the touchscreen driver IC and LCD driver IC can be integrated. Therefore, the touchscreen, requires only the 1.8 V power supply, and the 3.3 V power required internally is supplied by the LCD VSP power (typical value: 5.5 V) in the driver IC.
I/O control interfaces
Communications interfaces
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。