From 44f09fc5cb787b8e1450d5abc23ac4e893ffe12a Mon Sep 17 00:00:00 2001 From: ClicketySplit Date: Fri, 7 Jul 2023 07:11:15 +0000 Subject: [PATCH] Updated based on recommendations. --- app/boards/shields/leeloo/Kconfig.defconfig | 2 +- app/boards/shields/leeloo/Kconfig.shield | 2 +- app/boards/shields/leeloo/README.md | 34 +------ app/boards/shields/leeloo/leeloo.conf | 8 +- app/boards/shields/leeloo/leeloo.dtsi | 2 +- app/boards/shields/leeloo/leeloo.keymap | 11 +-- app/boards/shields/leeloo/leeloo_common.dtsi | 2 +- app/boards/shields/leeloo/leeloo_left.overlay | 2 +- app/boards/shields/leeloo/leeloo_rev2.conf | 8 +- app/boards/shields/leeloo/leeloo_rev2.dtsi | 2 +- app/boards/shields/leeloo/leeloo_rev2.keymap | 11 +-- .../shields/leeloo/leeloo_rev2_left.overlay | 2 +- .../shields/leeloo/leeloo_rev2_right.overlay | 2 +- .../shields/leeloo/leeloo_right.overlay | 2 +- .../shields/leeloo_micro/Kconfig.defconfig | 2 +- .../shields/leeloo_micro/Kconfig.shield | 2 +- app/boards/shields/leeloo_micro/README.md | 32 +------ .../shields/leeloo_micro/leeloo_micro.conf | 6 +- .../shields/leeloo_micro/leeloo_micro.dtsi | 87 +++++++++++++++++- .../shields/leeloo_micro/leeloo_micro.keymap | 10 +-- .../leeloo_micro/leeloo_micro_common.dtsi | 89 ------------------- .../leeloo_micro/leeloo_micro_left.overlay | 2 +- .../leeloo_micro/leeloo_micro_right.overlay | 2 +- 23 files changed, 121 insertions(+), 201 deletions(-) delete mode 100644 app/boards/shields/leeloo_micro/leeloo_micro_common.dtsi diff --git a/app/boards/shields/leeloo/Kconfig.defconfig b/app/boards/shields/leeloo/Kconfig.defconfig index f6dd9d8a..046bd49a 100644 --- a/app/boards/shields/leeloo/Kconfig.defconfig +++ b/app/boards/shields/leeloo/Kconfig.defconfig @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The ZMK Contributors +# Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT if SHIELD_LEELOO_REV2_LEFT diff --git a/app/boards/shields/leeloo/Kconfig.shield b/app/boards/shields/leeloo/Kconfig.shield index ad4b76c8..1d784395 100644 --- a/app/boards/shields/leeloo/Kconfig.shield +++ b/app/boards/shields/leeloo/Kconfig.shield @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The ZMK Contributors +# Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT config SHIELD_LEELOO diff --git a/app/boards/shields/leeloo/README.md b/app/boards/shields/leeloo/README.md index 026beaab..27d5e872 100644 --- a/app/boards/shields/leeloo/README.md +++ b/app/boards/shields/leeloo/README.md @@ -61,14 +61,14 @@ west build -d build/right_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_right Build commands for your custom keymap of Leeloo v1: ``` -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_right -DZMK_CONFIG="C:/dev/zmk/[yourNmae]/leeloo/config" +west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo/config" west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo/config" ``` Build commands for your custom keymap of Leeloo v2: ``` -west build -d build/right_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_right -DZMK_CONFIG="C:/dev/zmk/[yourNmae]/leeloo_v2/config" +west build -d build/right_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_v2/config" west build -d build/left_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_v2/config" ``` @@ -82,10 +82,6 @@ Near the top 3rd of the leeloo[_rev2].keymap file, locate the following code blo ``` //nice_view_spi: &spi0 { -// compatible = "nordic,nrf-spim"; -// pinctrl-0 = <&spi0_default>; -// pinctrl-1 = <&spi0_sleep>; -// pinctrl-names = "default", "sleep"; // cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>; //}; ``` @@ -94,34 +90,12 @@ Remove the forward slashes to resemble the following: ``` nice_view_spi: &spi0 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>; }; ``` Save your changes and close the file. -### Edit the leeloo[_rev2].conf file: - -Near the top of the leeloo[_rev2].conf file, locate the following line items: - -``` -# Uncomment the following line to enable the OLED Display or nice!view Display -# CONFIG_ZMK_DISPLAY=y -``` - -Remove the # character in front of the CONFIG_ZMK_DISPLAY configuration item to resemble the following: - -``` -# Uncomment the following line to enable the OLED Display or nice!view Display -CONFIG_ZMK_DISPLAY=y -``` - -Save your changes and close the file. - ### Sample Build Commands for nice!view Displays Build commands for the default keymap of Leeloo v1: @@ -141,8 +115,8 @@ west build -d build/right_v2 -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_right n Build commands for your custom keymap of Leeloo v2: ``` -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_left nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourNmae]/leeloo_v2/config" -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_right nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourNmae]/leeloo_v2/config" +west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_left nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_v2/config" +west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_right nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_v2/config" ``` # Support diff --git a/app/boards/shields/leeloo/leeloo.conf b/app/boards/shields/leeloo/leeloo.conf index 67a21e7a..466279a3 100644 --- a/app/boards/shields/leeloo/leeloo.conf +++ b/app/boards/shields/leeloo/leeloo.conf @@ -1,14 +1,14 @@ -# Copyright (c) 2022 The ZMK Contributors +# Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT -# Uncomment the following line to enable the OLED Display or nice!view Display +# Uncomment the following line to enable the OLED Display # CONFIG_ZMK_DISPLAY=y # Uncomment to turn off WPM Status. # CONFIG_ZMK_WIDGET_WPM_STATUS=n -# Uncomment to invert colour, if using nice!view Displays -# CONFIG_LVGL_USE_THEME_MONO=y +# Uncomment to invert colour when using nice!view Displays +# CONFIG_ZMK_DISPLAY_INVERT=y # Uncomment these two lines to add support for encoders diff --git a/app/boards/shields/leeloo/leeloo.dtsi b/app/boards/shields/leeloo/leeloo.dtsi index 0db97e64..dad05c55 100644 --- a/app/boards/shields/leeloo/leeloo.dtsi +++ b/app/boards/shields/leeloo/leeloo.dtsi @@ -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/leeloo/leeloo.keymap b/app/boards/shields/leeloo/leeloo.keymap index 91e60007..8ac6977c 100644 --- a/app/boards/shields/leeloo/leeloo.keymap +++ b/app/boards/shields/leeloo/leeloo.keymap @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The ZMK Contributors + * Copyright (c) 2023 The ZMK Contributors * SPDX-License-Identifier: MIT */ @@ -8,11 +8,6 @@ #include #include -// Layers -#define DEFAULT 0 // default_layer -#define LOWER 1 // lower_layer -#define RAISE 2 // raise_layer - /* * Assign the cs-gpios pin to 4. * Uncomment these next few lines if implementing nice!view Displays @@ -21,10 +16,6 @@ * the pins with Arduino Labels. */ //nice_view_spi: &spi0 { -// compatible = "nordic,nrf-spim"; -// pinctrl-0 = <&spi0_default>; -// pinctrl-1 = <&spi0_sleep>; -// pinctrl-names = "default", "sleep"; // cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>; //}; diff --git a/app/boards/shields/leeloo/leeloo_common.dtsi b/app/boards/shields/leeloo/leeloo_common.dtsi index 795e1de6..7c212fb4 100644 --- a/app/boards/shields/leeloo/leeloo_common.dtsi +++ b/app/boards/shields/leeloo/leeloo_common.dtsi @@ -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/leeloo/leeloo_left.overlay b/app/boards/shields/leeloo/leeloo_left.overlay index 5d5c974e..4421e112 100644 --- a/app/boards/shields/leeloo/leeloo_left.overlay +++ b/app/boards/shields/leeloo/leeloo_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/leeloo/leeloo_rev2.conf b/app/boards/shields/leeloo/leeloo_rev2.conf index 519b17d4..8c1cf3ee 100644 --- a/app/boards/shields/leeloo/leeloo_rev2.conf +++ b/app/boards/shields/leeloo/leeloo_rev2.conf @@ -1,14 +1,14 @@ -# Copyright (c) 2022 The ZMK Contributors +# Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT -# Uncomment the following line to enable the OLED Display or nice!view Display +# Uncomment the following line to enable the OLED Display # CONFIG_ZMK_DISPLAY=y # Uncomment to turn off WPM Status. # CONFIG_ZMK_WIDGET_WPM_STATUS=n -# Uncomment to invert colour, if using nice!view Displays -# CONFIG_LVGL_USE_THEME_MONO=y +# Uncomment to invert colour when using nice!view Displays +# CONFIG_ZMK_DISPLAY_INVERT=y # Uncomment the following line to enable per-key lighting diff --git a/app/boards/shields/leeloo/leeloo_rev2.dtsi b/app/boards/shields/leeloo/leeloo_rev2.dtsi index 0db97e64..dad05c55 100644 --- a/app/boards/shields/leeloo/leeloo_rev2.dtsi +++ b/app/boards/shields/leeloo/leeloo_rev2.dtsi @@ -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/leeloo/leeloo_rev2.keymap b/app/boards/shields/leeloo/leeloo_rev2.keymap index 2ae48041..b135ba25 100644 --- a/app/boards/shields/leeloo/leeloo_rev2.keymap +++ b/app/boards/shields/leeloo/leeloo_rev2.keymap @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The ZMK Contributors + * Copyright (c) 2023 The ZMK Contributors * SPDX-License-Identifier: MIT */ @@ -9,11 +9,6 @@ #include #include -// Layers -#define DEFAULT 0 // default_layer -#define LOWER 1 // lower_layer -#define RAISE 2 // raise_layer - // Short versions #define RGBON &rgb_ug RGB_ON #define RGBOFF &rgb_ug RGB_OFF @@ -32,10 +27,6 @@ * Uncomment these next few lines if implementing nice!view Displays */ //nice_view_spi: &spi0 { -// compatible = "nordic,nrf-spim"; -// pinctrl-0 = <&spi0_default>; -// pinctrl-1 = <&spi0_sleep>; -// pinctrl-names = "default", "sleep"; // cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>; //}; diff --git a/app/boards/shields/leeloo/leeloo_rev2_left.overlay b/app/boards/shields/leeloo/leeloo_rev2_left.overlay index 1341a080..14ddc0ec 100644 --- a/app/boards/shields/leeloo/leeloo_rev2_left.overlay +++ b/app/boards/shields/leeloo/leeloo_rev2_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/leeloo/leeloo_rev2_right.overlay b/app/boards/shields/leeloo/leeloo_rev2_right.overlay index a8f44db1..afca41b4 100644 --- a/app/boards/shields/leeloo/leeloo_rev2_right.overlay +++ b/app/boards/shields/leeloo/leeloo_rev2_right.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/leeloo/leeloo_right.overlay b/app/boards/shields/leeloo/leeloo_right.overlay index e2f1f7f3..b860c2ca 100644 --- a/app/boards/shields/leeloo/leeloo_right.overlay +++ b/app/boards/shields/leeloo/leeloo_right.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/leeloo_micro/Kconfig.defconfig b/app/boards/shields/leeloo_micro/Kconfig.defconfig index 895b0d4b..26256120 100644 --- a/app/boards/shields/leeloo_micro/Kconfig.defconfig +++ b/app/boards/shields/leeloo_micro/Kconfig.defconfig @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The ZMK Contributors +# Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT if SHIELD_LEELOO_MICRO_LEFT diff --git a/app/boards/shields/leeloo_micro/Kconfig.shield b/app/boards/shields/leeloo_micro/Kconfig.shield index 095ddfbb..c622f16d 100644 --- a/app/boards/shields/leeloo_micro/Kconfig.shield +++ b/app/boards/shields/leeloo_micro/Kconfig.shield @@ -1,4 +1,4 @@ -# Copyright (c) 2022 The ZMK Contributors +# Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT config SHIELD_LEELOO_MICRO diff --git a/app/boards/shields/leeloo_micro/README.md b/app/boards/shields/leeloo_micro/README.md index c220b915..c1827f82 100644 --- a/app/boards/shields/leeloo_micro/README.md +++ b/app/boards/shields/leeloo_micro/README.md @@ -37,7 +37,7 @@ west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_right Build commands for your custom keymap of Leeloo-Micro: ``` -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_right -DZMK_CONFIG="C:/dev/zmk/[yourNmae]/leeloo_micro/config" +west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_micro/config" west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_micro/config" ``` @@ -51,10 +51,6 @@ Near the top 3rd of the leeloo_micro.keymap file, locate the following code bloc ``` //nice_view_spi: &spi0 { -// compatible = "nordic,nrf-spim"; -// pinctrl-0 = <&spi0_default>; -// pinctrl-1 = <&spi0_sleep>; -// pinctrl-names = "default", "sleep"; // cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>; //}; ``` @@ -63,34 +59,12 @@ Remove the forward slashes to resemble the following: ``` nice_view_spi: &spi0 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>; }; ``` Save your changes and close the file. -### Edit the leeloo_micro.conf file: - -Near the top of the leeloo_micro.conf file, locate the following line items: - -``` -# Uncomment the following line to enable the OLED Display or nice!view Display -# CONFIG_ZMK_DISPLAY=y -``` - -Remove the # character in front of the CONFIG_ZMK_DISPLAY configuration item to resemble the following: - -``` -# Uncomment the following line to enable the OLED Display or nice!view Display -CONFIG_ZMK_DISPLAY=y -``` - -Save your changes and close the file. - ### Sample Build Commands for nice!view Displays Build commands for the default keymap of Leeloo-Micro: @@ -103,8 +77,8 @@ west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_right nic Build commands for your custom keymap of Leeloo-Micro: ``` -west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_left nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourNmae]/leeloo_micro/config" -west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_right nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourNmae]/leeloo_micro/config" +west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_left nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_micro/config" +west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_right nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_micro/config" ``` # Support diff --git a/app/boards/shields/leeloo_micro/leeloo_micro.conf b/app/boards/shields/leeloo_micro/leeloo_micro.conf index 11045031..02c1d605 100644 --- a/app/boards/shields/leeloo_micro/leeloo_micro.conf +++ b/app/boards/shields/leeloo_micro/leeloo_micro.conf @@ -1,14 +1,14 @@ -# Copyright (c) 2022 The ZMK Contributors +# Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT -# Uncomment the following line to enable the OLED Display or nice!view Display +# Uncomment the following line to enable the OLED Display # CONFIG_ZMK_DISPLAY=y # Uncomment to turn off WPM Status. # CONFIG_ZMK_WIDGET_WPM_STATUS=n # Uncomment to invert colour, if using nice!view Displays -# CONFIG_LVGL_USE_THEME_MONO=y +# CONFIG_ZMK_DISPLAY_INVERT=y # Uncomment the following line to enable per-key lighting diff --git a/app/boards/shields/leeloo_micro/leeloo_micro.dtsi b/app/boards/shields/leeloo_micro/leeloo_micro.dtsi index 7a2a17b9..02368b72 100644 --- a/app/boards/shields/leeloo_micro/leeloo_micro.dtsi +++ b/app/boards/shields/leeloo_micro/leeloo_micro.dtsi @@ -1,6 +1,89 @@ /* - * Copyright (c) 2022 The ZMK Contributors + * Copyright (c) 2023 The ZMK Contributors * SPDX-License-Identifier: MIT */ -#include "leeloo_micro_common.dtsi" \ No newline at end of file +#include + +/ { + chosen { + zephyr,display = &oled; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; +// +// | SW1 | SW2 | SW3 | SW4 | SW5 | | SW15 | SW4 | SW3 | SW2 | SW1 | +// | SW6 | SW7 | SW8 | SW9 | SW10 | | SW10 | SW9 | SW8 | SW7 | SW6 | +// | SW11 | SW12 | SW13 | SW14 | SW15 | SW20 | | SW20 | SW15 | SW14 | SW13 | SW12 | SW11 | +// | SW16 | SW17 | SW18 | SW19 | | SW19 | SW18 | SW17 | SW16 | + 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(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(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(3,4) RC(3,5) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,6) RC(3,7) RC(3,8) RC(3,9) + >; + }; + + 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)> + ; + }; + + left_encoder: left_encoder { + 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 = <2>; + status = "disabled"; + }; + + right_encoder: right_encoder { + 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 = <2>; + status = "disabled"; + }; + + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + }; + +}; + +&pro_micro_i2c { + status = "okay"; + + oled: 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>; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/leeloo_micro/leeloo_micro.keymap b/app/boards/shields/leeloo_micro/leeloo_micro.keymap index 13ed9676..8526f5ac 100644 --- a/app/boards/shields/leeloo_micro/leeloo_micro.keymap +++ b/app/boards/shields/leeloo_micro/leeloo_micro.keymap @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The ZMK Contributors + * Copyright (c) 2023 The ZMK Contributors * SPDX-License-Identifier: MIT */ @@ -45,10 +45,6 @@ * Uncomment these next few lines if implementing nice!view Displays. */ //nice_view_spi: &spi0 { -// compatible = "nordic,nrf-spim"; -// pinctrl-0 = <&spi0_default>; -// pinctrl-1 = <&spi0_sleep>; -// pinctrl-names = "default", "sleep"; // cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>; //}; @@ -57,8 +53,8 @@ conditional_layers { compatible = "zmk,conditional-layers"; adjust_layer { - if-layers = <1 2>; - then-layer = <3>; + if-layers = ; + then-layer = ; }; }; diff --git a/app/boards/shields/leeloo_micro/leeloo_micro_common.dtsi b/app/boards/shields/leeloo_micro/leeloo_micro_common.dtsi deleted file mode 100644 index aae9ef84..00000000 --- a/app/boards/shields/leeloo_micro/leeloo_micro_common.dtsi +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2022 The ZMK Contributors - * SPDX-License-Identifier: MIT - */ - -#include - -/ { - chosen { - zephyr,display = &oled; - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; - - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <10>; - rows = <4>; -// -// | SW1 | SW2 | SW3 | SW4 | SW5 | | SW15 | SW4 | SW3 | SW2 | SW1 | -// | SW6 | SW7 | SW8 | SW9 | SW10 | | SW10 | SW9 | SW8 | SW7 | SW6 | -// | SW11 | SW12 | SW13 | SW14 | SW15 | SW20 | | SW20 | SW15 | SW14 | SW13 | SW12 | SW11 | -// | SW16 | SW17 | SW18 | SW19 | | SW19 | SW18 | SW17 | SW16 | - 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(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(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(3,4) RC(3,5) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) - RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,6) RC(3,7) RC(3,8) RC(3,9) - >; - }; - - 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)> - ; - }; - - left_encoder: left_encoder { - 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 = <2>; - status = "disabled"; - }; - - right_encoder: right_encoder { - 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 = <2>; - status = "disabled"; - }; - - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder &right_encoder>; - }; - -}; - -&pro_micro_i2c { - status = "okay"; - - oled: 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>; - }; -}; \ No newline at end of file diff --git a/app/boards/shields/leeloo_micro/leeloo_micro_left.overlay b/app/boards/shields/leeloo_micro/leeloo_micro_left.overlay index 9e83daf0..d31fcf2c 100644 --- a/app/boards/shields/leeloo_micro/leeloo_micro_left.overlay +++ b/app/boards/shields/leeloo_micro/leeloo_micro_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/leeloo_micro/leeloo_micro_right.overlay b/app/boards/shields/leeloo_micro/leeloo_micro_right.overlay index 13618e51..a3f347fb 100644 --- a/app/boards/shields/leeloo_micro/leeloo_micro_right.overlay +++ b/app/boards/shields/leeloo_micro/leeloo_micro_right.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 The ZMK Contributors + * Copyright (c) 2023 The ZMK Contributors * SPDX-License-Identifier: MIT */