diff options
author | jack <[email protected]> | 2022-09-14 21:35:31 -0600 |
---|---|---|
committer | jack <[email protected]> | 2022-09-14 21:35:31 -0600 |
commit | 68dd21831c1de57db1730e7962035345c0649c38 (patch) | |
tree | 89e29073e93cd676fe4a02b4ed0cb6292a226a4b | |
parent | 236e949ed749cafc163ea609c286a53a78872e6d (diff) | |
download | zmk_build-68dd21831c1de57db1730e7962035345c0649c38.tar.gz zmk_build-68dd21831c1de57db1730e7962035345c0649c38.zip |
add lulu
-rw-r--r-- | lulu/Kconfig.defconfig | 15 | ||||
-rw-r--r-- | lulu/Kconfig.shield | 8 | ||||
-rw-r--r-- | lulu/lulu.conf | 2 | ||||
-rw-r--r-- | lulu/lulu.dtsi | 42 | ||||
-rw-r--r-- | lulu/lulu.keymap | 41 | ||||
-rw-r--r-- | lulu/lulu.zmk.yml | 12 | ||||
-rw-r--r-- | lulu/lulu_left.conf | 0 | ||||
-rw-r--r-- | lulu/lulu_left.overlay | 18 | ||||
-rw-r--r-- | lulu/lulu_right.conf | 0 | ||||
-rw-r--r-- | lulu/lulu_right.overlay | 18 |
10 files changed, 156 insertions, 0 deletions
diff --git a/lulu/Kconfig.defconfig b/lulu/Kconfig.defconfig new file mode 100644 index 0000000..636195e --- /dev/null +++ b/lulu/Kconfig.defconfig @@ -0,0 +1,15 @@ +# Copyright 2022 jack (@waffle87) +# SPDX-License-Identifier: MIT + +if SHIELD_LULU_LEFT +config ZMK_KEYBOARD_NAME + default "lulu" + +config ZMK_SPLIT_ROLE_CENTRAL + default y +endif + +if SHIELD_LULU_LEFT || SHIELD_LULU_RIGHT +config ZMK_SPLIT + default y +endif diff --git a/lulu/Kconfig.shield b/lulu/Kconfig.shield new file mode 100644 index 0000000..0f82b69 --- /dev/null +++ b/lulu/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright 2022 jack (@waffle87) +# SPDX-License-Identifier: MIT + +config SHIELD_LULU_LEFT + def_bool $(shields_list_contains,lulu_left) + +config SHIELD_LULU_RIGHT + def_bool $(shields_list_contains,lulu_right) diff --git a/lulu/lulu.conf b/lulu/lulu.conf new file mode 100644 index 0000000..6a4bf46 --- /dev/null +++ b/lulu/lulu.conf @@ -0,0 +1,2 @@ +CONFIG_EC11=y +CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y diff --git a/lulu/lulu.dtsi b/lulu/lulu.dtsi new file mode 100644 index 0000000..51801bb --- /dev/null +++ b/lulu/lulu.dtsi @@ -0,0 +1,42 @@ +// Copyright 2022 jack (@waffle87) +// SPDX-License-Identifier: MIT + +#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 = <16>; + rows = <5>; + map = < +RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) +RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) +RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) +RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) + RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) + >; + }; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; + row-gpios = + <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, + <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, + <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, + <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, + <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; + }; + left_encoder: encoder_left { + compatible = "alps,ec11"; + label = "LEFT_ENCODER"; + a-gpios = <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <4>; + }; + }; diff --git a/lulu/lulu.keymap b/lulu/lulu.keymap new file mode 100644 index 0000000..61c4e6d --- /dev/null +++ b/lulu/lulu.keymap @@ -0,0 +1,41 @@ +// Copyright 2022 jack (@waffle87) +// SPDX-License-Identifier: MIT + +#include <behaviors.dtsi> +#include <dt-bindings/zmk/keys.h> +#include <dt-bindings/zmk/bt.h> +#include <dt-bindings/zmk/ext_power.h> + +/ { + keymap { + compatible = "zmk,keymap"; + 0 { + bindings = < +&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp GRAVE +&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp MINUS +&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT +&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LBKT &kp RBKT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT + &kp LALT &kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp BSPC &kp RGUI + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + 1 { + bindings = < +&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans +&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 +&kp GRAVE &kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp TILDE +&trans &ext_power EP_ON &ext_power EP_OFF &ext_power EP_TOG &trans &trans &trans &trans &trans &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &kp PIPE + &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; + 2 { + bindings = < +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans +&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans +&kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &kp KP_PLUS &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH + &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; + }; + }; diff --git a/lulu/lulu.zmk.yml b/lulu/lulu.zmk.yml new file mode 100644 index 0000000..c5949d9 --- /dev/null +++ b/lulu/lulu.zmk.yml @@ -0,0 +1,12 @@ +file_format: "1" +id: lulu +name: Lulu +type: shield +url: https://boardsource.xyz/projects/60de24d6847112054777bbdd +requires: + - pro_micro +features: + - keys +siblings: + - lulu_left + - lulu_right diff --git a/lulu/lulu_left.conf b/lulu/lulu_left.conf new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/lulu/lulu_left.conf diff --git a/lulu/lulu_left.overlay b/lulu/lulu_left.overlay new file mode 100644 index 0000000..b54fa8a --- /dev/null +++ b/lulu/lulu_left.overlay @@ -0,0 +1,18 @@ +// Copyright 2022 jack (@waffle87) +// SPDX-License-Identifier: MIT + +#include "lulu.dtsi" + +&kscan0 { + col-gpios = + <&pro_micro 19 GPIO_ACTIVE_HIGH>, + <&pro_micro 18 GPIO_ACTIVE_HIGH>, + <&pro_micro 15 GPIO_ACTIVE_HIGH>, + <&pro_micro 14 GPIO_ACTIVE_HIGH>, + <&pro_micro 16 GPIO_ACTIVE_HIGH>, + <&pro_micro 10 GPIO_ACTIVE_HIGH>; +}; + +&left_encoder { + status = "okay"; +}; diff --git a/lulu/lulu_right.conf b/lulu/lulu_right.conf new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/lulu/lulu_right.conf diff --git a/lulu/lulu_right.overlay b/lulu/lulu_right.overlay new file mode 100644 index 0000000..fa4f531 --- /dev/null +++ b/lulu/lulu_right.overlay @@ -0,0 +1,18 @@ +// Copyright 2022 jack (@waffle87) +// SPDX-License-Identifier: MIT + +#include "lulu.dtsi" + +&default_transform { + col-offset = <6>; +}; + +&kscan0 { + col-gpios = + <&pro_micro 10 GPIO_ACTIVE_HIGH>, + <&pro_micro 16 GPIO_ACTIVE_HIGH>, + <&pro_micro 14 GPIO_ACTIVE_HIGH>, + <&pro_micro 15 GPIO_ACTIVE_HIGH>, + <&pro_micro 18 GPIO_ACTIVE_HIGH>, + <&pro_micro 19 GPIO_ACTIVE_HIGH>; +}; |