ec11 encoders

This commit is contained in:
2025-09-30 23:05:58 +10:00
parent 354fd0d231
commit 1adf0c071e
2 changed files with 31 additions and 6 deletions

View File

@@ -18,6 +18,23 @@
events = <0>;
};
/* Rotary encoders (same logical wiring as halves; mark disabled until mapped to actual pins if needed) */
left_encoder: left_encoder {
compatible = "alps,ec11";
a-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH)>;
b-gpios = <&gpio0 20 (GPIO_ACTIVE_HIGH)>;
steps = <80>;
status = "okay";
};
right_encoder: right_encoder {
compatible = "alps,ec11";
a-gpios = <&gpio0 20 (GPIO_ACTIVE_HIGH)>;
b-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH)>;
steps = <80>;
status = "okay";
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <16>;
@@ -30,4 +47,10 @@
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11)
>;
};
sensors: sensors {
compatible = "zmk,keymap-sensors";
sensors = <&left_encoder &right_encoder>;
triggers-per-rotation = <20>;
};
};