feat(usb_hid_keyboard): 支持键盘LED报告处理

- 添加KBD_LED_REPORT_WITH_ID_SIZE宏定义以支持带ID的LED报告
- 实现keyboard_handle_led_report函数来处理不同长度的LED报告
- 在keyboard_set_report中添加对HID_REPORT_TYPE_OUTPUT类型的支持
- 优化keyboard_output_report函数以复用LED报告处理逻辑
- 移除datetime_event中的INIT_LOG_ENABLE标志

支持处理长度为1字节或2字节(包含report ID)的键盘LED报告,
并提供适当的错误日志记录功能。
This commit is contained in:
2026-04-15 17:54:15 +08:00
parent bd57b00080
commit 2ca02325c1
3 changed files with 47 additions and 14 deletions

View File

@@ -30,7 +30,7 @@
label = "HID_KBD";
protocol-code = "keyboard";
in-report-size = <29>;
out-report-size = <1>;
out-report-size = <29>;
in-polling-period-us = <1000>;
out-polling-period-us = <1000>;
};