commit 8b0b50938a189c11f1ae90b91491a6627539735d
parent 746a31de0281d6ed86429b9b8a1b065e9bcbb9e5
Author: vin <git@vineetk.net>
Date: Wed, 30 Jul 2025 17:11:26 -0400
attempt to get dongle working
Diffstat:
15 files changed, 240 insertions(+), 108 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1,3 +1,7 @@
.*
*~
*.swp
+modules/
+venv/
+zephyr/
+zmk/
diff --git a/boards/shields/sweep/Kconfig.defconfig b/boards/shields/sweep/Kconfig.defconfig
@@ -0,0 +1,30 @@
+# Copyright (c) 2020 The ZMK Contributors
+# SPDX-License-Identifier: MIT
+
+if SHIELD_SWEEP_LEFT || SHIELD_SWEEP_RIGHT || SHIELD_SWEEP_DONGLE
+
+config ZMK_SPLIT
+ default y
+
+endif
+
+if SHIELD_SWEEP_DONGLE
+
+config ZMK_KEYBOARD_NAME
+ default "Sweep"
+
+config ZMK_SPLIT_ROLE_CENTRAL
+ 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
diff --git a/boards/shields/sweep/Kconfig.shield b/boards/shields/sweep/Kconfig.shield
@@ -0,0 +1,8 @@
+# Copyright (c) 2020 The ZMK Contributors
+# SPDX-License-Identifier: MIT
+
+config SHIELD_SWEEP_LEFT
+ def_bool $(shields_list_contains,sweep_left)
+
+config SHIELD_SWEEP_RIGHT
+ def_bool $(shields_list_contains,sweep_right)
diff --git a/boards/shields/sweep/sweep.conf b/boards/shields/sweep/sweep.conf
@@ -0,0 +1,3 @@
+CONFIG_ZMK_KEYBOARD_NAME="sweep"
+CONFIG_ZMK_SLEEP=y
+CONFIG_ZMK_BLE=y
diff --git a/boards/shields/sweep/sweep.dtsi b/boards/shields/sweep/sweep.dtsi
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#include <dt-bindings/zmk/matrix_transform.h>
+#include <layouts/cuddlykeyboards/ferris.dtsi>
+
+&cuddlykeyboards_ferris_layout {
+ transform = <&default_transform>;
+};
+
+/ {
+ chosen {
+ zmk,kscan = &kscan0;
+ };
+
+ default_transform: keymap_transform_0 {
+ compatible = "zmk,matrix-transform";
+ columns = <34>;
+ rows = <1>;
+ map = <
+ RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,21) RC(0,20) RC(0,19) RC(0,18) RC(0,17)
+ RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,26) RC(0,25) RC(0,24) RC(0,23) RC(0,22)
+ RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,31) RC(0,30) RC(0,29) RC(0,28) RC(0,27)
+ RC(0,15) RC(0,16) RC(0,33) RC(0,32)
+ >;
+ };
+
+ kscan0: kscan {
+ compatible = "zmk,kscan-gpio-direct";
+ wakeup-source;
+
+ input-gpios
+ = <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ , <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
+ ;
+ };
+
+};
diff --git a/boards/shields/sweep/sweep.keymap b/boards/shields/sweep/sweep.keymap
@@ -0,0 +1,71 @@
+// Copyright (c) 2022 The ZMK Contributors
+// SPDX-License-Identifier: MIT
+
+#include <behaviors.dtsi>
+#include <dt-bindings/zmk/keys.h>
+#include <dt-bindings/zmk/bt.h>
+
+// Home row mods macro
+#define HRML(k1,k2,k3,k4) &ht LSHFT k1 &ht LALT k2 &ht LCTRL k3 &ht LGUI k4
+#define HRMR(k1,k2,k3,k4) &ht RGUI k1 &ht RCTRL k2 &ht RALT k3 &ht RSHFT k4
+
+/ {
+ behaviors {
+ ht: hold_tap {
+ compatible = "zmk,behavior-hold-tap";
+ #binding-cells = <2>;
+ flavor = "tap-preferred";
+ tapping-term-ms = <220>;
+ quick-tap-ms = <150>;
+ require-prior-idle-ms = <100>;
+ bindings = <&kp>, <&kp>;
+ };
+ };
+
+ conditional_layers {
+ compatible = "zmk,conditional-layers";
+ tri_layer {
+ if-layers = <1 2>;
+ then-layer = <3>;
+ };
+ };
+
+ keymap {
+ compatible = "zmk,keymap";
+ default_layer {
+ bindings = <
+ &kp Q &kp D &kp R &kp W &kp B &kp J &kp F &kp U &kp P &kp SEMI
+ HRML(A, S, H, T) &kp G &kp Y HRMR(N, E, O, I)
+ &kp Z &kp X &kp M &kp C &kp V &kp K &kp L &kp COMMA &kp DOT &kp FSLH
+ < 2 TAB &kp ENTER &kp SPACE < 1 BSPC
+ >;
+ };
+
+ right_layer {
+ bindings = <
+ &kp INS &kp N7 &kp N8 &kp N9 &kp HOME &kp PG_UP &trans &trans &trans &trans
+ &kp DEL &kp N4 &kp N5 &kp N6 &kp END &kp PG_DN &kp LARW &kp DARW &kp UARW &kp RARW
+ &kp N0 &kp N1 &kp N2 &kp N3 &caps_word &trans &trans &trans &trans &trans
+ &trans &kp ESC &trans &trans
+ >;
+ };
+
+ left_layer {
+ bindings = <
+ &trans &kp AMPS &kp ASTRK &trans &trans &trans &trans &trans &kp LPAR &kp RPAR
+ &trans &kp DLLR &kp PRCNT &kp CARET &kp BSLH &kp GRAVE &kp MINUS &kp EQUAL &kp LBKT &kp RBKT
+ &trans &kp EXCL &kp AT &kp HASH &kp PIPE &kp TILDE &kp UNDER &kp PLUS &kp LBRC &kp RBRC
+ &trans &trans &trans &trans
+ >;
+ };
+
+ tri_layer {
+ bindings = <
+ &sys_reset &trans &trans &trans &bt BT_SEL 0 &kp F1 &kp F2 &kp F3 &kp F4 &sys_reset
+ &bootloader &trans &trans &trans &bt BT_SEL 1 &kp F5 &kp F6 &kp F7 &kp F8 &bootloader
+ &trans &trans &trans &bt BT_CLR &bt BT_SEL 2 &kp F9 &kp F10 &kp F11 &kp F12 &trans
+ &trans &trans &trans &trans
+ >;
+ };
+ };
+};
diff --git a/boards/shields/sweep/sweep.zmk.yml b/boards/shields/sweep/sweep.zmk.yml
@@ -0,0 +1,13 @@
+file_format: "1"
+id: sweep
+name: Sweep
+type: shield
+url: https://github.com/davidphilipbarr/Sweep
+requires: [pro_micro]
+exposes: [i2c_oled]
+features:
+ - keys
+ - studio
+siblings:
+ - sweep_left
+ - sweep_right
diff --git a/boards/shields/sweep/sweep_dongle.overlay b/boards/shields/sweep/sweep_dongle.overlay
@@ -0,0 +1,33 @@
+#include <dt-bindings/zmk/matrix_transform.h>
+
+/ {
+ chosen {
+ zmk,kscan = &mock_kscan;
+ zmk,physical-layout = &physical_layout0;
+ };
+
+ 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 = <34>;
+ rows = <1>;
+ map = <
+ RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,21) RC(0,20) RC(0,19) RC(0,18) RC(0,17)
+ RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,26) RC(0,25) RC(0,24) RC(0,23) RC(0,22)
+ RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,31) RC(0,30) RC(0,29) RC(0,28) RC(0,27)
+ RC(0,15) RC(0,16) RC(0,33) RC(0,32)
+ >;
+ };
+
+ physical_layout0: physical_layout_0 {
+ compatible = "zmk,physical-layout";
+ display-name = "Default Layout";
+ transform = <&default_transform>;
+ };
+};
diff --git a/boards/shields/sweep/sweep_left.conf b/boards/shields/sweep/sweep_left.conf
@@ -0,0 +1,2 @@
+# Copyright (c) 2020 The ZMK Contributors
+# SPDX-License-Identifier: MIT
diff --git a/boards/shields/sweep/sweep_left.overlay b/boards/shields/sweep/sweep_left.overlay
@@ -0,0 +1,7 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#include "sweep.dtsi"
diff --git a/boards/shields/sweep/sweep_right.conf b/boards/shields/sweep/sweep_right.conf
@@ -0,0 +1,2 @@
+# Copyright (c) 2020 The ZMK Contributors
+# SPDX-License-Identifier: MIT
diff --git a/boards/shields/sweep/sweep_right.overlay b/boards/shields/sweep/sweep_right.overlay
@@ -0,0 +1,11 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#include "sweep.dtsi"
+
+&default_transform {
+ col-offset = <17>;
+};
diff --git a/config/cradio.conf b/config/cradio.conf
@@ -1,3 +0,0 @@
-CONFIG_ZMK_KEYBOARD_NAME="uhhh"
-CONFIG_ZMK_SLEEP=y
-CONFIG_ZMK_BLE=y
diff --git a/config/cradio.keymap b/config/cradio.keymap
@@ -1,71 +0,0 @@
-// Copyright (c) 2022 The ZMK Contributors
-// SPDX-License-Identifier: MIT
-
-#include <behaviors.dtsi>
-#include <dt-bindings/zmk/keys.h>
-#include <dt-bindings/zmk/bt.h>
-
-// Home row mods macro
-#define HRML(k1,k2,k3,k4) &ht LSHFT k1 &ht LALT k2 &ht LCTRL k3 &ht LGUI k4
-#define HRMR(k1,k2,k3,k4) &ht RGUI k1 &ht RCTRL k2 &ht RALT k3 &ht RSHFT k4
-
-/ {
- behaviors {
- ht: hold_tap {
- compatible = "zmk,behavior-hold-tap";
- #binding-cells = <2>;
- flavor = "tap-preferred";
- tapping-term-ms = <220>;
- quick-tap-ms = <150>;
- require-prior-idle-ms = <100>;
- bindings = <&kp>, <&kp>;
- };
- };
-
- conditional_layers {
- compatible = "zmk,conditional-layers";
- tri_layer {
- if-layers = <1 2>;
- then-layer = <3>;
- };
- };
-
- keymap {
- compatible = "zmk,keymap";
- default_layer {
- bindings = <
- &kp Q &kp D &kp R &kp W &kp B &kp J &kp F &kp U &kp P &kp SEMI
- HRML(A, S, H, T) &kp G &kp Y HRMR(N, E, O, I)
- &kp Z &kp X &kp M &kp C &kp V &kp K &kp L &kp COMMA &kp DOT &kp FSLH
- < 2 TAB &kp ENTER &kp SPACE < 1 BSPC
- >;
- };
-
- right_layer {
- bindings = <
- &kp INS &kp N7 &kp N8 &kp N9 &kp HOME &kp PG_UP &trans &trans &trans &trans
- &kp DEL &kp N4 &kp N5 &kp N6 &kp END &kp PG_DN &kp LARW &kp DARW &kp UARW &kp RARW
- &kp N0 &kp N1 &kp N2 &kp N3 &caps_word &trans &trans &trans &trans &trans
- &trans &kp ESC &trans &trans
- >;
- };
-
- left_layer {
- bindings = <
- &trans &kp AMPS &kp ASTRK &trans &trans &trans &trans &trans &kp LPAR &kp RPAR
- &trans &kp DLLR &kp PRCNT &kp CARET &kp BLSH &kp GRAVE &kp MINUS &kp EQUAL &kp LBKT &kp RBKT
- &trans &kp EXCL &kp AT &kp HASH &kp PIPE &kp TILDE &kp UNDER &kp PLUS &kp LBRC &kp RBRC
- &trans &trans &trans &trans
- >;
- };
-
- tri_layer {
- bindings = <
- &sys_reset &trans &trans &trans &bt BT_SEL 0 &kp F1 &kp F2 &kp F3 &kp F4 &sys_reset
- &bootloader &trans &trans &trans &bt BT_SEL 1 &kp F5 &kp F6 &kp F7 &kp F8 &bootloader
- &trans &trans &trans &bt BT_CLR &bt BT_SEL 2 &kp F9 &kp F10 &kp F11 &kp F12 &trans
- &trans &trans &trans &trans
- >;
- };
- };
-};
diff --git a/config/west.yml b/config/west.yml
@@ -1,34 +0,0 @@
-manifest:
- remotes:
- - name: zmkfirmware
- url-base: https://github.com/zmkfirmware
- projects:
- - name: zmk
- remote: zmkfirmware
- revision: 4da89bd99716bf6c1d7d788f3cdaec4cee7403e9 # main
- import: app/west.yml
- - name: zephyr
- remote: zmkfirmware
- revision: 0fa4cc26d8b1e5243570ccc0f7f66c4c428d2961 # v3.5.0+zmk-fixes
- import:
- name-blocklist:
- - ci-tools
- - hal_altera
- - hal_cypress
- - hal_infineon
- - hal_microchip
- - hal_nxp
- - hal_openisa
- - hal_silabs
- - hal_xtensa
- - hal_st
- - hal_ti
- - loramac-node
- - mcuboot
- - mcumgr
- - net-tools
- - openthread
- - edtt
- - trusted-firmware-m
- self:
- path: config