From aaed46b0bc2c78775812d276552bbc7a6fde770e Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Mon, 28 Mar 2022 21:15:49 -0500 Subject: [PATCH 01/23] Adding new shield for Sofle RGB Keyhive. --- .../sofle_rgb_keyhive/Kconfig.defconfig | 55 ++++++++++++ .../shields/sofle_rgb_keyhive/Kconfig.shield | 8 ++ .../sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi | 89 +++++++++++++++++++ .../sofle_rgb_keyhive.keymap | 70 +++++++++++++++ .../sofle_rgb_keyhive.zmk.yml | 14 +++ .../sofle_rgb_keyhive_left.conf | 2 + .../sofle_rgb_keyhive_left.overlay | 22 +++++ .../sofle_rgb_keyhive_right.conf | 2 + .../sofle_rgb_keyhive_right.overlay | 26 ++++++ 9 files changed, 288 insertions(+) create mode 100644 app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig create mode 100644 app/boards/shields/sofle_rgb_keyhive/Kconfig.shield create mode 100644 app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi create mode 100644 app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap create mode 100644 app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.zmk.yml create mode 100644 app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.conf create mode 100644 app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay create mode 100644 app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.conf create mode 100644 app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay diff --git a/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig b/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig new file mode 100644 index 00000000000..b244d8e6745 --- /dev/null +++ b/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig @@ -0,0 +1,55 @@ +# Copyright (c) 2022 Josh Whitley +# SPDX-License-Identifier: MIT + +if SHIELD_SOFLE_RGB_KEYHIVE_LEFT + +config ZMK_KEYBOARD_NAME + default "Sofle RGB Keyhive" + +config ZMK_SPLIT_BLE_ROLE_CENTRAL + default y + +endif + +if SHIELD_SOFLE_BLE_KEYHIVE_LEFT || SHIELD_SOFLE_BLE_KEYHIVE_RIGHT + +config ZMK_SPLIT + default y + +if ZMK_DISPLAY + +config I2C + default y + +config SSD1306 + default y + +config SSD1306_REVERSE_MODE + default y + +endif # ZMK_DISPLAY + +if LVGL + +config LVGL_HOR_RES_MAX + default 128 + +config LVGL_VER_RES_MAX + default 32 + +config LVGL_VDB_SIZE + default 64 + +config LVGL_DPI + default 148 + +config LVGL_BITS_PER_PIXEL + default 1 + +choice LVGL_COLOR_DEPTH + default LVGL_COLOR_DEPTH_1 +endchoice + +endif # LVGL + +endif diff --git a/app/boards/shields/sofle_rgb_keyhive/Kconfig.shield b/app/boards/shields/sofle_rgb_keyhive/Kconfig.shield new file mode 100644 index 00000000000..e7d9b37fce3 --- /dev/null +++ b/app/boards/shields/sofle_rgb_keyhive/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2022 Josh Whitley +# SPDX-License-Identifier: MIT + +config SHIELD_SOFLE_RGB_KEYHIVE_LEFT + def_bool $(shields_list_contains,sofle_rgb_keyhive_left) + +config SHIELD_SOFLE_RGB_KEYHIVE_RIGHT + def_bool $(shields_list_contains,sofle_rgb_keyhive_right) diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi new file mode 100644 index 00000000000..8b0af7c427b --- /dev/null +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2020-2022 Pete Johanson, Ryan Cross, Josh Whitley + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <16>; + rows = <4>; +// | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | +// | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | +// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | +// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 | | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | +// | SW30 | SW29 | SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | SW29 | SW30 | + 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,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) + >; + }; + + 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 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <4>; + status = "disabled"; + }; + + right_encoder: encoder_right { + compatible = "alps,ec11"; + label = "RIGHT_ENCODER"; + a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <4>; + status = "disabled"; + }; + + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + }; +}; + +&pro_micro_i2c { + status = "okay"; + + ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + segment-remap; + com-invdir; + com-sequential; + prechargep = <0x22>; + }; +}; diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap new file mode 100644 index 00000000000..0efd58e076d --- /dev/null +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2020-2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { +// ------------------------------------------------------------------------------------------------------------ +// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | +// | ESC | Q | W | E | R | T | | Y | U | I | O | P | BKSPC | +// | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | +// | SHIFT | Z | X | C | V | B | MUTE | | | N | M | , | . | / | SHIFT | +// | GUI | ALT | CTRL | LOWER| ENTER | | SPACE | RAISE| CTRL | ALT | GUI | + bindings = < +&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &none +&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC +&kp TAB &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 C_MUTE &none &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT + &kp LGUI &kp LALT &kp LCTRL &mo 1 &kp RET &kp SPACE &mo 2 &kp RCTRL &kp RALT &kp RGUI + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + + lower_layer { +// TODO: Some binds are waiting for shifted keycode support. +// ------------------------------------------------------------------------------------------------------------ +// | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | +// | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | +// | | = | - | + | { | } | | | | [ | ] | ; | : | \ | | +// | | | | | | | | | | | | + bindings = < +&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 +&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp F12 +&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp PIPE +&trans &kp EQUAL &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &trans &trans &kp LBKT &kp RBKT &kp SEMI &kp COLON &kp BSLH &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + + raise_layer { +// ------------------------------------------------------------------------------------------------------------ +// |BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | +// | | INS | PSCR | GUI | | | | PGUP | | ^ | | | | +// | | ALT | CTRL | SHIFT | | CAPS | | PGDN | <- | v | -> | DEL | BKSPC | +// | | UNDO | CUT | COPY | PASTE | | | | | | | | | | | +// | | | | | | | | | | | | + 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 +&trans &kp INS &kp PSCRN &kp K_CMENU &trans &trans &kp PG_UP &trans &kp UP &trans &kp N0 &trans +&trans &kp LALT &kp LCTRL &kp LSHFT &trans &kp CLCK &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &kp DEL &kp BSPC +&trans &kp K_UNDO &kp K_CUT &kp K_COPY &kp K_PASTE &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + }; +}; diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.zmk.yml b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.zmk.yml new file mode 100644 index 00000000000..98d7366c723 --- /dev/null +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.zmk.yml @@ -0,0 +1,14 @@ +file_format: "1" +id: sofle_rgb_keyhive +name: Sofle RGB Keyhive +type: shield +url: https://keyhive.xyz/shop/sofle +requires: [pro_micro] +exposes: [i2c_oled] +features: + - keys + - display + - encoder +siblings: + - sofle_rgb_keyhive_left + - sofle_rgb_keyhive_right diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.conf b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.conf new file mode 100644 index 00000000000..5d1f6e77d7b --- /dev/null +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.conf @@ -0,0 +1,2 @@ +# Copyright (c) 2022 Josh Whitley +# SPDX-License-Identifier: MIT diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay new file mode 100644 index 00000000000..54d401fc1ae --- /dev/null +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2022, Josh Whitley + * + * SPDX-License-Identifier: MIT + */ + +#include "sofle_rgb_keyhive.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/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.conf b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.conf new file mode 100644 index 00000000000..a88d35a4aa4 --- /dev/null +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.conf @@ -0,0 +1,2 @@ +# Copyright (c) 2022, Josh Whitley +# SPDX-License-Identifier: MIT diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay new file mode 100644 index 00000000000..2a2de404bdf --- /dev/null +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2022, Josh Whitley + * + * SPDX-License-Identifier: MIT + */ + +#include "sofle_rgb_keyhive.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> + ; +}; + +&right_encoder { + status = "okay"; +}; From d035f0988f406bde956f38fb399e4a0eaaae4e1b Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Mon, 28 Mar 2022 21:32:44 -0500 Subject: [PATCH 02/23] Shorten BLE device name. --- app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig b/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig index b244d8e6745..388355268b1 100644 --- a/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig +++ b/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig @@ -4,7 +4,7 @@ if SHIELD_SOFLE_RGB_KEYHIVE_LEFT config ZMK_KEYBOARD_NAME - default "Sofle RGB Keyhive" + default "Sofle Keyhive" config ZMK_SPLIT_BLE_ROLE_CENTRAL default y From e96f256ab968f334eaad81d13bae8725a76c1150 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Mon, 28 Mar 2022 23:09:06 -0500 Subject: [PATCH 03/23] Updating keymap based on research. --- .../sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi index 8b0af7c427b..5812b75684c 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi @@ -14,19 +14,19 @@ default_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; - columns = <16>; - rows = <4>; + columns = <12>; + rows = <5>; // | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | // | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | // | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | -// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 | | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | -// | SW30 | SW29 | SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | SW29 | SW30 | +// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | +// | SW30 | SW29 | SW28 | SW27 | SW26 | SW25 | | SW25 | SW26 | SW27 | SW28 | SW29 | SW30 | 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,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) +RC(0,5) RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) +RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) +RC(2,5) RC(2,4) RC(2,3) RC(2,2) RC(2,1) RC(2,0) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) +RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) RC(3,0) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) + RC(4,5) RC(4,4) RC(4,3) RC(4,2) RC(4,1) RC(4,0) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) >; }; @@ -49,8 +49,8 @@ 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) label = "LEFT_ENCODER"; a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; - status = "disabled"; + resolution = <2>; + status = "okay"; }; right_encoder: encoder_right { @@ -58,8 +58,8 @@ 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) label = "RIGHT_ENCODER"; a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; - status = "disabled"; + resolution = <2>; + status = "okay"; }; sensors { From 1c5588d690cfd6e515c8da1e12b435be49668941 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Tue, 29 Mar 2022 00:10:06 -0500 Subject: [PATCH 04/23] Add RGB underglow. --- .../boards/nice_nano.overlay | 34 +++++++++++++++++++ .../sofle_rgb_keyhive/sofle_rgb_keyhive.conf | 12 +++++++ 2 files changed, 46 insertions(+) create mode 100644 app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.overlay create mode 100644 app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf diff --git a/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.overlay b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.overlay new file mode 100644 index 00000000000..fe6f567018d --- /dev/null +++ b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.overlay @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + mosi-pin = <6>; + // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. + sck-pin = <5>; + miso-pin = <7>; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <16>; /* number of LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf new file mode 100644 index 00000000000..f6fa868ddd9 --- /dev/null +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf @@ -0,0 +1,12 @@ +# Copyright (c) 2022, Josh Whitley +# SPDX-License-Identifier: MIT + +# Uncomment the following line to enable the Sofle OLED Display +# CONFIG_ZMK_DISPLAY=y + +# Uncomment the following two lines to enable the underglow LEDs +# CONFIG_ZMK_RGB_UNDERGLOW=y +# CONFIG_WS2812_STRIP=y + +CONFIG_EC11=y +CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y From cef63324eb37eb4f2b6657d3edc04a952414285e Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Tue, 29 Mar 2022 00:25:18 -0500 Subject: [PATCH 05/23] Updating hardware metadata file. --- app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.zmk.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.zmk.yml b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.zmk.yml index 98d7366c723..c8c8f510f6c 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.zmk.yml +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.zmk.yml @@ -9,6 +9,8 @@ features: - keys - display - encoder + - underglow + - backlight siblings: - sofle_rgb_keyhive_left - sofle_rgb_keyhive_right From 30bb6af3664d1cd9b1875f23ddec375cc139d92b Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Tue, 29 Mar 2022 00:51:16 -0500 Subject: [PATCH 06/23] Fix keymap (again). --- .../sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi | 14 +++++++------- .../sofle_rgb_keyhive/sofle_rgb_keyhive.keymap | 17 +++++++++-------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi index 5812b75684c..ca5e8be704a 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi @@ -19,14 +19,14 @@ // | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | // | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | // | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | -// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | -// | SW30 | SW29 | SW28 | SW27 | SW26 | SW25 | | SW25 | SW26 | SW27 | SW28 | SW29 | SW30 | +// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 | | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | +// | SW30 | SW29 | SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | SW29 | SW30 | map = < -RC(0,5) RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) -RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) -RC(2,5) RC(2,4) RC(2,3) RC(2,2) RC(2,1) RC(2,0) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) -RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) RC(3,0) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) - RC(4,5) RC(4,4) RC(4,3) RC(4,2) RC(4,1) RC(4,0) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) +RC(0,5) RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) +RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) +RC(2,5) RC(2,4) RC(2,3) RC(2,2) RC(2,1) RC(2,0) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) +RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) RC(3,0) RC(4,5) RC(4,11) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) + RC(4,4) RC(4,3) RC(4,2) RC(4,1) RC(4,0) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) >; }; diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap index 0efd58e076d..d6dbf6275dd 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap @@ -7,6 +7,7 @@ #include #include #include +#include / { keymap { @@ -20,14 +21,14 @@ // | SHIFT | Z | X | C | V | B | MUTE | | | N | M | , | . | / | SHIFT | // | GUI | ALT | CTRL | LOWER| ENTER | | SPACE | RAISE| CTRL | ALT | GUI | bindings = < -&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &none -&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC -&kp TAB &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 C_MUTE &none &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT - &kp LGUI &kp LALT &kp LCTRL &mo 1 &kp RET &kp SPACE &mo 2 &kp RCTRL &kp RALT &kp RGUI +&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &none +&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC +&kp TAB &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 RGB_TOG &kp C_MUTE &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT + &kp LGUI &kp LALT &kp LCTRL &mo 1 &kp RET &kp SPACE &mo 2 &kp RCTRL &kp RALT &kp RGUI >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + sensor-bindings = <&inc_dec_kp RGB_BRI RGB_BRD &inc_dec_kp C_VOL_UP C_VOL_DN>; }; lower_layer { @@ -46,7 +47,7 @@ &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + sensor-bindings = <&inc_dec_kp RGB_BRI RGB_BRD &inc_dec_kp C_VOL_UP C_VOL_DN>; }; raise_layer { @@ -64,7 +65,7 @@ &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + sensor-bindings = <&inc_dec_kp RGB_BRI RGB_BRD &inc_dec_kp C_VOL_UP C_VOL_DN>; }; }; }; From 0ae0fbb8d1aa9b9dc578f87cd6585970401a6211 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Tue, 29 Mar 2022 01:07:15 -0500 Subject: [PATCH 07/23] Fix RGB toggle binding. --- .../sofle_rgb_keyhive/sofle_rgb_keyhive.keymap | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap index d6dbf6275dd..da3963df68b 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap @@ -18,17 +18,17 @@ // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | // | ESC | Q | W | E | R | T | | Y | U | I | O | P | BKSPC | // | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | -// | SHIFT | Z | X | C | V | B | MUTE | | | N | M | , | . | / | SHIFT | +// | SHIFT | Z | X | C | V | B | RGB | | | N | M | , | . | / | SHIFT | // | GUI | ALT | CTRL | LOWER| ENTER | | SPACE | RAISE| CTRL | ALT | GUI | bindings = < -&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &none -&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC -&kp TAB &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 RGB_TOG &kp C_MUTE &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT - &kp LGUI &kp LALT &kp LCTRL &mo 1 &kp RET &kp SPACE &mo 2 &kp RCTRL &kp RALT &kp RGUI +&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &none +&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC +&kp TAB &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 &rgb_ug RGB_TOG &kp C_MUTE &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT + &kp LGUI &kp LALT &kp LCTRL &mo 1 &kp RET &kp SPACE &mo 2 &kp RCTRL &kp RALT &kp RGUI >; - sensor-bindings = <&inc_dec_kp RGB_BRI RGB_BRD &inc_dec_kp C_VOL_UP C_VOL_DN>; + sensor-bindings = <&inc_dec_kp PG_UP PG_DN &inc_dec_kp C_VOL_UP C_VOL_DN>; }; lower_layer { @@ -47,7 +47,7 @@ &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; - sensor-bindings = <&inc_dec_kp RGB_BRI RGB_BRD &inc_dec_kp C_VOL_UP C_VOL_DN>; + sensor-bindings = <&inc_dec_kp PG_UP PG_DN &inc_dec_kp C_VOL_UP C_VOL_DN>; }; raise_layer { @@ -65,7 +65,7 @@ &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; - sensor-bindings = <&inc_dec_kp RGB_BRI RGB_BRD &inc_dec_kp C_VOL_UP C_VOL_DN>; + sensor-bindings = <&inc_dec_kp PG_UP PG_DN &inc_dec_kp C_VOL_UP C_VOL_DN>; }; }; }; From 13cc9011d0d57fb17a5eaa80e3ba4fd032606694 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Tue, 29 Mar 2022 01:49:04 -0500 Subject: [PATCH 08/23] Fix typo in defconfig. --- app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig b/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig index 388355268b1..a1befe88b18 100644 --- a/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig +++ b/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig @@ -11,7 +11,7 @@ config ZMK_SPLIT_BLE_ROLE_CENTRAL endif -if SHIELD_SOFLE_BLE_KEYHIVE_LEFT || SHIELD_SOFLE_BLE_KEYHIVE_RIGHT +if SHIELD_SOFLE_RGB_KEYHIVE_LEFT || SHIELD_SOFLE_RGB_KEYHIVE_RIGHT config ZMK_SPLIT default y From 0f5ed55df1989041f75bb070f4f87d8f6d1ac0f3 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Tue, 29 Mar 2022 03:06:42 -0500 Subject: [PATCH 09/23] Enable RGB underglow at board level. --- app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.conf | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.conf diff --git a/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.conf b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.conf new file mode 100644 index 00000000000..7b0779480ec --- /dev/null +++ b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.conf @@ -0,0 +1,7 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +# Enable underglow +CONFIG_ZMK_RGB_UNDERGLOW=y +# Use the STRIP config specific to the LEDs you're using +CONFIG_WS2812_STRIP=y \ No newline at end of file From 36b81ebdf86188b6c3dbf0af1b7a4efbbeab5cc9 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Tue, 29 Mar 2022 03:08:40 -0500 Subject: [PATCH 10/23] Turn on RGB by default. --- app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf index f6fa868ddd9..f2e91ae4a82 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf @@ -4,9 +4,9 @@ # Uncomment the following line to enable the Sofle OLED Display # CONFIG_ZMK_DISPLAY=y -# Uncomment the following two lines to enable the underglow LEDs -# CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y +# Uncomment the following two lines to disable the underglow LEDs +# CONFIG_ZMK_RGB_UNDERGLOW=n +# CONFIG_WS2812_STRIP=n CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y From 4f0bc7076c7ea4b776869bf25a76e78ee0cda7a0 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Tue, 29 Mar 2022 03:12:53 -0500 Subject: [PATCH 11/23] Fixed SPI issue. --- app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.conf | 7 ------- .../boards/{nice_nano.overlay => nice_nano_v2.overlay} | 0 2 files changed, 7 deletions(-) delete mode 100644 app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.conf rename app/boards/shields/sofle_rgb_keyhive/boards/{nice_nano.overlay => nice_nano_v2.overlay} (100%) diff --git a/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.conf b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.conf deleted file mode 100644 index 7b0779480ec..00000000000 --- a/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.conf +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -# Enable underglow -CONFIG_ZMK_RGB_UNDERGLOW=y -# Use the STRIP config specific to the LEDs you're using -CONFIG_WS2812_STRIP=y \ No newline at end of file diff --git a/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.overlay b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay similarity index 100% rename from app/boards/shields/sofle_rgb_keyhive/boards/nice_nano.overlay rename to app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay From a941564eb0fcc8bed2398e05d30b3fc8a2911a2f Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Sat, 2 Apr 2022 19:57:42 -0500 Subject: [PATCH 12/23] Fix left/right switch order. --- .../shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi index ca5e8be704a..0bce38a98d8 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi @@ -19,14 +19,14 @@ // | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | // | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | // | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | -// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 | | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | -// | SW30 | SW29 | SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | SW29 | SW30 | +// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW30 | | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | +// | SW29 | SW28 | SW27 | SW26 | SW25 | | SW26 | SW27 | SW28 | SW29 | SW30 | map = < RC(0,5) RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(2,5) RC(2,4) RC(2,3) RC(2,2) RC(2,1) RC(2,0) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) -RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) RC(3,0) RC(4,5) RC(4,11) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) - RC(4,4) RC(4,3) RC(4,2) RC(4,1) RC(4,0) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) +RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) RC(3,0) 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,4) RC(4,3) RC(4,2) RC(4,1) RC(4,0) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) >; }; From ca8d9312e3b7b8e5f4fdf1b6e0562469f3f51c41 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Sun, 3 Apr 2022 01:46:18 -0500 Subject: [PATCH 13/23] Updates for new LED parameters. --- .../shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay | 4 ++++ app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay index fe6f567018d..765b555215e 100644 --- a/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay +++ b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay @@ -1,3 +1,5 @@ +#include + /* * Copyright (c) 2022 The ZMK Contributors * @@ -24,6 +26,8 @@ chain-length = <16>; /* number of LEDs */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + + color-mapping = ; }; }; diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi index 0bce38a98d8..7b1e35e9649 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi @@ -8,6 +8,7 @@ / { chosen { + zephyr,display = &oled; zmk,kscan = &kscan0; zmk,matrix_transform = &default_transform; }; @@ -71,7 +72,7 @@ RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) RC(3,0) RC(4,5) RC(4,6) RC(3,6) RC(3,7) &pro_micro_i2c { status = "okay"; - ssd1306@3c { + oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; label = "DISPLAY"; From 2e10592cc1d3321e408bde493ccacd734d06e042 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Sun, 3 Apr 2022 02:24:50 -0500 Subject: [PATCH 14/23] Revert change to encoder resolution. --- app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi index 7b1e35e9649..0d4ac338e35 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi @@ -50,7 +50,7 @@ RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) RC(3,0) RC(4,5) RC(4,6) RC(3,6) RC(3,7) label = "LEFT_ENCODER"; a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <2>; + resolution = <4>; status = "okay"; }; @@ -59,7 +59,7 @@ RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) RC(3,0) RC(4,5) RC(4,6) RC(3,6) RC(3,7) label = "RIGHT_ENCODER"; a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <2>; + resolution = <4>; status = "okay"; }; From 083abe8ab823b9c175a5668b179a823285a3b242 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Sun, 3 Apr 2022 02:31:36 -0500 Subject: [PATCH 15/23] Revert keymap changes. --- .../sofle_rgb_keyhive.keymap | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap index da3963df68b..0efd58e076d 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap @@ -7,7 +7,6 @@ #include #include #include -#include / { keymap { @@ -18,17 +17,17 @@ // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | // | ESC | Q | W | E | R | T | | Y | U | I | O | P | BKSPC | // | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | -// | SHIFT | Z | X | C | V | B | RGB | | | N | M | , | . | / | SHIFT | +// | SHIFT | Z | X | C | V | B | MUTE | | | N | M | , | . | / | SHIFT | // | GUI | ALT | CTRL | LOWER| ENTER | | SPACE | RAISE| CTRL | ALT | GUI | bindings = < -&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &none -&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC -&kp TAB &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 &rgb_ug RGB_TOG &kp C_MUTE &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT - &kp LGUI &kp LALT &kp LCTRL &mo 1 &kp RET &kp SPACE &mo 2 &kp RCTRL &kp RALT &kp RGUI +&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &none +&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC +&kp TAB &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 C_MUTE &none &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT + &kp LGUI &kp LALT &kp LCTRL &mo 1 &kp RET &kp SPACE &mo 2 &kp RCTRL &kp RALT &kp RGUI >; - sensor-bindings = <&inc_dec_kp PG_UP PG_DN &inc_dec_kp C_VOL_UP C_VOL_DN>; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; lower_layer { @@ -47,7 +46,7 @@ &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; - sensor-bindings = <&inc_dec_kp PG_UP PG_DN &inc_dec_kp C_VOL_UP C_VOL_DN>; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; raise_layer { @@ -65,7 +64,7 @@ &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; - sensor-bindings = <&inc_dec_kp PG_UP PG_DN &inc_dec_kp C_VOL_UP C_VOL_DN>; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; }; }; From 64ef35fb46a4171fb9a6f3f49127a6c5771ddb26 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Mon, 25 Apr 2022 15:08:02 -0500 Subject: [PATCH 16/23] Remove empty files. --- .../shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.conf | 2 -- .../shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.conf | 2 -- 2 files changed, 4 deletions(-) delete mode 100644 app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.conf delete mode 100644 app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.conf diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.conf b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.conf deleted file mode 100644 index 5d1f6e77d7b..00000000000 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.conf +++ /dev/null @@ -1,2 +0,0 @@ -# Copyright (c) 2022 Josh Whitley -# SPDX-License-Identifier: MIT diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.conf b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.conf deleted file mode 100644 index a88d35a4aa4..00000000000 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.conf +++ /dev/null @@ -1,2 +0,0 @@ -# Copyright (c) 2022, Josh Whitley -# SPDX-License-Identifier: MIT From 1c4319fd5557073e790e323593c93cf0d12e43a1 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Mon, 25 Apr 2022 15:08:51 -0500 Subject: [PATCH 17/23] Remove unnecessary TODO line. --- app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap | 1 - 1 file changed, 1 deletion(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap index 0efd58e076d..19f63222a6c 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap @@ -31,7 +31,6 @@ }; lower_layer { -// TODO: Some binds are waiting for shifted keycode support. // ------------------------------------------------------------------------------------------------------------ // | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | From 793dbdfd8bf2ed907426d1946ba3bfa2d27b1c10 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Mon, 9 May 2022 20:52:49 -0500 Subject: [PATCH 18/23] Update app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay Co-authored-by: Nick Winans --- .../shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay index 765b555215e..b58cd7b5470 100644 --- a/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay +++ b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay @@ -1,10 +1,10 @@ -#include - /* * Copyright (c) 2022 The ZMK Contributors * * SPDX-License-Identifier: MIT */ + +#include &spi1 { compatible = "nordic,nrf-spim"; From fa088ab50ae4cbcd59a8d072f96ce2668b153a50 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Mon, 9 May 2022 20:57:42 -0500 Subject: [PATCH 19/23] Update copyrights to be generic. --- app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig | 2 +- app/boards/shields/sofle_rgb_keyhive/Kconfig.shield | 2 +- app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf | 2 +- app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi | 2 +- .../shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay | 2 +- .../shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig b/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig index a1befe88b18..08ba4f72161 100644 --- a/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig +++ b/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Josh Whitley +# Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT if SHIELD_SOFLE_RGB_KEYHIVE_LEFT diff --git a/app/boards/shields/sofle_rgb_keyhive/Kconfig.shield b/app/boards/shields/sofle_rgb_keyhive/Kconfig.shield index e7d9b37fce3..3b043e07e8d 100644 --- a/app/boards/shields/sofle_rgb_keyhive/Kconfig.shield +++ b/app/boards/shields/sofle_rgb_keyhive/Kconfig.shield @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Josh Whitley +# Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT config SHIELD_SOFLE_RGB_KEYHIVE_LEFT diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf index f2e91ae4a82..8eab95e8030 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf @@ -1,4 +1,4 @@ -# Copyright (c) 2022, Josh Whitley +# Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT # Uncomment the following line to enable the Sofle OLED Display diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi index 0d4ac338e35..a172e2d5b0f 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022 Pete Johanson, Ryan Cross, Josh Whitley + * Copyright (c) 2020-2022 The ZMK Contributors * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay index 54d401fc1ae..a715ccc23d5 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Josh Whitley + * Copyright (c) 2022 The ZMK Contributors * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay index 2a2de404bdf..cbd1fa52ec7 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Josh Whitley + * Copyright (c) 2022 The ZMK Contributors * * SPDX-License-Identifier: MIT */ From f9f93d3fea70ee5bb5baba36546998faa632edce Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Mon, 9 May 2022 21:00:38 -0500 Subject: [PATCH 20/23] Removed backlight from feature listing. --- app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.zmk.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.zmk.yml b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.zmk.yml index c8c8f510f6c..dd0536dc756 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.zmk.yml +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.zmk.yml @@ -10,7 +10,6 @@ features: - display - encoder - underglow - - backlight siblings: - sofle_rgb_keyhive_left - sofle_rgb_keyhive_right From 0d6e2718eeecd8449ce3c47d2dafe9b9b480d71d Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Wed, 29 Jun 2022 13:30:13 -0500 Subject: [PATCH 21/23] Changes from review. --- app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig | 6 ------ .../shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig b/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig index 08ba4f72161..5d39b18a513 100644 --- a/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig +++ b/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig @@ -31,12 +31,6 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_HOR_RES_MAX - default 128 - -config LVGL_VER_RES_MAX - default 32 - config LVGL_VDB_SIZE default 64 diff --git a/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay index b58cd7b5470..9965e0474b3 100644 --- a/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay +++ b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay @@ -23,7 +23,7 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <16>; /* number of LEDs */ + chain-length = <37>; /* number of LEDs */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; From 524aa6e2e1209155dad4804bdaaa8ecbb8a99ad6 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Thu, 19 Oct 2023 21:18:27 -0700 Subject: [PATCH 22/23] Addressing feedback. --- app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig | 4 ++-- app/boards/shields/sofle_rgb_keyhive/Kconfig.shield | 2 +- .../shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay | 2 +- .../shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf | 8 ++++---- .../shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi | 2 +- .../shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap | 2 +- .../sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay | 2 +- .../sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig b/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig index 5d39b18a513..af0a4b10a60 100644 --- a/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig +++ b/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The ZMK Contributors +# Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT if SHIELD_SOFLE_RGB_KEYHIVE_LEFT @@ -6,7 +6,7 @@ if SHIELD_SOFLE_RGB_KEYHIVE_LEFT config ZMK_KEYBOARD_NAME default "Sofle Keyhive" -config ZMK_SPLIT_BLE_ROLE_CENTRAL +config ZMK_SPLIT_ROLE_CENTRAL default y endif diff --git a/app/boards/shields/sofle_rgb_keyhive/Kconfig.shield b/app/boards/shields/sofle_rgb_keyhive/Kconfig.shield index 3b043e07e8d..e626d6c4f81 100644 --- a/app/boards/shields/sofle_rgb_keyhive/Kconfig.shield +++ b/app/boards/shields/sofle_rgb_keyhive/Kconfig.shield @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The ZMK Contributors +# Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT config SHIELD_SOFLE_RGB_KEYHIVE_LEFT diff --git a/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay index 9965e0474b3..b361ba90d71 100644 --- a/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay +++ b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The ZMK Contributors + * Copyright (c) 2023 The ZMK Contributors * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf index 8eab95e8030..4ca281a5fc2 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.conf @@ -1,12 +1,12 @@ -# Copyright (c) 2022 The ZMK Contributors +# Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT # Uncomment the following line to enable the Sofle OLED Display # CONFIG_ZMK_DISPLAY=y -# Uncomment the following two lines to disable the underglow LEDs -# CONFIG_ZMK_RGB_UNDERGLOW=n -# CONFIG_WS2812_STRIP=n +# Uncomment the following two lines to enable the underglow LEDs +# CONFIG_ZMK_RGB_UNDERGLOW=y +# CONFIG_WS2812_STRIP=y CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi index a172e2d5b0f..c05dfd18c2c 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.dtsi @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022 The ZMK Contributors + * Copyright (c) 2020-2023 The ZMK Contributors * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap index 19f63222a6c..d8899e69eaa 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive.keymap @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022 The ZMK Contributors + * Copyright (c) 2020-2023 The ZMK Contributors * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay index a715ccc23d5..7d570be0917 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The ZMK Contributors + * Copyright (c) 2023 The ZMK Contributors * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay index cbd1fa52ec7..67122081fb4 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The ZMK Contributors + * Copyright (c) 2023 The ZMK Contributors * * SPDX-License-Identifier: MIT */ From 9ea1687534a967501dd240c4fc2b4d2430d2b936 Mon Sep 17 00:00:00 2001 From: Joshua Whitley Date: Thu, 19 Oct 2023 21:28:17 -0700 Subject: [PATCH 23/23] Fix formatting. --- .../sofle_rgb_keyhive/Kconfig.defconfig | 22 +++++++++---------- .../shields/sofle_rgb_keyhive/Kconfig.shield | 4 ++-- .../boards/nice_nano_v2.overlay | 2 +- .../sofle_rgb_keyhive_left.overlay | 18 +++++++-------- .../sofle_rgb_keyhive_right.overlay | 20 ++++++++--------- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig b/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig index af0a4b10a60..3df6dd4af39 100644 --- a/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig +++ b/app/boards/shields/sofle_rgb_keyhive/Kconfig.defconfig @@ -4,44 +4,44 @@ if SHIELD_SOFLE_RGB_KEYHIVE_LEFT config ZMK_KEYBOARD_NAME - default "Sofle Keyhive" + default "Sofle Keyhive" config ZMK_SPLIT_ROLE_CENTRAL - default y - + default y + endif if SHIELD_SOFLE_RGB_KEYHIVE_LEFT || SHIELD_SOFLE_RGB_KEYHIVE_RIGHT config ZMK_SPLIT - default y + default y if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LVGL_VDB_SIZE - default 64 + default 64 config LVGL_DPI - default 148 + default 148 config LVGL_BITS_PER_PIXEL - default 1 + default 1 choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 + default LVGL_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/sofle_rgb_keyhive/Kconfig.shield b/app/boards/shields/sofle_rgb_keyhive/Kconfig.shield index e626d6c4f81..acfda9275d7 100644 --- a/app/boards/shields/sofle_rgb_keyhive/Kconfig.shield +++ b/app/boards/shields/sofle_rgb_keyhive/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_SOFLE_RGB_KEYHIVE_LEFT - def_bool $(shields_list_contains,sofle_rgb_keyhive_left) + def_bool $(shields_list_contains,sofle_rgb_keyhive_left) config SHIELD_SOFLE_RGB_KEYHIVE_RIGHT - def_bool $(shields_list_contains,sofle_rgb_keyhive_right) + def_bool $(shields_list_contains,sofle_rgb_keyhive_right) diff --git a/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay index b361ba90d71..6d00661d60d 100644 --- a/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay +++ b/app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ - + #include &spi1 { diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay index 7d570be0917..663efba0a2b 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay @@ -7,16 +7,16 @@ #include "sofle_rgb_keyhive.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> - ; + 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"; + status = "okay"; }; diff --git a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay index 67122081fb4..ac9cf717fe2 100644 --- a/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay +++ b/app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay @@ -7,20 +7,20 @@ #include "sofle_rgb_keyhive.dtsi" &default_transform { - col-offset = <6>; + 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> - ; + 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> + ; }; &right_encoder { - status = "okay"; + status = "okay"; };