Linux Input 子系统及Android Input与其对接
2022-09-06 11:59:30 0 举报
linux input子系统及android input框架图
作者其他创作
大纲/内容
process
SensorInputMapper
device如何把数据传送到handler的input_event
InputDeviceNode
InputDevice.cpp
User 部分Input子系统
InputHostBase
InputReportDefinition
MultiTouchInputMapper
InputReader
INIT_LIST_HEAD
SwitchInputMapper
processInput
input_host_callbacks_t 的report_event
CursorInputMapper
JoystickInputMapper
InputHostInterface
XInputMapper
InputThread::run
device_add
processEventsLocked
EvdevModule
scanDir
InputPropertyMap
InpuDeviceManager
EventHub
InputMapper
+ void loopOnce()
ExternalStylusInputMapper
loopOnce
handler->connect
设置分配要处理数据的缓存队列
InputDeviceManager.cpp
is_event_supported
register_chrdev_region
KeyboardInputMapper
ContextImpl
input_wakeup_procfs_readers
flush
InputThread
InputHost
InputHub.cpp
InputManager
InputReaderInterface
class_register
input.c 对应的输入设备驱动程序关键点
input_proc_init
getEvents
InputDeviceInterface
- std::unique_ptr<InputHostInterface> mInputHost- std::shared_ptr<InputDeviceManager> mDeviceManager- std::unique_ptr<InputHub> mInputHub- std::thread mPollThread;
+ explicit EvdevModule(InputHostInterface* inputHost)+ void init();+ void notifyReport(input_report_t* r)- void loop();
input_register_handler
SingleTouchInputMapper
input_host_callbacks_t
检查device常用功能
device如何与handler关联起来的?input_attach_handler
InputDeviceDefinition
Android Framework 层 直接处理逻辑
connect 一般通过input_register_handle 将申请的node与device要处理的h_list(handler list) 关联
loop
RotaryEncoderInputMapper
EvdevModule.cpp
onInputEvent
input_register_device
reportEvent
InputDevice
EventHubInterface
input_match_device
init
TouchInputMapper
Linux 内核Input子系统
Android hal 层
InputMapperx
EvdevDevice
- std::vector<std::unique_ptr<InputMapper>> mMappers;
InputHubInterface
InputHost.cpp
SwitchInputMapper
VibratorInputMapper
InputReaderFactory
threadloop
InputCallbackInterface
input.c 对应的输入事件驱动程序关键点
MouseInputMapper
EvdevModule:init
- using MapperVector = std::vector<std::unique_ptr<InputMapper>>
poll
InputDeviceContext
- scanDevicesLocked():void
InputReport
InputDeviceManager
input_init
- threadLoop()
InputProperty
createInputReader
input.c input 核心层初始化
sync
processEventsForDeviceLocked
InputReaderContext
registerDevicePath
InputHub
EvdevDeviceNode
new InputReader
start
input_handle_event
0 条评论
下一页