diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d74fb89..18f82cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,6 @@ +name: Build ZMK firmware on: [push, pull_request, workflow_dispatch] jobs: build: - uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main + uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@v0.3 diff --git a/.gitignore b/.gitignore index c267c57..d096ad3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,6 @@ pcb/fp-info-cache pcb/_* pcb/~* modules -zephyr -!zephyr/module.yml zmk .west build diff --git a/config/boards/shields/abyss/Kconfig.defconfig b/boards/shields/abyss/Kconfig.defconfig similarity index 61% rename from config/boards/shields/abyss/Kconfig.defconfig rename to boards/shields/abyss/Kconfig.defconfig index bfb48b6..ebf0baf 100644 --- a/config/boards/shields/abyss/Kconfig.defconfig +++ b/boards/shields/abyss/Kconfig.defconfig @@ -6,6 +6,15 @@ config ZMK_KEYBOARD_NAME config ZMK_SPLIT_ROLE_CENTRAL default y +config ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS + default 1 + +config BT_MAX_CONN + default 6 + +config BT_MAX_PAIRED + default 6 + endif if SHIELD_ABYSS_LEFT || SHIELD_ABYSS_RIGHT diff --git a/config/boards/shields/abyss/Kconfig.shield b/boards/shields/abyss/Kconfig.shield similarity index 100% rename from config/boards/shields/abyss/Kconfig.shield rename to boards/shields/abyss/Kconfig.shield diff --git a/boards/shields/abyss/abyss-layouts.dtsi b/boards/shields/abyss/abyss-layouts.dtsi new file mode 100644 index 0000000..f0b0cc1 --- /dev/null +++ b/boards/shields/abyss/abyss-layouts.dtsi @@ -0,0 +1,42 @@ +#include + +/ { + physical_layout_abyss: physical_layout_abyss { + compatible = "zmk,physical-layout"; + display-name = "abyss"; + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 100 25 0 0 0> + , <&key_physical_attrs 100 100 200 0 0 0 0> + , <&key_physical_attrs 100 100 300 50 0 0 0> + , <&key_physical_attrs 100 100 400 100 0 0 0> + , <&key_physical_attrs 100 100 1053 25 0 0 0> + , <&key_physical_attrs 100 100 953 0 0 0 0> + , <&key_physical_attrs 100 100 853 50 0 0 0> + , <&key_physical_attrs 100 100 753 100 0 0 0> + , <&key_physical_attrs 100 100 100 125 0 0 0> + , <&key_physical_attrs 100 100 200 100 0 0 0> + , <&key_physical_attrs 100 100 300 150 0 0 0> + , <&key_physical_attrs 100 100 400 200 0 0 0> + , <&key_physical_attrs 100 100 1053 125 0 0 0> + , <&key_physical_attrs 100 100 953 100 0 0 0> + , <&key_physical_attrs 100 100 853 150 0 0 0> + , <&key_physical_attrs 100 100 753 200 0 0 0> + , <&key_physical_attrs 100 100 100 225 0 0 0> + , <&key_physical_attrs 100 100 200 200 0 0 0> + , <&key_physical_attrs 100 100 300 250 0 0 0> + , <&key_physical_attrs 100 100 453 382 700 503 432> + , <&key_physical_attrs 100 100 1053 225 0 0 0> + , <&key_physical_attrs 100 100 953 200 0 0 0> + , <&key_physical_attrs 100 100 853 250 0 0 0> + , <&key_physical_attrs 100 100 700 382 (-700) 750 432> + , <&key_physical_attrs 100 100 0 175 0 0 0> + , <&key_physical_attrs 100 100 0 275 0 0 0> + , <&key_physical_attrs 100 100 250 375 0 0 0> + , <&key_physical_attrs 100 100 350 375 0 0 0> + , <&key_physical_attrs 100 100 1153 175 0 0 0> + , <&key_physical_attrs 100 100 1153 275 0 0 0> + , <&key_physical_attrs 100 100 903 375 0 0 0> + , <&key_physical_attrs 100 100 803 375 0 0 0> + ; + }; +}; diff --git a/config/boards/shields/abyss/abyss.dtsi b/boards/shields/abyss/abyss.dtsi similarity index 50% rename from config/boards/shields/abyss/abyss.dtsi rename to boards/shields/abyss/abyss.dtsi index 12426d2..c60694e 100644 --- a/config/boards/shields/abyss/abyss.dtsi +++ b/boards/shields/abyss/abyss.dtsi @@ -1,20 +1,8 @@ +#include "abyss-layouts.dtsi" #include / { - chosen { - zmk,physical-layout = &physical_layout; - zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; - }; - - physical_layout: physical_layout_0 { - compatible = "zmk,physical-layout"; - display-name = "Default Layout"; - kscan = <&kscan0>; - transform = <&default_transform>; - }; - - default_transform: keymap_transform_0 { + matrix_transform0: matrix_transform0 { compatible = "zmk,matrix-transform"; columns = <8>; rows = <4>; @@ -25,15 +13,8 @@ RC(3,2) RC(3,3) RC(2,3) RC(2,7) RC(3,7) RC(3,6) >; }; - - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - wakeup-source; - - diode-direction = "col2row"; - }; }; -&xiao_serial { - status = "disabled"; +&physical_layout_abyss { + transform = <&matrix_transform0>; }; diff --git a/boards/shields/abyss/abyss_left.overlay b/boards/shields/abyss/abyss_left.overlay new file mode 100644 index 0000000..8b793bd --- /dev/null +++ b/boards/shields/abyss/abyss_left.overlay @@ -0,0 +1,28 @@ +#include "abyss.dtsi" + +/ { + kscan0: kscan0 { + compatible = "zmk,kscan-gpio-matrix"; + diode-direction = "col2row"; + wakeup-source; + + col-gpios + = <&xiao_d 3 GPIO_ACTIVE_HIGH> + , <&xiao_d 4 GPIO_ACTIVE_HIGH> + , <&xiao_d 5 GPIO_ACTIVE_HIGH> + , <&xiao_d 6 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&xiao_d 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&xiao_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&xiao_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&xiao_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; +}; + +&physical_layout_abyss { + kscan = <&kscan0>; +}; + diff --git a/boards/shields/abyss/abyss_right.overlay b/boards/shields/abyss/abyss_right.overlay new file mode 100644 index 0000000..db3290d --- /dev/null +++ b/boards/shields/abyss/abyss_right.overlay @@ -0,0 +1,32 @@ +#include "abyss.dtsi" + +/ { + kscan0: kscan0 { + compatible = "zmk,kscan-gpio-matrix"; + diode-direction = "col2row"; + wakeup-source; + + col-gpios + = <&xiao_d 10 GPIO_ACTIVE_HIGH> + , <&xiao_d 9 GPIO_ACTIVE_HIGH> + , <&xiao_d 8 GPIO_ACTIVE_HIGH> + , <&xiao_d 7 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&xiao_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&xiao_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&xiao_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&xiao_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; +}; + +&matrix_transform0 { + col-offset = <4>; +}; + +&physical_layout_abyss { + kscan = <&kscan0>; +}; + diff --git a/build.yaml b/build.yaml index cdd2629..d82bc9e 100644 --- a/build.yaml +++ b/build.yaml @@ -18,11 +18,18 @@ # --- include: - - board: xiao_ble - shield: abyss_left - - board: xiao_ble - shield: abyss_right - - board: xiao_ble - shield: settings_reset - - board: xiao_ble - shield: tester_xiao + - board: seeeduino_xiao_ble + shield: abyss_left + + # to suport zmk studio uncomment those + # - board: seeeduino_xiao_ble + # shield: abyss_left + # snippet: studio-rpc-usb-uart + # cmake-args: -DCONFIG_ZMK_STUDIO=y + # artifact-name: abyss_left_with_studio + + - board: seeeduino_xiao_ble + shield: abyss_right + + - board: seeeduino_xiao_ble + shield: settings_reset diff --git a/config/abyss.keymap b/config/abyss.keymap index 7f0940b..15ba383 100644 --- a/config/abyss.keymap +++ b/config/abyss.keymap @@ -158,7 +158,7 @@ //├─────────────┼─────────────┼─────────────┼─────────────┼──────────────╯ ╰───────────────┼───────────────┼─────────────┼─────────────┼─────────────┤ &kp SQT &kp Q &kp J &kp K &kp M &kp W &kp V &kp L //╰───────────────────────────┼─────────────┼─────────────┼──────────────╮ ╭───────────────┼───────────────┼─────────────┼───────────────────────────╯ - &left_tab <_spc SY 0 <sk OT RSHIFT <sk OT RSHIFT <_bspc SY 0 &up_del + &left_tab <_spc SY 0 <sk OT RSHIFT <sk OT RSHIFT <_bspc SY 0 &up_del // ╰─────────────┴─────────────┴──────────────╯ ╰───────────────┴───────────────┴─────────────╯ >; }; diff --git a/config/boards/shields/abyss/abyss.zmk.yml b/config/boards/shields/abyss/abyss.zmk.yml deleted file mode 100644 index bb1311e..0000000 --- a/config/boards/shields/abyss/abyss.zmk.yml +++ /dev/null @@ -1,11 +0,0 @@ -file_format: "1" -id: abyss -name: abyss -type: shield -url: https://github.com/zoriya/abyss -requires: [xiao_ble] -features: - - keys -siblings: - - abyss_left - - abyss_right diff --git a/config/boards/shields/abyss/abyss_left.overlay b/config/boards/shields/abyss/abyss_left.overlay deleted file mode 100644 index bfafae5..0000000 --- a/config/boards/shields/abyss/abyss_left.overlay +++ /dev/null @@ -1,18 +0,0 @@ -#include "abyss.dtsi" - -&kscan0 { - row-gpios - = <&xiao_d 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&xiao_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&xiao_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&xiao_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - col-gpios - = <&xiao_d 3 GPIO_ACTIVE_HIGH> - , <&xiao_d 4 GPIO_ACTIVE_HIGH> - , <&xiao_d 5 GPIO_ACTIVE_HIGH> - , <&xiao_d 6 GPIO_ACTIVE_HIGH> - ; -}; - -// vim: ft=dts diff --git a/config/boards/shields/abyss/abyss_right.overlay b/config/boards/shields/abyss/abyss_right.overlay deleted file mode 100644 index ebe20b0..0000000 --- a/config/boards/shields/abyss/abyss_right.overlay +++ /dev/null @@ -1,23 +0,0 @@ -#include "abyss.dtsi" - -&default_transform { - col-offset = <4>; -}; - -&kscan0 { - row-gpios - = <&xiao_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&xiao_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&xiao_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&xiao_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - col-gpios - = <&xiao_d 10 GPIO_ACTIVE_HIGH> - , <&xiao_d 9 GPIO_ACTIVE_HIGH> - , <&xiao_d 8 GPIO_ACTIVE_HIGH> - , <&xiao_d 7 GPIO_ACTIVE_HIGH> - ; -}; - - -// vim: ft=dts diff --git a/zephyr/module.yml b/zephyr/module.yml new file mode 100644 index 0000000..e85c584 --- /dev/null +++ b/zephyr/module.yml @@ -0,0 +1,4 @@ +name: zmk-keyboard-abyss +build: + settings: + board_root: .