Skip to content

Commit

Permalink
add initial files for ZMK Stratapad
Browse files Browse the repository at this point in the history
  • Loading branch information
MatchstickWorks committed Apr 11, 2024
1 parent 66992ee commit bdc6529
Show file tree
Hide file tree
Showing 15 changed files with 129 additions and 1 deletion.
9 changes: 9 additions & 0 deletions boards/shields/stratapad/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if SHIELD_STRATAPAD

config ZMK_KEYBOARD_NAME
default "stratapad macropad"

config ZMK_USB
default y

endif
2 changes: 2 additions & 0 deletions boards/shields/stratapad/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config SHIELD_STRATAPAD
def_bool $(shields_list_contains,stratapad)
4 changes: 4 additions & 0 deletions boards/shields/stratapad/boards/seeeduino_xiao.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG_CONSOLE=n
CONFIG_UART_CONSOLE=n
CONFIG_UART_INTERRUPT_DRIVEN=n
CONFIG_SERIAL=n
File renamed without changes.
14 changes: 14 additions & 0 deletions boards/shields/stratapad/stratapad.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>

/ {
keymap {
compatible = "zmk,keymap";

default_layer {
bindings = <
&kp W &kp A &kp S &kp D &kp Z
>;
};
};
};
28 changes: 28 additions & 0 deletions boards/shields/stratapad/stratapad.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include <dt-bindings/zmk/matrix_transform.h>

/ {
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <8>;
rows = <1>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4)
>;
};

kscan0: kscan {
compatible = "zmk,kscan-gpio-direct";
label = "KSCAN";
input-gpios
= <&xiao_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
};
};
2 changes: 1 addition & 1 deletion build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
---
include:
- board: seeeduino_xiao_ble
shield: hummingbird
shield: stratapad
Empty file added config/boards/shields/.gitkeep
Empty file.
9 changes: 9 additions & 0 deletions config/boards/shields/stratapad/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if SHIELD_STRATAPAD

config ZMK_KEYBOARD_NAME
default "stratapad macropad"

config ZMK_USB
default y

endif
2 changes: 2 additions & 0 deletions config/boards/shields/stratapad/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config SHIELD_STRATAPAD
def_bool $(shields_list_contains,stratapad)
4 changes: 4 additions & 0 deletions config/boards/shields/stratapad/boards/seeeduino_xiao.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG_CONSOLE=n
CONFIG_UART_CONSOLE=n
CONFIG_UART_INTERRUPT_DRIVEN=n
CONFIG_SERIAL=n
Empty file.
14 changes: 14 additions & 0 deletions config/boards/shields/stratapad/stratapad.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>

/ {
keymap {
compatible = "zmk,keymap";

default_layer {
bindings = <
&kp W &kp A &kp S &kp D &kp Z
>;
};
};
};
28 changes: 28 additions & 0 deletions config/boards/shields/stratapad/stratapad.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include <dt-bindings/zmk/matrix_transform.h>

/ {
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <8>;
rows = <1>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4)
>;
};

kscan0: kscan {
compatible = "zmk,kscan-gpio-direct";
label = "KSCAN";
input-gpios
= <&xiao_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
};
};
14 changes: 14 additions & 0 deletions config/stratapad.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>

/ {
keymap {
compatible = "zmk,keymap";

default_layer {
bindings = <
&kp W &kp A &kp S &kp D &kp Z
>;
};
};
};

0 comments on commit bdc6529

Please sign in to comment.