Browse Source

More consistent DT for the split encoders.

xmkb
Pete Johanson 4 years ago
parent
commit
a734d58ffe
  1. 19
      app/boards/shields/kyria/kyria.dtsi
  2. 13
      app/boards/shields/kyria/kyria_left.overlay
  3. 4
      app/boards/shields/kyria/kyria_right.overlay

19
app/boards/shields/kyria/kyria.dtsi

@ -10,6 +10,7 @@
chosen { chosen {
zmk,kscan = &kscan0; zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform; zmk,matrix_transform = &default_transform;
zmk,encoders = <&left_encoder &right_encoder>;
}; };
default_transform: keymap_transform_0 { default_transform: keymap_transform_0 {
@ -58,6 +59,24 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9)
}; };
left_encoder: encoder_left {
compatible = "alps,ec11";
label = "LEFT_ENCODER";
a-gpios = <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>;
status = "disabled";
};
right_encoder: encoder_right {
compatible = "alps,ec11";
label = "RIGHT_ENCODER";
a-gpios = <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>;
status = "disabled";
};
// TODO: Encoder node(s) // TODO: Encoder node(s)
// TODO: OLED node // TODO: OLED node
// TODO: RGB node(s) // TODO: RGB node(s)

13
app/boards/shields/kyria/kyria_left.overlay

@ -6,16 +6,6 @@
#include "kyria.dtsi" #include "kyria.dtsi"
/ {
encoder: encoder0 {
compatible = "alps,ec11";
label = "Rotary Encoder";
a-gpios = <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>;
};
};
&kscan0 { &kscan0 {
col-gpios col-gpios
= <&pro_micro_a 3 GPIO_ACTIVE_HIGH> = <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
@ -29,3 +19,6 @@
; ;
}; };
&left_encoder {
status = "okay";
};

4
app/boards/shields/kyria/kyria_right.overlay

@ -23,3 +23,7 @@
; ;
}; };
&right_encoder {
status = "okay";
};

Loading…
Cancel
Save