diff --git a/build.yaml b/build.yaml index acb6f8c..0b508e0 100644 --- a/build.yaml +++ b/build.yaml @@ -16,6 +16,6 @@ # cmake-args: -DCONFIG_ZMK_USB_LOGGING=y # artifact-name: corne_left_with_logging # ---- include: - board: nice60 + shield: ninepad diff --git a/config/boards/shields/ninepad/Kconfig.defconfig b/config/boards/shields/ninepad/Kconfig.defconfig new file mode 100644 index 0000000..bae4184 --- /dev/null +++ b/config/boards/shields/ninepad/Kconfig.defconfig @@ -0,0 +1,6 @@ +if SHIELD_NINEPAD + +config ZMK_KEYBOARD_NAME + default "Ninepad" + +endif diff --git a/config/boards/shields/ninepad/Kconfig.shield b/config/boards/shields/ninepad/Kconfig.shield new file mode 100644 index 0000000..41cd6fc --- /dev/null +++ b/config/boards/shields/ninepad/Kconfig.shield @@ -0,0 +1,2 @@ +config SHIELD_NINEPAD + def_bool $(shields_list_contains, ninepad) diff --git a/config/boards/shields/ninepad/ninepad.overlay b/config/boards/shields/ninepad/ninepad.overlay new file mode 100644 index 0000000..92c3f8e --- /dev/null +++ b/config/boards/shields/ninepad/ninepad.overlay @@ -0,0 +1,40 @@ + #include + +/ { + 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) + >; + }; + +}; diff --git a/config/nice60.conf b/config/nice60.conf deleted file mode 100644 index 9cbbd04..0000000 --- a/config/nice60.conf +++ /dev/null @@ -1 +0,0 @@ -# Put configuration options here diff --git a/config/nice60.keymap b/config/nice60.keymap deleted file mode 100644 index 3a35716..0000000 --- a/config/nice60.keymap +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2021 Nick Winans - * - * SPDX-License-Identifier: MIT - */ - -#include -#include -#include -#include - -/ { - keymap { - compatible = "zmk,keymap"; - - default_layer { -// ------------------------------------------------------------------------------------------ -// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | -// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" | -// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | -// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | -// | CTL | WIN | ALT | SPACE | ALT | WIN | MO(1) | CTL | -// ------------------------------------------------------------------------------------------ - bindings = < - &gresc &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC - &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH - &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT - &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RGUI &mo 1 &kp RCTRL - >; - }; - - rgb_layer { -// ------------------------------------------------------------------------------------------------ -// | BT CLR | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | EFFECT REV | -// | BT 1 | | UP | | HUEUP | SATUP | BRIUP | SPDUP | | | | | | | -// | BT 2 | LT | DN | RT | HUEDN | SATDN | BRIDN | SPDDN | | | | | EFFECT FORW | -// | BT 3 | | | | | | | | | | | | -// | BT 4 | | | TOG RGB | PRT SCR | | | DEL | -// ------------------------------------------------------------------------------------------------ - bindings = < - &bt BT_CLR &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &rgb_ug RGB_EFR - &bt BT_SEL 0 &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &trans &trans &trans &trans &trans &trans - &bt BT_SEL 1 &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &trans &trans &trans &trans &rgb_ug RGB_EFF - &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &bt BT_SEL 3 &trans &trans &rgb_ug RGB_TOG &kp PSCRN &trans &trans &kp DEL - >; - }; - }; -}; diff --git a/config/west.yml b/config/west.yml deleted file mode 100644 index b886cbe..0000000 --- a/config/west.yml +++ /dev/null @@ -1,13 +0,0 @@ -manifest: - remotes: - - name: zmkfirmware - url-base: https://github.com/zmkfirmware - # Additional modules containing boards/shields/custom code can be listed here as well - # See https://docs.zephyrproject.org/3.2.0/develop/west/manifest.html#projects - projects: - - name: zmk - remote: zmkfirmware - revision: main - import: app/west.yml - self: - path: config