diff --git a/app/boards/shields/tester_nrf52840dk/Kconfig.defconfig b/app/boards/shields/tester_nrf52840dk/Kconfig.defconfig new file mode 100644 index 00000000000..4146b86c96e --- /dev/null +++ b/app/boards/shields/tester_nrf52840dk/Kconfig.defconfig @@ -0,0 +1,12 @@ +if SHIELD_TESTER_NRF52840DK + +config ZMK_KEYBOARD_NAME + default "ZMK Tester" + +config ZMK_BLE + def_bool n + +config SETTINGS + def_bool n + +endif diff --git a/app/boards/shields/tester_nrf52840dk/Kconfig.shield b/app/boards/shields/tester_nrf52840dk/Kconfig.shield new file mode 100644 index 00000000000..a222eaae542 --- /dev/null +++ b/app/boards/shields/tester_nrf52840dk/Kconfig.shield @@ -0,0 +1,2 @@ +config SHIELD_TESTER_NRF52840DK + def_bool $(shields_list_contains,tester_nrf52840dk) diff --git a/app/boards/shields/tester_nrf52840dk/tester_nrf52840dk.keymap b/app/boards/shields/tester_nrf52840dk/tester_nrf52840dk.keymap new file mode 100644 index 00000000000..eefd1746a27 --- /dev/null +++ b/app/boards/shields/tester_nrf52840dk/tester_nrf52840dk.keymap @@ -0,0 +1,33 @@ +#include +#include + +#define PIN_MACRO(name, pin) \ +/ { \ + macros { \ + name: name { \ + compatible = "zmk,behavior-macro"; \ + wait-ms = <5>; \ + tap-ms = <5>; \ + #binding-cells = <0>; \ + bindings = <&kp P &kp I &kp N &kp SPACE>, pin, <&kp ENTER>; \ + }; \ + }; \ +}; + +PIN_MACRO(pin0, <&kp N0>) +PIN_MACRO(pin1, <&kp N1>) +PIN_MACRO(pin2, <&kp N2>) +PIN_MACRO(pin3, <&kp N3>) + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = <&pin0 + &pin1 + &pin2 + &pin3>; + }; + }; +}; diff --git a/app/boards/shields/tester_nrf52840dk/tester_nrf52840dk.overlay b/app/boards/shields/tester_nrf52840dk/tester_nrf52840dk.overlay new file mode 100644 index 00000000000..82d00852ae5 --- /dev/null +++ b/app/boards/shields/tester_nrf52840dk/tester_nrf52840dk.overlay @@ -0,0 +1,27 @@ +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix-transform = &transform0; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + wakeup-source; + debounce-press-ms = <10>; + debounce-release-ms = <10>; + input-gpios + = <&gpio0 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpio0 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpio0 24 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpio0 25 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; + + transform0: keymap_transform { + compatible = "zmk,matrix-transform"; + columns = <4>; + rows = <1>; + map = ; + }; +}; diff --git a/app/boards/shields/tester_nrf52840dk/tester_nrf52840dk.zmk.yml b/app/boards/shields/tester_nrf52840dk/tester_nrf52840dk.zmk.yml new file mode 100644 index 00000000000..dfc834d85ec --- /dev/null +++ b/app/boards/shields/tester_nrf52840dk/tester_nrf52840dk.zmk.yml @@ -0,0 +1,6 @@ +file_format: "1" +id: tester_nrf52840dk +name: TesternRF52840DK +type: shield +url: https://zmk.dev/docs/troubleshooting/hardware-issues +requires: [nrf52840dk_nrf52840]