ninepad
This commit is contained in:
parent
bd72e5b781
commit
de4a362675
7 changed files with 49 additions and 65 deletions
6
config/boards/shields/ninepad/Kconfig.defconfig
Normal file
6
config/boards/shields/ninepad/Kconfig.defconfig
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
if SHIELD_NINEPAD
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Ninepad"
|
||||
|
||||
endif
|
||||
2
config/boards/shields/ninepad/Kconfig.shield
Normal file
2
config/boards/shields/ninepad/Kconfig.shield
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
config SHIELD_NINEPAD
|
||||
def_bool $(shields_list_contains, ninepad)
|
||||
40
config/boards/shields/ninepad/ninepad.overlay
Normal file
40
config/boards/shields/ninepad/ninepad.overlay
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
/delete-property/ zephyr,console;
|
||||
/delete-property/ zephyr,shell-uart;
|
||||
};
|
||||
|
||||
default_kscan: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "default_kscan";
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
= <&gpio0 0 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 1 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 2 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
|
||||
row-gpios
|
||||
= <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
};
|
||||
|
||||
default_transform: matrix_transform {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <3>;
|
||||
rows = <3>;
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2)
|
||||
RC(1,0) RC(1,1) RC(1,2)
|
||||
RC(2,0) RC(2,1) RC(2,2)
|
||||
>;
|
||||
};
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue