Skip to content

Commit

Permalink
sofle support added
Browse files Browse the repository at this point in the history
  • Loading branch information
mctechnology17 authored and github-actions[bot] committed Jan 3, 2025
1 parent 9780f60 commit ae477ef
Show file tree
Hide file tree
Showing 28 changed files with 3,048 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog file for Structures extra.
https://github.com/mctechnology17/zmk-config/blob/main/CHANGELOG.txt

# FEATURES 0.0.2-beta2 (Jan 03, 2025)
=======================================
+ NEW FEATURES
- [x] sofle support
- [x] readme updated

# FEATURES 0.0.2-beta1 (Dec 19, 2024)
=======================================
+ NEW FEATURES
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# MC Technology's zmk-config for corne
# MC Technology's zmk-config for corne - sofle - lily58

[![MC Technology](https://github.com/mctechnology17/mctechnology17/blob/main/src/mctechnology_extendido.GIF)](https://www.youtube.com/channel/UC_mYh5PYPHBJ5YYUj8AIkcw)

Expand Down Expand Up @@ -29,10 +29,10 @@

----

- If you already have your corne configured with this repository and want to make
- If you already have your corne - sofle - lily58 configured with this repository and want to make
a modification to your keymap, you can do it with the online [ZMK-STUDIO](https://zmk.studio/).

- If you already have your corne configured with this repository and want to make
- If you already have your corne - sofle - lily58 configured with this repository and want to make
a modification to your keymap, you can do it with the online [keymap-editor](https://nickcoutsos.github.io/keymap-editor/).

- If you already have a repository and you want only the dongle option of this repository with support for `zmk-studio`, just add this repository as a module to your configuration, look the section [THIS REPOSITORY AS A MODULE](#THIS-REPOSITORY-AS-A-MODULE).
Expand All @@ -55,14 +55,14 @@ a modification to your keymap, you can do it with the online [keymap-editor](htt

The objective of this repository is to serve as a base for configuring your
Corne keyboard with the firmware [ZMK firmware] in a simple and fast way.
corne - sofle - lily58 keyboard with the firmware [ZMK firmware] in a simple and fast way.
without having to configure everything from scratch. Many of us are fascinated
by customizing our keyboards, but sometimes we don't have the time or
experience to do it. That is why I have decided to create this repository so
that you can have a base configuration and you can modify it to your liking.

This base includes the most recent corne configurations, featuring a setup for
the Corne dongle with/without an OLED screen.
This base includes the most recent corne - sofle - lily58 configurations, featuring a setup for
the corne - sofle - lily58 dongle with/without an OLED screen.
You can also use your keyboard WITH / WITHOUT a dongle of course. with any of the
plates or screens you have.

Expand Down Expand Up @@ -100,7 +100,7 @@ peripherals), **[nice_nano_v2]** (used as a dongle and as peripherals),
# QUICK START
> [!NOTE]
>
> 1. With this configuration you can use the corne keyboard practically
> 1. With this configuration you can use the corne - sofle - lily58 keyboard practically
> immediately, you just have to follow the following steps and that's it.
>
> 2. If you need precompiled files you can download them from the [firmware
Expand Down Expand Up @@ -372,15 +372,15 @@ MACRO(dongle_boot, &bootloader)
# USEFUL TIPS
> [!TIP]
>
> Below are some useful tips for using your corne keyboard with this
> Below are some useful tips for using your corne - sofle - lily58 keyboard with this
> configuration.
- You can add a reset key on each half, that's useful for when your halves disconnect/desynchronize, or something unusual happens. That way the firmware is loaded again. see reference in [corne.keymap](./config/corne.keymap)
- You can add a bootloader activator on each half in case you don't have access to the bootloader button, it is useful in case your case is not optimized or you just want that option. see reference in [corne.keymap](./config/corne.keymap)
- If both halves were disconnected/unsynchronized, you just have to press the reset button on both halves 10 times in a row and they will reconnect.
- If you want to flash the firmware again you just have to connect the keyboard (that is, one half first, usually the left one) press the reset button 2 times in a row
and your device is recognized as a hard disk storage drive, then just drag the file to flash and that's it. do the same with the other half.
- Remember that if your corne only has some functional RGB lights you can activate only the ones that you have functional, it is not necessary to activate all the lights. see reference in [led strip](./config/corne.keymap)
- Remember that if your corne - sofle - lily58 only has some functional RGB lights you can activate only the ones that you have functional, it is not necessary to activate all the lights. see reference in [led strip](./config/corne.keymap)
- You can combine the boards, for example: on the left you can have a [nice_nano_v2], on the right a [puchi_ble_v1] and on the dongle a [seeeduino_xiao_ble] or some clone [nice_nano_v2], or any combination you can think of.
# RELATED PROJECTS
Expand Down
60 changes: 60 additions & 0 deletions boards/shields/sofle/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright (c) 2020 Ryan Cross
# SPDX-License-Identifier: MIT

if SHIELD_SOFLE_LEFT || SHIELD_SOFLE_DONGLE_XIAO || SHIELD_SOFLE_DONGLE_PRO_MICRO

config ZMK_KEYBOARD_NAME
default "Sofle"

config ZMK_SPLIT_ROLE_CENTRAL
default y

endif

if SHIELD_SOFLE_LEFT || SHIELD_SOFLE_RIGHT || SHIELD_SOFLE_LEFT_PERIPHERAL || SHIELD_SOFLE_DONGLE_XIAO || SHIELD_SOFLE_DONGLE_PRO_MICRO

config ZMK_SPLIT
default y

if ZMK_DISPLAY

config I2C
default y

config SSD1306
default y

if SHIELD_SOFLE_DONGLE_XIAO || SHIELD_SOFLE_DONGLE_PRO_MICRO

choice ZMK_DISPLAY_WORK_QUEUE
default ZMK_DISPLAY_WORK_QUEUE_DEDICATED
endchoice

endif

endif # ZMK_DISPLAY

if LVGL

config LV_Z_VDB_SIZE
default 64

config LV_DPI_DEF
default 148

config LV_Z_BITS_PER_PIXEL
default 1

choice LV_COLOR_DEPTH
default LV_COLOR_DEPTH_1
endchoice

endif # LVGL

if ZMK_RGB_UNDERGLOW

config WS2812_STRIP
default y
endif

endif
17 changes: 17 additions & 0 deletions boards/shields/sofle/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) 2020 Ryan Cross
# SPDX-License-Identifier: MIT

config SHIELD_SOFLE_LEFT
def_bool $(shields_list_contains,sofle_left)

config SHIELD_SOFLE_RIGHT
def_bool $(shields_list_contains,sofle_right)

config SHIELD_SOFLE_LEFT_PERIPHERAL
def_bool $(shields_list_contains,sofle_left_peripheral)

config SHIELD_SOFLE_DONGLE_XIAO
def_bool $(shields_list_contains,sofle_dongle_xiao)

config SHIELD_SOFLE_DONGLE_PRO_MICRO
def_bool $(shields_list_contains,sofle_dongle_pro_micro)
50 changes: 50 additions & 0 deletions boards/shields/sofle/boards/nice_nano.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#include <dt-bindings/led/led.h>

&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
};
};

spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
low-power-enable;
};
};
};

&spi3 {
compatible = "nordic,nrf-spim";
status = "okay";

pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";

led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";

/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;

/* WS2812 */
chain-length = <36>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;

color-mapping = <
LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE
>;
};
};

/ {
chosen {
zmk,underglow = &led_strip;
};
};
50 changes: 50 additions & 0 deletions boards/shields/sofle/boards/nice_nano_v2.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#include <dt-bindings/led/led.h>

&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
};
};

spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
low-power-enable;
};
};
};

&spi3 {
compatible = "nordic,nrf-spim";
status = "okay";

pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";

led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";

/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;

/* WS2812 */
chain-length = <36>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;

color-mapping = <
LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE
>;
};
};

/ {
chosen {
zmk,underglow = &led_strip;
};
};
50 changes: 50 additions & 0 deletions boards/shields/sofle/boards/nrfmicro_11.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#include <dt-bindings/led/led.h>

&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
};
};

spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
low-power-enable;
};
};
};

&spi3 {
compatible = "nordic,nrf-spim";
status = "okay";

pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";

led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";

/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;

/* WS2812 */
chain-length = <36>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;

color-mapping = <
LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE
>;
};
};

/ {
chosen {
zmk,underglow = &led_strip;
};
};
50 changes: 50 additions & 0 deletions boards/shields/sofle/boards/nrfmicro_13.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#include <dt-bindings/led/led.h>

&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
};
};

spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
low-power-enable;
};
};
};

&spi3 {
compatible = "nordic,nrf-spim";
status = "okay";

pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";

led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";

/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;

/* WS2812 */
chain-length = <36>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;

color-mapping = <
LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE
>;
};
};

/ {
chosen {
zmk,underglow = &led_strip;
};
};
17 changes: 17 additions & 0 deletions boards/shields/sofle/sofle.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) 2020 Ryan Cross
# SPDX-License-Identifier: MIT

# Uncomment the following line to enable the Sofle OLED Display
# CONFIG_ZMK_DISPLAY=y

# Uncomment these two lines to add support for encoders
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y

# Uncomment this line below to add rgb underglow / backlight support
# CONFIG_ZMK_RGB_UNDERGLOW=y

# Uncomment the line below to disable external power toggling by the underglow.
# By default toggling the underglow on and off also toggles external power
# on and off. This also causes the display to turn off.
# CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n
Loading

0 comments on commit ae477ef

Please sign in to comment.