diff --git a/boards/shields/corne/Kconfig.defconfig b/boards/shields/corne/Kconfig.defconfig new file mode 100644 index 0000000..4eb1fc8 --- /dev/null +++ b/boards/shields/corne/Kconfig.defconfig @@ -0,0 +1,57 @@ +if SHIELD_CORNE_DONGLE + +config ZMK_KEYBOARD_NAME + default "Corne" + +config ZMK_SPLIT_ROLE_CENTRAL + 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 + +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..e3a38ce --- /dev/null +++ b/boards/shields/corne/Kconfig.shield @@ -0,0 +1,12 @@ +# 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) + diff --git a/boards/shields/corne/corne_dongle.conf b/boards/shields/corne/corne_dongle.conf new file mode 100644 index 0000000..c2718cf --- /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 + +### DONGLE MODE +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..5d68c0c --- /dev/null +++ b/boards/shields/corne/corne_dongle.overlay @@ -0,0 +1,65 @@ +/* + * 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 { + 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 { + 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) + >; + }; + +}; diff --git a/build.yaml b/build.yaml index 4f34ddd..18ab2af 100644 --- a/build.yaml +++ b/build.yaml @@ -19,8 +19,28 @@ # --- 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_left nice_view_adapter nice_view - snippet: studio-rpc-usb-uart + 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 + 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 diff --git a/config/corne.conf b/config/corne.conf deleted file mode 100644 index 56431cb..0000000 --- a/config/corne.conf +++ /dev/null @@ -1,20 +0,0 @@ -# Uncomment the following line to enable deep sleep -CONFIG_ZMK_SLEEP=y -CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000 - -# Uncomment the following line to increase the keyboard's wireless range -CONFIG_BT_CTLR_TX_PWR_PLUS_8=y - -# 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 - -# 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/corne_left.conf b/config/corne_left.conf new file mode 100644 index 0000000..d8f32ab --- /dev/null +++ b/config/corne_left.conf @@ -0,0 +1,27 @@ +# 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 + +# 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/config/corne_right.conf b/config/corne_right.conf new file mode 100644 index 0000000..d8f32ab --- /dev/null +++ b/config/corne_right.conf @@ -0,0 +1,27 @@ +# 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 + +# 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 +