Initial code

This commit is contained in:
etiennelepagel 2022-03-13 18:15:16 -04:00
parent 1d5b48cb52
commit 13ede52013
6 changed files with 64 additions and 0 deletions

View file

@ -0,0 +1,6 @@
if SHIELD_MACH3
config ZMK_KEYBOARD_NAME
default "MACH3"
endif # BOARD_MACH3

View file

@ -0,0 +1,2 @@
config SHIELD_MACH3
def_bool $(shields_list_contains,MACH3)

View file

View file

@ -0,0 +1,22 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
/ {
keymap {
compatible = "zmk,keymap";
default_layer {
// -----------------------------
// | A | B | C |
// | D | E | F |
// | G | H | I |
// -----------------------------
bindings = <
&kp A &kp B &kp C
&kp D &kp E &kp F
&kp G &kp H &kp I
>;
};
};
};

View file

@ -0,0 +1,23 @@
/ {
chosen {
zmk,kscan = &kscan0;
};
kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";
col-gpios
= <&pro_micro 7 GPIO_ACTIVE_HIGH>
, <&pro_micro 8 GPIO_ACTIVE_HIGH>
, <&pro_micro 9 GPIO_ACTIVE_HIGH>
;
row-gpios
= <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};
};

View file

@ -0,0 +1,11 @@
file_format: "1"
id: MACH3
name: MACH3
type: shield
url: https://machkeyboards.com
requires: [pro_micro]
features:
- keys
outputs:
- usb
- ble