Skip to content

Commit

Permalink
3x3 attempt 1
Browse files Browse the repository at this point in the history
  • Loading branch information
EricNeiman committed Feb 16, 2024
1 parent b44a6c2 commit 0183663
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 1 deletion.
Empty file added boards/arm/xiao.conf
Empty file.
Empty file added boards/arm/xiao.dts
Empty file.
Empty file added boards/arm/xiao.keymap
Empty file.
Empty file added boards/arm/xiao_defconfig
Empty file.
Empty file.
35 changes: 35 additions & 0 deletions boards/shields/3x3macropad/3x3macropad.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#include <dt-bindings/zmk/matrix_transform.h>

/ {
chosen {
zmk,kscan = &default_kscan;
zmk,matrix_transform = &default_transform;
};

default_kscan: kscan {
compatible = "zmk,kscan-gpio-matric";
lable = "default_kscan";
diode-direction = "col2row"

row-gpios = <&seeeduino_xiao 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
<&seeeduino_xiao 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>,
<&seeeduino_xiao 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;

col-gpios = <&seeeduino_xiao 6 GPIO_ACTIVE_HIGH>,
<&seeeduino_xiao 5 GPIO_ACTIVE_HIGH>,
<&seeeduino_xiao 4 GPIO_ACTIVE_HIGH>;

};

default_transform: matrix_transform {
compatible = "zmk,matrix-transform";
rows = <3>;
cols = <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)
>;
};
};
4 changes: 4 additions & 0 deletions boards/shields/3x3macropad/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if SHIELD_3X3MACROPAD

config ZMK_KEYBOARD_NAME
default "3x3macropad"
2 changes: 2 additions & 0 deletions boards/shields/3x3macropad/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config SHIELD_3X3MACROPAD
def_bool $(shields_list_contains, 3x3macropad)
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
shield: hummingbird
shield: 3x3macropad

0 comments on commit 0183663

Please sign in to comment.