Files
new_kbd/app.overlay
skiinder a46b7ad8b8 feat(usb_hid): 支持HID供应商报告类型并增加输出报告大小
支持HID供应商特定报告类型的处理,在USB HID模块中添加了对REPORT_ID_VENDOR
的支持,并相应地修改了设备覆盖文件中的输出报告大小配置。

功能变更包括:
- 在app.overlay中将out-report-size从8增加到31以支持更大的报告
- 添加hid_vendor_mask_event.h头文件引入
- 实现try_extract_vendor_mask函数用于解析供应商特定掩码数据
- 在hid_stub_set_report和hid_stub_output_report函数中添加供应商掩码处理逻辑
- 更新handle_hid_tx_event函数以允许REPORT_ID_VENDOR类型的报告
2026-03-20 15:50:20 +08:00

81 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#include <zephyr/dt-bindings/gpio/gpio.h>
/ {
zephyr,user {
vbat-en-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
io-channels = <&adc 5>, <&adc 7>;
};
hid_dev_0: hid_dev_0 {
compatible = "zephyr,hid-device";
label = "HID_BOOT";
protocol-code = "keyboard";
in-report-size = <8>;
in-polling-period-us = <1000>;
out-report-size = <8>;
out-polling-period-us = <1000>;
};
hid_dev_1: hid_dev_1 {
compatible = "zephyr,hid-device";
label = "HID_NKRO";
protocol-code = "none";
in-report-size = <31>;
in-polling-period-us = <1000>;
out-report-size = <31>;
out-polling-period-us = <1000>;
};
raw_hid: hid_dev_2 {
compatible = "zephyr,hid-device";
label = "HID_RAW";
protocol-code = "none";
in-report-size = <64>;
in-polling-period-us = <1000>;
out-report-size = <64>;
out-polling-period-us = <1000>;
};
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&gpiote {
status = "okay";
};
&led_0 {
status = "okay";
};
&led_1 {
status = "okay";
};
/* 使能 SAADCmode_switch_module 使用 channel 7 采样模式拨码电压。 */
&adc {
status = "okay";
};
&i2c1 {
status = "okay";
ip5305: pmic@75 {
status = "okay";
keepalive-interval-ms = <10000>;
};
};
&usbd {
status = "okay";
};
qdec: &qdec {
status = "okay";
};