diff --git a/config/boards/arm/sofle/sofle.dtsi b/config/boards/arm/sofle/sofle.dtsi index 632baeb..5a947e8 100644 --- a/config/boards/arm/sofle/sofle.dtsi +++ b/config/boards/arm/sofle/sofle.dtsi @@ -25,6 +25,18 @@ zmk,matrix-transform = &default_transform; }; + left_encoder: encoder_left { + compatible = "alps,ec11"; + label = "LEFT_ENCODER"; + resolution = <4>; + status = "disabled"; + }; + + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder>; + }; + default_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <14>; diff --git a/config/boards/arm/sofle/sofle_left.dts b/config/boards/arm/sofle/sofle_left.dts index 348e924..ece27d5 100644 --- a/config/boards/arm/sofle/sofle_left.dts +++ b/config/boards/arm/sofle/sofle_left.dts @@ -35,18 +35,11 @@ ; }; - left_encoder: encoder_left { - compatible = "alps,ec11"; - label = "LEFT_ENCODER"; + &left_encoder { a-gpios = <&gpio1 10 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; b-gpios = <&gpio1 14 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; - resolution = <4>; - status = "okay"; - }; - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder>; - }; + status = "okay"; + }; ext-power { compatible = "zmk,ext-power-generic"; diff --git a/config/sofle.conf b/config/sofle.conf index eb7d126..7f933b2 100644 --- a/config/sofle.conf +++ b/config/sofle.conf @@ -21,3 +21,7 @@ CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=160 CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3 #CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y + +#EC11 enable +CONFIG_EC11=y +CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y \ No newline at end of file