同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
The init function of the input device manager initializes the device management linked list, and the init function of the common driver allocates memory for related structures. The RegisterChipDevice function passes touchscreen chip driver information to the related structures of the input common driver and initializes hardware information (for example, interrupt registration). The RegisterInputDevice function registers inputDev (binding the device and the driver) with the device manager. The RegisterInputDevice function adds inputDev to the device management linked list. The function implementation is as follows:
// Code location: ./drivers/framework/model/input/driver/hdf_touch.c
int32_t RegisterChipDevice(ChipDevice *chipDev)
{
...
/* Bind the device to the driver and create an inputDev instance using InputDeviceInstance. */
DeviceBindDriver(chipDev);
...
/* Implement the interrupt registration and interrupt handling functions. The interrupt handling function contains the channel for reporting data to the user space. */
ChipDriverInit(chipDev);
...
/* Allocate memory for instantiating inputDev. */
inputDev = InputDeviceInstance(chipDev);
...
/* Register inputDev with the input device manager. */
RegisterInputDevice(inputDev);
...
}
// Code location: ./drivers/framework/model/input/driver/hdf_input_device_manager.c
int32_t RegisterInputDevice(InputDevice *inputDev)
{
...
/* Allocate a device ID, which is unique for each input device. */
ret = AllocDeviceID(inputDev);
...
/* This function contains special processing for hid devices but does nothing for the touchscreen driver. */
CreateDeviceNode(inputDev);
/* Apply for the buffer for the IOService capability, which is required to transmit kernel-space data to the user space. */
AllocPackageBuffer(inputDev);
/* Add the input device to the global device management linked list. */
AddInputDevice(inputDev);
...
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。