-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[dm][input] support input #11031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dm][input] support input #11031
Conversation
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
📌 Code Review Assignment🏷️ Tag: componentsReviewers: Maihuanyi Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2025-12-10 11:58 CST)
📝 Review Instructions
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a comprehensive input device framework to RT-Thread, introducing support for various input devices including keyboards, touchscreens, joysticks, and miscellaneous input devices. The implementation includes power event handling, touch device abstraction layer, Unix-style API (UAPI) for application compatibility, and hardware-specific drivers.
Key Changes
- Added core input device framework with event handling, capability management, and handler registration system
- Implemented touch device abstraction with multi-touch support and coordinate transformation
- Integrated Unix-style API (UAPI) for file operations (open, close, read, write, ioctl, poll)
- Added power event handling for system shutdown/restart via input events
- Included hardware drivers for GPIO keyboards and NI Ettus Research USRP E3x0 buttons
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| components/drivers/input/input.c | Core input device registration, capability management, and event dispatch system |
| components/drivers/input/input_power.c | Power event handler for system shutdown/restart via KEY_POWER and KEY_RESTART |
| components/drivers/input/input_touch.c | Touch device abstraction layer with coordinate transformation and multi-touch support |
| components/drivers/input/input_uapi.c | Unix API implementation providing file operations for input devices |
| components/drivers/input/keyboard/keys-gpio.c | GPIO-based keyboard driver supporting device tree configuration |
| components/drivers/input/misc/button-e3x0.c | Hardware-specific button driver for NI Ettus E3x0 platform |
| components/drivers/input/touchscreen/Kconfig | Configuration for touchscreen device drivers |
| components/drivers/input/joystick/Kconfig | Configuration for joystick device drivers |
| components/drivers/input/misc/Kconfig | Configuration for miscellaneous input devices |
| components/drivers/input/keyboard/Kconfig | Configuration for keyboard device drivers |
| components/drivers/input/Kconfig | Main input subsystem configuration |
| components/drivers/input/SConscript | Build script for input subsystem |
| components/drivers/include/dt-bindings/input/event-codes.h | Standard Linux-compatible input event code definitions |
| components/drivers/include/rtdevice.h | Integration of input headers into RT-Thread device framework |
| components/drivers/Kconfig | Added input subsystem to drivers configuration |
For: RT-Thread#6251 1. Add power event. 2. Port to touch. 3. Add uapi for unix app. Signed-off-by: GuEe-GUI <2991707448@qq.com>
1. NI Ettus Research USRP E3xx Button support. 2. GPIO Keyboards support. Signed-off-by: GuEe-GUI <2991707448@qq.com>
|
@Rbb666 AI 相关合理问题已修改 |
拉取/合并请求描述:(PR description)
[
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up