From f0e7228a41065ec449d57d49b4cdbb8fda6bb5f0 Mon Sep 17 00:00:00 2001 From: Darren Victoriano Date: Mon, 27 Jan 2025 19:46:32 -0800 Subject: [PATCH 01/13] added dongle support using mctech's code as module --- build.yaml | 8 ++++++-- config/corne.conf | 27 ++++++++++++++++++--------- config/west.yml | 7 +++++++ 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/build.yaml b/build.yaml index 4f34ddd..451e565 100644 --- a/build.yaml +++ b/build.yaml @@ -19,8 +19,12 @@ # --- include: - - board: nice_nano_v2 - shield: corne_left nice_view_adapter nice_view + - board: seeeduino_xiao_ble + shield: corne_dongle_xiao + cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Xiao_Dongle\" -DCONFIG_ZMK_STUDIO=y + artifact-name: xiao_corne_dongle_xiao snippet: studio-rpc-usb-uart + - board: nice_nano_v2 + shield: corne_left nice_view_adapter nice_view - board: nice_nano_v2 shield: corne_right nice_view_adapter nice_view diff --git a/config/corne.conf b/config/corne.conf index 56431cb..f12a933 100644 --- a/config/corne.conf +++ b/config/corne.conf @@ -1,9 +1,23 @@ -# Uncomment the following line to enable deep sleep -CONFIG_ZMK_SLEEP=y -CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000 +# Board Name +CONFIG_ZMK_KEYBOARD_NAME="Corne Bop" -# Uncomment the following line to increase the keyboard's wireless range +# Enable and adjust nice!view +CONFIG_ZMK_DISPLAY=y +CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y +CONFIG_ZMK_WIDGET_WPM_STATUS=n + +# Disable in-built nice!view widget +CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y +CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y +CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y + +# Increase the bluetooth transmission power CONFIG_BT_CTLR_TX_PWR_PLUS_8=y +CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y + +# Set sleep timeout to 30 minutes +CONFIG_ZMK_SLEEP=y +CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000 # Enable eager debouncing CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1 @@ -13,8 +27,3 @@ CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=10 CONFIG_ZMK_STUDIO=y CONFIG_ZMK_STUDIO_LOCKING=n -# Uncomment the following line to enable USB Logging (this increases power usage by a significant amount, turn it off when not in use) -# CONFIG_ZMK_USB_LOGGING=y - -# Board Name -CONFIG_ZMK_KEYBOARD_NAME="Corne Bop" diff --git a/config/west.yml b/config/west.yml index b886cbe..e4d67b1 100644 --- a/config/west.yml +++ b/config/west.yml @@ -4,10 +4,17 @@ manifest: url-base: https://github.com/zmkfirmware # Additional modules containing boards/shields/custom code can be listed here as well # See https://docs.zephyrproject.org/3.2.0/develop/west/manifest.html#projects + # include corne with dongle pro_micro and xiao compatible + - name: mctechnology17 + url-base: https://github.com/mctechnology17 projects: - name: zmk remote: zmkfirmware revision: main import: app/west.yml + # include corne with dongle pro_micro and xiao compatible + - name: zmk-config + remote: mctechnology17 + revision: main self: path: config From e50204265f84b4e8fce8de57e42f754cb66c8978 Mon Sep 17 00:00:00 2001 From: Darren Victoriano Date: Mon, 27 Jan 2025 20:10:55 -0800 Subject: [PATCH 02/13] added dongle support using mctech's code as module --- build.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/build.yaml b/build.yaml index 451e565..6e869b4 100644 --- a/build.yaml +++ b/build.yaml @@ -19,12 +19,20 @@ # --- include: + # nice_nano_v2 + nice_view + - board: nice_nano_v2 + shield: corne_left nice_view_adapter nice_view_gem + cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Nice_Corne_View\" + artifact-name: nice_corne_left_view + snippet: studio-rpc-usb-uart + - board: nice_nano_v2 + shield: corne_right nice_view_adapter nice_view_gem + cmake-args: -DCONFIG_NICE_VIEW_GEM_ANIMATION=y + artifact-name: nice_corne_right_view + + # xiao_dongle - board: seeeduino_xiao_ble shield: corne_dongle_xiao cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Xiao_Dongle\" -DCONFIG_ZMK_STUDIO=y artifact-name: xiao_corne_dongle_xiao snippet: studio-rpc-usb-uart - - board: nice_nano_v2 - shield: corne_left nice_view_adapter nice_view - - board: nice_nano_v2 - shield: corne_right nice_view_adapter nice_view From b564d753eaf6cbd12bfc6f1db908135594fd35ac Mon Sep 17 00:00:00 2001 From: Darren Victoriano Date: Wed, 29 Jan 2025 19:57:14 -0800 Subject: [PATCH 03/13] added xiao dongle support --- build.yaml | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/build.yaml b/build.yaml index 6e869b4..231e981 100644 --- a/build.yaml +++ b/build.yaml @@ -19,20 +19,25 @@ # --- include: - # nice_nano_v2 + nice_view - - board: nice_nano_v2 - shield: corne_left nice_view_adapter nice_view_gem - cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Nice_Corne_View\" - artifact-name: nice_corne_left_view - snippet: studio-rpc-usb-uart - - board: nice_nano_v2 - shield: corne_right nice_view_adapter nice_view_gem - cmake-args: -DCONFIG_NICE_VIEW_GEM_ANIMATION=y - artifact-name: nice_corne_right_view - # xiao_dongle - board: seeeduino_xiao_ble shield: corne_dongle_xiao - cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Xiao_Dongle\" -DCONFIG_ZMK_STUDIO=y - artifact-name: xiao_corne_dongle_xiao snippet: studio-rpc-usb-uart + artifact-name: xiao_dongle + + # nice_nano_v2 + nice_view + - board: nice_nano_v2 + shield: corne_left nice_view_adapter nice_view + artifact-name: nice_corne_left_view + - board: nice_nano_v2 + shield: corne_right nice_view_adapter nice_view + artifact-name: nice_corne_right_view + + # reset_settings + - board: nice_nano_v2 + shield: settings_reset + artifact-name: nano_reset_settings + - board: seeeduino_xiao_ble + shield: settings_reset + artifact-name: xiao_reset_settings + From f7f013ef5e679228d1ad023578a59f87a34cfb65 Mon Sep 17 00:00:00 2001 From: Darren Victoriano Date: Wed, 29 Jan 2025 22:02:55 -0800 Subject: [PATCH 04/13] added xiao dongle support --- boards/nice_nano.overlay | 46 +++++++++++ boards/nice_nano_v2.overlay | 46 +++++++++++ boards/shields/corne/Kconfig.defconfig | 46 +++++++++++ boards/shields/corne/Kconfig.shield | 14 ++++ boards/shields/corne/corne.dtsi | 82 +++++++++++++++++++ boards/shields/corne/corne.zmk.yml | 15 ++++ boards/shields/corne/corne_dongle.conf | 6 ++ boards/shields/corne/corne_dongle.overlay | 59 +++++++++++++ boards/shields/corne/corne_left.conf | 0 boards/shields/corne/corne_left.overlay | 18 ++++ .../shields/corne/corne_peripheral_left.conf | 0 .../corne/corne_peripheral_left.overlay | 18 ++++ boards/shields/corne/corne_right.conf | 0 boards/shields/corne/corne_right.overlay | 26 ++++++ build.yaml | 19 ++--- config/west.yml | 7 -- 16 files changed, 385 insertions(+), 17 deletions(-) create mode 100644 boards/nice_nano.overlay create mode 100644 boards/nice_nano_v2.overlay create mode 100644 boards/shields/corne/Kconfig.defconfig create mode 100644 boards/shields/corne/Kconfig.shield create mode 100644 boards/shields/corne/corne.dtsi create mode 100644 boards/shields/corne/corne.zmk.yml create mode 100644 boards/shields/corne/corne_dongle.conf create mode 100644 boards/shields/corne/corne_dongle.overlay create mode 100644 boards/shields/corne/corne_left.conf create mode 100644 boards/shields/corne/corne_left.overlay create mode 100644 boards/shields/corne/corne_peripheral_left.conf create mode 100644 boards/shields/corne/corne_peripheral_left.overlay create mode 100644 boards/shields/corne/corne_right.conf create mode 100644 boards/shields/corne/corne_right.overlay diff --git a/boards/nice_nano.overlay b/boards/nice_nano.overlay new file mode 100644 index 0000000..424a617 --- /dev/null +++ b/boards/nice_nano.overlay @@ -0,0 +1,46 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + 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 = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/boards/nice_nano_v2.overlay b/boards/nice_nano_v2.overlay new file mode 100644 index 0000000..424a617 --- /dev/null +++ b/boards/nice_nano_v2.overlay @@ -0,0 +1,46 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + 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 = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/boards/shields/corne/Kconfig.defconfig b/boards/shields/corne/Kconfig.defconfig new file mode 100644 index 0000000..54be731 --- /dev/null +++ b/boards/shields/corne/Kconfig.defconfig @@ -0,0 +1,46 @@ +if SHIELD_CORNE_LEFT || SHIELD_CORNE_DONGLE + +config ZMK_KEYBOARD_NAME + default "Corne" + +config ZMK_SPLIT_ROLE_CENTRAL + default y + +config ZMK_USB + default y + +endif + +if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT || SHIELD_CORNE_DONGLE || SHIELD_CORNE_PERIPHERAL_LEFT + +config ZMK_SPLIT + default y + +if ZMK_DISPLAY + +config I2C + default y + +config SSD1306 + default y + +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 + +endif diff --git a/boards/shields/corne/Kconfig.shield b/boards/shields/corne/Kconfig.shield new file mode 100644 index 0000000..dbcb528 --- /dev/null +++ b/boards/shields/corne/Kconfig.shield @@ -0,0 +1,14 @@ +# Copyright (c) 2020 Pete Johanson +# SPDX-License-Identifier: MIT + +config SHIELD_CORNE_LEFT + def_bool $(shields_list_contains,corne_left) + +config SHIELD_CORNE_RIGHT + def_bool $(shields_list_contains,corne_right) + +config SHIELD_CORNE_DONGLE + def_bool $(shields_list_contains,corne_dongle) + +config SHIELD_CORNE_PERIPHERAL_LEFT + def_bool $(shields_list_contains,corne_peripheral_left) diff --git a/boards/shields/corne/corne.dtsi b/boards/shields/corne/corne.dtsi new file mode 100644 index 0000000..f6d41e3 --- /dev/null +++ b/boards/shields/corne/corne.dtsi @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * 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 = <12>; + rows = <4>; +// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | +// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | +// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | +// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | + 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,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) + >; + }; + + five_column_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; +// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | +// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | +// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | +// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | + map = < +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(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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + + diode-direction = "col2row"; + row-gpios + = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&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)> + ; + + }; + + // TODO: per-key RGB node(s)? +}; + +&pro_micro_i2c { + status = "okay"; + + oled: ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + segment-remap; + com-invdir; + com-sequential; + inversion-on; + prechargep = <0x22>; + }; +}; diff --git a/boards/shields/corne/corne.zmk.yml b/boards/shields/corne/corne.zmk.yml new file mode 100644 index 0000000..b7c05f2 --- /dev/null +++ b/boards/shields/corne/corne.zmk.yml @@ -0,0 +1,15 @@ +file_format: "1" +id: corne +name: Corne +type: shield +url: https://github.com/foostan/crkbd/ +requires: [pro_micro] +exposes: [i2c_oled] +features: + - keys + - display +siblings: + - corne_left + - corne_right + - corne_dongle + - corne_peripheral_left diff --git a/boards/shields/corne/corne_dongle.conf b/boards/shields/corne/corne_dongle.conf new file mode 100644 index 0000000..330217a --- /dev/null +++ b/boards/shields/corne/corne_dongle.conf @@ -0,0 +1,6 @@ +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y +CONFIG_ZMK_SLEEP=n + +# Allow multiple peripherals +CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2 + diff --git a/boards/shields/corne/corne_dongle.overlay b/boards/shields/corne/corne_dongle.overlay new file mode 100644 index 0000000..3eb72b1 --- /dev/null +++ b/boards/shields/corne/corne_dongle.overlay @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix-transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <4>; +// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | +// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | +// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | +// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | + 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,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) + >; + }; + + five_column_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; +// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | +// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | +// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | +// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | + map = < +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(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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + + input-gpios + = <&xiao_d 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; + + // TODO: per-key RGB node(s)? +}; diff --git a/boards/shields/corne/corne_left.conf b/boards/shields/corne/corne_left.conf new file mode 100644 index 0000000..e69de29 diff --git a/boards/shields/corne/corne_left.overlay b/boards/shields/corne/corne_left.overlay new file mode 100644 index 0000000..117cb19 --- /dev/null +++ b/boards/shields/corne/corne_left.overlay @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include "corne.dtsi" + +&kscan0 { + col-gpios + = <&pro_micro 21 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + ; +}; diff --git a/boards/shields/corne/corne_peripheral_left.conf b/boards/shields/corne/corne_peripheral_left.conf new file mode 100644 index 0000000..e69de29 diff --git a/boards/shields/corne/corne_peripheral_left.overlay b/boards/shields/corne/corne_peripheral_left.overlay new file mode 100644 index 0000000..117cb19 --- /dev/null +++ b/boards/shields/corne/corne_peripheral_left.overlay @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include "corne.dtsi" + +&kscan0 { + col-gpios + = <&pro_micro 21 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + ; +}; diff --git a/boards/shields/corne/corne_right.conf b/boards/shields/corne/corne_right.conf new file mode 100644 index 0000000..e69de29 diff --git a/boards/shields/corne/corne_right.overlay b/boards/shields/corne/corne_right.overlay new file mode 100644 index 0000000..a8a0cfe --- /dev/null +++ b/boards/shields/corne/corne_right.overlay @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include "corne.dtsi" + +&default_transform { + col-offset = <6>; +}; + +&five_column_transform { + col-offset = <6>; +}; + +&kscan0 { + col-gpios + = <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> + ; +}; diff --git a/build.yaml b/build.yaml index 231e981..1f3f33c 100644 --- a/build.yaml +++ b/build.yaml @@ -19,20 +19,20 @@ # --- include: - # xiao_dongle - - board: seeeduino_xiao_ble - shield: corne_dongle_xiao - snippet: studio-rpc-usb-uart - artifact-name: xiao_dongle - # nice_nano_v2 + nice_view - board: nice_nano_v2 shield: corne_left nice_view_adapter nice_view - artifact-name: nice_corne_left_view - board: nice_nano_v2 shield: corne_right nice_view_adapter nice_view - artifact-name: nice_corne_right_view - + + # xiao_dongle + - board: seeeduino_xiao_ble + shield: corne_dongle + # snippet: studio-rpc-usb-uart + # artifact-name: xiao_dongle + - board: nice_nano_v2 + shield: corne_peripheral_left nice_view_adapter nice_view + # reset_settings - board: nice_nano_v2 shield: settings_reset @@ -40,4 +40,3 @@ include: - board: seeeduino_xiao_ble shield: settings_reset artifact-name: xiao_reset_settings - diff --git a/config/west.yml b/config/west.yml index e4d67b1..b886cbe 100644 --- a/config/west.yml +++ b/config/west.yml @@ -4,17 +4,10 @@ manifest: url-base: https://github.com/zmkfirmware # Additional modules containing boards/shields/custom code can be listed here as well # See https://docs.zephyrproject.org/3.2.0/develop/west/manifest.html#projects - # include corne with dongle pro_micro and xiao compatible - - name: mctechnology17 - url-base: https://github.com/mctechnology17 projects: - name: zmk remote: zmkfirmware revision: main import: app/west.yml - # include corne with dongle pro_micro and xiao compatible - - name: zmk-config - remote: mctechnology17 - revision: main self: path: config From b39229285ac88be95a22f66fdb2417052fa84141 Mon Sep 17 00:00:00 2001 From: Darren Victoriano Date: Wed, 29 Jan 2025 22:08:18 -0800 Subject: [PATCH 05/13] added xiao dongle support --- build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.yaml b/build.yaml index 1f3f33c..027f9f6 100644 --- a/build.yaml +++ b/build.yaml @@ -28,8 +28,8 @@ include: # xiao_dongle - board: seeeduino_xiao_ble shield: corne_dongle - # snippet: studio-rpc-usb-uart - # artifact-name: xiao_dongle + snippet: studio-rpc-usb-uart + artifact-name: xiao_dongle - board: nice_nano_v2 shield: corne_peripheral_left nice_view_adapter nice_view From 0c170878af6cd63ce2c8ebfdf7434515396975d3 Mon Sep 17 00:00:00 2001 From: Darren Victoriano Date: Thu, 30 Jan 2025 23:26:00 -0800 Subject: [PATCH 06/13] added xiao dongle support --- boards/shields/corne/Kconfig.defconfig | 33 +++++++- boards/shields/corne/corne.conf | 0 boards/shields/corne/corne.dtsi | 82 ------------------- boards/shields/corne/corne.keymap | 0 boards/shields/corne/corne_dongle.conf | 6 -- boards/shields/corne/corne_dongle_xiao.conf | 11 +++ ...ngle.overlay => corne_dongle_xiao.overlay} | 0 build.yaml | 1 + 8 files changed, 43 insertions(+), 90 deletions(-) create mode 100644 boards/shields/corne/corne.conf create mode 100644 boards/shields/corne/corne.keymap delete mode 100644 boards/shields/corne/corne_dongle.conf create mode 100644 boards/shields/corne/corne_dongle_xiao.conf rename boards/shields/corne/{corne_dongle.overlay => corne_dongle_xiao.overlay} (100%) diff --git a/boards/shields/corne/Kconfig.defconfig b/boards/shields/corne/Kconfig.defconfig index 54be731..2071a5a 100644 --- a/boards/shields/corne/Kconfig.defconfig +++ b/boards/shields/corne/Kconfig.defconfig @@ -1,3 +1,4 @@ +## ----------------------------------------------------------------- if SHIELD_CORNE_LEFT || SHIELD_CORNE_DONGLE config ZMK_KEYBOARD_NAME @@ -6,11 +7,35 @@ config ZMK_KEYBOARD_NAME config ZMK_SPLIT_ROLE_CENTRAL default y -config ZMK_USB +config ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS + default 2 + +config BT_MAX_CONN + default 2 + +config BT_MAX_PAIRED + default 2 + +config ZMK_STUDIO default y -endif +config ZMK_STUDIO_LOCKING + default n +config ZMK_SLEEP + default n + +endif ## SHIELD_CORNE_DONGLE + +## ----------------------------------------------------------------- +if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT + +config ZMK_SPLIT_ROLE_CENTRAL + default n + +endif ## SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT + +## ----------------------------------------------------------------- if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT || SHIELD_CORNE_DONGLE || SHIELD_CORNE_PERIPHERAL_LEFT config ZMK_SPLIT @@ -25,6 +50,8 @@ config SSD1306 default y endif # ZMK_DISPLAY + +## ------------------ if LVGL @@ -44,3 +71,5 @@ endchoice endif # LVGL endif + + diff --git a/boards/shields/corne/corne.conf b/boards/shields/corne/corne.conf new file mode 100644 index 0000000..e69de29 diff --git a/boards/shields/corne/corne.dtsi b/boards/shields/corne/corne.dtsi index f6d41e3..e69de29 100644 --- a/boards/shields/corne/corne.dtsi +++ b/boards/shields/corne/corne.dtsi @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2020 Pete Johanson - * - * 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 = <12>; - rows = <4>; -// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | -// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | -// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | -// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - 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,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) - >; - }; - - five_column_transform: keymap_transform_1 { - compatible = "zmk,matrix-transform"; - columns = <10>; - rows = <4>; -// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | -// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | -// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | -// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - map = < -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(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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) - >; - }; - - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - - diode-direction = "col2row"; - row-gpios - = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&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)> - ; - - }; - - // TODO: per-key RGB node(s)? -}; - -&pro_micro_i2c { - status = "okay"; - - oled: ssd1306@3c { - compatible = "solomon,ssd1306fb"; - reg = <0x3c>; - width = <128>; - height = <32>; - segment-offset = <0>; - page-offset = <0>; - display-offset = <0>; - multiplex-ratio = <31>; - segment-remap; - com-invdir; - com-sequential; - inversion-on; - prechargep = <0x22>; - }; -}; diff --git a/boards/shields/corne/corne.keymap b/boards/shields/corne/corne.keymap new file mode 100644 index 0000000..e69de29 diff --git a/boards/shields/corne/corne_dongle.conf b/boards/shields/corne/corne_dongle.conf deleted file mode 100644 index 330217a..0000000 --- a/boards/shields/corne/corne_dongle.conf +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_BT_CTLR_TX_PWR_PLUS_8=y -CONFIG_ZMK_SLEEP=n - -# Allow multiple peripherals -CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2 - diff --git a/boards/shields/corne/corne_dongle_xiao.conf b/boards/shields/corne/corne_dongle_xiao.conf new file mode 100644 index 0000000..7537dd2 --- /dev/null +++ b/boards/shields/corne/corne_dongle_xiao.conf @@ -0,0 +1,11 @@ +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y +CONFIG_ZMK_SLEEP=n + +### DONGLE MODE +CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2 + +### DONGLE OPTIONS +# 3 profiles (n+2) +CONFIG_BT_MAX_CONN=5 +CONFIG_BT_MAX_PAIRED=5 + diff --git a/boards/shields/corne/corne_dongle.overlay b/boards/shields/corne/corne_dongle_xiao.overlay similarity index 100% rename from boards/shields/corne/corne_dongle.overlay rename to boards/shields/corne/corne_dongle_xiao.overlay diff --git a/build.yaml b/build.yaml index 027f9f6..bd5c36a 100644 --- a/build.yaml +++ b/build.yaml @@ -32,6 +32,7 @@ include: artifact-name: xiao_dongle - board: nice_nano_v2 shield: corne_peripheral_left nice_view_adapter nice_view + snippet: studio-rpc-usb-uart # reset_settings - board: nice_nano_v2 From db99749e55a77c663a76a23c39117415c9310782 Mon Sep 17 00:00:00 2001 From: Darren Victoriano Date: Sun, 2 Feb 2025 13:28:22 -0800 Subject: [PATCH 07/13] added xiao dongle support --- boards/shields/corne/Kconfig.defconfig | 33 +------- boards/shields/corne/corne.conf | 6 ++ boards/shields/corne/corne.dtsi | 82 +++++++++++++++++++ boards/shields/corne/corne.keymap | 42 ++++++++++ boards/shields/corne/corne.zmk.yml | 1 + ...rne_dongle_xiao.conf => corne_dongle.conf} | 5 -- ...ngle_xiao.overlay => corne_dongle.overlay} | 0 boards/shields/corne/corne_left.conf | 30 +++++++ .../shields/corne/corne_peripheral_left.conf | 27 ++++++ boards/shields/corne/corne_right.conf | 27 ++++++ build.yaml | 8 +- config/corne.conf | 29 ------- 12 files changed, 220 insertions(+), 70 deletions(-) rename boards/shields/corne/{corne_dongle_xiao.conf => corne_dongle.conf} (57%) rename boards/shields/corne/{corne_dongle_xiao.overlay => corne_dongle.overlay} (100%) delete mode 100644 config/corne.conf diff --git a/boards/shields/corne/Kconfig.defconfig b/boards/shields/corne/Kconfig.defconfig index 2071a5a..54be731 100644 --- a/boards/shields/corne/Kconfig.defconfig +++ b/boards/shields/corne/Kconfig.defconfig @@ -1,4 +1,3 @@ -## ----------------------------------------------------------------- if SHIELD_CORNE_LEFT || SHIELD_CORNE_DONGLE config ZMK_KEYBOARD_NAME @@ -7,35 +6,11 @@ config ZMK_KEYBOARD_NAME config ZMK_SPLIT_ROLE_CENTRAL default y -config ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS - default 2 - -config BT_MAX_CONN - default 2 - -config BT_MAX_PAIRED - default 2 - -config ZMK_STUDIO +config ZMK_USB default y -config ZMK_STUDIO_LOCKING - default n +endif -config ZMK_SLEEP - default n - -endif ## SHIELD_CORNE_DONGLE - -## ----------------------------------------------------------------- -if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT - -config ZMK_SPLIT_ROLE_CENTRAL - default n - -endif ## SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT - -## ----------------------------------------------------------------- if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT || SHIELD_CORNE_DONGLE || SHIELD_CORNE_PERIPHERAL_LEFT config ZMK_SPLIT @@ -50,8 +25,6 @@ config SSD1306 default y endif # ZMK_DISPLAY - -## ------------------ if LVGL @@ -71,5 +44,3 @@ endchoice endif # LVGL endif - - diff --git a/boards/shields/corne/corne.conf b/boards/shields/corne/corne.conf index e69de29..974243c 100644 --- a/boards/shields/corne/corne.conf +++ b/boards/shields/corne/corne.conf @@ -0,0 +1,6 @@ +# Uncomment the following lines to enable the Corne RGB Underglow +# CONFIG_ZMK_RGB_UNDERGLOW=y +# CONFIG_WS2812_STRIP=y + +# Uncomment the following line to enable the Corne OLED Display +# CONFIG_ZMK_DISPLAY=y diff --git a/boards/shields/corne/corne.dtsi b/boards/shields/corne/corne.dtsi index e69de29..f6d41e3 100644 --- a/boards/shields/corne/corne.dtsi +++ b/boards/shields/corne/corne.dtsi @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * 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 = <12>; + rows = <4>; +// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | +// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | +// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | +// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | + 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,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) + >; + }; + + five_column_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; +// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | +// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | +// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | +// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | + map = < +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(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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + + diode-direction = "col2row"; + row-gpios + = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&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)> + ; + + }; + + // TODO: per-key RGB node(s)? +}; + +&pro_micro_i2c { + status = "okay"; + + oled: ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + segment-remap; + com-invdir; + com-sequential; + inversion-on; + prechargep = <0x22>; + }; +}; diff --git a/boards/shields/corne/corne.keymap b/boards/shields/corne/corne.keymap index e69de29..1bc054b 100644 --- a/boards/shields/corne/corne.keymap +++ b/boards/shields/corne/corne.keymap @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < +&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC +&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp ENTER +&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC + &kp LGUI &mo 1 &kp SPACE &kp SPACE &mo 2 &kp RALT + >; + }; + + lower_layer { + bindings = < +&kp LS(TAB) &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC +&kp LCTRL &none &none &none &none &none &kp LEFT_ARROW &kp DOWN_ARROW &kp UP_ARROW &kp RIGHT_ARROW &none &kp ENTER +&kp LSHFT &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_CLR &none &none &none &none &kp ESC + &kp LGUI &mo 1 &kp SPACE &kp SPACE &mo 2 &kp RALT + >; + }; + + raise_layer { + bindings = < +&kp LC(TAB) &kp EXCL &kp AT &kp POUND &kp DOLLAR &kp PERCENT &kp CARET &kp AMPERSAND &kp STAR &kp PLUS &kp EQUAL &kp BSPC +&kp LCTRL &kp GRAVE &kp TILDE &kp LEFT_BRACE &kp LEFT_BRACKET &kp LEFT_PARENTHESIS &kp RIGHT_PARENTHESIS &kp RIGHT_BRACKET &kp RIGHT_BRACE &kp BACKSLASH &kp PIPE &kp ENTER +&kp LSHFT &none &none &none &kp SQT &kp MINUS &kp UNDER &kp DOUBLE_QUOTES &none &none &none &kp RIGHT_SHIFT + &kp LGUI &mo 1 &kp SPACE &kp SPACE &mo 2 &kp RALT + >; + }; + }; +}; diff --git a/boards/shields/corne/corne.zmk.yml b/boards/shields/corne/corne.zmk.yml index b7c05f2..5e78dbc 100644 --- a/boards/shields/corne/corne.zmk.yml +++ b/boards/shields/corne/corne.zmk.yml @@ -8,6 +8,7 @@ exposes: [i2c_oled] features: - keys - display + - underglow siblings: - corne_left - corne_right diff --git a/boards/shields/corne/corne_dongle_xiao.conf b/boards/shields/corne/corne_dongle.conf similarity index 57% rename from boards/shields/corne/corne_dongle_xiao.conf rename to boards/shields/corne/corne_dongle.conf index 7537dd2..c2718cf 100644 --- a/boards/shields/corne/corne_dongle_xiao.conf +++ b/boards/shields/corne/corne_dongle.conf @@ -4,8 +4,3 @@ CONFIG_ZMK_SLEEP=n ### DONGLE MODE CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2 -### DONGLE OPTIONS -# 3 profiles (n+2) -CONFIG_BT_MAX_CONN=5 -CONFIG_BT_MAX_PAIRED=5 - diff --git a/boards/shields/corne/corne_dongle_xiao.overlay b/boards/shields/corne/corne_dongle.overlay similarity index 100% rename from boards/shields/corne/corne_dongle_xiao.overlay rename to boards/shields/corne/corne_dongle.overlay diff --git a/boards/shields/corne/corne_left.conf b/boards/shields/corne/corne_left.conf index e69de29..b3c8e61 100644 --- a/boards/shields/corne/corne_left.conf +++ b/boards/shields/corne/corne_left.conf @@ -0,0 +1,30 @@ +# Board Name +CONFIG_ZMK_KEYBOARD_NAME="Corne-Bop" + +# Enable and adjust nice!view +CONFIG_ZMK_DISPLAY=y +CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y +CONFIG_ZMK_WIDGET_WPM_STATUS=n + +# Disable in-built nice!view widget +CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y +CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y +CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y + +# Increase the bluetooth transmission power +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y +CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y +CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y + +# Set sleep timeout to 30 minutes +CONFIG_ZMK_SLEEP=y +CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000 + +# Enable eager debouncing +CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1 +CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=10 + +# Enable ZMK Studio for Realtime Keymap Updates +# CONFIG_ZMK_STUDIO=y +# CONFIG_ZMK_STUDIO_LOCKING=n + diff --git a/boards/shields/corne/corne_peripheral_left.conf b/boards/shields/corne/corne_peripheral_left.conf index e69de29..e4d224a 100644 --- a/boards/shields/corne/corne_peripheral_left.conf +++ b/boards/shields/corne/corne_peripheral_left.conf @@ -0,0 +1,27 @@ +# Enable and adjust nice!view +CONFIG_ZMK_DISPLAY=y +CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y +CONFIG_ZMK_WIDGET_WPM_STATUS=n + +# Disable in-built nice!view widget +CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y +CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y +CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y + +# Increase the bluetooth transmission power +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y +CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y +CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y + +# Set sleep timeout to 30 minutes +CONFIG_ZMK_SLEEP=y +CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000 + +# Enable eager debouncing +CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1 +CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=10 + +# Enable ZMK Studio for Realtime Keymap Updates +# CONFIG_ZMK_STUDIO=y +# CONFIG_ZMK_STUDIO_LOCKING=n + diff --git a/boards/shields/corne/corne_right.conf b/boards/shields/corne/corne_right.conf index e69de29..e4d224a 100644 --- a/boards/shields/corne/corne_right.conf +++ b/boards/shields/corne/corne_right.conf @@ -0,0 +1,27 @@ +# Enable and adjust nice!view +CONFIG_ZMK_DISPLAY=y +CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y +CONFIG_ZMK_WIDGET_WPM_STATUS=n + +# Disable in-built nice!view widget +CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y +CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y +CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y + +# Increase the bluetooth transmission power +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y +CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y +CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y + +# Set sleep timeout to 30 minutes +CONFIG_ZMK_SLEEP=y +CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000 + +# Enable eager debouncing +CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1 +CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=10 + +# Enable ZMK Studio for Realtime Keymap Updates +# CONFIG_ZMK_STUDIO=y +# CONFIG_ZMK_STUDIO_LOCKING=n + diff --git a/build.yaml b/build.yaml index bd5c36a..f367750 100644 --- a/build.yaml +++ b/build.yaml @@ -19,20 +19,18 @@ # --- include: - # nice_nano_v2 + nice_view - board: nice_nano_v2 shield: corne_left nice_view_adapter nice_view - board: nice_nano_v2 shield: corne_right nice_view_adapter nice_view + - board: nice_nano_v2 + shield: settings_reset - # xiao_dongle + # Add custom dongle and a peripheral left corne - board: seeeduino_xiao_ble shield: corne_dongle - snippet: studio-rpc-usb-uart - artifact-name: xiao_dongle - board: nice_nano_v2 shield: corne_peripheral_left nice_view_adapter nice_view - snippet: studio-rpc-usb-uart # reset_settings - board: nice_nano_v2 diff --git a/config/corne.conf b/config/corne.conf deleted file mode 100644 index f12a933..0000000 --- a/config/corne.conf +++ /dev/null @@ -1,29 +0,0 @@ -# Board Name -CONFIG_ZMK_KEYBOARD_NAME="Corne Bop" - -# Enable and adjust nice!view -CONFIG_ZMK_DISPLAY=y -CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y -CONFIG_ZMK_WIDGET_WPM_STATUS=n - -# Disable in-built nice!view widget -CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y -CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y -CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y - -# Increase the bluetooth transmission power -CONFIG_BT_CTLR_TX_PWR_PLUS_8=y -CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y - -# Set sleep timeout to 30 minutes -CONFIG_ZMK_SLEEP=y -CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000 - -# Enable eager debouncing -CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1 -CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=10 - -# Enable ZMK Studio for Realtime Keymap Updates -CONFIG_ZMK_STUDIO=y -CONFIG_ZMK_STUDIO_LOCKING=n - From 55015746cfb6e2f74ccc53c83c2e369af7e003a1 Mon Sep 17 00:00:00 2001 From: Darren Victoriano Date: Sun, 2 Feb 2025 13:38:43 -0800 Subject: [PATCH 08/13] renamed artifacts: --- build.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.yaml b/build.yaml index f367750..fd51290 100644 --- a/build.yaml +++ b/build.yaml @@ -21,16 +21,18 @@ include: - board: nice_nano_v2 shield: corne_left nice_view_adapter nice_view + artifact-name: corne_left_master - board: nice_nano_v2 shield: corne_right nice_view_adapter nice_view - - board: nice_nano_v2 - shield: settings_reset + artifact-name: corne_right_slave # Add custom dongle and a peripheral left corne - board: seeeduino_xiao_ble shield: corne_dongle + artifact-name: xiao_dongle - board: nice_nano_v2 shield: corne_peripheral_left nice_view_adapter nice_view + artifact-name: corne_left_slave # reset_settings - board: nice_nano_v2 From 2e459898c00e34b763ac2f35c190fc55583e05f0 Mon Sep 17 00:00:00 2001 From: Darren Victoriano Date: Mon, 3 Feb 2025 19:57:13 -0800 Subject: [PATCH 09/13] changed config --- boards/shields/corne/corne_left.conf | 1 - boards/shields/corne/corne_peripheral_left.conf | 1 - boards/shields/corne/corne_right.conf | 1 - 3 files changed, 3 deletions(-) diff --git a/boards/shields/corne/corne_left.conf b/boards/shields/corne/corne_left.conf index b3c8e61..5f46928 100644 --- a/boards/shields/corne/corne_left.conf +++ b/boards/shields/corne/corne_left.conf @@ -14,7 +14,6 @@ CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y # Increase the bluetooth transmission power CONFIG_BT_CTLR_TX_PWR_PLUS_8=y CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y -CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y # Set sleep timeout to 30 minutes CONFIG_ZMK_SLEEP=y diff --git a/boards/shields/corne/corne_peripheral_left.conf b/boards/shields/corne/corne_peripheral_left.conf index e4d224a..fc91a52 100644 --- a/boards/shields/corne/corne_peripheral_left.conf +++ b/boards/shields/corne/corne_peripheral_left.conf @@ -11,7 +11,6 @@ CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y # Increase the bluetooth transmission power CONFIG_BT_CTLR_TX_PWR_PLUS_8=y CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y -CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y # Set sleep timeout to 30 minutes CONFIG_ZMK_SLEEP=y diff --git a/boards/shields/corne/corne_right.conf b/boards/shields/corne/corne_right.conf index e4d224a..fc91a52 100644 --- a/boards/shields/corne/corne_right.conf +++ b/boards/shields/corne/corne_right.conf @@ -11,7 +11,6 @@ CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y # Increase the bluetooth transmission power CONFIG_BT_CTLR_TX_PWR_PLUS_8=y CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y -CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y # Set sleep timeout to 30 minutes CONFIG_ZMK_SLEEP=y From 86e080ad78f71f160a3f22a7914b2f1ccabf3731 Mon Sep 17 00:00:00 2001 From: Darren Victoriano Date: Mon, 3 Feb 2025 21:34:20 -0800 Subject: [PATCH 10/13] fix dongle --- boards/shields/corne/Kconfig.defconfig | 21 ++++++++--- boards/shields/corne/corne.dtsi | 16 +++++++- boards/shields/corne/corne_dongle.overlay | 46 ++++++++--------------- build.yaml | 16 ++++---- 4 files changed, 52 insertions(+), 47 deletions(-) diff --git a/boards/shields/corne/Kconfig.defconfig b/boards/shields/corne/Kconfig.defconfig index 54be731..3361bb2 100644 --- a/boards/shields/corne/Kconfig.defconfig +++ b/boards/shields/corne/Kconfig.defconfig @@ -1,4 +1,4 @@ -if SHIELD_CORNE_LEFT || SHIELD_CORNE_DONGLE +if SHIELD_CORNE_DONGLE config ZMK_KEYBOARD_NAME default "Corne" @@ -6,16 +6,25 @@ config ZMK_KEYBOARD_NAME config ZMK_SPLIT_ROLE_CENTRAL default y +config ZMK_SPLIT + default y + config ZMK_USB default y +config ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS + default 2 + +# Set this to ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS + your desired number of BT profiles (default is 5) +config BT_MAX_CONN + default 5 + +# Set this to the same number as BT_MAX_CONN +config BT_MAX_PAIRED + default 5 + endif -if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT || SHIELD_CORNE_DONGLE || SHIELD_CORNE_PERIPHERAL_LEFT - -config ZMK_SPLIT - default y - if ZMK_DISPLAY config I2C diff --git a/boards/shields/corne/corne.dtsi b/boards/shields/corne/corne.dtsi index f6d41e3..e1dcc05 100644 --- a/boards/shields/corne/corne.dtsi +++ b/boards/shields/corne/corne.dtsi @@ -6,11 +6,22 @@ #include +#include +#include + +&foostan_corne_6col_layout { + transform = <&default_transform>; +}; + +&foostan_corne_5col_layout { + transform = <&five_column_transform>; +}; + / { chosen { zephyr,display = &oled; zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &foostan_corne_6col_layout; }; default_transform: keymap_transform_0 { @@ -36,7 +47,7 @@ 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) // | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | // | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | // | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | -// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | +// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | map = < 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(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) @@ -47,6 +58,7 @@ 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 kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; + wakeup-source; diode-direction = "col2row"; row-gpios diff --git a/boards/shields/corne/corne_dongle.overlay b/boards/shields/corne/corne_dongle.overlay index 3eb72b1..10bc4dd 100644 --- a/boards/shields/corne/corne_dongle.overlay +++ b/boards/shields/corne/corne_dongle.overlay @@ -5,11 +5,24 @@ */ #include +#include + +&foostan_corne_6col_layout { + transform = <&default_transform>; +}; / { chosen { - zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,kscan = &mock_kscan; + zmk,physical-layout = &foostan_corne_6col_layout; + }; + + mock_kscan:mock_kscan_0 { + compatible = "zmk,kscan-mock"; + columns = <0>; + rows = <0>; + events = <0>; + }; default_transform: keymap_transform_0 { @@ -27,33 +40,4 @@ 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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) >; }; - - five_column_transform: keymap_transform_1 { - compatible = "zmk,matrix-transform"; - columns = <10>; - rows = <4>; -// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | -// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | -// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | -// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - map = < -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(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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) - >; - }; - - kscan0: kscan { - compatible = "zmk,kscan-gpio-direct"; - - input-gpios - = <&xiao_d 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&xiao_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&xiao_d 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&xiao_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; - }; - - // TODO: per-key RGB node(s)? }; diff --git a/build.yaml b/build.yaml index fd51290..637e086 100644 --- a/build.yaml +++ b/build.yaml @@ -19,14 +19,7 @@ # --- include: - - board: nice_nano_v2 - shield: corne_left nice_view_adapter nice_view - artifact-name: corne_left_master - - board: nice_nano_v2 - shield: corne_right nice_view_adapter nice_view - artifact-name: corne_right_slave - - # Add custom dongle and a peripheral left corne + # Add custom dongle and a peripheral left corne - board: seeeduino_xiao_ble shield: corne_dongle artifact-name: xiao_dongle @@ -34,6 +27,13 @@ include: shield: corne_peripheral_left nice_view_adapter nice_view artifact-name: corne_left_slave + # - board: nice_nano_v2 + # shield: corne_left nice_view_adapter nice_view + # artifact-name: corne_left_master + - board: nice_nano_v2 + shield: corne_right nice_view_adapter nice_view + artifact-name: corne_right_slave + # reset_settings - board: nice_nano_v2 shield: settings_reset From 1a18a3e043131a688ed6ddc6ee659ce9c053b038 Mon Sep 17 00:00:00 2001 From: Darren Victoriano Date: Mon, 3 Feb 2025 21:44:36 -0800 Subject: [PATCH 11/13] fix def conf --- boards/shields/corne/Kconfig.defconfig | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/boards/shields/corne/Kconfig.defconfig b/boards/shields/corne/Kconfig.defconfig index 3361bb2..dc69844 100644 --- a/boards/shields/corne/Kconfig.defconfig +++ b/boards/shields/corne/Kconfig.defconfig @@ -6,9 +6,6 @@ config ZMK_KEYBOARD_NAME config ZMK_SPLIT_ROLE_CENTRAL default y -config ZMK_SPLIT - default y - config ZMK_USB default y @@ -25,6 +22,11 @@ config BT_MAX_PAIRED endif +if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT || SHIELD_CORNE_DONGLE || SHIELD_CORNE_PERIPHERAL_LEFT + +config ZMK_SPLIT + default y + if ZMK_DISPLAY config I2C From 328ec5ebbccf444b03e1290d4fd5bf1fdf518410 Mon Sep 17 00:00:00 2001 From: Darren Victoriano Date: Mon, 3 Feb 2025 22:54:37 -0800 Subject: [PATCH 12/13] testing --- boards/nice_nano.overlay | 46 --------- boards/nice_nano_v2.overlay | 46 --------- boards/shields/corne/Kconfig.defconfig | 2 +- boards/shields/corne/Kconfig.shield | 2 - boards/shields/corne/corne.conf | 6 -- boards/shields/corne/corne.dtsi | 94 ------------------- boards/shields/corne/corne.keymap | 42 --------- boards/shields/corne/corne.zmk.yml | 16 ---- boards/shields/corne/corne_dongle.overlay | 22 +++++ boards/shields/corne/corne_left.conf | 3 - boards/shields/corne/corne_left.overlay | 18 ---- .../shields/corne/corne_peripheral_left.conf | 26 ----- .../corne/corne_peripheral_left.overlay | 18 ---- boards/shields/corne/corne_right.overlay | 26 ----- build.yaml | 17 ++-- 15 files changed, 33 insertions(+), 351 deletions(-) delete mode 100644 boards/nice_nano.overlay delete mode 100644 boards/nice_nano_v2.overlay delete mode 100644 boards/shields/corne/corne.conf delete mode 100644 boards/shields/corne/corne.dtsi delete mode 100644 boards/shields/corne/corne.keymap delete mode 100644 boards/shields/corne/corne.zmk.yml delete mode 100644 boards/shields/corne/corne_left.overlay delete mode 100644 boards/shields/corne/corne_peripheral_left.conf delete mode 100644 boards/shields/corne/corne_peripheral_left.overlay delete mode 100644 boards/shields/corne/corne_right.overlay diff --git a/boards/nice_nano.overlay b/boards/nice_nano.overlay deleted file mode 100644 index 424a617..0000000 --- a/boards/nice_nano.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/boards/nice_nano_v2.overlay b/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617..0000000 --- a/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - 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 = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/boards/shields/corne/Kconfig.defconfig b/boards/shields/corne/Kconfig.defconfig index dc69844..4eb1fc8 100644 --- a/boards/shields/corne/Kconfig.defconfig +++ b/boards/shields/corne/Kconfig.defconfig @@ -22,7 +22,7 @@ config BT_MAX_PAIRED endif -if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT || SHIELD_CORNE_DONGLE || SHIELD_CORNE_PERIPHERAL_LEFT +if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT || SHIELD_CORNE_DONGLE config ZMK_SPLIT default y diff --git a/boards/shields/corne/Kconfig.shield b/boards/shields/corne/Kconfig.shield index dbcb528..e3a38ce 100644 --- a/boards/shields/corne/Kconfig.shield +++ b/boards/shields/corne/Kconfig.shield @@ -10,5 +10,3 @@ config SHIELD_CORNE_RIGHT config SHIELD_CORNE_DONGLE def_bool $(shields_list_contains,corne_dongle) -config SHIELD_CORNE_PERIPHERAL_LEFT - def_bool $(shields_list_contains,corne_peripheral_left) diff --git a/boards/shields/corne/corne.conf b/boards/shields/corne/corne.conf deleted file mode 100644 index 974243c..0000000 --- a/boards/shields/corne/corne.conf +++ /dev/null @@ -1,6 +0,0 @@ -# Uncomment the following lines to enable the Corne RGB Underglow -# CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y - -# Uncomment the following line to enable the Corne OLED Display -# CONFIG_ZMK_DISPLAY=y diff --git a/boards/shields/corne/corne.dtsi b/boards/shields/corne/corne.dtsi deleted file mode 100644 index e1dcc05..0000000 --- a/boards/shields/corne/corne.dtsi +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2020 Pete Johanson - * - * SPDX-License-Identifier: MIT - */ - -#include - -#include -#include - -&foostan_corne_6col_layout { - transform = <&default_transform>; -}; - -&foostan_corne_5col_layout { - transform = <&five_column_transform>; -}; - -/ { - chosen { - zephyr,display = &oled; - zmk,kscan = &kscan0; - zmk,physical-layout = &foostan_corne_6col_layout; - }; - - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <4>; -// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | -// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | -// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | -// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - 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,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) - >; - }; - - five_column_transform: keymap_transform_1 { - compatible = "zmk,matrix-transform"; - columns = <10>; - rows = <4>; -// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | -// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | -// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | -// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - map = < -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(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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) - >; - }; - - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - wakeup-source; - - diode-direction = "col2row"; - row-gpios - = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&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)> - ; - - }; - - // TODO: per-key RGB node(s)? -}; - -&pro_micro_i2c { - status = "okay"; - - oled: ssd1306@3c { - compatible = "solomon,ssd1306fb"; - reg = <0x3c>; - width = <128>; - height = <32>; - segment-offset = <0>; - page-offset = <0>; - display-offset = <0>; - multiplex-ratio = <31>; - segment-remap; - com-invdir; - com-sequential; - inversion-on; - prechargep = <0x22>; - }; -}; diff --git a/boards/shields/corne/corne.keymap b/boards/shields/corne/corne.keymap deleted file mode 100644 index 1bc054b..0000000 --- a/boards/shields/corne/corne.keymap +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -#include -#include -#include - -/ { - keymap { - compatible = "zmk,keymap"; - - default_layer { - bindings = < -&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC -&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp ENTER -&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC - &kp LGUI &mo 1 &kp SPACE &kp SPACE &mo 2 &kp RALT - >; - }; - - lower_layer { - bindings = < -&kp LS(TAB) &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC -&kp LCTRL &none &none &none &none &none &kp LEFT_ARROW &kp DOWN_ARROW &kp UP_ARROW &kp RIGHT_ARROW &none &kp ENTER -&kp LSHFT &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_CLR &none &none &none &none &kp ESC - &kp LGUI &mo 1 &kp SPACE &kp SPACE &mo 2 &kp RALT - >; - }; - - raise_layer { - bindings = < -&kp LC(TAB) &kp EXCL &kp AT &kp POUND &kp DOLLAR &kp PERCENT &kp CARET &kp AMPERSAND &kp STAR &kp PLUS &kp EQUAL &kp BSPC -&kp LCTRL &kp GRAVE &kp TILDE &kp LEFT_BRACE &kp LEFT_BRACKET &kp LEFT_PARENTHESIS &kp RIGHT_PARENTHESIS &kp RIGHT_BRACKET &kp RIGHT_BRACE &kp BACKSLASH &kp PIPE &kp ENTER -&kp LSHFT &none &none &none &kp SQT &kp MINUS &kp UNDER &kp DOUBLE_QUOTES &none &none &none &kp RIGHT_SHIFT - &kp LGUI &mo 1 &kp SPACE &kp SPACE &mo 2 &kp RALT - >; - }; - }; -}; diff --git a/boards/shields/corne/corne.zmk.yml b/boards/shields/corne/corne.zmk.yml deleted file mode 100644 index 5e78dbc..0000000 --- a/boards/shields/corne/corne.zmk.yml +++ /dev/null @@ -1,16 +0,0 @@ -file_format: "1" -id: corne -name: Corne -type: shield -url: https://github.com/foostan/crkbd/ -requires: [pro_micro] -exposes: [i2c_oled] -features: - - keys - - display - - underglow -siblings: - - corne_left - - corne_right - - corne_dongle - - corne_peripheral_left diff --git a/boards/shields/corne/corne_dongle.overlay b/boards/shields/corne/corne_dongle.overlay index 10bc4dd..5d68c0c 100644 --- a/boards/shields/corne/corne_dongle.overlay +++ b/boards/shields/corne/corne_dongle.overlay @@ -5,12 +5,17 @@ */ #include +#include #include &foostan_corne_6col_layout { transform = <&default_transform>; }; +&foostan_corne_5col_layout { + transform = <&five_column_transform>; +}; + / { chosen { zmk,kscan = &mock_kscan; @@ -40,4 +45,21 @@ 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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) >; }; + + five_column_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; +// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | +// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | +// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | +// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | + map = < +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(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(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(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) + >; + }; + }; diff --git a/boards/shields/corne/corne_left.conf b/boards/shields/corne/corne_left.conf index 5f46928..fc91a52 100644 --- a/boards/shields/corne/corne_left.conf +++ b/boards/shields/corne/corne_left.conf @@ -1,6 +1,3 @@ -# Board Name -CONFIG_ZMK_KEYBOARD_NAME="Corne-Bop" - # Enable and adjust nice!view CONFIG_ZMK_DISPLAY=y CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y diff --git a/boards/shields/corne/corne_left.overlay b/boards/shields/corne/corne_left.overlay deleted file mode 100644 index 117cb19..0000000 --- a/boards/shields/corne/corne_left.overlay +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) 2020 Pete Johanson - * - * SPDX-License-Identifier: MIT - */ - -#include "corne.dtsi" - -&kscan0 { - col-gpios - = <&pro_micro 21 GPIO_ACTIVE_HIGH> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 15 GPIO_ACTIVE_HIGH> - , <&pro_micro 14 GPIO_ACTIVE_HIGH> - ; -}; diff --git a/boards/shields/corne/corne_peripheral_left.conf b/boards/shields/corne/corne_peripheral_left.conf deleted file mode 100644 index fc91a52..0000000 --- a/boards/shields/corne/corne_peripheral_left.conf +++ /dev/null @@ -1,26 +0,0 @@ -# Enable and adjust nice!view -CONFIG_ZMK_DISPLAY=y -CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y -CONFIG_ZMK_WIDGET_WPM_STATUS=n - -# Disable in-built nice!view widget -CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y -CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y -CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y - -# Increase the bluetooth transmission power -CONFIG_BT_CTLR_TX_PWR_PLUS_8=y -CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y - -# Set sleep timeout to 30 minutes -CONFIG_ZMK_SLEEP=y -CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000 - -# Enable eager debouncing -CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1 -CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=10 - -# Enable ZMK Studio for Realtime Keymap Updates -# CONFIG_ZMK_STUDIO=y -# CONFIG_ZMK_STUDIO_LOCKING=n - diff --git a/boards/shields/corne/corne_peripheral_left.overlay b/boards/shields/corne/corne_peripheral_left.overlay deleted file mode 100644 index 117cb19..0000000 --- a/boards/shields/corne/corne_peripheral_left.overlay +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) 2020 Pete Johanson - * - * SPDX-License-Identifier: MIT - */ - -#include "corne.dtsi" - -&kscan0 { - col-gpios - = <&pro_micro 21 GPIO_ACTIVE_HIGH> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 15 GPIO_ACTIVE_HIGH> - , <&pro_micro 14 GPIO_ACTIVE_HIGH> - ; -}; diff --git a/boards/shields/corne/corne_right.overlay b/boards/shields/corne/corne_right.overlay deleted file mode 100644 index a8a0cfe..0000000 --- a/boards/shields/corne/corne_right.overlay +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2020 Pete Johanson - * - * SPDX-License-Identifier: MIT - */ - -#include "corne.dtsi" - -&default_transform { - col-offset = <6>; -}; - -&five_column_transform { - col-offset = <6>; -}; - -&kscan0 { - col-gpios - = <&pro_micro 14 GPIO_ACTIVE_HIGH> - , <&pro_micro 15 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - , <&pro_micro 21 GPIO_ACTIVE_HIGH> - ; -}; diff --git a/build.yaml b/build.yaml index 637e086..18ab2af 100644 --- a/build.yaml +++ b/build.yaml @@ -22,22 +22,25 @@ include: # Add custom dongle and a peripheral left corne - board: seeeduino_xiao_ble shield: corne_dongle + snippet: studio-rpc-usb-uart + cmake-args: -DCONFIG_ZMK_SPLIT_ROLE_CENTRAL=y -DCONFIG_ZMK_STUDIO=y -DCONFIG_ZMK_STUDIO_LOCKING=n artifact-name: xiao_dongle - - board: nice_nano_v2 - shield: corne_peripheral_left nice_view_adapter nice_view - artifact-name: corne_left_slave - # - board: nice_nano_v2 - # shield: corne_left nice_view_adapter nice_view - # artifact-name: corne_left_master + - board: nice_nano_v2 + shield: corne_left nice_view_adapter nice_view + cmake-args: -DCONFIG_ZMK_SPLIT_ROLE_CENTRAL=n + artifact-name: nano_corne_left + - board: nice_nano_v2 shield: corne_right nice_view_adapter nice_view - artifact-name: corne_right_slave + cmake-args: -DCONFIG_ZMK_SPLIT_ROLE_CENTRAL=n + artifact-name: nano_corne_right # reset_settings - board: nice_nano_v2 shield: settings_reset artifact-name: nano_reset_settings + - board: seeeduino_xiao_ble shield: settings_reset artifact-name: xiao_reset_settings From bd3f3540b5964d926754788466fbf87a917aad48 Mon Sep 17 00:00:00 2001 From: Darren Victoriano Date: Mon, 3 Feb 2025 23:28:31 -0800 Subject: [PATCH 13/13] move config --- {boards/shields/corne => config}/corne_left.conf | 1 + {boards/shields/corne => config}/corne_right.conf | 1 + 2 files changed, 2 insertions(+) rename {boards/shields/corne => config}/corne_left.conf (95%) rename {boards/shields/corne => config}/corne_right.conf (95%) diff --git a/boards/shields/corne/corne_left.conf b/config/corne_left.conf similarity index 95% rename from boards/shields/corne/corne_left.conf rename to config/corne_left.conf index fc91a52..d8f32ab 100644 --- a/boards/shields/corne/corne_left.conf +++ b/config/corne_left.conf @@ -1,5 +1,6 @@ # Enable and adjust nice!view CONFIG_ZMK_DISPLAY=y +CONFIG_ZMK_WIDGET_BATTERY_STATUS=y CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y CONFIG_ZMK_WIDGET_WPM_STATUS=n diff --git a/boards/shields/corne/corne_right.conf b/config/corne_right.conf similarity index 95% rename from boards/shields/corne/corne_right.conf rename to config/corne_right.conf index fc91a52..d8f32ab 100644 --- a/boards/shields/corne/corne_right.conf +++ b/config/corne_right.conf @@ -1,5 +1,6 @@ # Enable and adjust nice!view CONFIG_ZMK_DISPLAY=y +CONFIG_ZMK_WIDGET_BATTERY_STATUS=y CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y CONFIG_ZMK_WIDGET_WPM_STATUS=n