From d19345a016d2404d3e407bfd4b8e1e8799e090c1 Mon Sep 17 00:00:00 2001 From: schwarzgrau Date: Tue, 13 Sep 2022 01:58:04 +0200 Subject: [PATCH] aaargh --- config/boards/shields/totem/Kconfig.defconfig | 2 +- config/boards/shields/totem/Kconfig.shield | 7 +++- config/boards/shields/totem/totem.dtsi | 35 +++++++++---------- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/config/boards/shields/totem/Kconfig.defconfig b/config/boards/shields/totem/Kconfig.defconfig index 9871440..d6059f0 100644 --- a/config/boards/shields/totem/Kconfig.defconfig +++ b/config/boards/shields/totem/Kconfig.defconfig @@ -10,7 +10,7 @@ endif # LEFT -if SHIELD_TOTEM_LEFT || SHIELD_TOTEM_RIGHT +if SHIELD_TOTEM config ZMK_SPLIT default y diff --git a/config/boards/shields/totem/Kconfig.shield b/config/boards/shields/totem/Kconfig.shield index 489b208..2f2d59a 100644 --- a/config/boards/shields/totem/Kconfig.shield +++ b/config/boards/shields/totem/Kconfig.shield @@ -1,5 +1,10 @@ +config SHIELD_TOTEM + bool + config SHIELD_TOTEM_LEFT def_bool $(shields_list_contains,totem_left) + select SHIELD_TOTEM config SHIELD_TOTEM_RIGHT - def_bool $(shields_list_contains,totem_right) \ No newline at end of file + def_bool $(shields_list_contains,totem_right) + select SHIELD_CLOG_V2 \ No newline at end of file diff --git a/config/boards/shields/totem/totem.dtsi b/config/boards/shields/totem/totem.dtsi index f0e1735..45c818e 100644 --- a/config/boards/shields/totem/totem.dtsi +++ b/config/boards/shields/totem/totem.dtsi @@ -8,14 +8,14 @@ / { chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; }; - default_transform: keymap_transform { - compatible = "zmk,matrix-transform"; - columns = <10>; - rows = <4>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; map = < RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) @@ -25,17 +25,16 @@ }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; - diode-direction = "col2row"; - - row-gpios - = <&xiao_d 1 GPIO_ACTIVE_HIGH> - , <&xiao_d 2 GPIO_ACTIVE_HIGH> - , <&xiao_d 3 GPIO_ACTIVE_HIGH> - , <&xiao_d 4 GPIO_ACTIVE_HIGH> - ; - }; + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "row2col"; + row-gpios + = <&xiao_d 10 GPIO_ACTIVE_HIGH> + , <&xiao_d 9 GPIO_ACTIVE_HIGH> + , <&xiao_d 8 GPIO_ACTIVE_HIGH> + , <&xiao_d 7 GPIO_ACTIVE_HIGH> + ; + }; }; \ No newline at end of file