Files
new_kbd/app.overlay
skiinder 86af0d2373 feat: 添加模式切换模块支持多协议键盘
添加了完整的模式切换功能,通过ADC采样检测模式拨码开关,
实现USB、BLE和2.4G三种工作模式的自动识别和切换。

- 新增mode_event事件用于传递模式状态
- 实现mode_switch_module模块,包含ADC初始化、
  模式识别算法和状态管理逻辑
- 配置CMakeLists.txt添加新源文件和头文件目录
- 更新设备树配置启用ADC和IO通道
- 添加Kconfig选项CONFIG_ADC=y
- 实现防抖机制和稳定的模式检测逻辑
- 集成到CAF事件系统,支持电源管理状态切换
2026-03-11 10:44:50 +08:00

27 lines
328 B
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.
/ {
zephyr,user {
io-channels = <&adc 5>, <&adc 7>;
};
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&gpiote {
status = "okay";
};
&led_0 {
status = "okay";
};
/* 使能 SAADCmode_switch_module 使用 channel 7 采样模式拨码电压。 */
&adc {
status = "okay";
};