From 6c74520e884b9d1c1293f8fd581a09a68e340c40 Mon Sep 17 00:00:00 2001 From: Yaroslav Kondratev <95915347+KondratevYaroslav@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:46:21 +0300 Subject: [PATCH] Update sofle.dtsi --- app/boards/shields/sofle/sofle.dtsi | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index ea791a46..f4df4ffa 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -31,6 +31,11 @@ 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) >; }; + soft_off_wakers { + compatible = "zmk,soft-off-wakeup-sources"; + wakeup-sources = <&encoder_switch>; // Пробуждение только от нажатия энкодера + }; + kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; wakeup-source; @@ -51,7 +56,6 @@ 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) b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <80>; status = "disabled"; - wakeup-source; }; right_encoder: encoder_right { @@ -60,7 +64,13 @@ 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) b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <80>; status = "disabled"; - wakeup-source; + }; + + encoder_switch: encoder_switch { + compatible = "gpio-keys"; + gpios = <&pro_micro 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; // Пин для нажатия энкодера + wakeup-source; // Пробуждение от нажатия + label = "Encoder Switch"; }; sensors: sensors {