initial setup of Mercury board
This commit is contained in:
parent
acabc7a08b
commit
0d422b83fa
10 changed files with 212 additions and 0 deletions
25
app/boards/shields/mercury/Kconfig.defconfig
Normal file
25
app/boards/shields/mercury/Kconfig.defconfig
Normal file
|
@ -0,0 +1,25 @@
|
|||
if SHIELD_MERCURY_LEFT
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Mercury-L"
|
||||
|
||||
config ZMK_SPLIT_BLE_ROLE_CENTRAL
|
||||
default y
|
||||
|
||||
endif
|
||||
|
||||
|
||||
if SHIELD_MERCURY_RIGHT
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Mercury-R"
|
||||
|
||||
endif
|
||||
|
||||
|
||||
if SHIELD_MERCURY_LEFT || SHIELD_MERCURY_RIGHT
|
||||
|
||||
config ZMK_SPLIT
|
||||
default y
|
||||
|
||||
endif
|
5
app/boards/shields/mercury/Kconfig.shield
Normal file
5
app/boards/shields/mercury/Kconfig.shield
Normal file
|
@ -0,0 +1,5 @@
|
|||
config SHIELD_MERCURY_LEFT
|
||||
def_bool $(shields_list_contains,mercury_left)
|
||||
|
||||
config SHIELD_MERCURY_RIGHT
|
||||
def_bool $(shields_list_contains,mercury_right)
|
2
app/boards/shields/mercury/mercury.conf
Normal file
2
app/boards/shields/mercury/mercury.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
# CONFIG_ZMK_SLEEP=y
|
||||
# CONFIG_ZMK_USB_LOGGING=y
|
35
app/boards/shields/mercury/mercury.dtsi
Normal file
35
app/boards/shields/mercury/mercury.dtsi
Normal file
|
@ -0,0 +1,35 @@
|
|||
#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 = <7>;
|
||||
rows = <6>;
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
|
||||
RC(2,6) RC(1,6) RC(0,6) RC(5,6) RC(4,6) RC(3,6)
|
||||
>;
|
||||
};
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
= <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
};
|
||||
};
|
115
app/boards/shields/mercury/mercury.keymap
Normal file
115
app/boards/shields/mercury/mercury.keymap
Normal file
|
@ -0,0 +1,115 @@
|
|||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/outputs.h>
|
||||
|
||||
#define APL 0
|
||||
#define WIN 1
|
||||
#define NUM 2
|
||||
#define FUN 3
|
||||
#define NAV 4
|
||||
#define MED 5
|
||||
#define SYS 6
|
||||
|
||||
/ {
|
||||
|
||||
behaviors {
|
||||
hlt: hold_preferred_layer_tap {
|
||||
compatible = "zmk,behavior-hold-tap";
|
||||
label = "HOLD_PREFERRED_LAYER_TAP";
|
||||
#binding-cells = <2>;
|
||||
flavor = "hold-preferred";
|
||||
tapping-term-ms = <200>;
|
||||
bindings = <&mo>, <&kp>;
|
||||
};
|
||||
|
||||
tmt: tap_preferred_mod_tap {
|
||||
compatible = "zmk,behavior-hold-tap";
|
||||
label = "TAP_PREFERRED_MOD_TAP";
|
||||
#binding-cells = <2>;
|
||||
flavor = "tap-preferred";
|
||||
// Longer tapping term (default=200ms), tap is strongly preferred!
|
||||
tapping-term-ms = <300>;
|
||||
bindings = <&kp>, <&kp>;
|
||||
};
|
||||
|
||||
// Short tapping term, required_keys_for_hold is the primary mechanism
|
||||
// to prevent unintentional HOLD behaviors.
|
||||
cmt: c_mod_tap {
|
||||
compatible = "zmk,behavior-hold-tap";
|
||||
label = "CONDITIONAL_HOLD_TAP";
|
||||
#binding-cells = <2>;
|
||||
flavor = "hold-preferred";
|
||||
tapping-term-ms = <100>;
|
||||
bindings = <&kp>, <&kp>;
|
||||
hold-enabler-keys = <0 12>;
|
||||
};
|
||||
};
|
||||
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
apple_layer {
|
||||
bindings = <
|
||||
&hlt FUN TAB &cmt LSFT Q &kp W &kp E &kp R &kp T /**/ &kp Y &kp U &kp I &kp O &kp P &kp BKSP
|
||||
&hlt NUM ESC &cmt LSFT A &kp S &kp D &kp F &kp G /**/ &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT
|
||||
&kp LSFT &kp Z &kp X &kp C &kp V &kp B /**/ &kp N &kp M &kp CMMA &kp DOT &tmt RALT FSLH &mt RSFT BSLH
|
||||
&kp LCTL &kp LALT &kp LGUI /**/ &kp SPC &hlt NAV RET &hlt MED DEL
|
||||
>;
|
||||
};
|
||||
|
||||
windows_layer {
|
||||
bindings = <
|
||||
&trans &trans &trans &trans &trans &trans /**/ &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans /**/ &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans /**/ &trans &trans &trans &trans &trans &trans
|
||||
&kp LGUI &kp LALT &mt LCTL K_CMENU /**/ &trans &trans &trans
|
||||
>;
|
||||
};
|
||||
|
||||
num_layer {
|
||||
bindings = <
|
||||
&mo SYS &trans &trans &trans &trans &trans /**/ &trans &kp NUM_7 &kp NUM_8 &kp NUM_9 &trans &trans
|
||||
&trans &kp LSFT &trans &kp GRAV &kp TILDE &trans /**/ &kp EQL &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp LBKT &kp RBKT
|
||||
&trans &trans &trans &trans &trans &trans /**/ &kp MINUS &kp NUM_1 &kp NUM_2 &kp NUM_3 &trans &trans
|
||||
&trans &trans &trans /**/ &trans &kp NUM_0 &trans
|
||||
>;
|
||||
};
|
||||
|
||||
function_layer {
|
||||
bindings = <
|
||||
&trans &kp LSFT &trans &trans &trans &trans /**/ &kp F12 &kp F7 &kp F8 &kp F9 &trans &trans
|
||||
&mo SYS &trans &trans &trans &trans &trans /**/ &kp F11 &kp F4 &kp F5 &kp F6 &kp LBKT &kp RBKT
|
||||
&trans &trans &trans &trans &trans &trans /**/ &kp F10 &kp F1 &kp F2 &kp F3 &trans &trans
|
||||
&trans &trans &trans /**/ &trans &trans &trans
|
||||
>;
|
||||
};
|
||||
|
||||
nav_layer {
|
||||
bindings = <
|
||||
&trans &trans &trans &trans &trans &trans /**/ &trans &trans &kp UARW &kp PGUP &kp PRSC &trans
|
||||
&trans &trans &kp SLCK &trans &trans &trans /**/ &trans &kp LARW &kp DARW &kp RARW &trans &trans
|
||||
&trans &trans &trans &kp CLCK &trans &kp PAUSE_BREAK /**/ &kp INS &kp PGDN &kp HOME &kp END &trans &trans
|
||||
&trans &trans &trans /**/ &trans &trans &trans
|
||||
>;
|
||||
};
|
||||
|
||||
media_layer {
|
||||
bindings = <
|
||||
&trans &trans &to WIN &trans &trans &trans /**/ &trans &trans &kp C_VOL_UP &trans &trans &trans
|
||||
&trans &to APL &trans &trans &trans &trans /**/ &trans &kp C_BRI_DN &kp C_VOL_DN &kp C_BRI_UP &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans /**/ &trans &kp C_MUTE &trans &trans &trans &trans
|
||||
&trans &trans &trans /**/ &trans &trans &trans
|
||||
>;
|
||||
};
|
||||
|
||||
system_layer {
|
||||
bindings = <
|
||||
&trans &trans &to WIN &trans &reset &trans /**/ &trans &trans &trans &trans &trans &trans
|
||||
&trans &to APL &out OUT_USB &trans &trans &trans /**/ &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &bt BT_CLR &trans &out OUT_BLE /**/ &trans &trans &trans &trans &trans &trans
|
||||
&bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 /**/ &trans &trans &trans
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
0
app/boards/shields/mercury/mercury_left.conf
Normal file
0
app/boards/shields/mercury/mercury_left.conf
Normal file
13
app/boards/shields/mercury/mercury_left.overlay
Normal file
13
app/boards/shields/mercury/mercury_left.overlay
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include "mercury.dtsi"
|
||||
|
||||
&kscan0 {
|
||||
col-gpios
|
||||
= <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 1 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
0
app/boards/shields/mercury/mercury_right.conf
Normal file
0
app/boards/shields/mercury/mercury_right.conf
Normal file
13
app/boards/shields/mercury/mercury_right.overlay
Normal file
13
app/boards/shields/mercury/mercury_right.overlay
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include "mercury.dtsi"
|
||||
|
||||
&kscan0 {
|
||||
col-gpios
|
||||
= <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 1 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
4
app/boards/shields/mercury/readme.txt
Normal file
4
app/boards/shields/mercury/readme.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
from Windows CMD:
|
||||
cd zmk\app
|
||||
west build -d build/left -p -b nice_nano -- -DSHIELD=mercury_left
|
||||
west build -d build/right -p -b nice_nano -- -DSHIELD=mercury_right
|
Loading…
Add table
Reference in a new issue