From b0b56a6ec1ae4672c06cdf4c91572ce592fc2d21 Mon Sep 17 00:00:00 2001 From: Yumagulov Rafael Date: Thu, 21 Dec 2023 21:15:22 +0300 Subject: [PATCH] add dongle --- build.yaml | 2 ++ .../shields/ergonaut_one/Kconfig.defconfig | 7 +++++-- .../boards/shields/ergonaut_one/Kconfig.shield | 3 +++ .../shields/ergonaut_one/ergonaut_one.keymap | 2 +- .../shields/ergonaut_one/ergonaut_one.zmk.yml | 1 + .../ergonaut_one/ergonaut_one_dongle.conf | 6 ++++++ .../ergonaut_one/ergonaut_one_dongle.overlay | 18 ++++++++++++++++++ .../ergonaut_one/ergonaut_one_left.conf | 2 -- .../ergonaut_one/ergonaut_one_right.conf | 2 -- config/ergonaut_one.conf | 6 ------ 10 files changed, 36 insertions(+), 13 deletions(-) create mode 100644 config/boards/shields/ergonaut_one/ergonaut_one_dongle.conf create mode 100644 config/boards/shields/ergonaut_one/ergonaut_one_dongle.overlay delete mode 100644 config/boards/shields/ergonaut_one/ergonaut_one_left.conf delete mode 100644 config/boards/shields/ergonaut_one/ergonaut_one_right.conf diff --git a/build.yaml b/build.yaml index fd852aa..1cb46b3 100644 --- a/build.yaml +++ b/build.yaml @@ -3,5 +3,7 @@ include: shield: ergonaut_one_left - board: seeeduino_xiao_ble shield: ergonaut_one_right + - board: seeeduino_xiao_ble + shield: ergonaut_one_dongle - board: seeeduino_xiao_ble shield: settings_reset diff --git a/config/boards/shields/ergonaut_one/Kconfig.defconfig b/config/boards/shields/ergonaut_one/Kconfig.defconfig index db1b767..c976004 100644 --- a/config/boards/shields/ergonaut_one/Kconfig.defconfig +++ b/config/boards/shields/ergonaut_one/Kconfig.defconfig @@ -1,7 +1,7 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -if SHIELD_ERGONAUT_ONE_LEFT +if SHIELD_ERGONAUT_ONE_DONGLE config ZMK_KEYBOARD_NAME default "Ergonaut One" @@ -9,9 +9,12 @@ config ZMK_KEYBOARD_NAME config ZMK_SPLIT_ROLE_CENTRAL default y +config USB_HID_POLL_INTERVAL_MS + default 1 + endif -if SHIELD_ERGONAUT_ONE_LEFT || SHIELD_ERGONAUT_ONE_RIGHT +if SHIELD_ERGONAUT_ONE_LEFT || SHIELD_ERGONAUT_ONE_RIGHT || SHIELD_ERGONAUT_ONE_DONGLE config ZMK_SPLIT default y diff --git a/config/boards/shields/ergonaut_one/Kconfig.shield b/config/boards/shields/ergonaut_one/Kconfig.shield index f085401..60311cc 100644 --- a/config/boards/shields/ergonaut_one/Kconfig.shield +++ b/config/boards/shields/ergonaut_one/Kconfig.shield @@ -6,3 +6,6 @@ config SHIELD_ERGONAUT_ONE_LEFT config SHIELD_ERGONAUT_ONE_RIGHT def_bool $(shields_list_contains,ergonaut_one_right) + +config SHIELD_ERGONAUT_ONE_DONGLE + def_bool $(shields_list_contains,ergonaut_one_dongle) diff --git a/config/boards/shields/ergonaut_one/ergonaut_one.keymap b/config/boards/shields/ergonaut_one/ergonaut_one.keymap index 6ee719e..247f4f4 100644 --- a/config/boards/shields/ergonaut_one/ergonaut_one.keymap +++ b/config/boards/shields/ergonaut_one/ergonaut_one.keymap @@ -56,7 +56,7 @@ adjust_layer { bindings = < &bootloader &none &none &none &none &none &none &none &none &none &none &bootloader - &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR + &bt BT_CLR &none &none &none &none &none &none &none &none &none &none &bt BT_CLR &sys_reset &none &none &none &none &none &none &none &none &none &none &sys_reset &trans &none &trans &none &trans &trans >; diff --git a/config/boards/shields/ergonaut_one/ergonaut_one.zmk.yml b/config/boards/shields/ergonaut_one/ergonaut_one.zmk.yml index d7c537f..b4246bd 100644 --- a/config/boards/shields/ergonaut_one/ergonaut_one.zmk.yml +++ b/config/boards/shields/ergonaut_one/ergonaut_one.zmk.yml @@ -9,3 +9,4 @@ features: siblings: - ergonaut_one_left - ergonaut_one_right + - ergonaut_one_dongle diff --git a/config/boards/shields/ergonaut_one/ergonaut_one_dongle.conf b/config/boards/shields/ergonaut_one/ergonaut_one_dongle.conf new file mode 100644 index 0000000..5ff0881 --- /dev/null +++ b/config/boards/shields/ergonaut_one/ergonaut_one_dongle.conf @@ -0,0 +1,6 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2 +CONFIG_BT_MAX_CONN=7 +CONFIG_BT_MAX_PAIRED=7 diff --git a/config/boards/shields/ergonaut_one/ergonaut_one_dongle.overlay b/config/boards/shields/ergonaut_one/ergonaut_one_dongle.overlay new file mode 100644 index 0000000..c63045b --- /dev/null +++ b/config/boards/shields/ergonaut_one/ergonaut_one_dongle.overlay @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "ergonaut_one.dtsi" + +&kscan0 { + col-gpios + = <&xiao_d 0 GPIO_ACTIVE_HIGH> + , <&xiao_d 1 GPIO_ACTIVE_HIGH> + , <&xiao_d 2 GPIO_ACTIVE_HIGH> + , <&xiao_d 3 GPIO_ACTIVE_HIGH> + , <&xiao_d 4 GPIO_ACTIVE_HIGH> + , <&xiao_d 5 GPIO_ACTIVE_HIGH> + ; +}; diff --git a/config/boards/shields/ergonaut_one/ergonaut_one_left.conf b/config/boards/shields/ergonaut_one/ergonaut_one_left.conf deleted file mode 100644 index c9f7988..0000000 --- a/config/boards/shields/ergonaut_one/ergonaut_one_left.conf +++ /dev/null @@ -1,2 +0,0 @@ -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT diff --git a/config/boards/shields/ergonaut_one/ergonaut_one_right.conf b/config/boards/shields/ergonaut_one/ergonaut_one_right.conf deleted file mode 100644 index c9f7988..0000000 --- a/config/boards/shields/ergonaut_one/ergonaut_one_right.conf +++ /dev/null @@ -1,2 +0,0 @@ -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT diff --git a/config/ergonaut_one.conf b/config/ergonaut_one.conf index ac9038d..cc9d5f6 100644 --- a/config/ergonaut_one.conf +++ b/config/ergonaut_one.conf @@ -1,15 +1,9 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -CONFIG_BT_MAX_CONN=5 -CONFIG_BT_MAX_PAIRED=5 - CONFIG_ZMK_IDLE_TIMEOUT=30000 CONFIG_ZMK_SLEEP=y CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000 CONFIG_ZMK_BATTERY_REPORT_INTERVAL=1800 -CONFIG_ZMK_USB=y -CONFIG_ZMK_BLE=y - CONFIG_BT_CTLR_TX_PWR_PLUS_8=y