Files
zmk-config/boards/shields/numpad3d/numpad3d.overlay
Sam Hadow 0d29d199d3
Some checks failed
Build ZMK firmware / build (push) Has been cancelled
update
2026-03-11 17:25:20 +01:00

52 lines
1.3 KiB
Plaintext

// 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_OPEN_SOURCE
&gpio0 29 GPIO_OPEN_SOURCE
&gpio0 2 GPIO_OPEN_SOURCE
&gpio1 15 GPIO_OPEN_SOURCE
&gpio1 13 GPIO_OPEN_SOURCE
&gpio1 11 GPIO_OPEN_SOURCE
>;
};
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)
>;
};
};