diff --git a/boards/shields/generic-numpad/generic-numpad.dtsi b/boards/shields/generic-numpad/generic-numpad.dtsi index d4addd6..67a89d2 100644 --- a/boards/shields/generic-numpad/generic-numpad.dtsi +++ b/boards/shields/generic-numpad/generic-numpad.dtsi @@ -18,4 +18,16 @@ RC(4,1) RC(4,3) >; }; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + + diode-direction = "col2row"; + row-gpios + = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; } diff --git a/boards/shields/generic-numpad/generic-numpad.overlay b/boards/shields/generic-numpad/generic-numpad.overlay index 3ff4961..cd863b4 100644 --- a/boards/shields/generic-numpad/generic-numpad.overlay +++ b/boards/shields/generic-numpad/generic-numpad.overlay @@ -1,3 +1,5 @@ +#include "generic-numpad.dtsi" + / { chosen { zmk,kscan = &kscan0; @@ -13,13 +15,5 @@ , <&pro_micro 4 GPIO_ACTIVE_HIGH> , <&pro_micro 5 GPIO_ACTIVE_HIGH> ; - - row-gpios - = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; }; }; \ No newline at end of file