mirror of
https://github.com/Ajetski/corne-zmk-config.git
synced 2025-11-27 12:42:44 -10:00
refactor: consolidate encoder config
This commit is contained in:
parent
9da0f34455
commit
b85964cf00
@ -24,19 +24,20 @@
|
||||
zmk,backlight = &backlight;
|
||||
};
|
||||
|
||||
left_encoder: encoder_left {
|
||||
compatible = "alps,ec11";
|
||||
label = "LEFT_ENCODER";
|
||||
resolution = <4>;
|
||||
steps = <40>;
|
||||
status = "disabled";
|
||||
};
|
||||
left_encoder: encoder_left {
|
||||
compatible = "alps,ec11";
|
||||
a-gpios = <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
steps = <40>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder>;
|
||||
};
|
||||
|
||||
compatible = "zmk,keymap-sensors";
|
||||
triggers-per-rotation = <20>;
|
||||
sensors = <&left_encoder>;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <14>;
|
||||
|
||||
@ -7,6 +7,7 @@ arch: arm
|
||||
features:
|
||||
- keys
|
||||
- display
|
||||
- encoder
|
||||
outputs:
|
||||
- usb
|
||||
- ble
|
||||
|
||||
@ -48,8 +48,6 @@
|
||||
};
|
||||
|
||||
&left_encoder {
|
||||
a-gpios = <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user