Updated based on recommendations.
This commit is contained in:
parent
f8d6495b36
commit
44f09fc5cb
23 changed files with 121 additions and 201 deletions
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2022 The ZMK Contributors
|
# Copyright (c) 2023 The ZMK Contributors
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
if SHIELD_LEELOO_REV2_LEFT
|
if SHIELD_LEELOO_REV2_LEFT
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2022 The ZMK Contributors
|
# Copyright (c) 2023 The ZMK Contributors
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
config SHIELD_LEELOO
|
config SHIELD_LEELOO
|
||||||
|
|
|
@ -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:
|
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"
|
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:
|
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"
|
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 {
|
//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>;
|
// cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>;
|
||||||
//};
|
//};
|
||||||
```
|
```
|
||||||
|
@ -94,34 +90,12 @@ Remove the forward slashes to resemble the following:
|
||||||
|
|
||||||
```
|
```
|
||||||
nice_view_spi: &spi0 {
|
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>;
|
cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
Save your changes and close the file.
|
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
|
### Sample Build Commands for nice!view Displays
|
||||||
|
|
||||||
Build commands for the default keymap of Leeloo v1:
|
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:
|
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/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/[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/[yourName]/leeloo_v2/config"
|
||||||
```
|
```
|
||||||
|
|
||||||
# Support
|
# Support
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# Copyright (c) 2022 The ZMK Contributors
|
# Copyright (c) 2023 The ZMK Contributors
|
||||||
# SPDX-License-Identifier: MIT
|
# 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
|
# CONFIG_ZMK_DISPLAY=y
|
||||||
|
|
||||||
# Uncomment to turn off WPM Status.
|
# Uncomment to turn off WPM Status.
|
||||||
# CONFIG_ZMK_WIDGET_WPM_STATUS=n
|
# CONFIG_ZMK_WIDGET_WPM_STATUS=n
|
||||||
|
|
||||||
# Uncomment to invert colour, if using nice!view Displays
|
# Uncomment to invert colour when using nice!view Displays
|
||||||
# CONFIG_LVGL_USE_THEME_MONO=y
|
# CONFIG_ZMK_DISPLAY_INVERT=y
|
||||||
|
|
||||||
|
|
||||||
# Uncomment these two lines to add support for encoders
|
# Uncomment these two lines to add support for encoders
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -8,11 +8,6 @@
|
||||||
#include <dt-bindings/zmk/keys.h>
|
#include <dt-bindings/zmk/keys.h>
|
||||||
#include <dt-bindings/zmk/bt.h>
|
#include <dt-bindings/zmk/bt.h>
|
||||||
|
|
||||||
// Layers
|
|
||||||
#define DEFAULT 0 // default_layer
|
|
||||||
#define LOWER 1 // lower_layer
|
|
||||||
#define RAISE 2 // raise_layer
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Assign the cs-gpios pin to 4.
|
* Assign the cs-gpios pin to 4.
|
||||||
* Uncomment these next few lines if implementing nice!view Displays
|
* Uncomment these next few lines if implementing nice!view Displays
|
||||||
|
@ -21,10 +16,6 @@
|
||||||
* the pins with Arduino Labels.
|
* the pins with Arduino Labels.
|
||||||
*/
|
*/
|
||||||
//nice_view_spi: &spi0 {
|
//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>;
|
// cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>;
|
||||||
//};
|
//};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# Copyright (c) 2022 The ZMK Contributors
|
# Copyright (c) 2023 The ZMK Contributors
|
||||||
# SPDX-License-Identifier: MIT
|
# 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
|
# CONFIG_ZMK_DISPLAY=y
|
||||||
|
|
||||||
# Uncomment to turn off WPM Status.
|
# Uncomment to turn off WPM Status.
|
||||||
# CONFIG_ZMK_WIDGET_WPM_STATUS=n
|
# CONFIG_ZMK_WIDGET_WPM_STATUS=n
|
||||||
|
|
||||||
# Uncomment to invert colour, if using nice!view Displays
|
# Uncomment to invert colour when using nice!view Displays
|
||||||
# CONFIG_LVGL_USE_THEME_MONO=y
|
# CONFIG_ZMK_DISPLAY_INVERT=y
|
||||||
|
|
||||||
|
|
||||||
# Uncomment the following line to enable per-key lighting
|
# Uncomment the following line to enable per-key lighting
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -9,11 +9,6 @@
|
||||||
#include <dt-bindings/zmk/bt.h>
|
#include <dt-bindings/zmk/bt.h>
|
||||||
#include <dt-bindings/zmk/rgb.h>
|
#include <dt-bindings/zmk/rgb.h>
|
||||||
|
|
||||||
// Layers
|
|
||||||
#define DEFAULT 0 // default_layer
|
|
||||||
#define LOWER 1 // lower_layer
|
|
||||||
#define RAISE 2 // raise_layer
|
|
||||||
|
|
||||||
// Short versions
|
// Short versions
|
||||||
#define RGBON &rgb_ug RGB_ON
|
#define RGBON &rgb_ug RGB_ON
|
||||||
#define RGBOFF &rgb_ug RGB_OFF
|
#define RGBOFF &rgb_ug RGB_OFF
|
||||||
|
@ -32,10 +27,6 @@
|
||||||
* Uncomment these next few lines if implementing nice!view Displays
|
* Uncomment these next few lines if implementing nice!view Displays
|
||||||
*/
|
*/
|
||||||
//nice_view_spi: &spi0 {
|
//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>;
|
// cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>;
|
||||||
//};
|
//};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2022 The ZMK Contributors
|
# Copyright (c) 2023 The ZMK Contributors
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
if SHIELD_LEELOO_MICRO_LEFT
|
if SHIELD_LEELOO_MICRO_LEFT
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2022 The ZMK Contributors
|
# Copyright (c) 2023 The ZMK Contributors
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
config SHIELD_LEELOO_MICRO
|
config SHIELD_LEELOO_MICRO
|
||||||
|
|
|
@ -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:
|
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"
|
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 {
|
//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>;
|
// cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>;
|
||||||
//};
|
//};
|
||||||
```
|
```
|
||||||
|
@ -63,34 +59,12 @@ Remove the forward slashes to resemble the following:
|
||||||
|
|
||||||
```
|
```
|
||||||
nice_view_spi: &spi0 {
|
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>;
|
cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
Save your changes and close the file.
|
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
|
### Sample Build Commands for nice!view Displays
|
||||||
|
|
||||||
Build commands for the default keymap of Leeloo-Micro:
|
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:
|
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/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/[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/[yourName]/leeloo_micro/config"
|
||||||
```
|
```
|
||||||
|
|
||||||
# Support
|
# Support
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# Copyright (c) 2022 The ZMK Contributors
|
# Copyright (c) 2023 The ZMK Contributors
|
||||||
# SPDX-License-Identifier: MIT
|
# 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
|
# CONFIG_ZMK_DISPLAY=y
|
||||||
|
|
||||||
# Uncomment to turn off WPM Status.
|
# Uncomment to turn off WPM Status.
|
||||||
# CONFIG_ZMK_WIDGET_WPM_STATUS=n
|
# CONFIG_ZMK_WIDGET_WPM_STATUS=n
|
||||||
|
|
||||||
# Uncomment to invert colour, if using nice!view Displays
|
# 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
|
# Uncomment the following line to enable per-key lighting
|
||||||
|
|
|
@ -1,6 +1,89 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "leeloo_micro_common.dtsi"
|
#include <dt-bindings/zmk/matrix_transform.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -45,10 +45,6 @@
|
||||||
* Uncomment these next few lines if implementing nice!view Displays.
|
* Uncomment these next few lines if implementing nice!view Displays.
|
||||||
*/
|
*/
|
||||||
//nice_view_spi: &spi0 {
|
//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>;
|
// cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>;
|
||||||
//};
|
//};
|
||||||
|
|
||||||
|
@ -57,8 +53,8 @@
|
||||||
conditional_layers {
|
conditional_layers {
|
||||||
compatible = "zmk,conditional-layers";
|
compatible = "zmk,conditional-layers";
|
||||||
adjust_layer {
|
adjust_layer {
|
||||||
if-layers = <1 2>;
|
if-layers = <QW_L QW_R>;
|
||||||
then-layer = <3>;
|
then-layer = <QW_A>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,89 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <dt-bindings/zmk/matrix_transform.h>
|
|
||||||
|
|
||||||
/ {
|
|
||||||
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>;
|
|
||||||
};
|
|
||||||
};
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
* Copyright (c) 2023 The ZMK Contributors
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue