feat(shields) Add encoder support to CRBN

Pin A maps to A2 (F5), pin B to A3 (F4).
Added keymappings to encoder on default and lower layers.
This commit is contained in:
mantas
2021-01-30 14:03:00 +02:00
committed by Pete Johanson
parent c94943da1c
commit b4d63fb52c
3 changed files with 22 additions and 0 deletions

View File

@@ -38,4 +38,18 @@
, <&pro_micro_a 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};
encoder: encoder {
compatible = "alps,ec11";
label = "ENCODER";
a-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <2>;
status = "okay";
};
sensors {
compatible = "zmk,keymap-sensors";
sensors = <&encoder>;
};
};