about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorVictor <lucachi.victor@gmail.com>2024-07-05 14:28:14 +0300
committerGitHub <noreply@github.com>2024-07-05 14:28:14 +0300
commitea3f46d54f49e4a1920c14ae7eb9421d134c2883 (patch)
treeccaaccc15a35115a2d48892d324ddfccdb341b37
parent822a367cbeda19475a7441bae51af5635631f915 (diff)
downloadzmk-config-ea3f46d54f49e4a1920c14ae7eb9421d134c2883.tar.gz
zmk-config-ea3f46d54f49e4a1920c14ae7eb9421d134c2883.zip
add corne dongle conf
-rw-r--r--build.yaml12
-rw-r--r--config/boards/shields/corne/Kconfig.defconfig16
-rw-r--r--config/boards/shields/corne/Kconfig.shield11
-rw-r--r--config/boards/shields/corne/corne.conf0
-rw-r--r--config/boards/shields/corne/corne.dtsi52
-rw-r--r--config/boards/shields/corne/corne.zmk.yml12
-rw-r--r--config/boards/shields/corne/corne_central_dongle.conf1
-rw-r--r--config/boards/shields/corne/corne_central_dongle.overlay21
-rw-r--r--config/boards/shields/corne/corne_peripheral_left.conf0
-rw-r--r--config/boards/shields/corne/corne_peripheral_left.overlay27
-rw-r--r--config/boards/shields/corne/corne_peripheral_right.conf0
-rw-r--r--config/boards/shields/corne/corne_peripheral_right.overlay35
-rw-r--r--config/corne.conf15
-rw-r--r--config/corne.keymap4
14 files changed, 194 insertions, 12 deletions
diff --git a/build.yaml b/build.yaml
index 228498f..b220d59 100644
--- a/build.yaml
+++ b/build.yaml
@@ -13,7 +13,15 @@
 #
 ---
 include:
+  - board: seeeduino_xiao_ble
+    shield: corne_central_dongle
   - board: nice_nano_v2
-    shield: corne_left nice_view_adapter nice_view
+    shield: corne_central_dongle
   - board: nice_nano_v2
-    shield: corne_right nice_view_adapter nice_view
+    shield: corne_peripheral_left
+  - board: nice_nano_v2
+    shield: corne_peripheral_right
+  - board: nice_nano_v2
+    shield: settings_reset
+  - board: seeeduino_xiao_ble
+    shield: settings_reset
\ No newline at end of file
diff --git a/config/boards/shields/corne/Kconfig.defconfig b/config/boards/shields/corne/Kconfig.defconfig
new file mode 100644
index 0000000..cac785c
--- /dev/null
+++ b/config/boards/shields/corne/Kconfig.defconfig
@@ -0,0 +1,16 @@
+if SHIELD_CORNE_CENTRAL_DONGLE

+

+config ZMK_KEYBOARD_NAME

+    default "Corne"

+

+config ZMK_SPLIT_ROLE_CENTRAL

+    default y

+

+endif

+

+if SHIELD_CORNE_CENTRAL_DONGLE || SHIELD_CORNE_PERIPHERAL_LEFT || SHIELD_CORNE_PERIPHERAL_RIGHT

+

+config ZMK_SPLIT

+    default y

+

+endif
\ No newline at end of file
diff --git a/config/boards/shields/corne/Kconfig.shield b/config/boards/shields/corne/Kconfig.shield
new file mode 100644
index 0000000..0feb0a6
--- /dev/null
+++ b/config/boards/shields/corne/Kconfig.shield
@@ -0,0 +1,11 @@
+# Copyright (c) 2020 Pete Johanson

+# SPDX-License-Identifier: MIT

+

+config SHIELD_CORNE_CENTRAL_DONGLE

+    def_bool $(shields_list_contains,corne_central_dongle)

+

+config SHIELD_CORNE_PERIPHERAL_LEFT

+    def_bool $(shields_list_contains,corne_peripheral_left)

+

+config SHIELD_CORNE_PERIPHERAL_RIGHT

+    def_bool $(shields_list_contains,corne_peripheral_right)
\ No newline at end of file
diff --git a/config/boards/shields/corne/corne.conf b/config/boards/shields/corne/corne.conf
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/config/boards/shields/corne/corne.conf
diff --git a/config/boards/shields/corne/corne.dtsi b/config/boards/shields/corne/corne.dtsi
new file mode 100644
index 0000000..1d9dbfb
--- /dev/null
+++ b/config/boards/shields/corne/corne.dtsi
@@ -0,0 +1,52 @@
+/*

+ * Copyright (c) 2020 Pete Johanson

+ *

+ * SPDX-License-Identifier: MIT

+ */

+

+#include <dt-bindings/zmk/matrix_transform.h>

+

+/ {

+    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 {

+        label = "KSCAN";

+

+        diode-direction = "col2row";

+    };

+};
\ No newline at end of file
diff --git a/config/boards/shields/corne/corne.zmk.yml b/config/boards/shields/corne/corne.zmk.yml
new file mode 100644
index 0000000..89fbe71
--- /dev/null
+++ b/config/boards/shields/corne/corne.zmk.yml
@@ -0,0 +1,12 @@
+file_format: "1"

+id: corne

+name: Corne

+type: shield

+url: https://github.com/foostan/crkbd/

+requires: [pro_micro]

+features:

+  - keys

+siblings:

+  - corne_left

+  - corne_right

+  - corne_dongle
\ No newline at end of file
diff --git a/config/boards/shields/corne/corne_central_dongle.conf b/config/boards/shields/corne/corne_central_dongle.conf
new file mode 100644
index 0000000..0119fa9
--- /dev/null
+++ b/config/boards/shields/corne/corne_central_dongle.conf
@@ -0,0 +1 @@
+CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2
\ No newline at end of file
diff --git a/config/boards/shields/corne/corne_central_dongle.overlay b/config/boards/shields/corne/corne_central_dongle.overlay
new file mode 100644
index 0000000..fb20a9b
--- /dev/null
+++ b/config/boards/shields/corne/corne_central_dongle.overlay
@@ -0,0 +1,21 @@
+/*

+ * Copyright (c) 2020 Pete Johanson

+ *

+ * SPDX-License-Identifier: MIT

+ */

+

+#include "corne.dtsi"

+

+/ {

+    chosen {

+        zmk,kscan = &mock_kscan;

+        zmk,matrix-transform = &default_transform;

+    };

+

+    mock_kscan: kscan_0 {

+        compatible = "zmk,kscan-mock";

+        columns = <0>;

+        rows = <0>;

+        events = <0>;

+    };

+};

diff --git a/config/boards/shields/corne/corne_peripheral_left.conf b/config/boards/shields/corne/corne_peripheral_left.conf
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/config/boards/shields/corne/corne_peripheral_left.conf
diff --git a/config/boards/shields/corne/corne_peripheral_left.overlay b/config/boards/shields/corne/corne_peripheral_left.overlay
new file mode 100644
index 0000000..32cc878
--- /dev/null
+++ b/config/boards/shields/corne/corne_peripheral_left.overlay
@@ -0,0 +1,27 @@
+/*

+ * Copyright (c) 2020 Pete Johanson

+ *

+ * SPDX-License-Identifier: MIT

+ */

+

+#include "corne.dtsi"

+

+&kscan0 {

+        compatible = "zmk,kscan-gpio-matrix";

+

+        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>

+            ;

+

+    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)>

+        ;

+};

diff --git a/config/boards/shields/corne/corne_peripheral_right.conf b/config/boards/shields/corne/corne_peripheral_right.conf
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/config/boards/shields/corne/corne_peripheral_right.conf
diff --git a/config/boards/shields/corne/corne_peripheral_right.overlay b/config/boards/shields/corne/corne_peripheral_right.overlay
new file mode 100644
index 0000000..4811f1d
--- /dev/null
+++ b/config/boards/shields/corne/corne_peripheral_right.overlay
@@ -0,0 +1,35 @@
+/*

+ * Copyright (c) 2020 Pete Johanson

+ *

+ * SPDX-License-Identifier: MIT

+ */

+

+#include "corne.dtsi"

+

+&default_transform {

+    col-offset = <6>;

+};

+

+&five_column_transform {

+    col-offset = <6>;

+};

+

+&kscan0 {

+        compatible = "zmk,kscan-gpio-matrix";

+

+        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>

+            ;

+

+    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)>

+        ;

+};

diff --git a/config/corne.conf b/config/corne.conf
index 4f7eda5..43a326d 100644
--- a/config/corne.conf
+++ b/config/corne.conf
@@ -3,10 +3,11 @@
 # CONFIG_WS2812_STRIP=y
 
 # Uncomment the following line to enable the Corne OLED Display
-CONFIG_ZMK_DISPLAY=y
-CONFIG_ZMK_EXT_POWER=y
-CONFIG_ZMK_SLEEP=y
-CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
-CONFIG_ZMK_WIDGET_WPM_STATUS=n
-CONFIG_ZMK_BATTERY_REPORT_INTERVAL=600
-CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
+#CONFIG_ZMK_DISPLAY=y
+#CONFIG_ZMK_EXT_POWER=y
+
+CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
+CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y
+
+CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y
+CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_PROXY=y
\ No newline at end of file
diff --git a/config/corne.keymap b/config/corne.keymap
index 08080e4..857bce5 100644
--- a/config/corne.keymap
+++ b/config/corne.keymap
@@ -81,6 +81,4 @@
             >;
         };
     };
-};
-
-&nice_view_spi { cs-gpios = <&pro_micro 0 GPIO_ACTIVE_HIGH>; };
+};
\ No newline at end of file