This commit is contained in:
51
boards/shields/numpad3d/numpad3d.overlay
Normal file
51
boards/shields/numpad3d/numpad3d.overlay
Normal file
@@ -0,0 +1,51 @@
|
||||
// This file was generated from a template. Edit it to match your keyboard.
|
||||
// See https://zmk.dev/docs/development/hardware-integration/new-shield for more
|
||||
// instructions.
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
#include "numpad3d-layouts.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios = <
|
||||
&gpio1 4 GPIO_ACTIVE_HIGH
|
||||
&gpio1 6 GPIO_ACTIVE_HIGH
|
||||
&gpio0 9 GPIO_ACTIVE_HIGH
|
||||
&gpio0 10 GPIO_ACTIVE_HIGH
|
||||
>;
|
||||
|
||||
row-gpios = <
|
||||
&gpio0 31 GPIO_ACTIVE_HIGH
|
||||
&gpio0 29 GPIO_ACTIVE_HIGH
|
||||
&gpio0 2 GPIO_ACTIVE_HIGH
|
||||
&gpio1 15 GPIO_ACTIVE_HIGH
|
||||
&gpio1 13 GPIO_ACTIVE_HIGH
|
||||
&gpio1 11 GPIO_ACTIVE_HIGH
|
||||
>;
|
||||
};
|
||||
|
||||
default_transform: matrix_transform {
|
||||
compatible = "zmk,matrix-transform";
|
||||
rows = <6>;
|
||||
columns = <4>;
|
||||
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3)
|
||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3)
|
||||
RC(5,0) RC(5,1) RC(5,2) RC(5,3)
|
||||
>;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user