From 27d537827a46931ea3a0709479ef3405d19a68c1 Mon Sep 17 00:00:00 2001 From: Yaroslav Kondratev <95915347+KondratevYaroslav@users.noreply.github.com> Date: Tue, 27 Aug 2024 17:42:24 +0300 Subject: [PATCH] Update sofle.dtsi --- app/boards/shields/sofle/sofle.dtsi | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index 1ef26c0c..5d12bb22 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -44,7 +44,48 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; +// start soft-off + keys { + compatible = "gpio-keys"; + wakeup_key: wakeup_key { + gpios = <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; + }; + }; + behaviors { + hw_soft_off: hw_soft_off { + compatible = "zmk,behavior-soft-off"; + #binding-cells = <0>; + hold-time-ms = <2000>; + }; + }; + + side_band_behavior_triggers: side_band_behavior_triggers { + compatible = "zmk,kscan-sideband-behaviors"; + wakeup-source; + kscan = <&kscan>; + soft_off { + column = <0>; + row = <0>; + bindings = <&hw_soft_off>; + }; + }; + + wakeup_source: wakeup_source { + compatible = "zmk,gpio-key-wakeup-trigger"; + + trigger = <&wakeup_key>; + wakeup-source; + extra-gpios + = <&gpio0 19 GPIO_ACTIVE_HIGH> + ; + }; + + soft_off_wakers { + compatible = "zmk,soft-off-wakeup-sources"; + wakeup-sources = <&wakeup_source>; + }; +// end soft-off left_encoder: encoder_left { compatible = "alps,ec11"; a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;