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