Skip to content

Commit

Permalink
edited to use matrix transform
Browse files Browse the repository at this point in the history
  • Loading branch information
Sadteeto committed Jan 27, 2024
1 parent efad742 commit 2b23f2d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
12 changes: 12 additions & 0 deletions boards/shields/generic-numpad/generic-numpad.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -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)>
;
};
}
10 changes: 2 additions & 8 deletions boards/shields/generic-numpad/generic-numpad.overlay
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "generic-numpad.dtsi"

/ {
chosen {
zmk,kscan = &kscan0;
Expand All @@ -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)>
;
};
};

0 comments on commit 2b23f2d

Please sign in to comment.