输入子系统+按键

输入子系统

使用输入子系统,就不需要自己注册字符设备或杂项设备了

什么是输入子系统

image
image
image
image
键盘数据格式
image

访问设备节点获取上报的数据

image


输入子系统读取按键值

image

相关api

申请struct input_dev

image

注销struct input_dev

image

初始化event

初始化code

向linux内核注册input_dev

image

事件上报

image

示例

image

中断中调用input_report_key(test_dev)、input_sync(test_dev)

image


posted @ 2023-03-12 08:06  我爱茜茜公主  阅读(19)  评论(0)    收藏  举报