From 94789a092c6d8ddf5ab5ad88eb011a4ece6b5cee Mon Sep 17 00:00:00 2001 From: Alexander Krikun Date: Wed, 3 May 2023 23:16:33 +0400 Subject: [PATCH 001/160] fix(boards): unify board I2C configuration, use TWI driver --- app/boards/arm/bluemicro840/bluemicro840_v1.dts | 3 ++- app/boards/arm/nrfmicro/nrfmicro_11.dts | 3 ++- app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts | 3 ++- app/boards/arm/nrfmicro/nrfmicro_13.dts | 3 ++- app/boards/arm/nrfmicro/nrfmicro_13_52833.dts | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.dts b/app/boards/arm/bluemicro840/bluemicro840_v1.dts index f19526011a6..05849001eaf 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1.dts +++ b/app/boards/arm/bluemicro840/bluemicro840_v1.dts @@ -63,7 +63,7 @@ }; &i2c0 { - compatible = "nordic,nrf-twim"; + compatible = "nordic,nrf-twi"; pinctrl-0 = <&i2c0_default>; pinctrl-1 = <&i2c0_sleep>; pinctrl-names = "default", "sleep"; @@ -71,6 +71,7 @@ &uart0 { compatible = "nordic,nrf-uarte"; + current-speed = <115200>; pinctrl-0 = <&uart0_default>; pinctrl-1 = <&uart0_sleep>; pinctrl-names = "default", "sleep"; diff --git a/app/boards/arm/nrfmicro/nrfmicro_11.dts b/app/boards/arm/nrfmicro/nrfmicro_11.dts index 68331edc692..14b9adb9670 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_11.dts @@ -48,7 +48,7 @@ }; &i2c0 { - compatible = "nordic,nrf-twim"; + compatible = "nordic,nrf-twi"; pinctrl-0 = <&i2c0_default>; pinctrl-1 = <&i2c0_sleep>; pinctrl-names = "default", "sleep"; @@ -56,6 +56,7 @@ &uart0 { compatible = "nordic,nrf-uarte"; + current-speed = <115200>; pinctrl-0 = <&uart0_default>; pinctrl-1 = <&uart0_sleep>; pinctrl-names = "default", "sleep"; diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts index 9977617c768..874b67e25de 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts @@ -48,7 +48,7 @@ }; &i2c0 { - compatible = "nordic,nrf-twim"; + compatible = "nordic,nrf-twi"; pinctrl-0 = <&i2c0_default>; pinctrl-1 = <&i2c0_sleep>; pinctrl-names = "default", "sleep"; @@ -56,6 +56,7 @@ &uart0 { compatible = "nordic,nrf-uarte"; + current-speed = <115200>; pinctrl-0 = <&uart0_default>; pinctrl-1 = <&uart0_sleep>; pinctrl-names = "default", "sleep"; diff --git a/app/boards/arm/nrfmicro/nrfmicro_13.dts b/app/boards/arm/nrfmicro/nrfmicro_13.dts index 300838ff1ab..65674132f80 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_13.dts @@ -61,7 +61,7 @@ }; &i2c0 { - compatible = "nordic,nrf-twim"; + compatible = "nordic,nrf-twi"; pinctrl-0 = <&i2c0_default>; pinctrl-1 = <&i2c0_sleep>; pinctrl-names = "default", "sleep"; @@ -69,6 +69,7 @@ &uart0 { compatible = "nordic,nrf-uarte"; + current-speed = <115200>; pinctrl-0 = <&uart0_default>; pinctrl-1 = <&uart0_sleep>; pinctrl-names = "default", "sleep"; diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts b/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts index 86bcb5e5753..cfe77e37c82 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts @@ -61,7 +61,7 @@ }; &i2c0 { - compatible = "nordic,nrf-twim"; + compatible = "nordic,nrf-twi"; pinctrl-0 = <&i2c0_default>; pinctrl-1 = <&i2c0_sleep>; pinctrl-names = "default", "sleep"; @@ -69,6 +69,7 @@ &uart0 { compatible = "nordic,nrf-uarte"; + current-speed = <115200>; pinctrl-0 = <&uart0_default>; pinctrl-1 = <&uart0_sleep>; pinctrl-names = "default", "sleep"; From 48be2eedd09d4918d25d8bcb8bcb58e51eff6060 Mon Sep 17 00:00:00 2001 From: Albert Y <76888457+filterpaper@users.noreply.github.com> Date: Wed, 10 May 2023 12:21:24 +0800 Subject: [PATCH 002/160] fix(docs): Update QMK debounce references --- docs/docs/features/debouncing.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/docs/features/debouncing.md b/docs/docs/features/debouncing.md index 9629131d7e7..40170739fcb 100644 --- a/docs/docs/features/debouncing.md +++ b/docs/docs/features/debouncing.md @@ -99,8 +99,6 @@ one millisecond of latency but protects against short noise spikes. ZMK's default debouncing is similar to QMK's `sym_defer_pk` algorithm. -Setting `CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=0` for eager debouncing would be similar -to QMK's (unimplemented as of this writing) `asym_eager_defer_pk`. +Setting `CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=0` for eager debouncing would be similar to QMK's `asym_eager_defer_pk`. -See [QMK's Debounce API documentation](https://beta.docs.qmk.fm/using-qmk/software-features/feature_debounce_type) -for more information. +See [QMK's Debounce API documentation](https://docs.qmk.fm/#/feature_debounce_type) for more information. From d53cd1992936dd5604b84cd4c02cfdfad4d9944a Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sat, 22 Apr 2023 23:47:42 -0500 Subject: [PATCH 003/160] refactor: Add format on save for VS Code Added settings to format various file types on save in VS Code. Added some recommended VS Code extensions: - Prettier for formatting various file types - Python for formatting Python files - C/C++ for formatting C files - Devicetree for syntax highlighting - CMake for syntax highlighting --- .vscode/extensions.json | 9 +++++++++ .vscode/settings.json | 18 +++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000000..0819f71e7a0 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + "recommendations": [ + "esbenp.prettier-vscode", + "ms-python.python", + "ms-vscode.cpptools", + "plorefice.devicetree", + "twxs.cmake" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index aea29cf0097..8bbff533a11 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,5 +3,21 @@ "*.overlay": "dts", "*.keymap": "dts" }, - "python.formatting.provider": "black" + "python.formatting.provider": "black", + "[c]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "ms-vscode.cpptools" + }, + "[javascript][javascriptreact][typescript][typescriptreact]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[python]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "ms-python.python" + }, + "[css][json][jsonc][html][markdown][yaml]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode" + } } From a1e0607a22deb72ce4ac64e442f0baa721e32b0b Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 14 May 2023 12:20:40 -0500 Subject: [PATCH 004/160] fix: Don't specify default C formatter Microsoft's C/C++ extension performs poorly on some systems, so this gives the option to use any other extension that supports formatting with clang-format. --- .vscode/settings.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 8bbff533a11..924d83b1f25 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,8 +5,7 @@ }, "python.formatting.provider": "black", "[c]": { - "editor.formatOnSave": true, - "editor.defaultFormatter": "ms-vscode.cpptools" + "editor.formatOnSave": true }, "[javascript][javascriptreact][typescript][typescriptreact]": { "editor.formatOnSave": true, From b1ca9199de02dcb45d055a71807ff3894290fda7 Mon Sep 17 00:00:00 2001 From: Albert Y <76888457+filterpaper@users.noreply.github.com> Date: Wed, 17 May 2023 12:42:57 +0800 Subject: [PATCH 005/160] fix(ci): Refactor prepare variable step * Refactor workflow variables * Use quotes to avoid word splitting --- .github/workflows/build-user-config.yml | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index b1e0602d54f..5891ddc1e26 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -39,8 +39,8 @@ jobs: - name: Fetch Build Matrix run: | - echo "build_matrix=$(yaml2json ${{ inputs.build_matrix_path }} | jq -c .)" >> $GITHUB_ENV - yaml2json ${{ inputs.build_matrix_path }} | jq + echo "build_matrix=$(yaml2json '${{ inputs.build_matrix_path }}' | jq -c .)" >> $GITHUB_ENV + yaml2json "${{ inputs.build_matrix_path }}" | jq build: runs-on: ubuntu-latest @@ -54,18 +54,13 @@ jobs: steps: - name: Prepare variables shell: sh -x {0} + env: + shield: ${{ matrix.shield }} run: | - if [ -n "${{ matrix.shield }}" ] - then - echo "extra_cmake_args=-DSHIELD=\"${{ matrix.shield }}\"" >> $GITHUB_ENV - echo "artifact_name=${{ matrix.shield }}-${{ matrix.board }}-zmk" >> $GITHUB_ENV - echo "display_name=${{ matrix.shield }} - ${{ matrix.board }}" >> $GITHUB_ENV - else - echo "extra_cmake_args=" >> $GITHUB_ENV - echo "artifact_name=${{ matrix.board }}-zmk" >> $GITHUB_ENV - echo "display_name=${{ matrix.board }}" >> $GITHUB_ENV - fi echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV + echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}" >> $GITHUB_ENV + echo "display_name=${shield:+$shield - }${{ matrix.board }}" >> $GITHUB_ENV + echo "artifact_name=${shield:+$shield-}${{ matrix.board }}-zmk" >> $GITHUB_ENV - name: Checkout uses: actions/checkout@v3 @@ -89,7 +84,7 @@ jobs: ${{ runner.os }}- - name: West Init - run: west init -l ${{ inputs.config_path }} + run: west init -l "${{ inputs.config_path }}" - name: West Update run: west update @@ -99,7 +94,7 @@ jobs: - name: West Build (${{ env.display_name }}) shell: sh -x {0} - run: west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }} + run: west build -s zmk/app -b "${{ matrix.board }}" -- -DZMK_CONFIG="${GITHUB_WORKSPACE}/${{ inputs.config_path }}" ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }} - name: ${{ env.display_name }} Kconfig file run: grep -v -e "^#" -e "^$" build/zephyr/.config | sort @@ -113,7 +108,7 @@ jobs: cp build/zephyr/zmk.uf2 "build/artifacts/${{ env.artifact_name }}.uf2" elif [ -f build/zephyr/zmk.${{ inputs.fallback_binary }} ] then - cp build/zephyr/zmk.${{ inputs.fallback_binary }} "build/artifacts/${{ env.artifact_name }}.${{ inputs.fallback_binary }}" + cp "build/zephyr/zmk.${{ inputs.fallback_binary }}" "build/artifacts/${{ env.artifact_name }}.${{ inputs.fallback_binary }}" fi - name: Archive (${{ env.display_name }}) From 89d71ed2c2c1af78c166a96dc65658e4f39743ab Mon Sep 17 00:00:00 2001 From: digger vermont Date: Thu, 18 May 2023 19:47:36 -0400 Subject: [PATCH 006/160] feat(boards): Add KBDfans Tofu65 2.0 board * Initial commit of Tofu65 2.0 board --------- Co-authored-by: Pete Johanson --- app/boards/arm/kbdfans_tofu65/Kconfig.board | 6 + .../arm/kbdfans_tofu65/Kconfig.defconfig | 15 +++ .../arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts | 125 ++++++++++++++++++ .../kbdfans_tofu65/kbdfans_tofu65_v2.keymap | 97 ++++++++++++++ .../arm/kbdfans_tofu65/kbdfans_tofu65_v2.yaml | 15 +++ .../kbdfans_tofu65/kbdfans_tofu65_v2.zmk.yml | 10 ++ .../kbdfans_tofu65_v2_defconfig | 20 +++ 7 files changed, 288 insertions(+) create mode 100644 app/boards/arm/kbdfans_tofu65/Kconfig.board create mode 100644 app/boards/arm/kbdfans_tofu65/Kconfig.defconfig create mode 100644 app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts create mode 100644 app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.keymap create mode 100644 app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.yaml create mode 100644 app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.zmk.yml create mode 100644 app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig diff --git a/app/boards/arm/kbdfans_tofu65/Kconfig.board b/app/boards/arm/kbdfans_tofu65/Kconfig.board new file mode 100644 index 00000000000..954166b715f --- /dev/null +++ b/app/boards/arm/kbdfans_tofu65/Kconfig.board @@ -0,0 +1,6 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_KBDFANS_TOFU65_V2 + bool "KBDfans Tofu65 2.0" + depends on SOC_RP2040 diff --git a/app/boards/arm/kbdfans_tofu65/Kconfig.defconfig b/app/boards/arm/kbdfans_tofu65/Kconfig.defconfig new file mode 100644 index 00000000000..993d51423b5 --- /dev/null +++ b/app/boards/arm/kbdfans_tofu65/Kconfig.defconfig @@ -0,0 +1,15 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if BOARD_KBDFANS_TOFU65_V2 + +config ZMK_KEYBOARD_NAME + default "kbdfans tofu65" + +config RP2_FLASH_W25Q080 + default y + +config ZMK_USB + default y + +endif # BOARD_KBDFANS_TOFU65_V2 diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts new file mode 100644 index 00000000000..261ffbf4850 --- /dev/null +++ b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; + +#include +#include + +/ { + + chosen { + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zephyr,shell-uart = &cdc_acm_uart; + zephyr,code-partition = &code_partition; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + xtal_clk: xtal-clk { + compatible = "fixed-clock"; + clock-frequency = <12000000>; + #clock-cells = <0>; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <15>; + rows = <5>; + +// ------- Switch Matrix ---------- +// +// Column 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +// ========================================================================================== +// Row 0 || S0 | S1 | S2 | S3 | S4 | S5 | S6 | S7 | S8 | S9 | S10 | S11 | S12 | S13 | S14 | +// Row 1 || S0 | S1 | S2 | S3 | S4 | S5 | S6 | S7 | S8 | S9 | S10 | S11 | S12 | S13 | S14 | +// Row 2 || S0 | S1 | S2 | S3 | S4 | S5 | S6 | S7 | S8 | S9 | S10 | S11 | S12 | | S13 | +// Row 3 || S0 | S1 | S2 | S3 | S4 | S5 | S6 | S7 | S8 | S9 | S10 | S11 | | S12 | S13 | +// Row 4 || S0 | S1 | S2 | | | | S3 | | S4 | S5 | S6 | | S7 | S8 | S9 | +// ----------------------------------------------------------------------------------- +// + 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(0,12) RC(0,13) RC(0,14) +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(1,12) RC(1,13) RC(1,14) +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(2,12) RC(2,14) +RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,14) +RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,8) RC(4,9) RC(4,10) RC(4,12) RC(4,13) RC(4,14) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + diode-direction = "col2row"; + row-gpios + = <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 28 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 27 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + col-gpios + = <&gpio0 25 GPIO_ACTIVE_HIGH> + , <&gpio0 24 GPIO_ACTIVE_HIGH> + , <&gpio0 23 GPIO_ACTIVE_HIGH> + , <&gpio0 1 GPIO_ACTIVE_HIGH> + , <&gpio0 7 GPIO_ACTIVE_HIGH> + , <&gpio0 21 GPIO_ACTIVE_HIGH> + , <&gpio0 20 GPIO_ACTIVE_HIGH> + , <&gpio0 19 GPIO_ACTIVE_HIGH> + , <&gpio0 18 GPIO_ACTIVE_HIGH> + , <&gpio0 17 GPIO_ACTIVE_HIGH> + , <&gpio0 16 GPIO_ACTIVE_HIGH> + , <&gpio0 15 GPIO_ACTIVE_HIGH> + , <&gpio0 14 GPIO_ACTIVE_HIGH> + , <&gpio0 13 GPIO_ACTIVE_HIGH> + , <&gpio0 12 GPIO_ACTIVE_HIGH> + ; + }; +}; + +&flash0 { + reg = <0x10000000 DT_SIZE_M(16)>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + /* Reserved memory for the second stage bootloader */ + second_stage_bootloader: partition@0 { + label = "second_stage_bootloader"; + reg = <0x00000000 0x100>; + read-only; + }; + + /* + * Usable flash. Starts at 0x100, after the bootloader. The partition + * size is 16MB minus the 0x100 bytes taken by the bootloader. + */ + code_partition: partition@100 { + label = "code"; + reg = <0x100 (DT_SIZE_M(16) - 0x100)>; + read-only; + }; + }; +}; + + +&usbd { + status = "okay"; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + }; +}; + + +&gpio0 { + status = "okay"; +}; + diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.keymap b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.keymap new file mode 100644 index 00000000000..7eca7919a4a --- /dev/null +++ b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.keymap @@ -0,0 +1,97 @@ +// Copyright (c) 2023 The ZMK Contributors +// SPDX-License-Identifier: MIT + +#include +#include + +#define BASE 0 +#define FUNC 1 + +// +// ---------- Tofu65 2.0 key switch positions ---------- +// +// ------------------------------------------------------------------------------------------------- +// | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +// ------------------------------------------------------------------------------------------------- +// | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 24 | 26 | 27 | 28 | 29 | +// ------------------------------------------------------------------------------------------------- +// | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | +// ------------------------------------------------------------------------------------------------- +// | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | +// ------------------------------------------------------------------------------------------------- +// | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | +// ------------------------------------------------------------------------------------------------- +// + + +/ { + combos { + compatible = "zmk,combos"; + + // BACKSPACE + LCTRL + LALT = &sys_reset + combo_bootloader { + timeout-ms = <100>; + key-positions = <13 58 60>; + bindings = <&sys_reset>; + }; + + // RETURN + LCTRL + LALT = &bootloader + combo_sys_reset { + timeout-ms = <100>; + key-positions = <42 58 60>; + bindings = <&bootloader>; + }; + }; + + + keymap { + compatible = "zmk,keymap"; + + base { + +// --------- Default QWERTY Layout --------- +// Layer 0 BASE +// ------------------------------------------------------------------------------------------------- +// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | HME | +// ------------------------------------------------------------------------------------------------- +// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | PGU | +// ------------------------------------------------------------------------------------------------- +// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PGD | +// ------------------------------------------------------------------------------------------------- +// | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHFT | ↑ | END | +// ------------------------------------------------------------------------------------------------- +// | LCTL | LGUI | LALT | SPACE | RALT | RGUI | RCTL | <- | ↓ | -> | +// ------------------------------------------------------------------------------------------------- + bindings = < +&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp HOME +&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp PG_UP +&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp ENTER &kp PG_DN +&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp END +&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT < FUNC K_APP &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT + >; + }; + + func { +// --------- Default QWERTY Layout --------- +// Layer 1 FUNC +// --------------------------------------------------------------------------------------------------- +// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | HME | +// --------------------------------------------------------------------------------------------------- +// | --- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | scroll lock | pause | --- | PGU | +// --------------------------------------------------------------------------------------------------- +// | CAPS | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | --- | PGD | +// --------------------------------------------------------------------------------------------------- +// | LSHIFT | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | ----- | VOL UP | MUTE | +// --------------------------------------------------------------------------------------------------- +// | ---- | ---- | ---- | ---- | -- | MO 1 | -- | PREV | VOL DN | NEXT | +// --------------------------------------------------------------------------------------------------- + bindings = < +&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp SLCK &kp PAUSE_BREAK &trans &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_VOL_UP &kp C_MUTE +&trans &trans &trans &trans &trans &trans &trans &kp C_PREV &kp C_VOL_DN &kp C_NEXT + >; + }; + }; +}; diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.yaml b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.yaml new file mode 100644 index 00000000000..e1089766da2 --- /dev/null +++ b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.yaml @@ -0,0 +1,15 @@ +identifier: kbdfans_tofu65_v2 +name: KBDfans Tofu65 2.0 +type: mcu +arch: arm +flash: 16384 +ram: 264 +toolchain: + - zephyr + - gnuarmemb + - xtools +supported: + - gpio + - usb_device + - hwinfo + - pwm diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.zmk.yml b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.zmk.yml new file mode 100644 index 00000000000..382e7dd3603 --- /dev/null +++ b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.zmk.yml @@ -0,0 +1,10 @@ +file_format: "1" +id: kbdfans_tofu65_v2 +name: KBDfans Tofu65 2.0 +type: board +arch: arm +features: + - keys +outputs: + - usb +url: https://kbdfans.com/collections/tofu65-2-0/products/tofu65-2-0 diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig new file mode 100644 index 00000000000..cf546683452 --- /dev/null +++ b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig @@ -0,0 +1,20 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +CONFIG_SOC_SERIES_RP2XXX=y +CONFIG_SOC_RP2040=y +CONFIG_BOARD_KBDFANS_TOFU65_V2=y + +CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000 + +# Enable USB CDC ACM logging for debugging +# CONFIG_ZMK_USB_LOGGING=y + +# Enable reset by default +CONFIG_RESET=y + +# Code partition needed to target the correct flash range +CONFIG_USE_DT_CODE_PARTITION=y + +# Output UF2 by default, native bootloader supports it. +CONFIG_BUILD_OUTPUT_UF2=y From d799560985b40a7f9526cfdedd88546b60cf3182 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 23 Apr 2023 00:10:58 -0500 Subject: [PATCH 007/160] chore: Update typescript, eslint, webpack --- docs/package-lock.json | 978 +++++++++++++++++++++-------------------- docs/package.json | 10 +- 2 files changed, 503 insertions(+), 485 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index 2c8a7fba1e5..2d1e7a57d2e 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -31,18 +31,18 @@ "@types/react": "^17.0.3", "@types/react-helmet": "^6.1.5", "@types/react-router-dom": "^5.1.7", - "eslint": "^8.0.0", - "eslint-config-prettier": "^8.5.0", + "eslint": "^8.39.0", + "eslint-config-prettier": "^8.8.0", "eslint-plugin-mdx": "^2.0.5", - "eslint-plugin-react": "^7.30.0", + "eslint-plugin-react": "^7.32.2", "json-schema-to-typescript": "^10.1.5", "mustache": "^4.2.0", "null-loader": "^4.0.0", "prebuild-webpack-plugin": "^1.1.1", "prettier": "^2.8.7", "string-replace-loader": "^3.1.0", - "typescript": "^4.6.3", - "webpack": "^5.72.1" + "typescript": "^5.0.4", + "webpack": "^5.80.0" } }, "node_modules/@algolia/autocomplete-core": { @@ -2583,16 +2583,40 @@ "node": ">=16.14" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "devOptional": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz", + "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==", + "devOptional": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", - "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", + "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", "devOptional": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.15.0", + "espree": "^9.5.1", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -2607,9 +2631,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "devOptional": true, "dependencies": { "type-fest": "^0.20.2" @@ -2633,6 +2657,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@eslint/js": { + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz", + "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==", + "devOptional": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@fortawesome/fontawesome-common-types": { "version": "0.2.36", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.36.tgz", @@ -2692,14 +2725,14 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.6.tgz", - "integrity": "sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "devOptional": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" @@ -3706,133 +3739,133 @@ "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==" }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.5.tgz", + "integrity": "sha512-LHY/GSAZZRpsNQH+/oHqhRQ5FT7eoULcBqgfyTB5nQHogFnK3/7QoN7dLnwSE/JkUAF0SrRuclT7ODqMFtWxxQ==", "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + "@webassemblyjs/helper-numbers": "1.11.5", + "@webassemblyjs/helper-wasm-bytecode": "1.11.5" } }, "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==" + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.5.tgz", + "integrity": "sha512-1j1zTIC5EZOtCplMBG/IEwLtUojtwFVwdyVMbL/hwWqbzlQoJsWCOavrdnLkemwNoC/EOwtUFch3fuo+cbcXYQ==" }, "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==" + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.5.tgz", + "integrity": "sha512-L65bDPmfpY0+yFrsgz8b6LhXmbbs38OnwDCf6NpnMUYqa+ENfE5Dq9E42ny0qz/PdR0LJyq/T5YijPnU8AXEpA==" }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==" + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.5.tgz", + "integrity": "sha512-fDKo1gstwFFSfacIeH5KfwzjykIE6ldh1iH9Y/8YkAZrhmu4TctqYjSh7t0K2VyDSXOZJ1MLhht/k9IvYGcIxg==" }, "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.5.tgz", + "integrity": "sha512-DhykHXM0ZABqfIGYNv93A5KKDw/+ywBFnuWybZZWcuzWHfbp21wUfRkbtz7dMGwGgT4iXjWuhRMA2Mzod6W4WA==", "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/floating-point-hex-parser": "1.11.5", + "@webassemblyjs/helper-api-error": "1.11.5", "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==" + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.5.tgz", + "integrity": "sha512-oC4Qa0bNcqnjAowFn7MPCETQgDYytpsfvz4ujZz63Zu/a/v71HeCAAmZsgZ3YVKec3zSPYytG3/PrRCqbtcAvA==" }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.5.tgz", + "integrity": "sha512-uEoThA1LN2NA+K3B9wDo3yKlBfVtC6rh0i4/6hvbz071E8gTNZD/pT0MsBf7MeD6KbApMSkaAK0XeKyOZC7CIA==", "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" + "@webassemblyjs/ast": "1.11.5", + "@webassemblyjs/helper-buffer": "1.11.5", + "@webassemblyjs/helper-wasm-bytecode": "1.11.5", + "@webassemblyjs/wasm-gen": "1.11.5" } }, "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.5.tgz", + "integrity": "sha512-37aGq6qVL8A8oPbPrSGMBcp38YZFXcHfiROflJn9jxSdSMMM5dS5P/9e2/TpaJuhE+wFrbukN2WI6Hw9MH5acg==", "dependencies": { "@xtuc/ieee754": "^1.2.0" } }, "node_modules/@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.5.tgz", + "integrity": "sha512-ajqrRSXaTJoPW+xmkfYN6l8VIeNnR4vBOTQO9HzR7IygoCcKWkICbKFbVTNMjMgMREqXEr0+2M6zukzM47ZUfQ==", "dependencies": { "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==" + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.5.tgz", + "integrity": "sha512-WiOhulHKTZU5UPlRl53gHR8OxdGsSOxqfpqWeA2FmcwBMaoEdz6b2x2si3IwC9/fSPLfe8pBMRTHVMk5nlwnFQ==" }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.5.tgz", + "integrity": "sha512-C0p9D2fAu3Twwqvygvf42iGCQ4av8MFBLiTb+08SZ4cEdwzWx9QeAHDo1E2k+9s/0w1DM40oflJOpkZ8jW4HCQ==", "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" + "@webassemblyjs/ast": "1.11.5", + "@webassemblyjs/helper-buffer": "1.11.5", + "@webassemblyjs/helper-wasm-bytecode": "1.11.5", + "@webassemblyjs/helper-wasm-section": "1.11.5", + "@webassemblyjs/wasm-gen": "1.11.5", + "@webassemblyjs/wasm-opt": "1.11.5", + "@webassemblyjs/wasm-parser": "1.11.5", + "@webassemblyjs/wast-printer": "1.11.5" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.5.tgz", + "integrity": "sha512-14vteRlRjxLK9eSyYFvw1K8Vv+iPdZU0Aebk3j6oB8TQiQYuO6hj9s4d7qf6f2HJr2khzvNldAFG13CgdkAIfA==", "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.11.5", + "@webassemblyjs/helper-wasm-bytecode": "1.11.5", + "@webassemblyjs/ieee754": "1.11.5", + "@webassemblyjs/leb128": "1.11.5", + "@webassemblyjs/utf8": "1.11.5" } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.5.tgz", + "integrity": "sha512-tcKwlIXstBQgbKy1MlbDMlXaxpucn42eb17H29rawYLxm5+MsEmgPzeCP8B1Cl69hCice8LeKgZpRUAPtqYPgw==", "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" + "@webassemblyjs/ast": "1.11.5", + "@webassemblyjs/helper-buffer": "1.11.5", + "@webassemblyjs/wasm-gen": "1.11.5", + "@webassemblyjs/wasm-parser": "1.11.5" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.5.tgz", + "integrity": "sha512-SVXUIwsLQlc8srSD7jejsfTU83g7pIGr2YYNb9oHdtldSxaOhvA5xwvIiWIfcX8PlSakgqMXsLpLfbbJ4cBYew==", "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.11.5", + "@webassemblyjs/helper-api-error": "1.11.5", + "@webassemblyjs/helper-wasm-bytecode": "1.11.5", + "@webassemblyjs/ieee754": "1.11.5", + "@webassemblyjs/leb128": "1.11.5", + "@webassemblyjs/utf8": "1.11.5" } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.5.tgz", + "integrity": "sha512-f7Pq3wvg3GSPUPzR0F6bmI89Hdb+u9WXrSKc4v+N0aV0q6r42WoF92Jp2jEorBEBRoRNXgjp53nBniDXcqZYPA==", "dependencies": { - "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/ast": "1.11.5", "@xtuc/long": "4.2.2" } }, @@ -4117,15 +4150,15 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==" }, "node_modules/array-includes": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz", - "integrity": "sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5", - "get-intrinsic": "^1.1.1", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", "is-string": "^1.0.7" }, "engines": { @@ -4144,14 +4177,14 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.0.tgz", - "integrity": "sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", "es-shim-unscopables": "^1.0.0" }, "engines": { @@ -4161,6 +4194,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array.prototype.tosorted": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz", + "integrity": "sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.1.3" + } + }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -5991,9 +6037,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz", - "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.13.0.tgz", + "integrity": "sha512-eyV8f0y1+bzyfh8xAwW/WTSZpLbjhqc4ne9eGSH4Zo2ejdyiNG9pU6mf9DG8a7+Auk6MFTlNOT4Y2y/9k8GKVg==", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -6060,9 +6106,9 @@ } }, "node_modules/es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.2.1.tgz", + "integrity": "sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg==" }, "node_modules/es-shim-unscopables": { "version": "1.0.0", @@ -6171,13 +6217,16 @@ } }, "node_modules/eslint": { - "version": "8.26.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", - "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz", + "integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==", "devOptional": true, "dependencies": { - "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.11.6", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.2", + "@eslint/js": "8.39.0", + "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -6186,17 +6235,16 @@ "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.0", + "espree": "^9.5.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.15.0", + "globals": "^13.19.0", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", @@ -6211,7 +6259,6 @@ "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" @@ -6227,9 +6274,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", - "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", + "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -6675,25 +6722,26 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.31.10", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.31.10.tgz", - "integrity": "sha512-e4N/nc6AAlg4UKW/mXeYWd3R++qUano5/o+t+wnWxIf+bLsOaH3a4q74kX3nDjYym3VBN4HyO9nEn1GcAqgQOA==", + "version": "7.32.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz", + "integrity": "sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==", "dev": true, "dependencies": { - "array-includes": "^3.1.5", - "array.prototype.flatmap": "^1.3.0", + "array-includes": "^3.1.6", + "array.prototype.flatmap": "^1.3.1", + "array.prototype.tosorted": "^1.1.1", "doctrine": "^2.1.0", "estraverse": "^5.3.0", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", - "object.entries": "^1.1.5", - "object.fromentries": "^2.0.5", - "object.hasown": "^1.1.1", - "object.values": "^1.1.5", + "object.entries": "^1.1.6", + "object.fromentries": "^2.0.6", + "object.hasown": "^1.1.2", + "object.values": "^1.1.6", "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.3", + "resolve": "^2.0.0-next.4", "semver": "^6.3.0", - "string.prototype.matchall": "^4.0.7" + "string.prototype.matchall": "^4.0.8" }, "engines": { "node": ">=4" @@ -6741,9 +6789,9 @@ } }, "node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", "devOptional": true, "dependencies": { "esrecurse": "^4.3.0", @@ -6751,42 +6799,21 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "devOptional": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "devOptional": true, - "engines": { - "node": ">=10" + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", + "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", "devOptional": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/glob-parent": { @@ -6802,9 +6829,9 @@ } }, "node_modules/eslint/node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "devOptional": true, "dependencies": { "type-fest": "^0.20.2" @@ -6829,14 +6856,14 @@ } }, "node_modules/espree": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", + "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", "devOptional": true, "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -6858,9 +6885,9 @@ } }, "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "devOptional": true, "dependencies": { "estraverse": "^5.1.0" @@ -11077,28 +11104,28 @@ } }, "node_modules/object.entries": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", - "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz", + "integrity": "sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "engines": { "node": ">= 0.4" } }, "node_modules/object.fromentries": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz", - "integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.6.tgz", + "integrity": "sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "engines": { "node": ">= 0.4" @@ -11108,27 +11135,27 @@ } }, "node_modules/object.hasown": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.1.tgz", - "integrity": "sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.2.tgz", + "integrity": "sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==", "dev": true, "dependencies": { "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "es-abstract": "^1.20.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object.values": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", - "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "engines": { "node": ">= 0.4" @@ -12796,18 +12823,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "devOptional": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/regexpu-core": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.2.1.tgz", @@ -13572,9 +13587,9 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", "dependencies": { "randombytes": "^2.1.0" } @@ -14024,18 +14039,18 @@ } }, "node_modules/string.prototype.matchall": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz", - "integrity": "sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", + "integrity": "sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1", - "get-intrinsic": "^1.1.1", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", "has-symbols": "^1.0.3", "internal-slot": "^1.0.3", - "regexp.prototype.flags": "^1.4.1", + "regexp.prototype.flags": "^1.4.3", "side-channel": "^1.0.4" }, "funding": { @@ -14311,9 +14326,9 @@ } }, "node_modules/terser": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz", - "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.1.tgz", + "integrity": "sha512-hVl35zClmpisy6oaoKALOpS0rDYLxRFLHhRuDlEGTKey9qHjS1w9GMORjuwIMt70Wan4lwsLYyWDVnWgF+KUEw==", "dependencies": { "@jridgewell/source-map": "^0.3.2", "acorn": "^8.5.0", @@ -14328,15 +14343,15 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.6", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz", - "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz", + "integrity": "sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.14", + "@jridgewell/trace-mapping": "^0.3.17", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "terser": "^5.14.1" + "serialize-javascript": "^6.0.1", + "terser": "^5.16.5" }, "engines": { "node": ">= 10.13.0" @@ -14620,15 +14635,15 @@ } }, "node_modules/typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", + "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=12.20" } }, "node_modules/ua-parser-js": { @@ -15360,21 +15375,21 @@ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/webpack": { - "version": "5.74.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz", - "integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==", + "version": "5.80.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.80.0.tgz", + "integrity": "sha512-OIMiq37XK1rWO8mH9ssfFKZsXg4n6klTEDL7S8/HqbAOBBaiy8ABvXvz0dDCXeEF9gqwxSvVk611zFPjS8hJxA==", "dependencies": { "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", + "@types/estree": "^1.0.0", + "@webassemblyjs/ast": "^1.11.5", + "@webassemblyjs/wasm-edit": "^1.11.5", + "@webassemblyjs/wasm-parser": "^1.11.5", "acorn": "^8.7.1", "acorn-import-assertions": "^1.7.6", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.10.0", - "es-module-lexer": "^0.9.0", + "enhanced-resolve": "^5.13.0", + "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", @@ -15383,9 +15398,9 @@ "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", + "schema-utils": "^3.1.2", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", + "terser-webpack-plugin": "^5.3.7", "watchpack": "^2.4.0", "webpack-sources": "^3.2.3" }, @@ -15676,11 +15691,6 @@ "node": ">=10.13.0" } }, - "node_modules/webpack/node_modules/@types/estree": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==" - }, "node_modules/webpack/node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -15721,9 +15731,9 @@ } }, "node_modules/webpack/node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", + "integrity": "sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==", "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -17793,16 +17803,31 @@ "tslib": "^2.4.0" } }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "devOptional": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz", + "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==", + "devOptional": true + }, "@eslint/eslintrc": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", - "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", + "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", "devOptional": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.15.0", + "espree": "^9.5.1", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -17811,9 +17836,9 @@ }, "dependencies": { "globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "devOptional": true, "requires": { "type-fest": "^0.20.2" @@ -17827,6 +17852,12 @@ } } }, + "@eslint/js": { + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz", + "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==", + "devOptional": true + }, "@fortawesome/fontawesome-common-types": { "version": "0.2.36", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.36.tgz", @@ -17870,14 +17901,14 @@ } }, "@humanwhocodes/config-array": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.6.tgz", - "integrity": "sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "devOptional": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" } }, "@humanwhocodes/module-importer": { @@ -18668,133 +18699,133 @@ "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==" }, "@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.5.tgz", + "integrity": "sha512-LHY/GSAZZRpsNQH+/oHqhRQ5FT7eoULcBqgfyTB5nQHogFnK3/7QoN7dLnwSE/JkUAF0SrRuclT7ODqMFtWxxQ==", "requires": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + "@webassemblyjs/helper-numbers": "1.11.5", + "@webassemblyjs/helper-wasm-bytecode": "1.11.5" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==" + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.5.tgz", + "integrity": "sha512-1j1zTIC5EZOtCplMBG/IEwLtUojtwFVwdyVMbL/hwWqbzlQoJsWCOavrdnLkemwNoC/EOwtUFch3fuo+cbcXYQ==" }, "@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==" + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.5.tgz", + "integrity": "sha512-L65bDPmfpY0+yFrsgz8b6LhXmbbs38OnwDCf6NpnMUYqa+ENfE5Dq9E42ny0qz/PdR0LJyq/T5YijPnU8AXEpA==" }, "@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==" + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.5.tgz", + "integrity": "sha512-fDKo1gstwFFSfacIeH5KfwzjykIE6ldh1iH9Y/8YkAZrhmu4TctqYjSh7t0K2VyDSXOZJ1MLhht/k9IvYGcIxg==" }, "@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.5.tgz", + "integrity": "sha512-DhykHXM0ZABqfIGYNv93A5KKDw/+ywBFnuWybZZWcuzWHfbp21wUfRkbtz7dMGwGgT4iXjWuhRMA2Mzod6W4WA==", "requires": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/floating-point-hex-parser": "1.11.5", + "@webassemblyjs/helper-api-error": "1.11.5", "@xtuc/long": "4.2.2" } }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==" + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.5.tgz", + "integrity": "sha512-oC4Qa0bNcqnjAowFn7MPCETQgDYytpsfvz4ujZz63Zu/a/v71HeCAAmZsgZ3YVKec3zSPYytG3/PrRCqbtcAvA==" }, "@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.5.tgz", + "integrity": "sha512-uEoThA1LN2NA+K3B9wDo3yKlBfVtC6rh0i4/6hvbz071E8gTNZD/pT0MsBf7MeD6KbApMSkaAK0XeKyOZC7CIA==", "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" + "@webassemblyjs/ast": "1.11.5", + "@webassemblyjs/helper-buffer": "1.11.5", + "@webassemblyjs/helper-wasm-bytecode": "1.11.5", + "@webassemblyjs/wasm-gen": "1.11.5" } }, "@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.5.tgz", + "integrity": "sha512-37aGq6qVL8A8oPbPrSGMBcp38YZFXcHfiROflJn9jxSdSMMM5dS5P/9e2/TpaJuhE+wFrbukN2WI6Hw9MH5acg==", "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.5.tgz", + "integrity": "sha512-ajqrRSXaTJoPW+xmkfYN6l8VIeNnR4vBOTQO9HzR7IygoCcKWkICbKFbVTNMjMgMREqXEr0+2M6zukzM47ZUfQ==", "requires": { "@xtuc/long": "4.2.2" } }, "@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==" + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.5.tgz", + "integrity": "sha512-WiOhulHKTZU5UPlRl53gHR8OxdGsSOxqfpqWeA2FmcwBMaoEdz6b2x2si3IwC9/fSPLfe8pBMRTHVMk5nlwnFQ==" }, "@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.5.tgz", + "integrity": "sha512-C0p9D2fAu3Twwqvygvf42iGCQ4av8MFBLiTb+08SZ4cEdwzWx9QeAHDo1E2k+9s/0w1DM40oflJOpkZ8jW4HCQ==", "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" + "@webassemblyjs/ast": "1.11.5", + "@webassemblyjs/helper-buffer": "1.11.5", + "@webassemblyjs/helper-wasm-bytecode": "1.11.5", + "@webassemblyjs/helper-wasm-section": "1.11.5", + "@webassemblyjs/wasm-gen": "1.11.5", + "@webassemblyjs/wasm-opt": "1.11.5", + "@webassemblyjs/wasm-parser": "1.11.5", + "@webassemblyjs/wast-printer": "1.11.5" } }, "@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.5.tgz", + "integrity": "sha512-14vteRlRjxLK9eSyYFvw1K8Vv+iPdZU0Aebk3j6oB8TQiQYuO6hj9s4d7qf6f2HJr2khzvNldAFG13CgdkAIfA==", "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.11.5", + "@webassemblyjs/helper-wasm-bytecode": "1.11.5", + "@webassemblyjs/ieee754": "1.11.5", + "@webassemblyjs/leb128": "1.11.5", + "@webassemblyjs/utf8": "1.11.5" } }, "@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.5.tgz", + "integrity": "sha512-tcKwlIXstBQgbKy1MlbDMlXaxpucn42eb17H29rawYLxm5+MsEmgPzeCP8B1Cl69hCice8LeKgZpRUAPtqYPgw==", "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" + "@webassemblyjs/ast": "1.11.5", + "@webassemblyjs/helper-buffer": "1.11.5", + "@webassemblyjs/wasm-gen": "1.11.5", + "@webassemblyjs/wasm-parser": "1.11.5" } }, "@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.5.tgz", + "integrity": "sha512-SVXUIwsLQlc8srSD7jejsfTU83g7pIGr2YYNb9oHdtldSxaOhvA5xwvIiWIfcX8PlSakgqMXsLpLfbbJ4cBYew==", "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.11.5", + "@webassemblyjs/helper-api-error": "1.11.5", + "@webassemblyjs/helper-wasm-bytecode": "1.11.5", + "@webassemblyjs/ieee754": "1.11.5", + "@webassemblyjs/leb128": "1.11.5", + "@webassemblyjs/utf8": "1.11.5" } }, "@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.5.tgz", + "integrity": "sha512-f7Pq3wvg3GSPUPzR0F6bmI89Hdb+u9WXrSKc4v+N0aV0q6r42WoF92Jp2jEorBEBRoRNXgjp53nBniDXcqZYPA==", "requires": { - "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/ast": "1.11.5", "@xtuc/long": "4.2.2" } }, @@ -19015,15 +19046,15 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==" }, "array-includes": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz", - "integrity": "sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5", - "get-intrinsic": "^1.1.1", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", "is-string": "^1.0.7" } }, @@ -19033,17 +19064,30 @@ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" }, "array.prototype.flatmap": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.0.tgz", - "integrity": "sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", "es-shim-unscopables": "^1.0.0" } }, + "array.prototype.tosorted": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz", + "integrity": "sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.1.3" + } + }, "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -20352,9 +20396,9 @@ } }, "enhanced-resolve": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz", - "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.13.0.tgz", + "integrity": "sha512-eyV8f0y1+bzyfh8xAwW/WTSZpLbjhqc4ne9eGSH4Zo2ejdyiNG9pU6mf9DG8a7+Auk6MFTlNOT4Y2y/9k8GKVg==", "requires": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -20406,9 +20450,9 @@ } }, "es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.2.1.tgz", + "integrity": "sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg==" }, "es-shim-unscopables": { "version": "1.0.0", @@ -20495,13 +20539,16 @@ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" }, "eslint": { - "version": "8.26.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", - "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz", + "integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==", "devOptional": true, "requires": { - "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.11.6", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.2", + "@eslint/js": "8.39.0", + "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -20510,17 +20557,16 @@ "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.0", + "espree": "^9.5.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.15.0", + "globals": "^13.19.0", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", @@ -20535,7 +20581,6 @@ "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" @@ -20551,9 +20596,9 @@ } }, "globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "devOptional": true, "requires": { "type-fest": "^0.20.2" @@ -20568,9 +20613,9 @@ } }, "eslint-config-prettier": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", - "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", + "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", "dev": true, "requires": {} }, @@ -20881,25 +20926,26 @@ } }, "eslint-plugin-react": { - "version": "7.31.10", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.31.10.tgz", - "integrity": "sha512-e4N/nc6AAlg4UKW/mXeYWd3R++qUano5/o+t+wnWxIf+bLsOaH3a4q74kX3nDjYym3VBN4HyO9nEn1GcAqgQOA==", + "version": "7.32.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz", + "integrity": "sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==", "dev": true, "requires": { - "array-includes": "^3.1.5", - "array.prototype.flatmap": "^1.3.0", + "array-includes": "^3.1.6", + "array.prototype.flatmap": "^1.3.1", + "array.prototype.tosorted": "^1.1.1", "doctrine": "^2.1.0", "estraverse": "^5.3.0", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", - "object.entries": "^1.1.5", - "object.fromentries": "^2.0.5", - "object.hasown": "^1.1.1", - "object.values": "^1.1.5", + "object.entries": "^1.1.6", + "object.fromentries": "^2.0.6", + "object.hasown": "^1.1.2", + "object.values": "^1.1.6", "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.3", + "resolve": "^2.0.0-next.4", "semver": "^6.3.0", - "string.prototype.matchall": "^4.0.7" + "string.prototype.matchall": "^4.0.8" }, "dependencies": { "doctrine": { @@ -20931,47 +20977,30 @@ } }, "eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", "devOptional": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "devOptional": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "devOptional": true - } - } - }, "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", + "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", "devOptional": true }, "espree": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", + "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", "devOptional": true, "requires": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.0" } }, "esprima": { @@ -20980,9 +21009,9 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "devOptional": true, "requires": { "estraverse": "^5.1.0" @@ -23944,46 +23973,46 @@ } }, "object.entries": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", - "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz", + "integrity": "sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" } }, "object.fromentries": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz", - "integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.6.tgz", + "integrity": "sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" } }, "object.hasown": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.1.tgz", - "integrity": "sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.2.tgz", + "integrity": "sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==", "dev": true, "requires": { "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "es-abstract": "^1.20.4" } }, "object.values": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", - "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" } }, "obuf": { @@ -25136,12 +25165,6 @@ "functions-have-names": "^1.2.2" } }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "devOptional": true - }, "regexpu-core": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.2.1.tgz", @@ -25709,9 +25732,9 @@ } }, "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", "requires": { "randombytes": "^2.1.0" } @@ -26067,18 +26090,18 @@ } }, "string.prototype.matchall": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz", - "integrity": "sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", + "integrity": "sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1", - "get-intrinsic": "^1.1.1", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", "has-symbols": "^1.0.3", "internal-slot": "^1.0.3", - "regexp.prototype.flags": "^1.4.1", + "regexp.prototype.flags": "^1.4.3", "side-channel": "^1.0.4" } }, @@ -26272,9 +26295,9 @@ "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==" }, "terser": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz", - "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.1.tgz", + "integrity": "sha512-hVl35zClmpisy6oaoKALOpS0rDYLxRFLHhRuDlEGTKey9qHjS1w9GMORjuwIMt70Wan4lwsLYyWDVnWgF+KUEw==", "requires": { "@jridgewell/source-map": "^0.3.2", "acorn": "^8.5.0", @@ -26290,15 +26313,15 @@ } }, "terser-webpack-plugin": { - "version": "5.3.6", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz", - "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz", + "integrity": "sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==", "requires": { - "@jridgewell/trace-mapping": "^0.3.14", + "@jridgewell/trace-mapping": "^0.3.17", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "terser": "^5.14.1" + "serialize-javascript": "^6.0.1", + "terser": "^5.16.5" }, "dependencies": { "jest-worker": { @@ -26500,9 +26523,9 @@ } }, "typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==" + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", + "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==" }, "ua-parser-js": { "version": "0.7.32", @@ -26996,21 +27019,21 @@ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "webpack": { - "version": "5.74.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz", - "integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==", + "version": "5.80.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.80.0.tgz", + "integrity": "sha512-OIMiq37XK1rWO8mH9ssfFKZsXg4n6klTEDL7S8/HqbAOBBaiy8ABvXvz0dDCXeEF9gqwxSvVk611zFPjS8hJxA==", "requires": { "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", + "@types/estree": "^1.0.0", + "@webassemblyjs/ast": "^1.11.5", + "@webassemblyjs/wasm-edit": "^1.11.5", + "@webassemblyjs/wasm-parser": "^1.11.5", "acorn": "^8.7.1", "acorn-import-assertions": "^1.7.6", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.10.0", - "es-module-lexer": "^0.9.0", + "enhanced-resolve": "^5.13.0", + "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", @@ -27019,18 +27042,13 @@ "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", + "schema-utils": "^3.1.2", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", + "terser-webpack-plugin": "^5.3.7", "watchpack": "^2.4.0", "webpack-sources": "^3.2.3" }, "dependencies": { - "@types/estree": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==" - }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -27059,9 +27077,9 @@ } }, "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", + "integrity": "sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==", "requires": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", diff --git a/docs/package.json b/docs/package.json index 70105b54f64..dd4b3ff7c07 100644 --- a/docs/package.json +++ b/docs/package.json @@ -50,17 +50,17 @@ "@types/react": "^17.0.3", "@types/react-helmet": "^6.1.5", "@types/react-router-dom": "^5.1.7", - "eslint": "^8.0.0", - "eslint-config-prettier": "^8.5.0", + "eslint": "^8.39.0", + "eslint-config-prettier": "^8.8.0", "eslint-plugin-mdx": "^2.0.5", - "eslint-plugin-react": "^7.30.0", + "eslint-plugin-react": "^7.32.2", "json-schema-to-typescript": "^10.1.5", "mustache": "^4.2.0", "null-loader": "^4.0.0", "prebuild-webpack-plugin": "^1.1.1", "prettier": "^2.8.7", "string-replace-loader": "^3.1.0", - "typescript": "^4.6.3", - "webpack": "^5.72.1" + "typescript": "^5.0.4", + "webpack": "^5.80.0" } } From 4674215551b8c9bb0706e825742ba82b9d46ed3b Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 23 Apr 2023 00:14:00 -0500 Subject: [PATCH 008/160] chore: Update json-schema-to-typescript --- docs/package-lock.json | 193 ++++++++++++++++++----------------------- docs/package.json | 2 +- 2 files changed, 85 insertions(+), 110 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index 2d1e7a57d2e..ba968736b47 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -35,7 +35,7 @@ "eslint-config-prettier": "^8.8.0", "eslint-plugin-mdx": "^2.0.5", "eslint-plugin-react": "^7.32.2", - "json-schema-to-typescript": "^10.1.5", + "json-schema-to-typescript": "^12.0.0", "mustache": "^4.2.0", "null-loader": "^4.0.0", "prebuild-webpack-plugin": "^1.1.1", @@ -202,18 +202,6 @@ "node": ">=6.0.0" } }, - "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", - "integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==", - "dev": true, - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.6", - "call-me-maybe": "^1.0.1", - "js-yaml": "^4.1.0" - } - }, "node_modules/@babel/code-frame": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", @@ -1984,6 +1972,24 @@ "node": ">=6.9.0" } }, + "node_modules/@bcherny/json-schema-ref-parser": { + "version": "10.0.5-fork", + "resolved": "https://registry.npmjs.org/@bcherny/json-schema-ref-parser/-/json-schema-ref-parser-10.0.5-fork.tgz", + "integrity": "sha512-E/jKbPoca1tfUPj3iSbitDZTGnq6FUFjkH6L8U2oDwSuwK1WhnnVtCG7oFOTg/DDnyoXbQYUiUiGOibHqaGVnw==", + "dev": true, + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/philsturgeon" + } + }, "node_modules/@colors/colors": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", @@ -3487,9 +3493,9 @@ } }, "node_modules/@types/glob": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.0.0.tgz", - "integrity": "sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", "dev": true, "dependencies": { "@types/minimatch": "*", @@ -4609,9 +4615,9 @@ } }, "node_modules/call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha512-wCyFsDQkKPwwF8BDwOiWNx/9K45L/hvggQiDbve+viMNMQnWhrlYIuBk09offfwCRtCO9P6XwUttufzU11WCVw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", "dev": true }, "node_modules/callsites": { @@ -7711,18 +7717,22 @@ } }, "node_modules/glob-promise": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-3.4.0.tgz", - "integrity": "sha512-q08RJ6O+eJn+dVanerAndJwIcumgbDdYiUT7zFQl3Wm1xD6fBKtah7H8ZJChj4wP+8C+QfeVy8xautR7rdmKEw==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-4.2.2.tgz", + "integrity": "sha512-xcUzJ8NWN5bktoTIX7eOclO1Npxd/dyVqUJxlLIDasT4C7KZyqlPIwkdJ0Ypiy3p2ZKahTjK4M9uC3sNSfNMzw==", "dev": true, "dependencies": { - "@types/glob": "*" + "@types/glob": "^7.1.3" }, "engines": { - "node": ">=4" + "node": ">=12" + }, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/ahmadnassri" }, "peerDependencies": { - "glob": "*" + "glob": "^7.1.6" } }, "node_modules/glob-to-regexp": { @@ -9126,45 +9136,32 @@ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, - "node_modules/json-schema-ref-parser": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", - "integrity": "sha512-qcP2lmGy+JUoQJ4DOQeLaZDqH9qSkeGCK3suKWxJXS82dg728Mn3j97azDMaOUmJAN4uCq91LdPx4K7E8F1a7Q==", - "dev": true, - "dependencies": { - "@apidevtools/json-schema-ref-parser": "9.0.9" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/json-schema-to-typescript": { - "version": "10.1.5", - "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-10.1.5.tgz", - "integrity": "sha512-X8bNNksfCQo6LhEuqNxmZr4eZpPjXZajmimciuk8eWXzZlif9Brq7WuMGD/SOhBKcRKP2SGVDNZbC28WQqx9Rg==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-12.0.0.tgz", + "integrity": "sha512-Uk/BDIAo8vqepPBhM86UhNMHgCv7JulicNj/BgnQPHE1fGCoej0UTtcEYzXU/uk6lSvbZCf7pccW+dnNMrr5rg==", "dev": true, "dependencies": { - "@types/json-schema": "^7.0.6", - "@types/lodash": "^4.14.168", - "@types/prettier": "^2.1.5", - "cli-color": "^2.0.0", + "@bcherny/json-schema-ref-parser": "10.0.5-fork", + "@types/json-schema": "^7.0.11", + "@types/lodash": "^4.14.182", + "@types/prettier": "^2.6.1", + "cli-color": "^2.0.2", "get-stdin": "^8.0.0", "glob": "^7.1.6", - "glob-promise": "^3.4.0", - "is-glob": "^4.0.1", - "json-schema-ref-parser": "^9.0.6", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.20", - "minimist": "^1.2.5", + "glob-promise": "^4.2.2", + "is-glob": "^4.0.3", + "lodash": "^4.17.21", + "minimist": "^1.2.6", "mkdirp": "^1.0.4", "mz": "^2.7.0", - "prettier": "^2.2.0" + "prettier": "^2.6.2" }, "bin": { "json2ts": "dist/src/cli.js" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.0.0" } }, "node_modules/json-schema-traverse": { @@ -9178,12 +9175,6 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "devOptional": true }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true - }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -16152,18 +16143,6 @@ "@jridgewell/trace-mapping": "^0.3.9" } }, - "@apidevtools/json-schema-ref-parser": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", - "integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==", - "dev": true, - "requires": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.6", - "call-me-maybe": "^1.0.1", - "js-yaml": "^4.1.0" - } - }, "@babel/code-frame": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", @@ -17362,6 +17341,18 @@ "to-fast-properties": "^2.0.0" } }, + "@bcherny/json-schema-ref-parser": { + "version": "10.0.5-fork", + "resolved": "https://registry.npmjs.org/@bcherny/json-schema-ref-parser/-/json-schema-ref-parser-10.0.5-fork.tgz", + "integrity": "sha512-E/jKbPoca1tfUPj3iSbitDZTGnq6FUFjkH6L8U2oDwSuwK1WhnnVtCG7oFOTg/DDnyoXbQYUiUiGOibHqaGVnw==", + "dev": true, + "requires": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" + } + }, "@colors/colors": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", @@ -18447,9 +18438,9 @@ } }, "@types/glob": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.0.0.tgz", - "integrity": "sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", "dev": true, "requires": { "@types/minimatch": "*", @@ -19385,9 +19376,9 @@ } }, "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha512-wCyFsDQkKPwwF8BDwOiWNx/9K45L/hvggQiDbve+viMNMQnWhrlYIuBk09offfwCRtCO9P6XwUttufzU11WCVw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", "dev": true }, "callsites": { @@ -21622,12 +21613,12 @@ } }, "glob-promise": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-3.4.0.tgz", - "integrity": "sha512-q08RJ6O+eJn+dVanerAndJwIcumgbDdYiUT7zFQl3Wm1xD6fBKtah7H8ZJChj4wP+8C+QfeVy8xautR7rdmKEw==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-4.2.2.tgz", + "integrity": "sha512-xcUzJ8NWN5bktoTIX7eOclO1Npxd/dyVqUJxlLIDasT4C7KZyqlPIwkdJ0Ypiy3p2ZKahTjK4M9uC3sNSfNMzw==", "dev": true, "requires": { - "@types/glob": "*" + "@types/glob": "^7.1.3" } }, "glob-to-regexp": { @@ -22632,36 +22623,26 @@ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, - "json-schema-ref-parser": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", - "integrity": "sha512-qcP2lmGy+JUoQJ4DOQeLaZDqH9qSkeGCK3suKWxJXS82dg728Mn3j97azDMaOUmJAN4uCq91LdPx4K7E8F1a7Q==", - "dev": true, - "requires": { - "@apidevtools/json-schema-ref-parser": "9.0.9" - } - }, "json-schema-to-typescript": { - "version": "10.1.5", - "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-10.1.5.tgz", - "integrity": "sha512-X8bNNksfCQo6LhEuqNxmZr4eZpPjXZajmimciuk8eWXzZlif9Brq7WuMGD/SOhBKcRKP2SGVDNZbC28WQqx9Rg==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-12.0.0.tgz", + "integrity": "sha512-Uk/BDIAo8vqepPBhM86UhNMHgCv7JulicNj/BgnQPHE1fGCoej0UTtcEYzXU/uk6lSvbZCf7pccW+dnNMrr5rg==", "dev": true, "requires": { - "@types/json-schema": "^7.0.6", - "@types/lodash": "^4.14.168", - "@types/prettier": "^2.1.5", - "cli-color": "^2.0.0", + "@bcherny/json-schema-ref-parser": "10.0.5-fork", + "@types/json-schema": "^7.0.11", + "@types/lodash": "^4.14.182", + "@types/prettier": "^2.6.1", + "cli-color": "^2.0.2", "get-stdin": "^8.0.0", "glob": "^7.1.6", - "glob-promise": "^3.4.0", - "is-glob": "^4.0.1", - "json-schema-ref-parser": "^9.0.6", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.20", - "minimist": "^1.2.5", + "glob-promise": "^4.2.2", + "is-glob": "^4.0.3", + "lodash": "^4.17.21", + "minimist": "^1.2.6", "mkdirp": "^1.0.4", "mz": "^2.7.0", - "prettier": "^2.2.0" + "prettier": "^2.6.2" } }, "json-schema-traverse": { @@ -22675,12 +22656,6 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "devOptional": true }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true - }, "json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", diff --git a/docs/package.json b/docs/package.json index dd4b3ff7c07..918fd173504 100644 --- a/docs/package.json +++ b/docs/package.json @@ -54,7 +54,7 @@ "eslint-config-prettier": "^8.8.0", "eslint-plugin-mdx": "^2.0.5", "eslint-plugin-react": "^7.32.2", - "json-schema-to-typescript": "^10.1.5", + "json-schema-to-typescript": "^12.0.0", "mustache": "^4.2.0", "null-loader": "^4.0.0", "prebuild-webpack-plugin": "^1.1.1", From da2599aa75875a67ea923b93d58b6591e0747a06 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 23 Apr 2023 00:26:28 -0500 Subject: [PATCH 009/160] chore: Update docusaurus, react types --- docs/package-lock.json | 1568 +++++++++++++++++++++------------------- docs/package.json | 14 +- 2 files changed, 819 insertions(+), 763 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index ba968736b47..ac8c947e909 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -8,8 +8,8 @@ "name": "docs", "version": "0.0.0", "dependencies": { - "@docusaurus/core": "^2.1.0", - "@docusaurus/preset-classic": "^2.1.0", + "@docusaurus/core": "^2.4.0", + "@docusaurus/preset-classic": "^2.4.0", "@fortawesome/fontawesome-svg-core": "^1.2.32", "@fortawesome/free-solid-svg-icons": "^5.15.3", "@fortawesome/react-fontawesome": "^0.1.18", @@ -24,12 +24,12 @@ "web-tree-sitter": "^0.19.4" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^2.1.0", - "@docusaurus/types": "^2.1.0", - "@tsconfig/docusaurus": "^1.0.5", + "@docusaurus/module-type-aliases": "^2.4.0", + "@docusaurus/types": "^2.4.0", + "@tsconfig/docusaurus": "^1.0.7", "@types/js-yaml": "^4.0.5", - "@types/react": "^17.0.3", - "@types/react-helmet": "^6.1.5", + "@types/react": "^17.0.58", + "@types/react-helmet": "^6.1.6", "@types/react-router-dom": "^5.1.7", "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", @@ -46,19 +46,19 @@ } }, "node_modules/@algolia/autocomplete-core": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.7.2.tgz", - "integrity": "sha512-eclwUDC6qfApNnEfu1uWcL/rudQsn59tjEoUYZYE2JSXZrHLRjBUGMxiCoknobU2Pva8ejb0eRxpIYDtVVqdsw==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.7.4.tgz", + "integrity": "sha512-daoLpQ3ps/VTMRZDEBfU8ixXd+amZcNJ4QSP3IERGyzqnL5Ch8uSRFt/4G8pUvW9c3o6GA4vtVv4I4lmnkdXyg==", "dependencies": { - "@algolia/autocomplete-shared": "1.7.2" + "@algolia/autocomplete-shared": "1.7.4" } }, "node_modules/@algolia/autocomplete-preset-algolia": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.2.tgz", - "integrity": "sha512-+RYEG6B0QiGGfRb2G3MtPfyrl0dALF3cQNTWBzBX6p5o01vCCGTTinAm2UKG3tfc2CnOMAtnPLkzNZyJUpnVJw==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.4.tgz", + "integrity": "sha512-s37hrvLEIfcmKY8VU9LsAXgm2yfmkdHT3DnA3SgHaY93yjZ2qL57wzb5QweVkYuEBZkT2PIREvRoLXC2sxTbpQ==", "dependencies": { - "@algolia/autocomplete-shared": "1.7.2" + "@algolia/autocomplete-shared": "1.7.4" }, "peerDependencies": { "@algolia/client-search": ">= 4.9.1 < 6", @@ -66,79 +66,79 @@ } }, "node_modules/@algolia/autocomplete-shared": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.2.tgz", - "integrity": "sha512-QCckjiC7xXHIUaIL3ektBtjJ0w7tTA3iqKcAE/Hjn1lZ5omp7i3Y4e09rAr9ZybqirL7AbxCLLq0Ra5DDPKeug==" + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.4.tgz", + "integrity": "sha512-2VGCk7I9tA9Ge73Km99+Qg87w0wzW4tgUruvWAn/gfey1ZXgmxZtyIRBebk35R1O8TbK77wujVtCnpsGpRy1kg==" }, "node_modules/@algolia/cache-browser-local-storage": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.14.2.tgz", - "integrity": "sha512-FRweBkK/ywO+GKYfAWbrepewQsPTIEirhi1BdykX9mxvBPtGNKccYAxvGdDCumU1jL4r3cayio4psfzKMejBlA==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.17.0.tgz", + "integrity": "sha512-myRSRZDIMYB8uCkO+lb40YKiYHi0fjpWRtJpR/dgkaiBlSD0plRyB6lLOh1XIfmMcSeBOqDE7y9m8xZMrXYfyQ==", "dependencies": { - "@algolia/cache-common": "4.14.2" + "@algolia/cache-common": "4.17.0" } }, "node_modules/@algolia/cache-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.14.2.tgz", - "integrity": "sha512-SbvAlG9VqNanCErr44q6lEKD2qoK4XtFNx9Qn8FK26ePCI8I9yU7pYB+eM/cZdS9SzQCRJBbHUumVr4bsQ4uxg==" + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.17.0.tgz", + "integrity": "sha512-g8mXzkrcUBIPZaulAuqE7xyHhLAYAcF2xSch7d9dABheybaU3U91LjBX6eJTEB7XVhEsgK4Smi27vWtAJRhIKQ==" }, "node_modules/@algolia/cache-in-memory": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.14.2.tgz", - "integrity": "sha512-HrOukWoop9XB/VFojPv1R5SVXowgI56T9pmezd/djh2JnVN/vXswhXV51RKy4nCpqxyHt/aGFSq2qkDvj6KiuQ==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.17.0.tgz", + "integrity": "sha512-PT32ciC/xI8z919d0oknWVu3kMfTlhQn3MKxDln3pkn+yA7F7xrxSALysxquv+MhFfNAcrtQ/oVvQVBAQSHtdw==", "dependencies": { - "@algolia/cache-common": "4.14.2" + "@algolia/cache-common": "4.17.0" } }, "node_modules/@algolia/client-account": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.14.2.tgz", - "integrity": "sha512-WHtriQqGyibbb/Rx71YY43T0cXqyelEU0lB2QMBRXvD2X0iyeGl4qMxocgEIcbHyK7uqE7hKgjT8aBrHqhgc1w==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.17.0.tgz", + "integrity": "sha512-sSEHx9GA6m7wrlsSMNBGfyzlIfDT2fkz2u7jqfCCd6JEEwmxt8emGmxAU/0qBfbhRSuGvzojoLJlr83BSZAKjA==", "dependencies": { - "@algolia/client-common": "4.14.2", - "@algolia/client-search": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.17.0", + "@algolia/client-search": "4.17.0", + "@algolia/transporter": "4.17.0" } }, "node_modules/@algolia/client-analytics": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.14.2.tgz", - "integrity": "sha512-yBvBv2mw+HX5a+aeR0dkvUbFZsiC4FKSnfqk9rrfX+QrlNOKEhCG0tJzjiOggRW4EcNqRmaTULIYvIzQVL2KYQ==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.17.0.tgz", + "integrity": "sha512-84ooP8QA3mQ958hQ9wozk7hFUbAO+81CX1CjAuerxBqjKIInh1fOhXKTaku05O/GHBvcfExpPLIQuSuLYziBXQ==", "dependencies": { - "@algolia/client-common": "4.14.2", - "@algolia/client-search": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.17.0", + "@algolia/client-search": "4.17.0", + "@algolia/requester-common": "4.17.0", + "@algolia/transporter": "4.17.0" } }, "node_modules/@algolia/client-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.14.2.tgz", - "integrity": "sha512-43o4fslNLcktgtDMVaT5XwlzsDPzlqvqesRi4MjQz2x4/Sxm7zYg5LRYFol1BIhG6EwxKvSUq8HcC/KxJu3J0Q==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.17.0.tgz", + "integrity": "sha512-jHMks0ZFicf8nRDn6ma8DNNsdwGgP/NKiAAL9z6rS7CymJ7L0+QqTJl3rYxRW7TmBhsUH40wqzmrG6aMIN/DrQ==", "dependencies": { - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/requester-common": "4.17.0", + "@algolia/transporter": "4.17.0" } }, "node_modules/@algolia/client-personalization": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.14.2.tgz", - "integrity": "sha512-ACCoLi0cL8CBZ1W/2juehSltrw2iqsQBnfiu/Rbl9W2yE6o2ZUb97+sqN/jBqYNQBS+o0ekTMKNkQjHHAcEXNw==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.17.0.tgz", + "integrity": "sha512-RMzN4dZLIta1YuwT7QC9o+OeGz2cU6eTOlGNE/6RcUBLOU3l9tkCOdln5dPE2jp8GZXPl2yk54b2nSs1+pAjqw==", "dependencies": { - "@algolia/client-common": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.17.0", + "@algolia/requester-common": "4.17.0", + "@algolia/transporter": "4.17.0" } }, "node_modules/@algolia/client-search": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.14.2.tgz", - "integrity": "sha512-L5zScdOmcZ6NGiVbLKTvP02UbxZ0njd5Vq9nJAmPFtjffUSOGEp11BmD2oMJ5QvARgx2XbX4KzTTNS5ECYIMWw==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.17.0.tgz", + "integrity": "sha512-x4P2wKrrRIXszT8gb7eWsMHNNHAJs0wE7/uqbufm4tZenAp+hwU/hq5KVsY50v+PfwM0LcDwwn/1DroujsTFoA==", "dependencies": { - "@algolia/client-common": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.17.0", + "@algolia/requester-common": "4.17.0", + "@algolia/transporter": "4.17.0" } }, "node_modules/@algolia/events": { @@ -147,47 +147,47 @@ "integrity": "sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==" }, "node_modules/@algolia/logger-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.14.2.tgz", - "integrity": "sha512-/JGlYvdV++IcMHBnVFsqEisTiOeEr6cUJtpjz8zc0A9c31JrtLm318Njc72p14Pnkw3A/5lHHh+QxpJ6WFTmsA==" + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.17.0.tgz", + "integrity": "sha512-DGuoZqpTmIKJFDeyAJ7M8E/LOenIjWiOsg1XJ1OqAU/eofp49JfqXxbfgctlVZVmDABIyOz8LqEoJ6ZP4DTyvw==" }, "node_modules/@algolia/logger-console": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.14.2.tgz", - "integrity": "sha512-8S2PlpdshbkwlLCSAB5f8c91xyc84VM9Ar9EdfE9UmX+NrKNYnWR1maXXVDQQoto07G1Ol/tYFnFVhUZq0xV/g==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.17.0.tgz", + "integrity": "sha512-zMPvugQV/gbXUvWBCzihw6m7oxIKp48w37QBIUu/XqQQfxhjoOE9xyfJr1KldUt5FrYOKZJVsJaEjTsu+bIgQg==", "dependencies": { - "@algolia/logger-common": "4.14.2" + "@algolia/logger-common": "4.17.0" } }, "node_modules/@algolia/requester-browser-xhr": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.14.2.tgz", - "integrity": "sha512-CEh//xYz/WfxHFh7pcMjQNWgpl4wFB85lUMRyVwaDPibNzQRVcV33YS+63fShFWc2+42YEipFGH2iPzlpszmDw==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.17.0.tgz", + "integrity": "sha512-aSOX/smauyTkP21Pf52pJ1O2LmNFJ5iHRIzEeTh0mwBeADO4GdG94cAWDILFA9rNblq/nK3EDh3+UyHHjplZ1A==", "dependencies": { - "@algolia/requester-common": "4.14.2" + "@algolia/requester-common": "4.17.0" } }, "node_modules/@algolia/requester-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.14.2.tgz", - "integrity": "sha512-73YQsBOKa5fvVV3My7iZHu1sUqmjjfs9TteFWwPwDmnad7T0VTCopttcsM3OjLxZFtBnX61Xxl2T2gmG2O4ehg==" + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.17.0.tgz", + "integrity": "sha512-XJjmWFEUlHu0ijvcHBoixuXfEoiRUdyzQM6YwTuB8usJNIgShua8ouFlRWF8iCeag0vZZiUm4S2WCVBPkdxFgg==" }, "node_modules/@algolia/requester-node-http": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.14.2.tgz", - "integrity": "sha512-oDbb02kd1o5GTEld4pETlPZLY0e+gOSWjWMJHWTgDXbv9rm/o2cF7japO6Vj1ENnrqWvLBmW1OzV9g6FUFhFXg==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.17.0.tgz", + "integrity": "sha512-bpb/wDA1aC6WxxM8v7TsFspB7yBN3nqCGs2H1OADolQR/hiAIjAxusbuMxVbRFOdaUvAIqioIIkWvZdpYNIn8w==", "dependencies": { - "@algolia/requester-common": "4.14.2" + "@algolia/requester-common": "4.17.0" } }, "node_modules/@algolia/transporter": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.14.2.tgz", - "integrity": "sha512-t89dfQb2T9MFQHidjHcfhh6iGMNwvuKUvojAj+JsrHAGbuSy7yE4BylhLX6R0Q1xYRoC4Vvv+O5qIw/LdnQfsQ==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.17.0.tgz", + "integrity": "sha512-6xL6H6fe+Fi0AEP3ziSgC+G04RK37iRb4uUUqVAH9WPYFI8g+LYFq6iv5HS8Cbuc5TTut+Bwj6G+dh/asdb9uA==", "dependencies": { - "@algolia/cache-common": "4.14.2", - "@algolia/logger-common": "4.14.2", - "@algolia/requester-common": "4.14.2" + "@algolia/cache-common": "4.17.0", + "@algolia/logger-common": "4.17.0", + "@algolia/requester-common": "4.17.0" } }, "node_modules/@ampproject/remapping": { @@ -1904,11 +1904,11 @@ } }, "node_modules/@babel/runtime": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.4.tgz", - "integrity": "sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz", + "integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==", "dependencies": { - "regenerator-runtime": "^0.13.4" + "regenerator-runtime": "^0.13.11" }, "engines": { "node": ">=6.9.0" @@ -2000,18 +2000,18 @@ } }, "node_modules/@docsearch/css": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.3.0.tgz", - "integrity": "sha512-rODCdDtGyudLj+Va8b6w6Y85KE85bXRsps/R4Yjwt5vueXKXZQKYw0aA9knxLBT6a/bI/GMrAcmCR75KYOM6hg==" + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.3.3.tgz", + "integrity": "sha512-6SCwI7P8ao+se1TUsdZ7B4XzL+gqeQZnBc+2EONZlcVa0dVrk0NjETxozFKgMv0eEGH8QzP1fkN+A1rH61l4eg==" }, "node_modules/@docsearch/react": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.3.0.tgz", - "integrity": "sha512-fhS5adZkae2SSdMYEMVg6pxI5a/cE+tW16ki1V0/ur4Fdok3hBRkmN/H8VvlXnxzggkQIIRIVvYPn00JPjen3A==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.3.3.tgz", + "integrity": "sha512-pLa0cxnl+G0FuIDuYlW+EBK6Rw2jwLw9B1RHIeS4N4s2VhsfJ/wzeCi3CWcs5yVfxLd5ZK50t//TMA5e79YT7Q==", "dependencies": { - "@algolia/autocomplete-core": "1.7.2", - "@algolia/autocomplete-preset-algolia": "1.7.2", - "@docsearch/css": "3.3.0", + "@algolia/autocomplete-core": "1.7.4", + "@algolia/autocomplete-preset-algolia": "1.7.4", + "@docsearch/css": "3.3.3", "algoliasearch": "^4.0.0" }, "peerDependencies": { @@ -2032,9 +2032,9 @@ } }, "node_modules/@docusaurus/core": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-2.1.0.tgz", - "integrity": "sha512-/ZJ6xmm+VB9Izbn0/s6h6289cbPy2k4iYFwWDhjiLsVqwa/Y0YBBcXvStfaHccudUC3OfP+26hMk7UCjc50J6Q==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-2.4.0.tgz", + "integrity": "sha512-J55/WEoIpRcLf3afO5POHPguVZosKmJEQWKBL+K7TAnfuE7i+Y0NPLlkKtnWCehagGsgTqClfQEexH/UT4kELA==", "dependencies": { "@babel/core": "^7.18.6", "@babel/generator": "^7.18.7", @@ -2046,13 +2046,13 @@ "@babel/runtime": "^7.18.6", "@babel/runtime-corejs3": "^7.18.6", "@babel/traverse": "^7.18.8", - "@docusaurus/cssnano-preset": "2.1.0", - "@docusaurus/logger": "2.1.0", - "@docusaurus/mdx-loader": "2.1.0", + "@docusaurus/cssnano-preset": "2.4.0", + "@docusaurus/logger": "2.4.0", + "@docusaurus/mdx-loader": "2.4.0", "@docusaurus/react-loadable": "5.5.2", - "@docusaurus/utils": "2.1.0", - "@docusaurus/utils-common": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-common": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "@slorber/static-site-generator-webpack-plugin": "^4.0.7", "@svgr/webpack": "^6.2.1", "autoprefixer": "^10.4.7", @@ -2073,7 +2073,7 @@ "del": "^6.1.1", "detect-port": "^1.3.0", "escape-html": "^1.0.3", - "eta": "^1.12.3", + "eta": "^2.0.0", "file-loader": "^6.2.0", "fs-extra": "^10.1.0", "html-minifier-terser": "^6.1.0", @@ -2120,9 +2120,9 @@ } }, "node_modules/@docusaurus/cssnano-preset": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-2.1.0.tgz", - "integrity": "sha512-pRLewcgGhOies6pzsUROfmPStDRdFw+FgV5sMtLr5+4Luv2rty5+b/eSIMMetqUsmg3A9r9bcxHk9bKAKvx3zQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-2.4.0.tgz", + "integrity": "sha512-RmdiA3IpsLgZGXRzqnmTbGv43W4OD44PCo+6Q/aYjEM2V57vKCVqNzuafE94jv0z/PjHoXUrjr69SaRymBKYYw==", "dependencies": { "cssnano-preset-advanced": "^5.3.8", "postcss": "^8.4.14", @@ -2134,9 +2134,9 @@ } }, "node_modules/@docusaurus/logger": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-2.1.0.tgz", - "integrity": "sha512-uuJx2T6hDBg82joFeyobywPjSOIfeq05GfyKGHThVoXuXsu1KAzMDYcjoDxarb9CoHCI/Dor8R2MoL6zII8x1Q==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-2.4.0.tgz", + "integrity": "sha512-T8+qR4APN+MjcC9yL2Es+xPJ2923S9hpzDmMtdsOcUGLqpCGBbU1vp3AAqDwXtVgFkq+NsEk7sHdVsfLWR/AXw==", "dependencies": { "chalk": "^4.1.2", "tslib": "^2.4.0" @@ -2146,14 +2146,14 @@ } }, "node_modules/@docusaurus/mdx-loader": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-2.1.0.tgz", - "integrity": "sha512-i97hi7hbQjsD3/8OSFhLy7dbKGH8ryjEzOfyhQIn2CFBYOY3ko0vMVEf3IY9nD3Ld7amYzsZ8153RPkcnXA+Lg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-2.4.0.tgz", + "integrity": "sha512-GWoH4izZKOmFoC+gbI2/y8deH/xKLvzz/T5BsEexBye8EHQlwsA7FMrVa48N063bJBH4FUOiRRXxk5rq9cC36g==", "dependencies": { "@babel/parser": "^7.18.8", "@babel/traverse": "^7.18.8", - "@docusaurus/logger": "2.1.0", - "@docusaurus/utils": "2.1.0", + "@docusaurus/logger": "2.4.0", + "@docusaurus/utils": "2.4.0", "@mdx-js/mdx": "^1.6.22", "escape-html": "^1.0.3", "file-loader": "^6.2.0", @@ -2177,12 +2177,12 @@ } }, "node_modules/@docusaurus/module-type-aliases": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-2.1.0.tgz", - "integrity": "sha512-Z8WZaK5cis3xEtyfOT817u9xgGUauT0PuuVo85ysnFRX8n7qLN1lTPCkC+aCmFm/UcV8h/W5T4NtIsst94UntQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-2.4.0.tgz", + "integrity": "sha512-YEQO2D3UXs72qCn8Cr+RlycSQXVGN9iEUyuHwTuK4/uL/HFomB2FHSU0vSDM23oLd+X/KibQ3Ez6nGjQLqXcHg==", "dependencies": { "@docusaurus/react-loadable": "5.5.2", - "@docusaurus/types": "2.1.0", + "@docusaurus/types": "2.4.0", "@types/history": "^4.7.11", "@types/react": "*", "@types/react-router-config": "*", @@ -2196,17 +2196,17 @@ } }, "node_modules/@docusaurus/plugin-content-blog": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.1.0.tgz", - "integrity": "sha512-xEp6jlu92HMNUmyRBEeJ4mCW1s77aAEQO4Keez94cUY/Ap7G/r0Awa6xSLff7HL0Fjg8KK1bEbDy7q9voIavdg==", - "dependencies": { - "@docusaurus/core": "2.1.0", - "@docusaurus/logger": "2.1.0", - "@docusaurus/mdx-loader": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils": "2.1.0", - "@docusaurus/utils-common": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.4.0.tgz", + "integrity": "sha512-YwkAkVUxtxoBAIj/MCb4ohN0SCtHBs4AS75jMhPpf67qf3j+U/4n33cELq7567hwyZ6fMz2GPJcVmctzlGGThQ==", + "dependencies": { + "@docusaurus/core": "2.4.0", + "@docusaurus/logger": "2.4.0", + "@docusaurus/mdx-loader": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-common": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "cheerio": "^1.0.0-rc.12", "feed": "^4.2.2", "fs-extra": "^10.1.0", @@ -2226,17 +2226,17 @@ } }, "node_modules/@docusaurus/plugin-content-docs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.1.0.tgz", - "integrity": "sha512-Rup5pqXrXlKGIC4VgwvioIhGWF7E/NNSlxv+JAxRYpik8VKlWsk9ysrdHIlpX+KJUCO9irnY21kQh2814mlp/Q==", - "dependencies": { - "@docusaurus/core": "2.1.0", - "@docusaurus/logger": "2.1.0", - "@docusaurus/mdx-loader": "2.1.0", - "@docusaurus/module-type-aliases": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.4.0.tgz", + "integrity": "sha512-ic/Z/ZN5Rk/RQo+Io6rUGpToOtNbtPloMR2JcGwC1xT2riMu6zzfSwmBi9tHJgdXH6CB5jG+0dOZZO8QS5tmDg==", + "dependencies": { + "@docusaurus/core": "2.4.0", + "@docusaurus/logger": "2.4.0", + "@docusaurus/mdx-loader": "2.4.0", + "@docusaurus/module-type-aliases": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "@types/react-router-config": "^5.0.6", "combine-promises": "^1.1.0", "fs-extra": "^10.1.0", @@ -2256,15 +2256,15 @@ } }, "node_modules/@docusaurus/plugin-content-pages": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.1.0.tgz", - "integrity": "sha512-SwZdDZRlObHNKXTnFo7W2aF6U5ZqNVI55Nw2GCBryL7oKQSLeI0lsrMlMXdzn+fS7OuBTd3MJBO1T4Zpz0i/+g==", - "dependencies": { - "@docusaurus/core": "2.1.0", - "@docusaurus/mdx-loader": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.4.0.tgz", + "integrity": "sha512-Pk2pOeOxk8MeU3mrTU0XLIgP9NZixbdcJmJ7RUFrZp1Aj42nd0RhIT14BGvXXyqb8yTQlk4DmYGAzqOfBsFyGw==", + "dependencies": { + "@docusaurus/core": "2.4.0", + "@docusaurus/mdx-loader": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "fs-extra": "^10.1.0", "tslib": "^2.4.0", "webpack": "^5.73.0" @@ -2278,13 +2278,13 @@ } }, "node_modules/@docusaurus/plugin-debug": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-2.1.0.tgz", - "integrity": "sha512-8wsDq3OIfiy6440KLlp/qT5uk+WRHQXIXklNHEeZcar+Of0TZxCNe2FBpv+bzb/0qcdP45ia5i5WmR5OjN6DPw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-2.4.0.tgz", + "integrity": "sha512-KC56DdYjYT7Txyux71vXHXGYZuP6yYtqwClvYpjKreWIHWus5Zt6VNi23rMZv3/QKhOCrN64zplUbdfQMvddBQ==", "dependencies": { - "@docusaurus/core": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils": "2.1.0", + "@docusaurus/core": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils": "2.4.0", "fs-extra": "^10.1.0", "react-json-view": "^1.21.3", "tslib": "^2.4.0" @@ -2298,13 +2298,13 @@ } }, "node_modules/@docusaurus/plugin-google-analytics": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.1.0.tgz", - "integrity": "sha512-4cgeqIly/wcFVbbWP03y1QJJBgH8W+Bv6AVbWnsXNOZa1yB3AO6hf3ZdeQH9x20v9T2pREogVgAH0rSoVnNsgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.4.0.tgz", + "integrity": "sha512-uGUzX67DOAIglygdNrmMOvEp8qG03X20jMWadeqVQktS6nADvozpSLGx4J0xbkblhJkUzN21WiilsP9iVP+zkw==", "dependencies": { - "@docusaurus/core": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "@docusaurus/core": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "tslib": "^2.4.0" }, "engines": { @@ -2316,13 +2316,31 @@ } }, "node_modules/@docusaurus/plugin-google-gtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.1.0.tgz", - "integrity": "sha512-/3aDlv2dMoCeiX2e+DTGvvrdTA+v3cKQV3DbmfsF4ENhvc5nKV23nth04Z3Vq0Ci1ui6Sn80TkhGk/tiCMW2AA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.4.0.tgz", + "integrity": "sha512-adj/70DANaQs2+TF/nRdMezDXFAV/O/pjAbUgmKBlyOTq5qoMe0Tk4muvQIwWUmiUQxFJe+sKlZGM771ownyOg==", + "dependencies": { + "@docusaurus/core": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/plugin-google-tag-manager": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-2.4.0.tgz", + "integrity": "sha512-E66uGcYs4l7yitmp/8kMEVQftFPwV9iC62ORh47Veqzs6ExwnhzBkJmwDnwIysHBF1vlxnzET0Fl2LfL5fRR3A==", "dependencies": { - "@docusaurus/core": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "@docusaurus/core": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "tslib": "^2.4.0" }, "engines": { @@ -2334,16 +2352,16 @@ } }, "node_modules/@docusaurus/plugin-sitemap": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.1.0.tgz", - "integrity": "sha512-2Y6Br8drlrZ/jN9MwMBl0aoi9GAjpfyfMBYpaQZXimbK+e9VjYnujXlvQ4SxtM60ASDgtHIAzfVFBkSR/MwRUw==", - "dependencies": { - "@docusaurus/core": "2.1.0", - "@docusaurus/logger": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils": "2.1.0", - "@docusaurus/utils-common": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.4.0.tgz", + "integrity": "sha512-pZxh+ygfnI657sN8a/FkYVIAmVv0CGk71QMKqJBOfMmDHNN1FeDeFkBjWP49ejBqpqAhjufkv5UWq3UOu2soCw==", + "dependencies": { + "@docusaurus/core": "2.4.0", + "@docusaurus/logger": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-common": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "fs-extra": "^10.1.0", "sitemap": "^7.1.1", "tslib": "^2.4.0" @@ -2357,22 +2375,23 @@ } }, "node_modules/@docusaurus/preset-classic": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-2.1.0.tgz", - "integrity": "sha512-NQMnaq974K4BcSMXFSJBQ5itniw6RSyW+VT+6i90kGZzTwiuKZmsp0r9lC6BYAvvVMQUNJQwrETmlu7y2XKW7w==", - "dependencies": { - "@docusaurus/core": "2.1.0", - "@docusaurus/plugin-content-blog": "2.1.0", - "@docusaurus/plugin-content-docs": "2.1.0", - "@docusaurus/plugin-content-pages": "2.1.0", - "@docusaurus/plugin-debug": "2.1.0", - "@docusaurus/plugin-google-analytics": "2.1.0", - "@docusaurus/plugin-google-gtag": "2.1.0", - "@docusaurus/plugin-sitemap": "2.1.0", - "@docusaurus/theme-classic": "2.1.0", - "@docusaurus/theme-common": "2.1.0", - "@docusaurus/theme-search-algolia": "2.1.0", - "@docusaurus/types": "2.1.0" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-2.4.0.tgz", + "integrity": "sha512-/5z5o/9bc6+P5ool2y01PbJhoGddEGsC0ej1MF6mCoazk8A+kW4feoUd68l7Bnv01rCnG3xy7kHUQP97Y0grUA==", + "dependencies": { + "@docusaurus/core": "2.4.0", + "@docusaurus/plugin-content-blog": "2.4.0", + "@docusaurus/plugin-content-docs": "2.4.0", + "@docusaurus/plugin-content-pages": "2.4.0", + "@docusaurus/plugin-debug": "2.4.0", + "@docusaurus/plugin-google-analytics": "2.4.0", + "@docusaurus/plugin-google-gtag": "2.4.0", + "@docusaurus/plugin-google-tag-manager": "2.4.0", + "@docusaurus/plugin-sitemap": "2.4.0", + "@docusaurus/theme-classic": "2.4.0", + "@docusaurus/theme-common": "2.4.0", + "@docusaurus/theme-search-algolia": "2.4.0", + "@docusaurus/types": "2.4.0" }, "engines": { "node": ">=16.14" @@ -2395,26 +2414,26 @@ } }, "node_modules/@docusaurus/theme-classic": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-2.1.0.tgz", - "integrity": "sha512-xn8ZfNMsf7gaSy9+ClFnUu71o7oKgMo5noYSS1hy3svNifRTkrBp6+MReLDsmIaj3mLf2e7+JCBYKBFbaGzQng==", - "dependencies": { - "@docusaurus/core": "2.1.0", - "@docusaurus/mdx-loader": "2.1.0", - "@docusaurus/module-type-aliases": "2.1.0", - "@docusaurus/plugin-content-blog": "2.1.0", - "@docusaurus/plugin-content-docs": "2.1.0", - "@docusaurus/plugin-content-pages": "2.1.0", - "@docusaurus/theme-common": "2.1.0", - "@docusaurus/theme-translations": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils": "2.1.0", - "@docusaurus/utils-common": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-2.4.0.tgz", + "integrity": "sha512-GMDX5WU6Z0OC65eQFgl3iNNEbI9IMJz9f6KnOyuMxNUR6q0qVLsKCNopFUDfFNJ55UU50o7P7o21yVhkwpfJ9w==", + "dependencies": { + "@docusaurus/core": "2.4.0", + "@docusaurus/mdx-loader": "2.4.0", + "@docusaurus/module-type-aliases": "2.4.0", + "@docusaurus/plugin-content-blog": "2.4.0", + "@docusaurus/plugin-content-docs": "2.4.0", + "@docusaurus/plugin-content-pages": "2.4.0", + "@docusaurus/theme-common": "2.4.0", + "@docusaurus/theme-translations": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-common": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "@mdx-js/react": "^1.6.22", "clsx": "^1.2.1", "copy-text-to-clipboard": "^3.0.1", - "infima": "0.2.0-alpha.42", + "infima": "0.2.0-alpha.43", "lodash": "^4.17.21", "nprogress": "^0.2.0", "postcss": "^8.4.14", @@ -2434,16 +2453,17 @@ } }, "node_modules/@docusaurus/theme-common": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-2.1.0.tgz", - "integrity": "sha512-vT1otpVPbKux90YpZUnvknsn5zvpLf+AW1W0EDcpE9up4cDrPqfsh0QoxGHFJnobE2/qftsBFC19BneN4BH8Ag==", - "dependencies": { - "@docusaurus/mdx-loader": "2.1.0", - "@docusaurus/module-type-aliases": "2.1.0", - "@docusaurus/plugin-content-blog": "2.1.0", - "@docusaurus/plugin-content-docs": "2.1.0", - "@docusaurus/plugin-content-pages": "2.1.0", - "@docusaurus/utils": "2.1.0", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-2.4.0.tgz", + "integrity": "sha512-IkG/l5f/FLY6cBIxtPmFnxpuPzc5TupuqlOx+XDN+035MdQcAh8wHXXZJAkTeYDeZ3anIUSUIvWa7/nRKoQEfg==", + "dependencies": { + "@docusaurus/mdx-loader": "2.4.0", + "@docusaurus/module-type-aliases": "2.4.0", + "@docusaurus/plugin-content-blog": "2.4.0", + "@docusaurus/plugin-content-docs": "2.4.0", + "@docusaurus/plugin-content-pages": "2.4.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-common": "2.4.0", "@types/history": "^4.7.11", "@types/react": "*", "@types/react-router-config": "*", @@ -2451,6 +2471,7 @@ "parse-numeric-range": "^1.3.0", "prism-react-renderer": "^1.3.5", "tslib": "^2.4.0", + "use-sync-external-store": "^1.2.0", "utility-types": "^3.10.0" }, "engines": { @@ -2462,22 +2483,22 @@ } }, "node_modules/@docusaurus/theme-search-algolia": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.1.0.tgz", - "integrity": "sha512-rNBvi35VvENhucslEeVPOtbAzBdZY/9j55gdsweGV5bYoAXy4mHB6zTGjealcB4pJ6lJY4a5g75fXXMOlUqPfg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.4.0.tgz", + "integrity": "sha512-pPCJSCL1Qt4pu/Z0uxBAuke0yEBbxh0s4fOvimna7TEcBLPq0x06/K78AaABXrTVQM6S0vdocFl9EoNgU17hqA==", "dependencies": { "@docsearch/react": "^3.1.1", - "@docusaurus/core": "2.1.0", - "@docusaurus/logger": "2.1.0", - "@docusaurus/plugin-content-docs": "2.1.0", - "@docusaurus/theme-common": "2.1.0", - "@docusaurus/theme-translations": "2.1.0", - "@docusaurus/utils": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "@docusaurus/core": "2.4.0", + "@docusaurus/logger": "2.4.0", + "@docusaurus/plugin-content-docs": "2.4.0", + "@docusaurus/theme-common": "2.4.0", + "@docusaurus/theme-translations": "2.4.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "algoliasearch": "^4.13.1", "algoliasearch-helper": "^3.10.0", "clsx": "^1.2.1", - "eta": "^1.12.3", + "eta": "^2.0.0", "fs-extra": "^10.1.0", "lodash": "^4.17.21", "tslib": "^2.4.0", @@ -2492,9 +2513,9 @@ } }, "node_modules/@docusaurus/theme-translations": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-2.1.0.tgz", - "integrity": "sha512-07n2akf2nqWvtJeMy3A+7oSGMuu5F673AovXVwY0aGAux1afzGCiqIFlYW3EP0CujvDJAEFSQi/Tetfh+95JNg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-2.4.0.tgz", + "integrity": "sha512-kEoITnPXzDPUMBHk3+fzEzbopxLD3fR5sDoayNH0vXkpUukA88/aDL1bqkhxWZHA3LOfJ3f0vJbOwmnXW5v85Q==", "dependencies": { "fs-extra": "^10.1.0", "tslib": "^2.4.0" @@ -2504,9 +2525,9 @@ } }, "node_modules/@docusaurus/types": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.1.0.tgz", - "integrity": "sha512-BS1ebpJZnGG6esKqsjtEC9U9qSaPylPwlO7cQ1GaIE7J/kMZI3FITnNn0otXXu7c7ZTqhb6+8dOrG6fZn6fqzQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.4.0.tgz", + "integrity": "sha512-xaBXr+KIPDkIaef06c+i2HeTqVNixB7yFut5fBXPGI2f1rrmEV2vLMznNGsFwvZ5XmA3Quuefd4OGRkdo97Dhw==", "dependencies": { "@types/history": "^4.7.11", "@types/react": "*", @@ -2523,12 +2544,13 @@ } }, "node_modules/@docusaurus/utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-2.1.0.tgz", - "integrity": "sha512-fPvrfmAuC54n8MjZuG4IysaMdmvN5A/qr7iFLbSGSyDrsbP4fnui6KdZZIa/YOLIPLec8vjZ8RIITJqF18mx4A==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-2.4.0.tgz", + "integrity": "sha512-89hLYkvtRX92j+C+ERYTuSUK6nF9bGM32QThcHPg2EDDHVw6FzYQXmX6/p+pU5SDyyx5nBlE4qXR92RxCAOqfg==", "dependencies": { - "@docusaurus/logger": "2.1.0", + "@docusaurus/logger": "2.4.0", "@svgr/webpack": "^6.2.1", + "escape-string-regexp": "^4.0.0", "file-loader": "^6.2.0", "fs-extra": "^10.1.0", "github-slugger": "^1.4.0", @@ -2556,9 +2578,9 @@ } }, "node_modules/@docusaurus/utils-common": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-2.1.0.tgz", - "integrity": "sha512-F2vgmt4yRFgRQR2vyEFGTWeyAdmgKbtmu3sjHObF0tjjx/pN0Iw/c6eCopaH34E6tc9nO0nvp01pwW+/86d1fg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-2.4.0.tgz", + "integrity": "sha512-zIMf10xuKxddYfLg5cS19x44zud/E9I7lj3+0bv8UIs0aahpErfNrGhijEfJpAfikhQ8tL3m35nH3hJ3sOG82A==", "dependencies": { "tslib": "^2.4.0" }, @@ -2575,12 +2597,12 @@ } }, "node_modules/@docusaurus/utils-validation": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-2.1.0.tgz", - "integrity": "sha512-AMJzWYKL3b7FLltKtDXNLO9Y649V2BXvrnRdnW2AA+PpBnYV78zKLSCz135cuWwRj1ajNtP4onbXdlnyvCijGQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-2.4.0.tgz", + "integrity": "sha512-IrBsBbbAp6y7mZdJx4S4pIA7dUyWSA0GNosPk6ZJ0fX3uYIEQgcQSGIgTeSC+8xPEx3c16o03en1jSDpgQgz/w==", "dependencies": { - "@docusaurus/logger": "2.1.0", - "@docusaurus/utils": "2.1.0", + "@docusaurus/logger": "2.4.0", + "@docusaurus/utils": "2.4.0", "joi": "^17.6.0", "js-yaml": "^4.1.0", "tslib": "^2.4.0" @@ -3382,9 +3404,9 @@ } }, "node_modules/@tsconfig/docusaurus": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@tsconfig/docusaurus/-/docusaurus-1.0.6.tgz", - "integrity": "sha512-1QxDaP54hpzM6bq9E+yFEo4F9WbWHhsDe4vktZXF/iDlc9FqGr9qlg+3X/nuKQXx8QxHV7ue8NXFazzajsxFBA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@tsconfig/docusaurus/-/docusaurus-1.0.7.tgz", + "integrity": "sha512-ffTXxGIP/IRMCjuzHd6M4/HdIrw1bMfC7Bv8hMkTadnePkpe0lG0oDSdbRpSDZb2rQMAgpbWiR10BvxvNYwYrg==", "dev": true }, "node_modules/@types/acorn": { @@ -3628,9 +3650,9 @@ "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==" }, "node_modules/@types/react": { - "version": "17.0.51", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.51.tgz", - "integrity": "sha512-YMddzAE+nSH04BiTJ5GydTxk0/3hckqyuOclg0s6zQYj/XzfRVNzHZAFwZb5SCSavkzTYUtcq/gwjLnvt2Y4cg==", + "version": "17.0.58", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.58.tgz", + "integrity": "sha512-c1GzVY97P0fGxwGxhYq989j4XwlcHQoto6wQISOC2v6wm3h0PORRWJFHlkRjfGsiG3y1609WdQ+J+tKxvrEd6A==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -3638,9 +3660,9 @@ } }, "node_modules/@types/react-helmet": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/@types/react-helmet/-/react-helmet-6.1.5.tgz", - "integrity": "sha512-/ICuy7OHZxR0YCAZLNg9r7I9aijWUWvxaPR6uTuyxe8tAj5RL4Sw1+R6NhXUtOsarkGYPmaHdBDvuXh2DIN/uA==", + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/@types/react-helmet/-/react-helmet-6.1.6.tgz", + "integrity": "sha512-ZKcoOdW/Tg+kiUbkFCBtvDw0k3nD4HJ/h/B9yWxN4uDO8OkRksWTO+EL+z/Qu3aHTeTll3Ro0Cc/8UhwBCMG5A==", "dev": true, "dependencies": { "@types/react": "*" @@ -4032,30 +4054,30 @@ } }, "node_modules/algoliasearch": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.14.2.tgz", - "integrity": "sha512-ngbEQonGEmf8dyEh5f+uOIihv4176dgbuOZspiuhmTTBRBuzWu3KCGHre6uHj5YyuC7pNvQGzB6ZNJyZi0z+Sg==", - "dependencies": { - "@algolia/cache-browser-local-storage": "4.14.2", - "@algolia/cache-common": "4.14.2", - "@algolia/cache-in-memory": "4.14.2", - "@algolia/client-account": "4.14.2", - "@algolia/client-analytics": "4.14.2", - "@algolia/client-common": "4.14.2", - "@algolia/client-personalization": "4.14.2", - "@algolia/client-search": "4.14.2", - "@algolia/logger-common": "4.14.2", - "@algolia/logger-console": "4.14.2", - "@algolia/requester-browser-xhr": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/requester-node-http": "4.14.2", - "@algolia/transporter": "4.14.2" + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.17.0.tgz", + "integrity": "sha512-JMRh2Mw6sEnVMiz6+APsi7lx9a2jiDFF+WUtANaUVCv6uSU9UOLdo5h9K3pdP6frRRybaM2fX8b1u0nqICS9aA==", + "dependencies": { + "@algolia/cache-browser-local-storage": "4.17.0", + "@algolia/cache-common": "4.17.0", + "@algolia/cache-in-memory": "4.17.0", + "@algolia/client-account": "4.17.0", + "@algolia/client-analytics": "4.17.0", + "@algolia/client-common": "4.17.0", + "@algolia/client-personalization": "4.17.0", + "@algolia/client-search": "4.17.0", + "@algolia/logger-common": "4.17.0", + "@algolia/logger-console": "4.17.0", + "@algolia/requester-browser-xhr": "4.17.0", + "@algolia/requester-common": "4.17.0", + "@algolia/requester-node-http": "4.17.0", + "@algolia/transporter": "4.17.0" } }, "node_modules/algoliasearch-helper": { - "version": "3.11.1", - "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.11.1.tgz", - "integrity": "sha512-mvsPN3eK4E0bZG0/WlWJjeqe/bUD2KOEVOl0GyL/TGXn6wcpZU8NOuztGHCUKXkyg5gq6YzUakVTmnmSSO5Yiw==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.12.0.tgz", + "integrity": "sha512-/j1U3PEwdan0n6P/QqSnSpNSLC5+cEMvyljd5CnmNmUjDlGrys+vFEOwjVEnqELIiAGMHEA/Nl3CiKVFBUYqyQ==", "dependencies": { "@algolia/events": "^4.0.1" }, @@ -4227,9 +4249,9 @@ } }, "node_modules/autoprefixer": { - "version": "10.4.12", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.12.tgz", - "integrity": "sha512-WrCGV9/b97Pa+jtwf5UGaRjgQIg7OK3D06GnoYoZNcG1Xb8Gt3EfuKjlhh9i/VtT16g6PYjZ69jdJ2g8FxSC4Q==", + "version": "10.4.14", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", + "integrity": "sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==", "funding": [ { "type": "opencollective", @@ -4241,8 +4263,8 @@ } ], "dependencies": { - "browserslist": "^4.21.4", - "caniuse-lite": "^1.0.30001407", + "browserslist": "^4.21.5", + "caniuse-lite": "^1.0.30001464", "fraction.js": "^4.2.0", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", @@ -4516,9 +4538,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.21.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", "funding": [ { "type": "opencollective", @@ -4530,10 +4552,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" }, "bin": { "browserslist": "cli.js" @@ -4668,9 +4690,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001425", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001425.tgz", - "integrity": "sha512-/pzFv0OmNG6W0ym80P3NtapU0QEiDS3VuYAZMGoLLqiC7f6FJFe1MjpQDREGApeenD9wloeytmVDj+JLXPC6qw==", + "version": "1.0.30001481", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001481.tgz", + "integrity": "sha512-KCqHwRnaa1InZBtqXzP98LPg0ajCVujMKjqKDhZEthIpAsJl/YEIa3YvXjGXPVqzZVguccuu7ga9KOE1J9rKPQ==", "funding": [ { "type": "opencollective", @@ -4679,6 +4701,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -5121,9 +5147,9 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "node_modules/copy-text-to-clipboard": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-3.0.1.tgz", - "integrity": "sha512-rvVsHrpFcL4F2P8ihsoLdFHmd404+CMg71S756oRSeQgqk51U3kicGdnvfkrxva0xXH92SjGS62B0XIJsbh+9Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-3.1.0.tgz", + "integrity": "sha512-PFM6BnjLnOON/lB3ta/Jg7Ywsv+l9kQGD4TWDCSlRBGmqnnTM5MrDkhAFgw+8HZt0wW6Q2BBE4cmy9sq+s9Qng==", "engines": { "node": ">=12" }, @@ -5530,12 +5556,12 @@ } }, "node_modules/cssnano-preset-advanced": { - "version": "5.3.8", - "resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-5.3.8.tgz", - "integrity": "sha512-xUlLLnEB1LjpEik+zgRNlk8Y/koBPPtONZjp7JKbXigeAmCrFvq9H0pXW5jJV45bQWAlmJ0sKy+IMr0XxLYQZg==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-5.3.10.tgz", + "integrity": "sha512-fnYJyCS9jgMU+cmHO1rPSPf9axbQyD7iUhLO5Df6O4G+fKIOMps+ZbU0PdGFejFBBZ3Pftf18fn1eG7MAPUSWQ==", "dependencies": { - "autoprefixer": "^10.3.7", - "cssnano-preset-default": "^5.2.12", + "autoprefixer": "^10.4.12", + "cssnano-preset-default": "^5.2.14", "postcss-discard-unused": "^5.1.0", "postcss-merge-idents": "^5.1.1", "postcss-reduce-idents": "^5.2.0", @@ -5549,24 +5575,24 @@ } }, "node_modules/cssnano-preset-default": { - "version": "5.2.12", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.12.tgz", - "integrity": "sha512-OyCBTZi+PXgylz9HAA5kHyoYhfGcYdwFmyaJzWnzxuGRtnMw/kR6ilW9XzlzlRAtB6PLT/r+prYgkef7hngFew==", + "version": "5.2.14", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.14.tgz", + "integrity": "sha512-t0SFesj/ZV2OTylqQVOrFgEh5uanxbO6ZAdeCrNsUQ6fVuXwYTxJPNAGvGTxHbD68ldIJNec7PyYZDBrfDQ+6A==", "dependencies": { - "css-declaration-sorter": "^6.3.0", + "css-declaration-sorter": "^6.3.1", "cssnano-utils": "^3.1.0", "postcss-calc": "^8.2.3", - "postcss-colormin": "^5.3.0", - "postcss-convert-values": "^5.1.2", + "postcss-colormin": "^5.3.1", + "postcss-convert-values": "^5.1.3", "postcss-discard-comments": "^5.1.2", "postcss-discard-duplicates": "^5.1.0", "postcss-discard-empty": "^5.1.1", "postcss-discard-overridden": "^5.1.0", - "postcss-merge-longhand": "^5.1.6", - "postcss-merge-rules": "^5.1.2", + "postcss-merge-longhand": "^5.1.7", + "postcss-merge-rules": "^5.1.4", "postcss-minify-font-values": "^5.1.0", "postcss-minify-gradients": "^5.1.1", - "postcss-minify-params": "^5.1.3", + "postcss-minify-params": "^5.1.4", "postcss-minify-selectors": "^5.2.1", "postcss-normalize-charset": "^5.1.0", "postcss-normalize-display-values": "^5.1.0", @@ -5574,11 +5600,11 @@ "postcss-normalize-repeat-style": "^5.1.1", "postcss-normalize-string": "^5.1.0", "postcss-normalize-timing-functions": "^5.1.0", - "postcss-normalize-unicode": "^5.1.0", + "postcss-normalize-unicode": "^5.1.1", "postcss-normalize-url": "^5.1.0", "postcss-normalize-whitespace": "^5.1.1", "postcss-ordered-values": "^5.1.3", - "postcss-reduce-initial": "^5.1.0", + "postcss-reduce-initial": "^5.1.2", "postcss-reduce-transforms": "^5.1.0", "postcss-svgo": "^5.1.0", "postcss-unique-selectors": "^5.1.1" @@ -6954,9 +6980,9 @@ } }, "node_modules/eta": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/eta/-/eta-1.12.3.tgz", - "integrity": "sha512-qHixwbDLtekO/d51Yr4glcaUJCIjGVJyTzuqV4GPlgZo1YpgOKG+avQynErZIYrfM6JIJdtiG2Kox8tbb+DoGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/eta/-/eta-2.0.1.tgz", + "integrity": "sha512-46E2qDPDm7QA+usjffUWz9KfXsxVZclPOuKsXs4ZWZdI/X1wpDF7AO424pt7fdYohCzWsIkXAhNGXSlwo5naAg==", "engines": { "node": ">=6.0.0" }, @@ -7398,9 +7424,9 @@ "devOptional": true }, "node_modules/flux": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/flux/-/flux-4.0.3.tgz", - "integrity": "sha512-yKAbrp7JhZhj6uiT1FTuVMlIAT1J4jqEyBpFApi1kxpGZCvacMVc/t1pMQyotqHhAgvoE3bNvAykhCo2CLjnYw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/flux/-/flux-4.0.4.tgz", + "integrity": "sha512-NCj3XlayA2UsapRpM7va6wU1+9rE5FIL7qoMcmxWHRzbp0yujihMBm9BBHZ1MDIk5h5o2Bl6eGiCe8rYELAmYw==", "dependencies": { "fbemitter": "^3.0.0", "fbjs": "^3.0.1" @@ -8300,9 +8326,9 @@ } }, "node_modules/htmlparser2": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", - "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", "funding": [ "https://github.com/fb55/htmlparser2?sponsor=1", { @@ -8312,9 +8338,9 @@ ], "dependencies": { "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", + "domhandler": "^5.0.3", "domutils": "^3.0.1", - "entities": "^4.3.0" + "entities": "^4.4.0" } }, "node_modules/http-cache-semantics": { @@ -8495,9 +8521,9 @@ } }, "node_modules/infima": { - "version": "0.2.0-alpha.42", - "resolved": "https://registry.npmjs.org/infima/-/infima-0.2.0-alpha.42.tgz", - "integrity": "sha512-ift8OXNbQQwtbIt6z16KnSWP7uJ/SysSMFI4F87MNRTicypfl4Pv3E2OGVv6N3nSZFJvA8imYulCBS64iyHYww==", + "version": "0.2.0-alpha.43", + "resolved": "https://registry.npmjs.org/infima/-/infima-0.2.0-alpha.43.tgz", + "integrity": "sha512-2uw57LvUqW0rK/SWYnd/2rRfxNA5DDNOh33jxF7fy46VWoNhGxiUQyVZHbBMjQ33mQem0cjdDVwgWVAmlRfgyQ==", "engines": { "node": ">=12" } @@ -10957,9 +10983,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", + "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==" }, "node_modules/normalize-path": { "version": "3.0.0", @@ -11394,9 +11420,9 @@ "integrity": "sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ==" }, "node_modules/parse5": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.1.tgz", - "integrity": "sha512-kwpuwzB+px5WUg9pyK0IcK/shltJN5/OVhQagxhCQNtT9Y9QRZqNY2e1cmbu/paRh5LMnz/oVTVLBpjFmMZhSg==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", "dependencies": { "entities": "^4.4.0" }, @@ -11661,11 +11687,11 @@ } }, "node_modules/postcss-colormin": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.0.tgz", - "integrity": "sha512-WdDO4gOFG2Z8n4P8TWBpshnL3JpmNmJwdnfP2gbk2qBA8PWwOYcmjmI/t3CmMeL72a7Hkd+x/Mg9O2/0rD54Pg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.1.tgz", + "integrity": "sha512-UsWQG0AqTFQmpBegeLLc1+c3jIqBNB0zlDGRWR+dQ3pRKJL1oeMzyqmH3o2PIfn9MBdNrVPWhDbT769LxCTLJQ==", "dependencies": { - "browserslist": "^4.16.6", + "browserslist": "^4.21.4", "caniuse-api": "^3.0.0", "colord": "^2.9.1", "postcss-value-parser": "^4.2.0" @@ -11678,11 +11704,11 @@ } }, "node_modules/postcss-convert-values": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.2.tgz", - "integrity": "sha512-c6Hzc4GAv95B7suy4udszX9Zy4ETyMCgFPUDtWjdFTKH1SE9eFY/jEpHSwTH1QPuwxHpWslhckUQWbNRM4ho5g==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.3.tgz", + "integrity": "sha512-82pC1xkJZtcJEfiLw6UXnXVXScgtBrjlO5CBmuDQc+dlb88ZYheFsjTn40+zBVi3DkfF7iezO0nJUPLcJK3pvA==", "dependencies": { - "browserslist": "^4.20.3", + "browserslist": "^4.21.4", "postcss-value-parser": "^4.2.0" }, "engines": { @@ -11787,12 +11813,12 @@ } }, "node_modules/postcss-merge-longhand": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.6.tgz", - "integrity": "sha512-6C/UGF/3T5OE2CEbOuX7iNO63dnvqhGZeUnKkDeifebY0XqkkvrctYSZurpNE902LDf2yKwwPFgotnfSoPhQiw==", + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.7.tgz", + "integrity": "sha512-YCI9gZB+PLNskrK0BB3/2OzPnGhPkBEwmwhfYk1ilBHYVAZB7/tkTHFBAnCrvBBOmeYyMYw3DMjT55SyxMBzjQ==", "dependencies": { "postcss-value-parser": "^4.2.0", - "stylehacks": "^5.1.0" + "stylehacks": "^5.1.1" }, "engines": { "node": "^10 || ^12 || >=14.0" @@ -11802,11 +11828,11 @@ } }, "node_modules/postcss-merge-rules": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.2.tgz", - "integrity": "sha512-zKMUlnw+zYCWoPN6yhPjtcEdlJaMUZ0WyVcxTAmw3lkkN/NDMRkOkiuctQEoWAOvH7twaxUUdvBWl0d4+hifRQ==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.4.tgz", + "integrity": "sha512-0R2IuYpgU93y9lhVbO/OylTtKMVcHb67zjWIfCiKR9rWL3GUk1677LAqD/BcHizukdZEjT8Ru3oHRoAYoJy44g==", "dependencies": { - "browserslist": "^4.16.6", + "browserslist": "^4.21.4", "caniuse-api": "^3.0.0", "cssnano-utils": "^3.1.0", "postcss-selector-parser": "^6.0.5" @@ -11849,11 +11875,11 @@ } }, "node_modules/postcss-minify-params": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.3.tgz", - "integrity": "sha512-bkzpWcjykkqIujNL+EVEPOlLYi/eZ050oImVtHU7b4lFS82jPnsCb44gvC6pxaNt38Els3jWYDHTjHKf0koTgg==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.4.tgz", + "integrity": "sha512-+mePA3MgdmVmv6g+30rn57USjOGSAyuxUmkfiWpzalZ8aiBkdPYjXWtHuwJGm1v5Ojy0Z0LaSYhHaLJQB0P8Jw==", "dependencies": { - "browserslist": "^4.16.6", + "browserslist": "^4.21.4", "cssnano-utils": "^3.1.0", "postcss-value-parser": "^4.2.0" }, @@ -12015,11 +12041,11 @@ } }, "node_modules/postcss-normalize-unicode": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.0.tgz", - "integrity": "sha512-J6M3MizAAZ2dOdSjy2caayJLQT8E8K9XjLce8AUQMwOrCvjCHv24aLC/Lps1R1ylOfol5VIDMaM/Lo9NGlk1SQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.1.tgz", + "integrity": "sha512-qnCL5jzkNUmKVhZoENp1mJiGNPcsJCs1aaRmURmeJGES23Z/ajaln+EPTD+rBeNkSryI+2WTdW+lwcVdOikrpA==", "dependencies": { - "browserslist": "^4.16.6", + "browserslist": "^4.21.4", "postcss-value-parser": "^4.2.0" }, "engines": { @@ -12088,11 +12114,11 @@ } }, "node_modules/postcss-reduce-initial": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.0.tgz", - "integrity": "sha512-5OgTUviz0aeH6MtBjHfbr57tml13PuedK/Ecg8szzd4XRMbYxH4572JFG067z+FqBIf6Zp/d+0581glkvvWMFw==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.2.tgz", + "integrity": "sha512-dE/y2XRaqAi6OvjzD22pjTUQ8eOfc6m/natGHgKFBK9DxFmIm69YmaRVQrGgFlEfc1HePIurY0TmDeROK05rIg==", "dependencies": { - "browserslist": "^4.16.6", + "browserslist": "^4.21.4", "caniuse-api": "^3.0.0" }, "engines": { @@ -12129,9 +12155,9 @@ } }, "node_modules/postcss-sort-media-queries": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/postcss-sort-media-queries/-/postcss-sort-media-queries-4.3.0.tgz", - "integrity": "sha512-jAl8gJM2DvuIJiI9sL1CuiHtKM4s5aEIomkU8G3LFvbP+p8i7Sz8VV63uieTgoewGqKbi+hxBTiOKJlB35upCg==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/postcss-sort-media-queries/-/postcss-sort-media-queries-4.4.1.tgz", + "integrity": "sha512-QDESFzDDGKgpiIh4GYXsSy6sek2yAwQx1JASl5AxBtU1Lq2JfKBljIPNdil989NcSKRQX1ToiaKphImtBuhXWw==", "dependencies": { "sort-css-media-queries": "2.1.0" }, @@ -12690,11 +12716,11 @@ } }, "node_modules/react-textarea-autosize": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.3.4.tgz", - "integrity": "sha512-CdtmP8Dc19xL8/R6sWvtknD/eCXkQr30dtvC4VmGInhRsfF8X/ihXCq6+9l9qbxmKRiq407/7z5fxE7cVWQNgQ==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.4.1.tgz", + "integrity": "sha512-aD2C+qK6QypknC+lCMzteOdIjoMbNlgSFmJjCV+DrfTPwp59i/it9mMNf2HDzvRjQgKAyBDPyLJhcrzElf2U4Q==", "dependencies": { - "@babel/runtime": "^7.10.2", + "@babel/runtime": "^7.20.13", "use-composed-ref": "^1.3.0", "use-latest": "^1.2.1" }, @@ -12785,9 +12811,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.13.10", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz", - "integrity": "sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw==" + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "node_modules/regenerator-transform": { "version": "0.15.0", @@ -14160,11 +14186,11 @@ } }, "node_modules/stylehacks": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.0.tgz", - "integrity": "sha512-SzLmvHQTrIWfSgljkQCw2++C9+Ne91d/6Sp92I8c5uHTcy/PgeHamwITIbBW9wnFTY/3ZfSXR9HIL6Ikqmcu6Q==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.1.tgz", + "integrity": "sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==", "dependencies": { - "browserslist": "^4.16.6", + "browserslist": "^4.21.4", "postcss-selector-parser": "^6.0.4" }, "engines": { @@ -14532,7 +14558,8 @@ "node_modules/trim": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", - "integrity": "sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==" + "integrity": "sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==", + "deprecated": "Use String.prototype.trim() instead" }, "node_modules/trim-trailing-lines": { "version": "1.1.4", @@ -14638,9 +14665,9 @@ } }, "node_modules/ua-parser-js": { - "version": "0.7.32", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.32.tgz", - "integrity": "sha512-f9BESNVhzlhEFf2CHMSj40NWOjYPl1YKYbrvIr/hFTDEmLq7SRbWvm7FcdcpCYT95zrOhC7gZSxjdnnTpBcwVw==", + "version": "0.7.35", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.35.tgz", + "integrity": "sha512-veRf7dawaj9xaWEu9HoTVn5Pggtc/qj+kqTOFvNiN1l0YdxwC1kvel57UCjThjGa3BHBihE8/UJAHI+uQHmd/g==", "funding": [ { "type": "opencollective", @@ -15169,6 +15196,14 @@ } } }, + "node_modules/use-sync-external-store": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -15994,95 +16029,95 @@ }, "dependencies": { "@algolia/autocomplete-core": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.7.2.tgz", - "integrity": "sha512-eclwUDC6qfApNnEfu1uWcL/rudQsn59tjEoUYZYE2JSXZrHLRjBUGMxiCoknobU2Pva8ejb0eRxpIYDtVVqdsw==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.7.4.tgz", + "integrity": "sha512-daoLpQ3ps/VTMRZDEBfU8ixXd+amZcNJ4QSP3IERGyzqnL5Ch8uSRFt/4G8pUvW9c3o6GA4vtVv4I4lmnkdXyg==", "requires": { - "@algolia/autocomplete-shared": "1.7.2" + "@algolia/autocomplete-shared": "1.7.4" } }, "@algolia/autocomplete-preset-algolia": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.2.tgz", - "integrity": "sha512-+RYEG6B0QiGGfRb2G3MtPfyrl0dALF3cQNTWBzBX6p5o01vCCGTTinAm2UKG3tfc2CnOMAtnPLkzNZyJUpnVJw==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.4.tgz", + "integrity": "sha512-s37hrvLEIfcmKY8VU9LsAXgm2yfmkdHT3DnA3SgHaY93yjZ2qL57wzb5QweVkYuEBZkT2PIREvRoLXC2sxTbpQ==", "requires": { - "@algolia/autocomplete-shared": "1.7.2" + "@algolia/autocomplete-shared": "1.7.4" } }, "@algolia/autocomplete-shared": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.2.tgz", - "integrity": "sha512-QCckjiC7xXHIUaIL3ektBtjJ0w7tTA3iqKcAE/Hjn1lZ5omp7i3Y4e09rAr9ZybqirL7AbxCLLq0Ra5DDPKeug==" + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.4.tgz", + "integrity": "sha512-2VGCk7I9tA9Ge73Km99+Qg87w0wzW4tgUruvWAn/gfey1ZXgmxZtyIRBebk35R1O8TbK77wujVtCnpsGpRy1kg==" }, "@algolia/cache-browser-local-storage": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.14.2.tgz", - "integrity": "sha512-FRweBkK/ywO+GKYfAWbrepewQsPTIEirhi1BdykX9mxvBPtGNKccYAxvGdDCumU1jL4r3cayio4psfzKMejBlA==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.17.0.tgz", + "integrity": "sha512-myRSRZDIMYB8uCkO+lb40YKiYHi0fjpWRtJpR/dgkaiBlSD0plRyB6lLOh1XIfmMcSeBOqDE7y9m8xZMrXYfyQ==", "requires": { - "@algolia/cache-common": "4.14.2" + "@algolia/cache-common": "4.17.0" } }, "@algolia/cache-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.14.2.tgz", - "integrity": "sha512-SbvAlG9VqNanCErr44q6lEKD2qoK4XtFNx9Qn8FK26ePCI8I9yU7pYB+eM/cZdS9SzQCRJBbHUumVr4bsQ4uxg==" + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.17.0.tgz", + "integrity": "sha512-g8mXzkrcUBIPZaulAuqE7xyHhLAYAcF2xSch7d9dABheybaU3U91LjBX6eJTEB7XVhEsgK4Smi27vWtAJRhIKQ==" }, "@algolia/cache-in-memory": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.14.2.tgz", - "integrity": "sha512-HrOukWoop9XB/VFojPv1R5SVXowgI56T9pmezd/djh2JnVN/vXswhXV51RKy4nCpqxyHt/aGFSq2qkDvj6KiuQ==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.17.0.tgz", + "integrity": "sha512-PT32ciC/xI8z919d0oknWVu3kMfTlhQn3MKxDln3pkn+yA7F7xrxSALysxquv+MhFfNAcrtQ/oVvQVBAQSHtdw==", "requires": { - "@algolia/cache-common": "4.14.2" + "@algolia/cache-common": "4.17.0" } }, "@algolia/client-account": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.14.2.tgz", - "integrity": "sha512-WHtriQqGyibbb/Rx71YY43T0cXqyelEU0lB2QMBRXvD2X0iyeGl4qMxocgEIcbHyK7uqE7hKgjT8aBrHqhgc1w==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.17.0.tgz", + "integrity": "sha512-sSEHx9GA6m7wrlsSMNBGfyzlIfDT2fkz2u7jqfCCd6JEEwmxt8emGmxAU/0qBfbhRSuGvzojoLJlr83BSZAKjA==", "requires": { - "@algolia/client-common": "4.14.2", - "@algolia/client-search": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.17.0", + "@algolia/client-search": "4.17.0", + "@algolia/transporter": "4.17.0" } }, "@algolia/client-analytics": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.14.2.tgz", - "integrity": "sha512-yBvBv2mw+HX5a+aeR0dkvUbFZsiC4FKSnfqk9rrfX+QrlNOKEhCG0tJzjiOggRW4EcNqRmaTULIYvIzQVL2KYQ==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.17.0.tgz", + "integrity": "sha512-84ooP8QA3mQ958hQ9wozk7hFUbAO+81CX1CjAuerxBqjKIInh1fOhXKTaku05O/GHBvcfExpPLIQuSuLYziBXQ==", "requires": { - "@algolia/client-common": "4.14.2", - "@algolia/client-search": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.17.0", + "@algolia/client-search": "4.17.0", + "@algolia/requester-common": "4.17.0", + "@algolia/transporter": "4.17.0" } }, "@algolia/client-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.14.2.tgz", - "integrity": "sha512-43o4fslNLcktgtDMVaT5XwlzsDPzlqvqesRi4MjQz2x4/Sxm7zYg5LRYFol1BIhG6EwxKvSUq8HcC/KxJu3J0Q==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.17.0.tgz", + "integrity": "sha512-jHMks0ZFicf8nRDn6ma8DNNsdwGgP/NKiAAL9z6rS7CymJ7L0+QqTJl3rYxRW7TmBhsUH40wqzmrG6aMIN/DrQ==", "requires": { - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/requester-common": "4.17.0", + "@algolia/transporter": "4.17.0" } }, "@algolia/client-personalization": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.14.2.tgz", - "integrity": "sha512-ACCoLi0cL8CBZ1W/2juehSltrw2iqsQBnfiu/Rbl9W2yE6o2ZUb97+sqN/jBqYNQBS+o0ekTMKNkQjHHAcEXNw==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.17.0.tgz", + "integrity": "sha512-RMzN4dZLIta1YuwT7QC9o+OeGz2cU6eTOlGNE/6RcUBLOU3l9tkCOdln5dPE2jp8GZXPl2yk54b2nSs1+pAjqw==", "requires": { - "@algolia/client-common": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.17.0", + "@algolia/requester-common": "4.17.0", + "@algolia/transporter": "4.17.0" } }, "@algolia/client-search": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.14.2.tgz", - "integrity": "sha512-L5zScdOmcZ6NGiVbLKTvP02UbxZ0njd5Vq9nJAmPFtjffUSOGEp11BmD2oMJ5QvARgx2XbX4KzTTNS5ECYIMWw==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.17.0.tgz", + "integrity": "sha512-x4P2wKrrRIXszT8gb7eWsMHNNHAJs0wE7/uqbufm4tZenAp+hwU/hq5KVsY50v+PfwM0LcDwwn/1DroujsTFoA==", "requires": { - "@algolia/client-common": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/transporter": "4.14.2" + "@algolia/client-common": "4.17.0", + "@algolia/requester-common": "4.17.0", + "@algolia/transporter": "4.17.0" } }, "@algolia/events": { @@ -16091,47 +16126,47 @@ "integrity": "sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==" }, "@algolia/logger-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.14.2.tgz", - "integrity": "sha512-/JGlYvdV++IcMHBnVFsqEisTiOeEr6cUJtpjz8zc0A9c31JrtLm318Njc72p14Pnkw3A/5lHHh+QxpJ6WFTmsA==" + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.17.0.tgz", + "integrity": "sha512-DGuoZqpTmIKJFDeyAJ7M8E/LOenIjWiOsg1XJ1OqAU/eofp49JfqXxbfgctlVZVmDABIyOz8LqEoJ6ZP4DTyvw==" }, "@algolia/logger-console": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.14.2.tgz", - "integrity": "sha512-8S2PlpdshbkwlLCSAB5f8c91xyc84VM9Ar9EdfE9UmX+NrKNYnWR1maXXVDQQoto07G1Ol/tYFnFVhUZq0xV/g==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.17.0.tgz", + "integrity": "sha512-zMPvugQV/gbXUvWBCzihw6m7oxIKp48w37QBIUu/XqQQfxhjoOE9xyfJr1KldUt5FrYOKZJVsJaEjTsu+bIgQg==", "requires": { - "@algolia/logger-common": "4.14.2" + "@algolia/logger-common": "4.17.0" } }, "@algolia/requester-browser-xhr": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.14.2.tgz", - "integrity": "sha512-CEh//xYz/WfxHFh7pcMjQNWgpl4wFB85lUMRyVwaDPibNzQRVcV33YS+63fShFWc2+42YEipFGH2iPzlpszmDw==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.17.0.tgz", + "integrity": "sha512-aSOX/smauyTkP21Pf52pJ1O2LmNFJ5iHRIzEeTh0mwBeADO4GdG94cAWDILFA9rNblq/nK3EDh3+UyHHjplZ1A==", "requires": { - "@algolia/requester-common": "4.14.2" + "@algolia/requester-common": "4.17.0" } }, "@algolia/requester-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.14.2.tgz", - "integrity": "sha512-73YQsBOKa5fvVV3My7iZHu1sUqmjjfs9TteFWwPwDmnad7T0VTCopttcsM3OjLxZFtBnX61Xxl2T2gmG2O4ehg==" + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.17.0.tgz", + "integrity": "sha512-XJjmWFEUlHu0ijvcHBoixuXfEoiRUdyzQM6YwTuB8usJNIgShua8ouFlRWF8iCeag0vZZiUm4S2WCVBPkdxFgg==" }, "@algolia/requester-node-http": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.14.2.tgz", - "integrity": "sha512-oDbb02kd1o5GTEld4pETlPZLY0e+gOSWjWMJHWTgDXbv9rm/o2cF7japO6Vj1ENnrqWvLBmW1OzV9g6FUFhFXg==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.17.0.tgz", + "integrity": "sha512-bpb/wDA1aC6WxxM8v7TsFspB7yBN3nqCGs2H1OADolQR/hiAIjAxusbuMxVbRFOdaUvAIqioIIkWvZdpYNIn8w==", "requires": { - "@algolia/requester-common": "4.14.2" + "@algolia/requester-common": "4.17.0" } }, "@algolia/transporter": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.14.2.tgz", - "integrity": "sha512-t89dfQb2T9MFQHidjHcfhh6iGMNwvuKUvojAj+JsrHAGbuSy7yE4BylhLX6R0Q1xYRoC4Vvv+O5qIw/LdnQfsQ==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.17.0.tgz", + "integrity": "sha512-6xL6H6fe+Fi0AEP3ziSgC+G04RK37iRb4uUUqVAH9WPYFI8g+LYFq6iv5HS8Cbuc5TTut+Bwj6G+dh/asdb9uA==", "requires": { - "@algolia/cache-common": "4.14.2", - "@algolia/logger-common": "4.14.2", - "@algolia/requester-common": "4.14.2" + "@algolia/cache-common": "4.17.0", + "@algolia/logger-common": "4.17.0", + "@algolia/requester-common": "4.17.0" } }, "@ampproject/remapping": { @@ -17288,11 +17323,11 @@ } }, "@babel/runtime": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.4.tgz", - "integrity": "sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz", + "integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==", "requires": { - "regenerator-runtime": "^0.13.4" + "regenerator-runtime": "^0.13.11" } }, "@babel/runtime-corejs3": { @@ -17360,25 +17395,25 @@ "optional": true }, "@docsearch/css": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.3.0.tgz", - "integrity": "sha512-rODCdDtGyudLj+Va8b6w6Y85KE85bXRsps/R4Yjwt5vueXKXZQKYw0aA9knxLBT6a/bI/GMrAcmCR75KYOM6hg==" + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.3.3.tgz", + "integrity": "sha512-6SCwI7P8ao+se1TUsdZ7B4XzL+gqeQZnBc+2EONZlcVa0dVrk0NjETxozFKgMv0eEGH8QzP1fkN+A1rH61l4eg==" }, "@docsearch/react": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.3.0.tgz", - "integrity": "sha512-fhS5adZkae2SSdMYEMVg6pxI5a/cE+tW16ki1V0/ur4Fdok3hBRkmN/H8VvlXnxzggkQIIRIVvYPn00JPjen3A==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.3.3.tgz", + "integrity": "sha512-pLa0cxnl+G0FuIDuYlW+EBK6Rw2jwLw9B1RHIeS4N4s2VhsfJ/wzeCi3CWcs5yVfxLd5ZK50t//TMA5e79YT7Q==", "requires": { - "@algolia/autocomplete-core": "1.7.2", - "@algolia/autocomplete-preset-algolia": "1.7.2", - "@docsearch/css": "3.3.0", + "@algolia/autocomplete-core": "1.7.4", + "@algolia/autocomplete-preset-algolia": "1.7.4", + "@docsearch/css": "3.3.3", "algoliasearch": "^4.0.0" } }, "@docusaurus/core": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-2.1.0.tgz", - "integrity": "sha512-/ZJ6xmm+VB9Izbn0/s6h6289cbPy2k4iYFwWDhjiLsVqwa/Y0YBBcXvStfaHccudUC3OfP+26hMk7UCjc50J6Q==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-2.4.0.tgz", + "integrity": "sha512-J55/WEoIpRcLf3afO5POHPguVZosKmJEQWKBL+K7TAnfuE7i+Y0NPLlkKtnWCehagGsgTqClfQEexH/UT4kELA==", "requires": { "@babel/core": "^7.18.6", "@babel/generator": "^7.18.7", @@ -17390,13 +17425,13 @@ "@babel/runtime": "^7.18.6", "@babel/runtime-corejs3": "^7.18.6", "@babel/traverse": "^7.18.8", - "@docusaurus/cssnano-preset": "2.1.0", - "@docusaurus/logger": "2.1.0", - "@docusaurus/mdx-loader": "2.1.0", + "@docusaurus/cssnano-preset": "2.4.0", + "@docusaurus/logger": "2.4.0", + "@docusaurus/mdx-loader": "2.4.0", "@docusaurus/react-loadable": "5.5.2", - "@docusaurus/utils": "2.1.0", - "@docusaurus/utils-common": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-common": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "@slorber/static-site-generator-webpack-plugin": "^4.0.7", "@svgr/webpack": "^6.2.1", "autoprefixer": "^10.4.7", @@ -17417,7 +17452,7 @@ "del": "^6.1.1", "detect-port": "^1.3.0", "escape-html": "^1.0.3", - "eta": "^1.12.3", + "eta": "^2.0.0", "file-loader": "^6.2.0", "fs-extra": "^10.1.0", "html-minifier-terser": "^6.1.0", @@ -17454,9 +17489,9 @@ } }, "@docusaurus/cssnano-preset": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-2.1.0.tgz", - "integrity": "sha512-pRLewcgGhOies6pzsUROfmPStDRdFw+FgV5sMtLr5+4Luv2rty5+b/eSIMMetqUsmg3A9r9bcxHk9bKAKvx3zQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-2.4.0.tgz", + "integrity": "sha512-RmdiA3IpsLgZGXRzqnmTbGv43W4OD44PCo+6Q/aYjEM2V57vKCVqNzuafE94jv0z/PjHoXUrjr69SaRymBKYYw==", "requires": { "cssnano-preset-advanced": "^5.3.8", "postcss": "^8.4.14", @@ -17465,23 +17500,23 @@ } }, "@docusaurus/logger": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-2.1.0.tgz", - "integrity": "sha512-uuJx2T6hDBg82joFeyobywPjSOIfeq05GfyKGHThVoXuXsu1KAzMDYcjoDxarb9CoHCI/Dor8R2MoL6zII8x1Q==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-2.4.0.tgz", + "integrity": "sha512-T8+qR4APN+MjcC9yL2Es+xPJ2923S9hpzDmMtdsOcUGLqpCGBbU1vp3AAqDwXtVgFkq+NsEk7sHdVsfLWR/AXw==", "requires": { "chalk": "^4.1.2", "tslib": "^2.4.0" } }, "@docusaurus/mdx-loader": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-2.1.0.tgz", - "integrity": "sha512-i97hi7hbQjsD3/8OSFhLy7dbKGH8ryjEzOfyhQIn2CFBYOY3ko0vMVEf3IY9nD3Ld7amYzsZ8153RPkcnXA+Lg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-2.4.0.tgz", + "integrity": "sha512-GWoH4izZKOmFoC+gbI2/y8deH/xKLvzz/T5BsEexBye8EHQlwsA7FMrVa48N063bJBH4FUOiRRXxk5rq9cC36g==", "requires": { "@babel/parser": "^7.18.8", "@babel/traverse": "^7.18.8", - "@docusaurus/logger": "2.1.0", - "@docusaurus/utils": "2.1.0", + "@docusaurus/logger": "2.4.0", + "@docusaurus/utils": "2.4.0", "@mdx-js/mdx": "^1.6.22", "escape-html": "^1.0.3", "file-loader": "^6.2.0", @@ -17498,12 +17533,12 @@ } }, "@docusaurus/module-type-aliases": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-2.1.0.tgz", - "integrity": "sha512-Z8WZaK5cis3xEtyfOT817u9xgGUauT0PuuVo85ysnFRX8n7qLN1lTPCkC+aCmFm/UcV8h/W5T4NtIsst94UntQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-2.4.0.tgz", + "integrity": "sha512-YEQO2D3UXs72qCn8Cr+RlycSQXVGN9iEUyuHwTuK4/uL/HFomB2FHSU0vSDM23oLd+X/KibQ3Ez6nGjQLqXcHg==", "requires": { "@docusaurus/react-loadable": "5.5.2", - "@docusaurus/types": "2.1.0", + "@docusaurus/types": "2.4.0", "@types/history": "^4.7.11", "@types/react": "*", "@types/react-router-config": "*", @@ -17513,17 +17548,17 @@ } }, "@docusaurus/plugin-content-blog": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.1.0.tgz", - "integrity": "sha512-xEp6jlu92HMNUmyRBEeJ4mCW1s77aAEQO4Keez94cUY/Ap7G/r0Awa6xSLff7HL0Fjg8KK1bEbDy7q9voIavdg==", - "requires": { - "@docusaurus/core": "2.1.0", - "@docusaurus/logger": "2.1.0", - "@docusaurus/mdx-loader": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils": "2.1.0", - "@docusaurus/utils-common": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.4.0.tgz", + "integrity": "sha512-YwkAkVUxtxoBAIj/MCb4ohN0SCtHBs4AS75jMhPpf67qf3j+U/4n33cELq7567hwyZ6fMz2GPJcVmctzlGGThQ==", + "requires": { + "@docusaurus/core": "2.4.0", + "@docusaurus/logger": "2.4.0", + "@docusaurus/mdx-loader": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-common": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "cheerio": "^1.0.0-rc.12", "feed": "^4.2.2", "fs-extra": "^10.1.0", @@ -17536,17 +17571,17 @@ } }, "@docusaurus/plugin-content-docs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.1.0.tgz", - "integrity": "sha512-Rup5pqXrXlKGIC4VgwvioIhGWF7E/NNSlxv+JAxRYpik8VKlWsk9ysrdHIlpX+KJUCO9irnY21kQh2814mlp/Q==", - "requires": { - "@docusaurus/core": "2.1.0", - "@docusaurus/logger": "2.1.0", - "@docusaurus/mdx-loader": "2.1.0", - "@docusaurus/module-type-aliases": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.4.0.tgz", + "integrity": "sha512-ic/Z/ZN5Rk/RQo+Io6rUGpToOtNbtPloMR2JcGwC1xT2riMu6zzfSwmBi9tHJgdXH6CB5jG+0dOZZO8QS5tmDg==", + "requires": { + "@docusaurus/core": "2.4.0", + "@docusaurus/logger": "2.4.0", + "@docusaurus/mdx-loader": "2.4.0", + "@docusaurus/module-type-aliases": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "@types/react-router-config": "^5.0.6", "combine-promises": "^1.1.0", "fs-extra": "^10.1.0", @@ -17559,88 +17594,100 @@ } }, "@docusaurus/plugin-content-pages": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.1.0.tgz", - "integrity": "sha512-SwZdDZRlObHNKXTnFo7W2aF6U5ZqNVI55Nw2GCBryL7oKQSLeI0lsrMlMXdzn+fS7OuBTd3MJBO1T4Zpz0i/+g==", - "requires": { - "@docusaurus/core": "2.1.0", - "@docusaurus/mdx-loader": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.4.0.tgz", + "integrity": "sha512-Pk2pOeOxk8MeU3mrTU0XLIgP9NZixbdcJmJ7RUFrZp1Aj42nd0RhIT14BGvXXyqb8yTQlk4DmYGAzqOfBsFyGw==", + "requires": { + "@docusaurus/core": "2.4.0", + "@docusaurus/mdx-loader": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "fs-extra": "^10.1.0", "tslib": "^2.4.0", "webpack": "^5.73.0" } }, "@docusaurus/plugin-debug": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-2.1.0.tgz", - "integrity": "sha512-8wsDq3OIfiy6440KLlp/qT5uk+WRHQXIXklNHEeZcar+Of0TZxCNe2FBpv+bzb/0qcdP45ia5i5WmR5OjN6DPw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-2.4.0.tgz", + "integrity": "sha512-KC56DdYjYT7Txyux71vXHXGYZuP6yYtqwClvYpjKreWIHWus5Zt6VNi23rMZv3/QKhOCrN64zplUbdfQMvddBQ==", "requires": { - "@docusaurus/core": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils": "2.1.0", + "@docusaurus/core": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils": "2.4.0", "fs-extra": "^10.1.0", "react-json-view": "^1.21.3", "tslib": "^2.4.0" } }, "@docusaurus/plugin-google-analytics": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.1.0.tgz", - "integrity": "sha512-4cgeqIly/wcFVbbWP03y1QJJBgH8W+Bv6AVbWnsXNOZa1yB3AO6hf3ZdeQH9x20v9T2pREogVgAH0rSoVnNsgg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.4.0.tgz", + "integrity": "sha512-uGUzX67DOAIglygdNrmMOvEp8qG03X20jMWadeqVQktS6nADvozpSLGx4J0xbkblhJkUzN21WiilsP9iVP+zkw==", "requires": { - "@docusaurus/core": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "@docusaurus/core": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "tslib": "^2.4.0" } }, "@docusaurus/plugin-google-gtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.1.0.tgz", - "integrity": "sha512-/3aDlv2dMoCeiX2e+DTGvvrdTA+v3cKQV3DbmfsF4ENhvc5nKV23nth04Z3Vq0Ci1ui6Sn80TkhGk/tiCMW2AA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.4.0.tgz", + "integrity": "sha512-adj/70DANaQs2+TF/nRdMezDXFAV/O/pjAbUgmKBlyOTq5qoMe0Tk4muvQIwWUmiUQxFJe+sKlZGM771ownyOg==", "requires": { - "@docusaurus/core": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "@docusaurus/core": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", + "tslib": "^2.4.0" + } + }, + "@docusaurus/plugin-google-tag-manager": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-2.4.0.tgz", + "integrity": "sha512-E66uGcYs4l7yitmp/8kMEVQftFPwV9iC62ORh47Veqzs6ExwnhzBkJmwDnwIysHBF1vlxnzET0Fl2LfL5fRR3A==", + "requires": { + "@docusaurus/core": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "tslib": "^2.4.0" } }, "@docusaurus/plugin-sitemap": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.1.0.tgz", - "integrity": "sha512-2Y6Br8drlrZ/jN9MwMBl0aoi9GAjpfyfMBYpaQZXimbK+e9VjYnujXlvQ4SxtM60ASDgtHIAzfVFBkSR/MwRUw==", - "requires": { - "@docusaurus/core": "2.1.0", - "@docusaurus/logger": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils": "2.1.0", - "@docusaurus/utils-common": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.4.0.tgz", + "integrity": "sha512-pZxh+ygfnI657sN8a/FkYVIAmVv0CGk71QMKqJBOfMmDHNN1FeDeFkBjWP49ejBqpqAhjufkv5UWq3UOu2soCw==", + "requires": { + "@docusaurus/core": "2.4.0", + "@docusaurus/logger": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-common": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "fs-extra": "^10.1.0", "sitemap": "^7.1.1", "tslib": "^2.4.0" } }, "@docusaurus/preset-classic": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-2.1.0.tgz", - "integrity": "sha512-NQMnaq974K4BcSMXFSJBQ5itniw6RSyW+VT+6i90kGZzTwiuKZmsp0r9lC6BYAvvVMQUNJQwrETmlu7y2XKW7w==", - "requires": { - "@docusaurus/core": "2.1.0", - "@docusaurus/plugin-content-blog": "2.1.0", - "@docusaurus/plugin-content-docs": "2.1.0", - "@docusaurus/plugin-content-pages": "2.1.0", - "@docusaurus/plugin-debug": "2.1.0", - "@docusaurus/plugin-google-analytics": "2.1.0", - "@docusaurus/plugin-google-gtag": "2.1.0", - "@docusaurus/plugin-sitemap": "2.1.0", - "@docusaurus/theme-classic": "2.1.0", - "@docusaurus/theme-common": "2.1.0", - "@docusaurus/theme-search-algolia": "2.1.0", - "@docusaurus/types": "2.1.0" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-2.4.0.tgz", + "integrity": "sha512-/5z5o/9bc6+P5ool2y01PbJhoGddEGsC0ej1MF6mCoazk8A+kW4feoUd68l7Bnv01rCnG3xy7kHUQP97Y0grUA==", + "requires": { + "@docusaurus/core": "2.4.0", + "@docusaurus/plugin-content-blog": "2.4.0", + "@docusaurus/plugin-content-docs": "2.4.0", + "@docusaurus/plugin-content-pages": "2.4.0", + "@docusaurus/plugin-debug": "2.4.0", + "@docusaurus/plugin-google-analytics": "2.4.0", + "@docusaurus/plugin-google-gtag": "2.4.0", + "@docusaurus/plugin-google-tag-manager": "2.4.0", + "@docusaurus/plugin-sitemap": "2.4.0", + "@docusaurus/theme-classic": "2.4.0", + "@docusaurus/theme-common": "2.4.0", + "@docusaurus/theme-search-algolia": "2.4.0", + "@docusaurus/types": "2.4.0" } }, "@docusaurus/react-loadable": { @@ -17653,26 +17700,26 @@ } }, "@docusaurus/theme-classic": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-2.1.0.tgz", - "integrity": "sha512-xn8ZfNMsf7gaSy9+ClFnUu71o7oKgMo5noYSS1hy3svNifRTkrBp6+MReLDsmIaj3mLf2e7+JCBYKBFbaGzQng==", - "requires": { - "@docusaurus/core": "2.1.0", - "@docusaurus/mdx-loader": "2.1.0", - "@docusaurus/module-type-aliases": "2.1.0", - "@docusaurus/plugin-content-blog": "2.1.0", - "@docusaurus/plugin-content-docs": "2.1.0", - "@docusaurus/plugin-content-pages": "2.1.0", - "@docusaurus/theme-common": "2.1.0", - "@docusaurus/theme-translations": "2.1.0", - "@docusaurus/types": "2.1.0", - "@docusaurus/utils": "2.1.0", - "@docusaurus/utils-common": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-2.4.0.tgz", + "integrity": "sha512-GMDX5WU6Z0OC65eQFgl3iNNEbI9IMJz9f6KnOyuMxNUR6q0qVLsKCNopFUDfFNJ55UU50o7P7o21yVhkwpfJ9w==", + "requires": { + "@docusaurus/core": "2.4.0", + "@docusaurus/mdx-loader": "2.4.0", + "@docusaurus/module-type-aliases": "2.4.0", + "@docusaurus/plugin-content-blog": "2.4.0", + "@docusaurus/plugin-content-docs": "2.4.0", + "@docusaurus/plugin-content-pages": "2.4.0", + "@docusaurus/theme-common": "2.4.0", + "@docusaurus/theme-translations": "2.4.0", + "@docusaurus/types": "2.4.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-common": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "@mdx-js/react": "^1.6.22", "clsx": "^1.2.1", "copy-text-to-clipboard": "^3.0.1", - "infima": "0.2.0-alpha.42", + "infima": "0.2.0-alpha.43", "lodash": "^4.17.21", "nprogress": "^0.2.0", "postcss": "^8.4.14", @@ -17685,16 +17732,17 @@ } }, "@docusaurus/theme-common": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-2.1.0.tgz", - "integrity": "sha512-vT1otpVPbKux90YpZUnvknsn5zvpLf+AW1W0EDcpE9up4cDrPqfsh0QoxGHFJnobE2/qftsBFC19BneN4BH8Ag==", - "requires": { - "@docusaurus/mdx-loader": "2.1.0", - "@docusaurus/module-type-aliases": "2.1.0", - "@docusaurus/plugin-content-blog": "2.1.0", - "@docusaurus/plugin-content-docs": "2.1.0", - "@docusaurus/plugin-content-pages": "2.1.0", - "@docusaurus/utils": "2.1.0", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-2.4.0.tgz", + "integrity": "sha512-IkG/l5f/FLY6cBIxtPmFnxpuPzc5TupuqlOx+XDN+035MdQcAh8wHXXZJAkTeYDeZ3anIUSUIvWa7/nRKoQEfg==", + "requires": { + "@docusaurus/mdx-loader": "2.4.0", + "@docusaurus/module-type-aliases": "2.4.0", + "@docusaurus/plugin-content-blog": "2.4.0", + "@docusaurus/plugin-content-docs": "2.4.0", + "@docusaurus/plugin-content-pages": "2.4.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-common": "2.4.0", "@types/history": "^4.7.11", "@types/react": "*", "@types/react-router-config": "*", @@ -17702,26 +17750,27 @@ "parse-numeric-range": "^1.3.0", "prism-react-renderer": "^1.3.5", "tslib": "^2.4.0", + "use-sync-external-store": "^1.2.0", "utility-types": "^3.10.0" } }, "@docusaurus/theme-search-algolia": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.1.0.tgz", - "integrity": "sha512-rNBvi35VvENhucslEeVPOtbAzBdZY/9j55gdsweGV5bYoAXy4mHB6zTGjealcB4pJ6lJY4a5g75fXXMOlUqPfg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.4.0.tgz", + "integrity": "sha512-pPCJSCL1Qt4pu/Z0uxBAuke0yEBbxh0s4fOvimna7TEcBLPq0x06/K78AaABXrTVQM6S0vdocFl9EoNgU17hqA==", "requires": { "@docsearch/react": "^3.1.1", - "@docusaurus/core": "2.1.0", - "@docusaurus/logger": "2.1.0", - "@docusaurus/plugin-content-docs": "2.1.0", - "@docusaurus/theme-common": "2.1.0", - "@docusaurus/theme-translations": "2.1.0", - "@docusaurus/utils": "2.1.0", - "@docusaurus/utils-validation": "2.1.0", + "@docusaurus/core": "2.4.0", + "@docusaurus/logger": "2.4.0", + "@docusaurus/plugin-content-docs": "2.4.0", + "@docusaurus/theme-common": "2.4.0", + "@docusaurus/theme-translations": "2.4.0", + "@docusaurus/utils": "2.4.0", + "@docusaurus/utils-validation": "2.4.0", "algoliasearch": "^4.13.1", "algoliasearch-helper": "^3.10.0", "clsx": "^1.2.1", - "eta": "^1.12.3", + "eta": "^2.0.0", "fs-extra": "^10.1.0", "lodash": "^4.17.21", "tslib": "^2.4.0", @@ -17729,18 +17778,18 @@ } }, "@docusaurus/theme-translations": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-2.1.0.tgz", - "integrity": "sha512-07n2akf2nqWvtJeMy3A+7oSGMuu5F673AovXVwY0aGAux1afzGCiqIFlYW3EP0CujvDJAEFSQi/Tetfh+95JNg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-2.4.0.tgz", + "integrity": "sha512-kEoITnPXzDPUMBHk3+fzEzbopxLD3fR5sDoayNH0vXkpUukA88/aDL1bqkhxWZHA3LOfJ3f0vJbOwmnXW5v85Q==", "requires": { "fs-extra": "^10.1.0", "tslib": "^2.4.0" } }, "@docusaurus/types": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.1.0.tgz", - "integrity": "sha512-BS1ebpJZnGG6esKqsjtEC9U9qSaPylPwlO7cQ1GaIE7J/kMZI3FITnNn0otXXu7c7ZTqhb6+8dOrG6fZn6fqzQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.4.0.tgz", + "integrity": "sha512-xaBXr+KIPDkIaef06c+i2HeTqVNixB7yFut5fBXPGI2f1rrmEV2vLMznNGsFwvZ5XmA3Quuefd4OGRkdo97Dhw==", "requires": { "@types/history": "^4.7.11", "@types/react": "*", @@ -17753,12 +17802,13 @@ } }, "@docusaurus/utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-2.1.0.tgz", - "integrity": "sha512-fPvrfmAuC54n8MjZuG4IysaMdmvN5A/qr7iFLbSGSyDrsbP4fnui6KdZZIa/YOLIPLec8vjZ8RIITJqF18mx4A==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-2.4.0.tgz", + "integrity": "sha512-89hLYkvtRX92j+C+ERYTuSUK6nF9bGM32QThcHPg2EDDHVw6FzYQXmX6/p+pU5SDyyx5nBlE4qXR92RxCAOqfg==", "requires": { - "@docusaurus/logger": "2.1.0", + "@docusaurus/logger": "2.4.0", "@svgr/webpack": "^6.2.1", + "escape-string-regexp": "^4.0.0", "file-loader": "^6.2.0", "fs-extra": "^10.1.0", "github-slugger": "^1.4.0", @@ -17775,20 +17825,20 @@ } }, "@docusaurus/utils-common": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-2.1.0.tgz", - "integrity": "sha512-F2vgmt4yRFgRQR2vyEFGTWeyAdmgKbtmu3sjHObF0tjjx/pN0Iw/c6eCopaH34E6tc9nO0nvp01pwW+/86d1fg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-2.4.0.tgz", + "integrity": "sha512-zIMf10xuKxddYfLg5cS19x44zud/E9I7lj3+0bv8UIs0aahpErfNrGhijEfJpAfikhQ8tL3m35nH3hJ3sOG82A==", "requires": { "tslib": "^2.4.0" } }, "@docusaurus/utils-validation": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-2.1.0.tgz", - "integrity": "sha512-AMJzWYKL3b7FLltKtDXNLO9Y649V2BXvrnRdnW2AA+PpBnYV78zKLSCz135cuWwRj1ajNtP4onbXdlnyvCijGQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-2.4.0.tgz", + "integrity": "sha512-IrBsBbbAp6y7mZdJx4S4pIA7dUyWSA0GNosPk6ZJ0fX3uYIEQgcQSGIgTeSC+8xPEx3c16o03en1jSDpgQgz/w==", "requires": { - "@docusaurus/logger": "2.1.0", - "@docusaurus/utils": "2.1.0", + "@docusaurus/logger": "2.4.0", + "@docusaurus/utils": "2.4.0", "joi": "^17.6.0", "js-yaml": "^4.1.0", "tslib": "^2.4.0" @@ -18327,9 +18377,9 @@ "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==" }, "@tsconfig/docusaurus": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@tsconfig/docusaurus/-/docusaurus-1.0.6.tgz", - "integrity": "sha512-1QxDaP54hpzM6bq9E+yFEo4F9WbWHhsDe4vktZXF/iDlc9FqGr9qlg+3X/nuKQXx8QxHV7ue8NXFazzajsxFBA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@tsconfig/docusaurus/-/docusaurus-1.0.7.tgz", + "integrity": "sha512-ffTXxGIP/IRMCjuzHd6M4/HdIrw1bMfC7Bv8hMkTadnePkpe0lG0oDSdbRpSDZb2rQMAgpbWiR10BvxvNYwYrg==", "dev": true }, "@types/acorn": { @@ -18573,9 +18623,9 @@ "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==" }, "@types/react": { - "version": "17.0.51", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.51.tgz", - "integrity": "sha512-YMddzAE+nSH04BiTJ5GydTxk0/3hckqyuOclg0s6zQYj/XzfRVNzHZAFwZb5SCSavkzTYUtcq/gwjLnvt2Y4cg==", + "version": "17.0.58", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.58.tgz", + "integrity": "sha512-c1GzVY97P0fGxwGxhYq989j4XwlcHQoto6wQISOC2v6wm3h0PORRWJFHlkRjfGsiG3y1609WdQ+J+tKxvrEd6A==", "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -18583,9 +18633,9 @@ } }, "@types/react-helmet": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/@types/react-helmet/-/react-helmet-6.1.5.tgz", - "integrity": "sha512-/ICuy7OHZxR0YCAZLNg9r7I9aijWUWvxaPR6uTuyxe8tAj5RL4Sw1+R6NhXUtOsarkGYPmaHdBDvuXh2DIN/uA==", + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/@types/react-helmet/-/react-helmet-6.1.6.tgz", + "integrity": "sha512-ZKcoOdW/Tg+kiUbkFCBtvDw0k3nD4HJ/h/B9yWxN4uDO8OkRksWTO+EL+z/Qu3aHTeTll3Ro0Cc/8UhwBCMG5A==", "dev": true, "requires": { "@types/react": "*" @@ -18935,30 +18985,30 @@ "requires": {} }, "algoliasearch": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.14.2.tgz", - "integrity": "sha512-ngbEQonGEmf8dyEh5f+uOIihv4176dgbuOZspiuhmTTBRBuzWu3KCGHre6uHj5YyuC7pNvQGzB6ZNJyZi0z+Sg==", - "requires": { - "@algolia/cache-browser-local-storage": "4.14.2", - "@algolia/cache-common": "4.14.2", - "@algolia/cache-in-memory": "4.14.2", - "@algolia/client-account": "4.14.2", - "@algolia/client-analytics": "4.14.2", - "@algolia/client-common": "4.14.2", - "@algolia/client-personalization": "4.14.2", - "@algolia/client-search": "4.14.2", - "@algolia/logger-common": "4.14.2", - "@algolia/logger-console": "4.14.2", - "@algolia/requester-browser-xhr": "4.14.2", - "@algolia/requester-common": "4.14.2", - "@algolia/requester-node-http": "4.14.2", - "@algolia/transporter": "4.14.2" + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.17.0.tgz", + "integrity": "sha512-JMRh2Mw6sEnVMiz6+APsi7lx9a2jiDFF+WUtANaUVCv6uSU9UOLdo5h9K3pdP6frRRybaM2fX8b1u0nqICS9aA==", + "requires": { + "@algolia/cache-browser-local-storage": "4.17.0", + "@algolia/cache-common": "4.17.0", + "@algolia/cache-in-memory": "4.17.0", + "@algolia/client-account": "4.17.0", + "@algolia/client-analytics": "4.17.0", + "@algolia/client-common": "4.17.0", + "@algolia/client-personalization": "4.17.0", + "@algolia/client-search": "4.17.0", + "@algolia/logger-common": "4.17.0", + "@algolia/logger-console": "4.17.0", + "@algolia/requester-browser-xhr": "4.17.0", + "@algolia/requester-common": "4.17.0", + "@algolia/requester-node-http": "4.17.0", + "@algolia/transporter": "4.17.0" } }, "algoliasearch-helper": { - "version": "3.11.1", - "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.11.1.tgz", - "integrity": "sha512-mvsPN3eK4E0bZG0/WlWJjeqe/bUD2KOEVOl0GyL/TGXn6wcpZU8NOuztGHCUKXkyg5gq6YzUakVTmnmSSO5Yiw==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.12.0.tgz", + "integrity": "sha512-/j1U3PEwdan0n6P/QqSnSpNSLC5+cEMvyljd5CnmNmUjDlGrys+vFEOwjVEnqELIiAGMHEA/Nl3CiKVFBUYqyQ==", "requires": { "@algolia/events": "^4.0.1" } @@ -19090,12 +19140,12 @@ "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==" }, "autoprefixer": { - "version": "10.4.12", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.12.tgz", - "integrity": "sha512-WrCGV9/b97Pa+jtwf5UGaRjgQIg7OK3D06GnoYoZNcG1Xb8Gt3EfuKjlhh9i/VtT16g6PYjZ69jdJ2g8FxSC4Q==", + "version": "10.4.14", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", + "integrity": "sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==", "requires": { - "browserslist": "^4.21.4", - "caniuse-lite": "^1.0.30001407", + "browserslist": "^4.21.5", + "caniuse-lite": "^1.0.30001464", "fraction.js": "^4.2.0", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", @@ -19312,14 +19362,14 @@ } }, "browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.21.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", "requires": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" } }, "buffer-from": { @@ -19417,9 +19467,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001425", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001425.tgz", - "integrity": "sha512-/pzFv0OmNG6W0ym80P3NtapU0QEiDS3VuYAZMGoLLqiC7f6FJFe1MjpQDREGApeenD9wloeytmVDj+JLXPC6qw==" + "version": "1.0.30001481", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001481.tgz", + "integrity": "sha512-KCqHwRnaa1InZBtqXzP98LPg0ajCVujMKjqKDhZEthIpAsJl/YEIa3YvXjGXPVqzZVguccuu7ga9KOE1J9rKPQ==" }, "ccount": { "version": "1.1.0", @@ -19744,9 +19794,9 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "copy-text-to-clipboard": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-3.0.1.tgz", - "integrity": "sha512-rvVsHrpFcL4F2P8ihsoLdFHmd404+CMg71S756oRSeQgqk51U3kicGdnvfkrxva0xXH92SjGS62B0XIJsbh+9Q==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-3.1.0.tgz", + "integrity": "sha512-PFM6BnjLnOON/lB3ta/Jg7Ywsv+l9kQGD4TWDCSlRBGmqnnTM5MrDkhAFgw+8HZt0wW6Q2BBE4cmy9sq+s9Qng==" }, "copy-to-clipboard": { "version": "3.3.2", @@ -20002,12 +20052,12 @@ } }, "cssnano-preset-advanced": { - "version": "5.3.8", - "resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-5.3.8.tgz", - "integrity": "sha512-xUlLLnEB1LjpEik+zgRNlk8Y/koBPPtONZjp7JKbXigeAmCrFvq9H0pXW5jJV45bQWAlmJ0sKy+IMr0XxLYQZg==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-5.3.10.tgz", + "integrity": "sha512-fnYJyCS9jgMU+cmHO1rPSPf9axbQyD7iUhLO5Df6O4G+fKIOMps+ZbU0PdGFejFBBZ3Pftf18fn1eG7MAPUSWQ==", "requires": { - "autoprefixer": "^10.3.7", - "cssnano-preset-default": "^5.2.12", + "autoprefixer": "^10.4.12", + "cssnano-preset-default": "^5.2.14", "postcss-discard-unused": "^5.1.0", "postcss-merge-idents": "^5.1.1", "postcss-reduce-idents": "^5.2.0", @@ -20015,24 +20065,24 @@ } }, "cssnano-preset-default": { - "version": "5.2.12", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.12.tgz", - "integrity": "sha512-OyCBTZi+PXgylz9HAA5kHyoYhfGcYdwFmyaJzWnzxuGRtnMw/kR6ilW9XzlzlRAtB6PLT/r+prYgkef7hngFew==", + "version": "5.2.14", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.14.tgz", + "integrity": "sha512-t0SFesj/ZV2OTylqQVOrFgEh5uanxbO6ZAdeCrNsUQ6fVuXwYTxJPNAGvGTxHbD68ldIJNec7PyYZDBrfDQ+6A==", "requires": { - "css-declaration-sorter": "^6.3.0", + "css-declaration-sorter": "^6.3.1", "cssnano-utils": "^3.1.0", "postcss-calc": "^8.2.3", - "postcss-colormin": "^5.3.0", - "postcss-convert-values": "^5.1.2", + "postcss-colormin": "^5.3.1", + "postcss-convert-values": "^5.1.3", "postcss-discard-comments": "^5.1.2", "postcss-discard-duplicates": "^5.1.0", "postcss-discard-empty": "^5.1.1", "postcss-discard-overridden": "^5.1.0", - "postcss-merge-longhand": "^5.1.6", - "postcss-merge-rules": "^5.1.2", + "postcss-merge-longhand": "^5.1.7", + "postcss-merge-rules": "^5.1.4", "postcss-minify-font-values": "^5.1.0", "postcss-minify-gradients": "^5.1.1", - "postcss-minify-params": "^5.1.3", + "postcss-minify-params": "^5.1.4", "postcss-minify-selectors": "^5.2.1", "postcss-normalize-charset": "^5.1.0", "postcss-normalize-display-values": "^5.1.0", @@ -20040,11 +20090,11 @@ "postcss-normalize-repeat-style": "^5.1.1", "postcss-normalize-string": "^5.1.0", "postcss-normalize-timing-functions": "^5.1.0", - "postcss-normalize-unicode": "^5.1.0", + "postcss-normalize-unicode": "^5.1.1", "postcss-normalize-url": "^5.1.0", "postcss-normalize-whitespace": "^5.1.1", "postcss-ordered-values": "^5.1.3", - "postcss-reduce-initial": "^5.1.0", + "postcss-reduce-initial": "^5.1.2", "postcss-reduce-transforms": "^5.1.0", "postcss-svgo": "^5.1.0", "postcss-unique-selectors": "^5.1.1" @@ -21043,9 +21093,9 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" }, "eta": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/eta/-/eta-1.12.3.tgz", - "integrity": "sha512-qHixwbDLtekO/d51Yr4glcaUJCIjGVJyTzuqV4GPlgZo1YpgOKG+avQynErZIYrfM6JIJdtiG2Kox8tbb+DoGg==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/eta/-/eta-2.0.1.tgz", + "integrity": "sha512-46E2qDPDm7QA+usjffUWz9KfXsxVZclPOuKsXs4ZWZdI/X1wpDF7AO424pt7fdYohCzWsIkXAhNGXSlwo5naAg==" }, "etag": { "version": "1.8.1", @@ -21405,9 +21455,9 @@ "devOptional": true }, "flux": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/flux/-/flux-4.0.3.tgz", - "integrity": "sha512-yKAbrp7JhZhj6uiT1FTuVMlIAT1J4jqEyBpFApi1kxpGZCvacMVc/t1pMQyotqHhAgvoE3bNvAykhCo2CLjnYw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/flux/-/flux-4.0.4.tgz", + "integrity": "sha512-NCj3XlayA2UsapRpM7va6wU1+9rE5FIL7qoMcmxWHRzbp0yujihMBm9BBHZ1MDIk5h5o2Bl6eGiCe8rYELAmYw==", "requires": { "fbemitter": "^3.0.0", "fbjs": "^3.0.1" @@ -22059,14 +22109,14 @@ } }, "htmlparser2": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", - "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", "requires": { "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", + "domhandler": "^5.0.3", "domutils": "^3.0.1", - "entities": "^4.3.0" + "entities": "^4.4.0" } }, "http-cache-semantics": { @@ -22187,9 +22237,9 @@ "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" }, "infima": { - "version": "0.2.0-alpha.42", - "resolved": "https://registry.npmjs.org/infima/-/infima-0.2.0-alpha.42.tgz", - "integrity": "sha512-ift8OXNbQQwtbIt6z16KnSWP7uJ/SysSMFI4F87MNRTicypfl4Pv3E2OGVv6N3nSZFJvA8imYulCBS64iyHYww==" + "version": "0.2.0-alpha.43", + "resolved": "https://registry.npmjs.org/infima/-/infima-0.2.0-alpha.43.tgz", + "integrity": "sha512-2uw57LvUqW0rK/SWYnd/2rRfxNA5DDNOh33jxF7fy46VWoNhGxiUQyVZHbBMjQ33mQem0cjdDVwgWVAmlRfgyQ==" }, "inflight": { "version": "1.0.6", @@ -23858,9 +23908,9 @@ "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==" }, "node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", + "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==" }, "normalize-path": { "version": "3.0.0", @@ -24161,9 +24211,9 @@ "integrity": "sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ==" }, "parse5": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.1.tgz", - "integrity": "sha512-kwpuwzB+px5WUg9pyK0IcK/shltJN5/OVhQagxhCQNtT9Y9QRZqNY2e1cmbu/paRh5LMnz/oVTVLBpjFmMZhSg==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", "requires": { "entities": "^4.4.0" } @@ -24350,22 +24400,22 @@ } }, "postcss-colormin": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.0.tgz", - "integrity": "sha512-WdDO4gOFG2Z8n4P8TWBpshnL3JpmNmJwdnfP2gbk2qBA8PWwOYcmjmI/t3CmMeL72a7Hkd+x/Mg9O2/0rD54Pg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.1.tgz", + "integrity": "sha512-UsWQG0AqTFQmpBegeLLc1+c3jIqBNB0zlDGRWR+dQ3pRKJL1oeMzyqmH3o2PIfn9MBdNrVPWhDbT769LxCTLJQ==", "requires": { - "browserslist": "^4.16.6", + "browserslist": "^4.21.4", "caniuse-api": "^3.0.0", "colord": "^2.9.1", "postcss-value-parser": "^4.2.0" } }, "postcss-convert-values": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.2.tgz", - "integrity": "sha512-c6Hzc4GAv95B7suy4udszX9Zy4ETyMCgFPUDtWjdFTKH1SE9eFY/jEpHSwTH1QPuwxHpWslhckUQWbNRM4ho5g==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.3.tgz", + "integrity": "sha512-82pC1xkJZtcJEfiLw6UXnXVXScgtBrjlO5CBmuDQc+dlb88ZYheFsjTn40+zBVi3DkfF7iezO0nJUPLcJK3pvA==", "requires": { - "browserslist": "^4.20.3", + "browserslist": "^4.21.4", "postcss-value-parser": "^4.2.0" } }, @@ -24421,20 +24471,20 @@ } }, "postcss-merge-longhand": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.6.tgz", - "integrity": "sha512-6C/UGF/3T5OE2CEbOuX7iNO63dnvqhGZeUnKkDeifebY0XqkkvrctYSZurpNE902LDf2yKwwPFgotnfSoPhQiw==", + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.7.tgz", + "integrity": "sha512-YCI9gZB+PLNskrK0BB3/2OzPnGhPkBEwmwhfYk1ilBHYVAZB7/tkTHFBAnCrvBBOmeYyMYw3DMjT55SyxMBzjQ==", "requires": { "postcss-value-parser": "^4.2.0", - "stylehacks": "^5.1.0" + "stylehacks": "^5.1.1" } }, "postcss-merge-rules": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.2.tgz", - "integrity": "sha512-zKMUlnw+zYCWoPN6yhPjtcEdlJaMUZ0WyVcxTAmw3lkkN/NDMRkOkiuctQEoWAOvH7twaxUUdvBWl0d4+hifRQ==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.4.tgz", + "integrity": "sha512-0R2IuYpgU93y9lhVbO/OylTtKMVcHb67zjWIfCiKR9rWL3GUk1677LAqD/BcHizukdZEjT8Ru3oHRoAYoJy44g==", "requires": { - "browserslist": "^4.16.6", + "browserslist": "^4.21.4", "caniuse-api": "^3.0.0", "cssnano-utils": "^3.1.0", "postcss-selector-parser": "^6.0.5" @@ -24459,11 +24509,11 @@ } }, "postcss-minify-params": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.3.tgz", - "integrity": "sha512-bkzpWcjykkqIujNL+EVEPOlLYi/eZ050oImVtHU7b4lFS82jPnsCb44gvC6pxaNt38Els3jWYDHTjHKf0koTgg==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.4.tgz", + "integrity": "sha512-+mePA3MgdmVmv6g+30rn57USjOGSAyuxUmkfiWpzalZ8aiBkdPYjXWtHuwJGm1v5Ojy0Z0LaSYhHaLJQB0P8Jw==", "requires": { - "browserslist": "^4.16.6", + "browserslist": "^4.21.4", "cssnano-utils": "^3.1.0", "postcss-value-parser": "^4.2.0" } @@ -24555,11 +24605,11 @@ } }, "postcss-normalize-unicode": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.0.tgz", - "integrity": "sha512-J6M3MizAAZ2dOdSjy2caayJLQT8E8K9XjLce8AUQMwOrCvjCHv24aLC/Lps1R1ylOfol5VIDMaM/Lo9NGlk1SQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.1.tgz", + "integrity": "sha512-qnCL5jzkNUmKVhZoENp1mJiGNPcsJCs1aaRmURmeJGES23Z/ajaln+EPTD+rBeNkSryI+2WTdW+lwcVdOikrpA==", "requires": { - "browserslist": "^4.16.6", + "browserslist": "^4.21.4", "postcss-value-parser": "^4.2.0" } }, @@ -24598,11 +24648,11 @@ } }, "postcss-reduce-initial": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.0.tgz", - "integrity": "sha512-5OgTUviz0aeH6MtBjHfbr57tml13PuedK/Ecg8szzd4XRMbYxH4572JFG067z+FqBIf6Zp/d+0581glkvvWMFw==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.2.tgz", + "integrity": "sha512-dE/y2XRaqAi6OvjzD22pjTUQ8eOfc6m/natGHgKFBK9DxFmIm69YmaRVQrGgFlEfc1HePIurY0TmDeROK05rIg==", "requires": { - "browserslist": "^4.16.6", + "browserslist": "^4.21.4", "caniuse-api": "^3.0.0" } }, @@ -24624,9 +24674,9 @@ } }, "postcss-sort-media-queries": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/postcss-sort-media-queries/-/postcss-sort-media-queries-4.3.0.tgz", - "integrity": "sha512-jAl8gJM2DvuIJiI9sL1CuiHtKM4s5aEIomkU8G3LFvbP+p8i7Sz8VV63uieTgoewGqKbi+hxBTiOKJlB35upCg==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/postcss-sort-media-queries/-/postcss-sort-media-queries-4.4.1.tgz", + "integrity": "sha512-QDESFzDDGKgpiIh4GYXsSy6sek2yAwQx1JASl5AxBtU1Lq2JfKBljIPNdil989NcSKRQX1ToiaKphImtBuhXWw==", "requires": { "sort-css-media-queries": "2.1.0" } @@ -25047,11 +25097,11 @@ } }, "react-textarea-autosize": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.3.4.tgz", - "integrity": "sha512-CdtmP8Dc19xL8/R6sWvtknD/eCXkQr30dtvC4VmGInhRsfF8X/ihXCq6+9l9qbxmKRiq407/7z5fxE7cVWQNgQ==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.4.1.tgz", + "integrity": "sha512-aD2C+qK6QypknC+lCMzteOdIjoMbNlgSFmJjCV+DrfTPwp59i/it9mMNf2HDzvRjQgKAyBDPyLJhcrzElf2U4Q==", "requires": { - "@babel/runtime": "^7.10.2", + "@babel/runtime": "^7.20.13", "use-composed-ref": "^1.3.0", "use-latest": "^1.2.1" } @@ -25117,9 +25167,9 @@ } }, "regenerator-runtime": { - "version": "0.13.10", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz", - "integrity": "sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw==" + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "regenerator-transform": { "version": "0.15.0", @@ -26162,11 +26212,11 @@ } }, "stylehacks": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.0.tgz", - "integrity": "sha512-SzLmvHQTrIWfSgljkQCw2++C9+Ne91d/6Sp92I8c5uHTcy/PgeHamwITIbBW9wnFTY/3ZfSXR9HIL6Ikqmcu6Q==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.1.tgz", + "integrity": "sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==", "requires": { - "browserslist": "^4.16.6", + "browserslist": "^4.21.4", "postcss-selector-parser": "^6.0.4" } }, @@ -26503,9 +26553,9 @@ "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==" }, "ua-parser-js": { - "version": "0.7.32", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.32.tgz", - "integrity": "sha512-f9BESNVhzlhEFf2CHMSj40NWOjYPl1YKYbrvIr/hFTDEmLq7SRbWvm7FcdcpCYT95zrOhC7gZSxjdnnTpBcwVw==" + "version": "0.7.35", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.35.tgz", + "integrity": "sha512-veRf7dawaj9xaWEu9HoTVn5Pggtc/qj+kqTOFvNiN1l0YdxwC1kvel57UCjThjGa3BHBihE8/UJAHI+uQHmd/g==" }, "unbox-primitive": { "version": "1.0.2", @@ -26845,6 +26895,12 @@ "use-isomorphic-layout-effect": "^1.1.1" } }, + "use-sync-external-store": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "requires": {} + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", diff --git a/docs/package.json b/docs/package.json index 918fd173504..3374231173a 100644 --- a/docs/package.json +++ b/docs/package.json @@ -15,8 +15,8 @@ "typecheck": "tsc" }, "dependencies": { - "@docusaurus/core": "^2.1.0", - "@docusaurus/preset-classic": "^2.1.0", + "@docusaurus/core": "^2.4.0", + "@docusaurus/preset-classic": "^2.4.0", "@fortawesome/fontawesome-svg-core": "^1.2.32", "@fortawesome/free-solid-svg-icons": "^5.15.3", "@fortawesome/react-fontawesome": "^0.1.18", @@ -43,12 +43,12 @@ ] }, "devDependencies": { - "@docusaurus/module-type-aliases": "^2.1.0", - "@docusaurus/types": "^2.1.0", - "@tsconfig/docusaurus": "^1.0.5", + "@docusaurus/module-type-aliases": "^2.4.0", + "@docusaurus/types": "^2.4.0", + "@tsconfig/docusaurus": "^1.0.7", "@types/js-yaml": "^4.0.5", - "@types/react": "^17.0.3", - "@types/react-helmet": "^6.1.5", + "@types/react": "^17.0.58", + "@types/react-helmet": "^6.1.6", "@types/react-router-dom": "^5.1.7", "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", From c6bf95a901164e57d87d76cc65962434bba7b25d Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 23 Apr 2023 00:41:08 -0500 Subject: [PATCH 010/160] chore: Update fontawesome --- docs/package-lock.json | 64 +++++++++++++++++++++--------------------- docs/package.json | 6 ++-- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index ac8c947e909..6f2ab304347 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -10,9 +10,9 @@ "dependencies": { "@docusaurus/core": "^2.4.0", "@docusaurus/preset-classic": "^2.4.0", - "@fortawesome/fontawesome-svg-core": "^1.2.32", - "@fortawesome/free-solid-svg-icons": "^5.15.3", - "@fortawesome/react-fontawesome": "^0.1.18", + "@fortawesome/fontawesome-svg-core": "^6.4.0", + "@fortawesome/free-solid-svg-icons": "^6.4.0", + "@fortawesome/react-fontawesome": "^0.2.0", "@mdx-js/react": "^1.6.22", "classnames": "^2.2.6", "js-yaml": "^4.1.0", @@ -2695,48 +2695,48 @@ } }, "node_modules/@fortawesome/fontawesome-common-types": { - "version": "0.2.36", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.36.tgz", - "integrity": "sha512-a/7BiSgobHAgBWeN7N0w+lAhInrGxksn13uK7231n2m8EDPE3BMCl9NZLTGrj9ZXfCmC6LM0QLqXidIizVQ6yg==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.4.0.tgz", + "integrity": "sha512-HNii132xfomg5QVZw0HwXXpN22s7VBHQBv9CeOu9tfJnhsWQNd2lmTNi8CSrnw5B+5YOmzu1UoPAyxaXsJ6RgQ==", "hasInstallScript": true, "engines": { "node": ">=6" } }, "node_modules/@fortawesome/fontawesome-svg-core": { - "version": "1.2.36", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.36.tgz", - "integrity": "sha512-YUcsLQKYb6DmaJjIHdDWpBIGCcyE/W+p/LMGvjQem55Mm2XWVAP5kWTMKWLv9lwpCVjpLxPyOMOyUocP1GxrtA==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.4.0.tgz", + "integrity": "sha512-Bertv8xOiVELz5raB2FlXDPKt+m94MQ3JgDfsVbrqNpLU9+UE2E18GKjLKw+d3XbeYPqg1pzyQKGsrzbw+pPaw==", "hasInstallScript": true, "dependencies": { - "@fortawesome/fontawesome-common-types": "^0.2.36" + "@fortawesome/fontawesome-common-types": "6.4.0" }, "engines": { "node": ">=6" } }, "node_modules/@fortawesome/free-solid-svg-icons": { - "version": "5.15.4", - "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.15.4.tgz", - "integrity": "sha512-JLmQfz6tdtwxoihXLg6lT78BorrFyCf59SAwBM6qV/0zXyVeDygJVb3fk+j5Qat+Yvcxp1buLTY5iDh1ZSAQ8w==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.4.0.tgz", + "integrity": "sha512-kutPeRGWm8V5dltFP1zGjQOEAzaLZj4StdQhWVZnfGFCvAPVvHh8qk5bRrU4KXnRRRNni5tKQI9PBAdI6MP8nQ==", "hasInstallScript": true, "dependencies": { - "@fortawesome/fontawesome-common-types": "^0.2.36" + "@fortawesome/fontawesome-common-types": "6.4.0" }, "engines": { "node": ">=6" } }, "node_modules/@fortawesome/react-fontawesome": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.1.19.tgz", - "integrity": "sha512-Hyb+lB8T18cvLNX0S3llz7PcSOAJMLwiVKBuuzwM/nI5uoBw+gQjnf9il0fR1C3DKOI5Kc79pkJ4/xB0Uw9aFQ==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.2.0.tgz", + "integrity": "sha512-uHg75Rb/XORTtVt7OS9WoK8uM276Ufi7gCzshVWkUJbHhh3svsUUeqXerrM96Wm7fRiDzfKRwSoahhMIkGAYHw==", "dependencies": { "prop-types": "^15.8.1" }, "peerDependencies": { "@fortawesome/fontawesome-svg-core": "~1 || ~6", - "react": ">=16.x" + "react": ">=16.3" } }, "node_modules/@hapi/hoek": { @@ -17900,30 +17900,30 @@ "devOptional": true }, "@fortawesome/fontawesome-common-types": { - "version": "0.2.36", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.36.tgz", - "integrity": "sha512-a/7BiSgobHAgBWeN7N0w+lAhInrGxksn13uK7231n2m8EDPE3BMCl9NZLTGrj9ZXfCmC6LM0QLqXidIizVQ6yg==" + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.4.0.tgz", + "integrity": "sha512-HNii132xfomg5QVZw0HwXXpN22s7VBHQBv9CeOu9tfJnhsWQNd2lmTNi8CSrnw5B+5YOmzu1UoPAyxaXsJ6RgQ==" }, "@fortawesome/fontawesome-svg-core": { - "version": "1.2.36", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.36.tgz", - "integrity": "sha512-YUcsLQKYb6DmaJjIHdDWpBIGCcyE/W+p/LMGvjQem55Mm2XWVAP5kWTMKWLv9lwpCVjpLxPyOMOyUocP1GxrtA==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.4.0.tgz", + "integrity": "sha512-Bertv8xOiVELz5raB2FlXDPKt+m94MQ3JgDfsVbrqNpLU9+UE2E18GKjLKw+d3XbeYPqg1pzyQKGsrzbw+pPaw==", "requires": { - "@fortawesome/fontawesome-common-types": "^0.2.36" + "@fortawesome/fontawesome-common-types": "6.4.0" } }, "@fortawesome/free-solid-svg-icons": { - "version": "5.15.4", - "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.15.4.tgz", - "integrity": "sha512-JLmQfz6tdtwxoihXLg6lT78BorrFyCf59SAwBM6qV/0zXyVeDygJVb3fk+j5Qat+Yvcxp1buLTY5iDh1ZSAQ8w==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.4.0.tgz", + "integrity": "sha512-kutPeRGWm8V5dltFP1zGjQOEAzaLZj4StdQhWVZnfGFCvAPVvHh8qk5bRrU4KXnRRRNni5tKQI9PBAdI6MP8nQ==", "requires": { - "@fortawesome/fontawesome-common-types": "^0.2.36" + "@fortawesome/fontawesome-common-types": "6.4.0" } }, "@fortawesome/react-fontawesome": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.1.19.tgz", - "integrity": "sha512-Hyb+lB8T18cvLNX0S3llz7PcSOAJMLwiVKBuuzwM/nI5uoBw+gQjnf9il0fR1C3DKOI5Kc79pkJ4/xB0Uw9aFQ==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.2.0.tgz", + "integrity": "sha512-uHg75Rb/XORTtVt7OS9WoK8uM276Ufi7gCzshVWkUJbHhh3svsUUeqXerrM96Wm7fRiDzfKRwSoahhMIkGAYHw==", "requires": { "prop-types": "^15.8.1" } diff --git a/docs/package.json b/docs/package.json index 3374231173a..44274becbba 100644 --- a/docs/package.json +++ b/docs/package.json @@ -17,9 +17,9 @@ "dependencies": { "@docusaurus/core": "^2.4.0", "@docusaurus/preset-classic": "^2.4.0", - "@fortawesome/fontawesome-svg-core": "^1.2.32", - "@fortawesome/free-solid-svg-icons": "^5.15.3", - "@fortawesome/react-fontawesome": "^0.1.18", + "@fortawesome/fontawesome-svg-core": "^6.4.0", + "@fortawesome/free-solid-svg-icons": "^6.4.0", + "@fortawesome/react-fontawesome": "^0.2.0", "@mdx-js/react": "^1.6.22", "classnames": "^2.2.6", "js-yaml": "^4.1.0", From dae020787e5b29290e5cbd564fb5cdc4d29a0324 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 23 Apr 2023 16:55:01 -0500 Subject: [PATCH 011/160] docs: Update tree-sitter Updated web-tree-sitter and the devicetree grammar. web-tree-sitter now supports a custom function to locate its .wasm file, so performing a string replace is no longer necessary to get it to work with Docusaurus' Webpack configuration. We now check when tree-sitter is locating its .wasm file and provide the Webpack-adjusted URL. --- docs/package-lock.json | 14 ++++---- docs/package.json | 2 +- .../docusaurus-tree-sitter-plugin/index.js | 30 ------------------ docs/src/keymap-upgrade.js | 15 ++++++++- docs/static/tree-sitter-devicetree.wasm | Bin 34601 -> 40229 bytes 5 files changed, 22 insertions(+), 39 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index 6f2ab304347..3183a51c144 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -21,7 +21,7 @@ "react-copy-to-clipboard": "^5.0.3", "react-dom": "^17.0.2", "react-toastify": "^7.0.4", - "web-tree-sitter": "^0.19.4" + "web-tree-sitter": "^0.20.8" }, "devDependencies": { "@docusaurus/module-type-aliases": "^2.4.0", @@ -15391,9 +15391,9 @@ } }, "node_modules/web-tree-sitter": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.19.4.tgz", - "integrity": "sha512-8G0xBj05hqZybCqBtW7RPZ/hWEtP3DiLTauQzGJZuZYfVRgw7qj7iaZ+8djNqJ4VPrdOO+pS2dR1JsTbsLxdYg==" + "version": "0.20.8", + "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.20.8.tgz", + "integrity": "sha512-weOVgZ3aAARgdnb220GqYuh7+rZU0Ka9k9yfKtGAzEYMa6GgiCzW9JjQRJyCJakvibQW+dfjJdihjInKuuCAUQ==" }, "node_modules/webidl-conversions": { "version": "3.0.1", @@ -27040,9 +27040,9 @@ "integrity": "sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==" }, "web-tree-sitter": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.19.4.tgz", - "integrity": "sha512-8G0xBj05hqZybCqBtW7RPZ/hWEtP3DiLTauQzGJZuZYfVRgw7qj7iaZ+8djNqJ4VPrdOO+pS2dR1JsTbsLxdYg==" + "version": "0.20.8", + "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.20.8.tgz", + "integrity": "sha512-weOVgZ3aAARgdnb220GqYuh7+rZU0Ka9k9yfKtGAzEYMa6GgiCzW9JjQRJyCJakvibQW+dfjJdihjInKuuCAUQ==" }, "webidl-conversions": { "version": "3.0.1", diff --git a/docs/package.json b/docs/package.json index 44274becbba..15d5aa38eea 100644 --- a/docs/package.json +++ b/docs/package.json @@ -28,7 +28,7 @@ "react-copy-to-clipboard": "^5.0.3", "react-dom": "^17.0.2", "react-toastify": "^7.0.4", - "web-tree-sitter": "^0.19.4" + "web-tree-sitter": "^0.20.8" }, "browserslist": { "production": [ diff --git a/docs/src/docusaurus-tree-sitter-plugin/index.js b/docs/src/docusaurus-tree-sitter-plugin/index.js index e782aea8d4e..a6952ce7c54 100644 --- a/docs/src/docusaurus-tree-sitter-plugin/index.js +++ b/docs/src/docusaurus-tree-sitter-plugin/index.js @@ -16,36 +16,6 @@ module.exports = function () { test: /web-tree-sitter/, loader: "null-loader", }); - } else { - // The way web-tree-sitter loads tree-sitter.wasm isn't something that - // Docusaurus/Webpack identify as an asset. There is currently no way to - // set location of the file other than patching web-tree-sitter. - // (see https://github.com/tree-sitter/tree-sitter/issues/559) - rules.push({ - test: /tree-sitter\.js$/, - loader: "string-replace-loader", - options: { - multiple: [ - // Replace the path to tree-sitter.wasm with a "new URL()" to clue - // Webpack in that it is an asset. - { - search: '"tree-sitter.wasm"', - replace: '(new URL("tree-sitter.wasm", import.meta.url)).href', - strict: true, - }, - // Webpack replaces "new URL()" with the full URL to the asset, but - // web-tree-sitter will still add a prefix to it unless there is a - // Module.locateFile() function. - { - search: "var Module=void 0!==Module?Module:{};", - replace: `var Module = { - locateFile: (path, prefix) => path.startsWith('http') ? path : prefix + path, - };`, - strict: true, - }, - ], - }, - }); } return { diff --git a/docs/src/keymap-upgrade.js b/docs/src/keymap-upgrade.js index 19a5d8e32c6..788ab31ab54 100644 --- a/docs/src/keymap-upgrade.js +++ b/docs/src/keymap-upgrade.js @@ -2,10 +2,23 @@ import Parser from "web-tree-sitter"; import { Codes, Behaviors } from "./data/keymap-upgrade"; +const TREE_SITTER_WASM_URL = new URL( + "/node_modules/web-tree-sitter/tree-sitter.wasm", + import.meta.url +); + let Devicetree; export async function initParser() { - await Parser.init(); + await Parser.init({ + locateFile: (path, prefix) => { + // When locating tree-sitter.wasm, use a path that Webpack can map to the correct URL. + if (path == "tree-sitter.wasm") { + return TREE_SITTER_WASM_URL.href; + } + return prefix + path; + }, + }); Devicetree = await Parser.Language.load("/tree-sitter-devicetree.wasm"); } diff --git a/docs/static/tree-sitter-devicetree.wasm b/docs/static/tree-sitter-devicetree.wasm index fbcb0f18a70a75cc57c24aa7ae0a4b00aad5a95b..cce5ac9656c93720f1840dd7d89cb23b19d6e66b 100644 GIT binary patch literal 40229 zcmeHwd7KqB)^?J6dx4uv1G2U(%_8oAI-`h!lwu=pxa+vJ4K&&U4Rp6S>db(Of`G~< zi=ZsBDTpYbAo~uAih_uW2ndJ@iUNxJ`<$ebTUEDiH_XrX`+a}B)t*$&$vIC>PEx5< zRW7pplJ1=0sFK8r-@C}+G*`dz#ayNlsJ-sdjSrw>w239?Mw8jTbb z^^WJ|buZ}NqxgZmj`<}8kv@!sGB2+*zhk!ouPj}w3C2mIc3xg#QRl+qf=;D*UG6LD zR9e`hNZat9&`67NE+QH2BUSS9?uUnYo$|YN%j;Cyqqu~zTCOa=XU}dAiC3F9?Niwg?!N(xI$3ySkP7xXUdR6r6YDr9ihh{t%O;?C!JG{SgnbX6|;G-A%a z5&T}9`hLdlJy$T~_A7zTAJm0AR-3}ZS}XjibwXpAEP*FLS%g*!f0g*nvD z`A?h5HtWKVh8n?EE!b)`wrRl_tFc217Foe=Em$$oVC>U^4TBPa*$+{U8>EAt{9#Z2 zs3-p$^3)*~v+qbH_}pcoV2iDInHH?I zf>l~@#G0(rg0F{|j@h6E{jJGHE!gm+(b%j7%dEy$Em&d&+qB?^!Nz2V7L2kOyCE=r zy-ydevg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(eBnB20Cs^CIZP~Dr1S-(Kps?gB)_>@bA!rIVU}*mlGJ)WS6%0;{ObjlN z!3-=KoG2KXC@C!(TFlUdLrbnJP|a9aMyis;z(k3xUcunPe(*9B)My5l`H2CFm+}ya zYDZQeO+nueB{9|JQm4~NOPwkhSvYt^!fUMliNS+QS%Gdlg0i5}K<6;Cx!n$91&M3X zD5bKF{R`n~V6>8K8FWW!8QQCOKoM0O-E0_*C@w_17>a&HK@CP?5yDeFqq`u8(Mw+U z3>;D1pGqn)mBR{43WuPD-0ni_4oei4bzp8&E8sPe&NW-5)bk09T5TNCK%R@QF+8oV zjS9|F>q%8O7}KH{!)0WGX#y`%nru=^d6Pxgp2<-thYlN@7+A)N3x^~a4V%KUp(RWf zi3y5PGpw-eYF1Ko)zxK84Gp;p7zeq9#v(}nAszTn>B~EU&UKWQ;4-00ULHyLW|}t1 VuYJt0y Date: Mon, 24 Apr 2023 20:22:42 -0500 Subject: [PATCH 012/160] fix(docs): Fix typescript error See https://github.com/facebook/docusaurus/issues/8226#issuecomment-1420620198 --- docs/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tsconfig.json b/docs/tsconfig.json index 589217e26a0..a9844e97c53 100644 --- a/docs/tsconfig.json +++ b/docs/tsconfig.json @@ -3,7 +3,7 @@ "include": ["src/"], "compilerOptions": { "types": ["node", "@docusaurus/theme-classic"], - "moduleResolution": "Node", + "moduleResolution": "Node16", "esModuleInterop": true, "resolveJsonModule": true, "strict": true, From b021d19255122883c4ccd1887ffa0bba5df076b0 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sun, 14 May 2023 12:12:59 -0700 Subject: [PATCH 013/160] fix(display): Imply LVGL mono theme when display is enabled All displays currently used with ZMK are monochrome so it makes sense to enable the mono theme by default, which can be disabled by the user since we use the "imply" statement. Without this theme setting, the small font size selection for widgets at the bottom of the stock status screen does not work. --- app/src/display/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/display/Kconfig b/app/src/display/Kconfig index 32be2a278f4..cb086b4cc1c 100644 --- a/app/src/display/Kconfig +++ b/app/src/display/Kconfig @@ -9,6 +9,7 @@ menuconfig ZMK_DISPLAY select LV_THEMES select LV_THEME_MONO select LV_CONF_MINIMAL + imply LV_USE_THEME_MONO if ZMK_DISPLAY From 7e29166c6ce4987de58de2e8a5545dca68312dfd Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sun, 14 May 2023 12:40:11 -0700 Subject: [PATCH 014/160] refactor(display): Clean up unused theme Kconfig --- app/src/display/Kconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/display/Kconfig b/app/src/display/Kconfig index cb086b4cc1c..5f67bf114be 100644 --- a/app/src/display/Kconfig +++ b/app/src/display/Kconfig @@ -6,8 +6,6 @@ menuconfig ZMK_DISPLAY default n select DISPLAY select LVGL - select LV_THEMES - select LV_THEME_MONO select LV_CONF_MINIMAL imply LV_USE_THEME_MONO From 864394b40a7599a1560782226168cd6e40244c5a Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sun, 14 May 2023 12:20:24 -0700 Subject: [PATCH 015/160] feat(display): Add setting to invert display colors Add CONFIG_ZMK_DISPLAY_INVERT Kconfig to invert colors (black-on-white to white-on-black) on monochrome screens. Currently applies only if CONFIG_LV_USE_THEME_MONO is selected, which is the default unless user overrides it. --- app/src/display/Kconfig | 7 +++++++ app/src/display/main.c | 3 ++- docs/docs/config/displays.md | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/src/display/Kconfig b/app/src/display/Kconfig index 5f67bf114be..63ba968b445 100644 --- a/app/src/display/Kconfig +++ b/app/src/display/Kconfig @@ -15,6 +15,13 @@ config ZMK_DISPLAY_BLANK_ON_IDLE bool "Blank display on idle" default y if SSD1306 +if LV_USE_THEME_MONO + +config ZMK_DISPLAY_INVERT + bool "Invert display colors" + +endif + choice LV_TXT_ENC default LV_TXT_ENC_UTF8 diff --git a/app/src/display/main.c b/app/src/display/main.c index e34f8a533cc..e15e2de0c9a 100644 --- a/app/src/display/main.c +++ b/app/src/display/main.c @@ -91,7 +91,8 @@ int zmk_display_is_initialized() { return initialized; } static void initialize_theme() { #if IS_ENABLED(CONFIG_LV_USE_THEME_MONO) lv_disp_t *disp = lv_disp_get_default(); - lv_theme_t *theme = lv_theme_mono_init(disp, false, CONFIG_LV_FONT_DEFAULT); + lv_theme_t *theme = + lv_theme_mono_init(disp, IS_ENABLED(CONFIG_ZMK_DISPLAY_INVERT), CONFIG_LV_FONT_DEFAULT); theme->font_small = CONFIG_ZMK_LV_FONT_DEFAULT_SMALL; disp->theme = theme; diff --git a/docs/docs/config/displays.md b/docs/docs/config/displays.md index d126e38aa1e..a68bf26a9b9 100644 --- a/docs/docs/config/displays.md +++ b/docs/docs/config/displays.md @@ -17,12 +17,15 @@ Definition files: | Config | Type | Description | Default | | -------------------------------------------------- | ---- | -------------------------------------------------------------- | ------- | | `CONFIG_ZMK_DISPLAY` | bool | Enable support for displays | n | +| `CONFIG_ZMK_DISPLAY_INVERT` | bool | Invert display colors from black-on-white to white-on-black | n | | `CONFIG_ZMK_WIDGET_LAYER_STATUS` | bool | Enable a widget to show the highest, active layer | y | | `CONFIG_ZMK_WIDGET_BATTERY_STATUS` | bool | Enable a widget to show battery charge information | y | | `CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE` | bool | If battery widget is enabled, show percentage instead of icons | n | | `CONFIG_ZMK_WIDGET_OUTPUT_STATUS` | bool | Enable a widget to show the current output (USB/BLE) | y | | `CONFIG_ZMK_WIDGET_WPM_STATUS` | bool | Enable a widget to show words per minute | n | +Note that `CONFIG_ZMK_DISPLAY_INVERT` setting might not work as expected with custom status screens that utilize images. + If `CONFIG_ZMK_DISPLAY` is enabled, exactly zero or one of the following options must be set to `y`. The first option is used if none are set. | Config | Description | From 5aac2743b10c69be000038cd03e51f5a284fa6cc Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 5 May 2023 22:56:58 -0700 Subject: [PATCH 016/160] fix(bluetooth): Improved checking for conn status. * Check the actual connection status before considering a discovered connection as connected. --- app/src/ble.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/ble.c b/app/src/ble.c index a7037d0cfd8..c7bdc401b66 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -118,6 +118,7 @@ void set_profile_address(uint8_t index, const bt_addr_le_t *addr) { bool zmk_ble_active_profile_is_connected() { struct bt_conn *conn; + struct bt_conn_info info; bt_addr_le_t *addr = zmk_ble_active_profile_addr(); if (!bt_addr_le_cmp(addr, BT_ADDR_LE_ANY)) { return false; @@ -125,9 +126,11 @@ bool zmk_ble_active_profile_is_connected() { return false; } + bt_conn_get_info(conn, &info); + bt_conn_unref(conn); - return true; + return info.state == BT_CONN_STATE_CONNECTED; } #define CHECKED_ADV_STOP() \ From 1adfcf92bf96cd6453e6bb3ae8cc3b2d1fa8caa4 Mon Sep 17 00:00:00 2001 From: Xudong Zheng <7pkvm5aw@slicealias.com> Date: Mon, 29 May 2023 00:28:45 -0400 Subject: [PATCH 017/160] refactor(split): fix inconsistency in Kconfig names --- app/include/zmk/ble.h | 2 +- app/src/keymap.c | 2 +- app/src/split/bluetooth/Kconfig | 4 ++-- app/src/split/bluetooth/central.c | 12 ++++++------ docs/docs/config/system.md | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/include/zmk/ble.h b/app/include/zmk/ble.h index 4380a33a901..1c84777d757 100644 --- a/app/include/zmk/ble.h +++ b/app/include/zmk/ble.h @@ -15,7 +15,7 @@ #if ZMK_BLE_IS_CENTRAL #define ZMK_BLE_PROFILE_COUNT (CONFIG_BT_MAX_PAIRED - 1) -#define ZMK_BLE_SPLIT_PERIPHERAL_COUNT 1 +#define ZMK_SPLIT_BLE_PERIPHERAL_COUNT 1 #else #define ZMK_BLE_PROFILE_COUNT CONFIG_BT_MAX_PAIRED #endif diff --git a/app/src/keymap.c b/app/src/keymap.c index 909fd20de87..da25fc096ca 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -218,7 +218,7 @@ int zmk_keymap_apply_position_state(uint8_t source, int layer, uint32_t position #endif case BEHAVIOR_LOCALITY_GLOBAL: #if ZMK_BLE_IS_CENTRAL - for (int i = 0; i < ZMK_BLE_SPLIT_PERIPHERAL_COUNT; i++) { + for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { zmk_split_bt_invoke_behavior(i, &binding, event, pressed); } #endif diff --git a/app/src/split/bluetooth/Kconfig b/app/src/split/bluetooth/Kconfig index 53119d8247f..005d75fd43b 100644 --- a/app/src/split/bluetooth/Kconfig +++ b/app/src/split/bluetooth/Kconfig @@ -21,11 +21,11 @@ config ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE int "Max number of key position state events to queue when received from peripherals" default 5 -config ZMK_BLE_SPLIT_CENTRAL_SPLIT_RUN_STACK_SIZE +config ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_STACK_SIZE int "BLE split central write thread stack size" default 512 -config ZMK_BLE_SPLIT_CENTRAL_SPLIT_RUN_QUEUE_SIZE +config ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_QUEUE_SIZE int "Max number of behavior run events to queue to send to the peripheral(s)" default 5 diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index ac073c59869..a7c0d8a9964 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -47,7 +47,7 @@ struct peripheral_slot { uint8_t changed_positions[POSITION_STATE_DATA_LEN]; }; -static struct peripheral_slot peripherals[ZMK_BLE_SPLIT_PERIPHERAL_COUNT]; +static struct peripheral_slot peripherals[ZMK_SPLIT_BLE_PERIPHERAL_COUNT]; static const struct bt_uuid_128 split_service_uuid = BT_UUID_INIT_128(ZMK_SPLIT_BT_SERVICE_UUID); @@ -65,7 +65,7 @@ void peripheral_event_work_callback(struct k_work *work) { K_WORK_DEFINE(peripheral_event_work, peripheral_event_work_callback); int peripheral_slot_index_for_conn(struct bt_conn *conn) { - for (int i = 0; i < ZMK_BLE_SPLIT_PERIPHERAL_COUNT; i++) { + for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { if (peripherals[i].conn == conn) { return i; } @@ -84,7 +84,7 @@ struct peripheral_slot *peripheral_slot_for_conn(struct bt_conn *conn) { } int release_peripheral_slot(int index) { - if (index < 0 || index >= ZMK_BLE_SPLIT_PERIPHERAL_COUNT) { + if (index < 0 || index >= ZMK_SPLIT_BLE_PERIPHERAL_COUNT) { return -EINVAL; } @@ -131,7 +131,7 @@ int release_peripheral_slot(int index) { } int reserve_peripheral_slot() { - for (int i = 0; i < ZMK_BLE_SPLIT_PERIPHERAL_COUNT; i++) { + for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { if (peripherals[i].state == PERIPHERAL_SLOT_STATE_OPEN) { // Be sure the slot is fully reinitialized. release_peripheral_slot(i); @@ -504,7 +504,7 @@ static struct bt_conn_cb conn_callbacks = { }; K_THREAD_STACK_DEFINE(split_central_split_run_q_stack, - CONFIG_ZMK_BLE_SPLIT_CENTRAL_SPLIT_RUN_STACK_SIZE); + CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_STACK_SIZE); struct k_work_q split_central_split_run_q; @@ -515,7 +515,7 @@ struct zmk_split_run_behavior_payload_wrapper { K_MSGQ_DEFINE(zmk_split_central_split_run_msgq, sizeof(struct zmk_split_run_behavior_payload_wrapper), - CONFIG_ZMK_BLE_SPLIT_CENTRAL_SPLIT_RUN_QUEUE_SIZE, 4); + CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_QUEUE_SIZE, 4); void split_central_split_run_callback(struct k_work *work) { struct zmk_split_run_behavior_payload_wrapper payload_wrapper; diff --git a/docs/docs/config/system.md b/docs/docs/config/system.md index a5347b96a1b..5a5ae5a55a0 100644 --- a/docs/docs/config/system.md +++ b/docs/docs/config/system.md @@ -97,8 +97,8 @@ Following split keyboard settings are defined in [zmk/app/src/split/Kconfig](htt | `CONFIG_ZMK_SPLIT_BLE` | bool | Use BLE to communicate between split keyboard halves | y | | `CONFIG_ZMK_SPLIT_ROLE_CENTRAL` | bool | `y` for central device, `n` for peripheral | | | `CONFIG_ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE` | int | Max number of key state events to queue when received from peripherals | 5 | -| `CONFIG_ZMK_BLE_SPLIT_CENTRAL_SPLIT_RUN_STACK_SIZE` | int | Stack size of the BLE split central write thread | 512 | -| `CONFIG_ZMK_BLE_SPLIT_CENTRAL_SPLIT_RUN_QUEUE_SIZE` | int | Max number of behavior run events to queue to send to the peripheral(s) | 5 | +| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_STACK_SIZE` | int | Stack size of the BLE split central write thread | 512 | +| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_QUEUE_SIZE` | int | Max number of behavior run events to queue to send to the peripheral(s) | 5 | | `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE` | int | Stack size of the BLE split peripheral notify thread | 650 | | `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_PRIORITY` | int | Priority of the BLE split peripheral notify thread | 5 | | `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_POSITION_QUEUE_SIZE` | int | Max number of key state events to queue to send to the central | 10 | From b276a3bfb074a869ca101bdaba924c936eeb04ec Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Tue, 6 Dec 2022 00:13:01 -0600 Subject: [PATCH 018/160] refactor(kscan): batch GPIO reads by port Changed the GPIO matrix and direct GPIO key scan drivers to do a single read per port instead of one read per pin. This is much more efficient for some types of GPIO drivers, such as I2C GPIO expanders. To accomplish this with minimal overhead, we now sort input pins by port at driver init. if we iterate through the pins in the sorted order, all pins on the same port are consecutive, so we only need to read each port once the first time we see it. --- app/drivers/kscan/CMakeLists.txt | 1 + app/drivers/kscan/kscan_gpio.c | 33 ++++++++ app/drivers/kscan/kscan_gpio.h | 61 ++++++++++++++ app/drivers/kscan/kscan_gpio_direct.c | 72 +++++++++-------- app/drivers/kscan/kscan_gpio_matrix.c | 110 +++++++++++++------------- 5 files changed, 188 insertions(+), 89 deletions(-) create mode 100644 app/drivers/kscan/kscan_gpio.c create mode 100644 app/drivers/kscan/kscan_gpio.h diff --git a/app/drivers/kscan/CMakeLists.txt b/app/drivers/kscan/CMakeLists.txt index ced31e6f67e..8fc7ed58d50 100644 --- a/app/drivers/kscan/CMakeLists.txt +++ b/app/drivers/kscan/CMakeLists.txt @@ -5,6 +5,7 @@ zephyr_library_named(zmk__drivers__kscan) zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DRIVER debounce.c) +zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DRIVER kscan_gpio.c) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_MATRIX kscan_gpio_matrix.c) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DIRECT kscan_gpio_direct.c) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DEMUX kscan_gpio_demux.c) diff --git a/app/drivers/kscan/kscan_gpio.c b/app/drivers/kscan/kscan_gpio.c new file mode 100644 index 00000000000..4963f6784f2 --- /dev/null +++ b/app/drivers/kscan/kscan_gpio.c @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "kscan_gpio.h" + +#include + +static int compare_ports(const void *a, const void *b) { + const struct kscan_gpio *gpio_a = a; + const struct kscan_gpio *gpio_b = b; + + return gpio_a->spec.port - gpio_b->spec.port; +} + +void kscan_gpio_list_sort_by_port(struct kscan_gpio_list *list) { + qsort(list->gpios, list->len, sizeof(list->gpios[0]), compare_ports); +} + +int kscan_gpio_pin_get(const struct kscan_gpio *gpio, struct kscan_gpio_port_state *state) { + if (gpio->spec.port != state->port) { + state->port = gpio->spec.port; + + const int err = gpio_port_get(state->port, &state->value); + if (err) { + return err; + } + } + + return (state->value & BIT(gpio->spec.pin)) != 0; +} diff --git a/app/drivers/kscan/kscan_gpio.h b/app/drivers/kscan/kscan_gpio.h new file mode 100644 index 00000000000..39343136d22 --- /dev/null +++ b/app/drivers/kscan/kscan_gpio.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include +#include +#include +#include +#include + +struct kscan_gpio { + struct gpio_dt_spec spec; + /** The index of the GPIO in the devicetree *-gpios array. */ + size_t index; +}; + +/** GPIO_DT_SPEC_GET_BY_IDX(), but for a struct kscan_gpio. */ +#define KSCAN_GPIO_GET_BY_IDX(node_id, prop, idx) \ + ((struct kscan_gpio){.spec = GPIO_DT_SPEC_GET_BY_IDX(node_id, prop, idx), .index = idx}) + +struct kscan_gpio_list { + struct kscan_gpio *gpios; + size_t len; +}; + +/** Define a kscan_gpio_list from a compile-time GPIO array. */ +#define KSCAN_GPIO_LIST(gpio_array) \ + ((struct kscan_gpio_list){.gpios = gpio_array, .len = ARRAY_SIZE(gpio_array)}) + +struct kscan_gpio_port_state { + const struct device *port; + gpio_port_value_t value; +}; + +/** + * Sorts a GPIO list by port so it can be used with kscan_gpio_pin_get(). + */ +void kscan_gpio_list_sort_by_port(struct kscan_gpio_list *list); + +/** + * Get logical level of an input pin. + * + * This is equivalent to gpio_pin_get() except that, when iterating through the + * pins in a list which is sorted by kscan_gpio_list_sort_by_port(), it only + * performs one read per port instead of one read per pin. + * + * @param gpio The input pin to read. + * @param state An object to track state between reads. Must be zero-initialized before the first + * use. + * + * @retval 1 If pin logical value is 1 / active. + * @retval 0 If pin logical value is 0 / inactive. + * @retval -EIO I/O error when accessing an external GPIO chip. + * @retval -EWOULDBLOCK if operation would block. + */ +int kscan_gpio_pin_get(const struct kscan_gpio *gpio, struct kscan_gpio_port_state *state); diff --git a/app/drivers/kscan/kscan_gpio_direct.c b/app/drivers/kscan/kscan_gpio_direct.c index 586e0d95c79..d43d716bf64 100644 --- a/app/drivers/kscan/kscan_gpio_direct.c +++ b/app/drivers/kscan/kscan_gpio_direct.c @@ -5,6 +5,7 @@ */ #include "debounce.h" +#include "kscan_gpio.h" #include #include @@ -41,7 +42,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #define INST_INPUTS_LEN(n) DT_INST_PROP_LEN(n, input_gpios) #define KSCAN_DIRECT_INPUT_CFG_INIT(idx, inst_idx) \ - GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst_idx), input_gpios, idx) + KSCAN_GPIO_GET_BY_IDX(DT_DRV_INST(inst_idx), input_gpios, idx) struct kscan_direct_irq_callback { const struct device *dev; @@ -50,6 +51,7 @@ struct kscan_direct_irq_callback { struct kscan_direct_data { const struct device *dev; + struct kscan_gpio_list inputs; kscan_callback_t callback; struct k_work_delayable work; #if USE_INTERRUPTS @@ -62,17 +64,7 @@ struct kscan_direct_data { struct debounce_state *pin_state; }; -struct kscan_gpio_list { - const struct gpio_dt_spec *gpios; - size_t len; -}; - -/** Define a kscan_gpio_list from a compile-time GPIO array. */ -#define KSCAN_GPIO_LIST(gpio_array) \ - ((struct kscan_gpio_list){.gpios = gpio_array, .len = ARRAY_SIZE(gpio_array)}) - struct kscan_direct_config { - struct kscan_gpio_list inputs; struct debounce_config debounce_config; int32_t debounce_scan_period_ms; int32_t poll_period_ms; @@ -81,10 +73,10 @@ struct kscan_direct_config { #if USE_INTERRUPTS static int kscan_direct_interrupt_configure(const struct device *dev, const gpio_flags_t flags) { - const struct kscan_direct_config *config = dev->config; + const struct kscan_direct_data *data = dev->data; - for (int i = 0; i < config->inputs.len; i++) { - const struct gpio_dt_spec *gpio = &config->inputs.gpios[i]; + for (int i = 0; i < data->inputs.len; i++) { + const struct gpio_dt_spec *gpio = &data->inputs.gpios[i].spec; int err = gpio_pin_interrupt_configure_dt(gpio, flags); if (err) { @@ -134,16 +126,16 @@ static gpio_flags_t kscan_gpio_get_extra_flags(const struct gpio_dt_spec *gpio, static int kscan_inputs_set_flags(const struct kscan_gpio_list *inputs, const struct gpio_dt_spec *active_gpio) { - gpio_flags_t extra_flags; for (int i = 0; i < inputs->len; i++) { - extra_flags = GPIO_INPUT | kscan_gpio_get_extra_flags(&inputs->gpios[i], - &inputs->gpios[i] == active_gpio); + const bool active = &inputs->gpios[i].spec == active_gpio; + const gpio_flags_t extra_flags = + GPIO_INPUT | kscan_gpio_get_extra_flags(&inputs->gpios[i].spec, active); LOG_DBG("Extra flags equal to: %d", extra_flags); - int err = gpio_pin_configure_dt(&inputs->gpios[i], extra_flags); + int err = gpio_pin_configure_dt(&inputs->gpios[i].spec, extra_flags); if (err) { - LOG_ERR("Unable to configure flags on pin %d on %s", inputs->gpios[i].pin, - inputs->gpios[i].port->name); + LOG_ERR("Unable to configure flags on pin %d on %s", inputs->gpios[i].spec.pin, + inputs->gpios[i].spec.port->name); return err; } } @@ -179,28 +171,35 @@ static int kscan_direct_read(const struct device *dev) { const struct kscan_direct_config *config = dev->config; // Read the inputs. - for (int i = 0; i < config->inputs.len; i++) { - const struct gpio_dt_spec *gpio = &config->inputs.gpios[i]; + struct kscan_gpio_port_state state = {0}; - const bool active = gpio_pin_get_dt(gpio); + for (int i = 0; i < data->inputs.len; i++) { + const struct kscan_gpio *gpio = &data->inputs.gpios[i]; - debounce_update(&data->pin_state[i], active, config->debounce_scan_period_ms, + const int active = kscan_gpio_pin_get(gpio, &state); + if (active < 0) { + LOG_ERR("Failed to read port %s: %i", gpio->spec.port->name, active); + return active; + } + + debounce_update(&data->pin_state[gpio->index], active, config->debounce_scan_period_ms, &config->debounce_config); } // Process the new state. bool continue_scan = false; - for (int i = 0; i < config->inputs.len; i++) { - struct debounce_state *state = &data->pin_state[i]; + for (int i = 0; i < data->inputs.len; i++) { + const struct kscan_gpio *gpio = &data->inputs.gpios[i]; + struct debounce_state *state = &data->pin_state[gpio->index]; if (debounce_get_changed(state)) { const bool pressed = debounce_is_pressed(state); - LOG_DBG("Sending event at 0,%i state %s", i, pressed ? "on" : "off"); - data->callback(dev, 0, i, pressed); + LOG_DBG("Sending event at 0,%i state %s", gpio->index, pressed ? "on" : "off"); + data->callback(dev, 0, gpio->index, pressed); if (config->toggle_mode && pressed) { - kscan_inputs_set_flags(&config->inputs, &config->inputs.gpios[i]); + kscan_inputs_set_flags(&data->inputs, &gpio->spec); } } @@ -289,10 +288,11 @@ static int kscan_direct_init_input_inst(const struct device *dev, const struct g } static int kscan_direct_init_inputs(const struct device *dev) { + const struct kscan_direct_data *data = dev->data; const struct kscan_direct_config *config = dev->config; - for (int i = 0; i < config->inputs.len; i++) { - const struct gpio_dt_spec *gpio = &config->inputs.gpios[i]; + for (int i = 0; i < data->inputs.len; i++) { + const struct gpio_dt_spec *gpio = &data->inputs.gpios[i].spec; int err = kscan_direct_init_input_inst(dev, gpio, i, config->toggle_mode); if (err) { return err; @@ -307,6 +307,9 @@ static int kscan_direct_init(const struct device *dev) { data->dev = dev; + // Sort inputs by port so we can read each port just once per scan. + kscan_gpio_list_sort_by_port(&data->inputs); + kscan_direct_init_inputs(dev); k_work_init_delayable(&data->work, kscan_direct_work_handler); @@ -326,7 +329,7 @@ static const struct kscan_driver_api kscan_direct_api = { BUILD_ASSERT(INST_DEBOUNCE_RELEASE_MS(n) <= DEBOUNCE_COUNTER_MAX, \ "ZMK_KSCAN_DEBOUNCE_RELEASE_MS or debounce-release-ms is too large"); \ \ - static const struct gpio_dt_spec kscan_direct_inputs_##n[] = { \ + static struct kscan_gpio kscan_direct_inputs_##n[] = { \ LISTIFY(INST_INPUTS_LEN(n), KSCAN_DIRECT_INPUT_CFG_INIT, (, ), n)}; \ \ static struct debounce_state kscan_direct_state_##n[INST_INPUTS_LEN(n)]; \ @@ -335,10 +338,11 @@ static const struct kscan_driver_api kscan_direct_api = { (static struct kscan_direct_irq_callback kscan_direct_irqs_##n[INST_INPUTS_LEN(n)];)) \ \ static struct kscan_direct_data kscan_direct_data_##n = { \ - .pin_state = kscan_direct_state_##n, COND_INTERRUPTS((.irqs = kscan_direct_irqs_##n, ))}; \ + .inputs = KSCAN_GPIO_LIST(kscan_direct_inputs_##n), \ + .pin_state = kscan_direct_state_##n, \ + COND_INTERRUPTS((.irqs = kscan_direct_irqs_##n, ))}; \ \ static struct kscan_direct_config kscan_direct_config_##n = { \ - .inputs = KSCAN_GPIO_LIST(kscan_direct_inputs_##n), \ .debounce_config = \ { \ .debounce_press_ms = INST_DEBOUNCE_PRESS_MS(n), \ diff --git a/app/drivers/kscan/kscan_gpio_matrix.c b/app/drivers/kscan/kscan_gpio_matrix.c index d2121273724..b8e72044928 100644 --- a/app/drivers/kscan/kscan_gpio_matrix.c +++ b/app/drivers/kscan/kscan_gpio_matrix.c @@ -5,6 +5,7 @@ */ #include "debounce.h" +#include "kscan_gpio.h" #include #include @@ -50,9 +51,9 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); COND_CODE_1(CONFIG_ZMK_KSCAN_MATRIX_POLLING, pollcode, intcode) #define KSCAN_GPIO_ROW_CFG_INIT(idx, inst_idx) \ - GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst_idx), row_gpios, idx) + KSCAN_GPIO_GET_BY_IDX(DT_DRV_INST(inst_idx), row_gpios, idx) #define KSCAN_GPIO_COL_CFG_INIT(idx, inst_idx) \ - GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst_idx), col_gpios, idx) + KSCAN_GPIO_GET_BY_IDX(DT_DRV_INST(inst_idx), col_gpios, idx) enum kscan_diode_direction { KSCAN_ROW2COL, @@ -66,6 +67,7 @@ struct kscan_matrix_irq_callback { struct kscan_matrix_data { const struct device *dev; + struct kscan_gpio_list inputs; kscan_callback_t callback; struct k_work_delayable work; #if USE_INTERRUPTS @@ -76,26 +78,16 @@ struct kscan_matrix_data { int64_t scan_time; /** * Current state of the matrix as a flattened 2D array of length - * (config->rows.len * config->cols.len) + * (config->rows * config->cols) */ struct debounce_state *matrix_state; }; -struct kscan_gpio_list { - const struct gpio_dt_spec *gpios; - size_t len; -}; - -/** Define a kscan_gpio_list from a compile-time GPIO array. */ -#define KSCAN_GPIO_LIST(gpio_array) \ - ((struct kscan_gpio_list){.gpios = gpio_array, .len = ARRAY_SIZE(gpio_array)}) - struct kscan_matrix_config { - struct kscan_gpio_list rows; - struct kscan_gpio_list cols; - struct kscan_gpio_list inputs; struct kscan_gpio_list outputs; struct debounce_config debounce_config; + size_t rows; + size_t cols; int32_t debounce_scan_period_ms; int32_t poll_period_ms; enum kscan_diode_direction diode_direction; @@ -105,10 +97,10 @@ struct kscan_matrix_config { * Get the index into a matrix state array from a row and column. */ static int state_index_rc(const struct kscan_matrix_config *config, const int row, const int col) { - __ASSERT(row < config->rows.len, "Invalid row %i", row); - __ASSERT(col < config->cols.len, "Invalid column %i", col); + __ASSERT(row < config->rows, "Invalid row %i", row); + __ASSERT(col < config->cols, "Invalid column %i", col); - return (col * config->rows.len) + row; + return (col * config->rows) + row; } /** @@ -125,7 +117,7 @@ static int kscan_matrix_set_all_outputs(const struct device *dev, const int valu const struct kscan_matrix_config *config = dev->config; for (int i = 0; i < config->outputs.len; i++) { - const struct gpio_dt_spec *gpio = &config->outputs.gpios[i]; + const struct gpio_dt_spec *gpio = &config->outputs.gpios[i].spec; int err = gpio_pin_set_dt(gpio, value); if (err) { @@ -139,10 +131,10 @@ static int kscan_matrix_set_all_outputs(const struct device *dev, const int valu #if USE_INTERRUPTS static int kscan_matrix_interrupt_configure(const struct device *dev, const gpio_flags_t flags) { - const struct kscan_matrix_config *config = dev->config; + const struct kscan_matrix_data *data = dev->data; - for (int i = 0; i < config->inputs.len; i++) { - const struct gpio_dt_spec *gpio = &config->inputs.gpios[i]; + for (int i = 0; i < data->inputs.len; i++) { + const struct gpio_dt_spec *gpio = &data->inputs.gpios[i].spec; int err = gpio_pin_interrupt_configure_dt(gpio, flags); if (err) { @@ -226,32 +218,37 @@ static int kscan_matrix_read(const struct device *dev) { const struct kscan_matrix_config *config = dev->config; // Scan the matrix. - for (int o = 0; o < config->outputs.len; o++) { - const struct gpio_dt_spec *out_gpio = &config->outputs.gpios[o]; + for (int i = 0; i < config->outputs.len; i++) { + const struct kscan_gpio *out_gpio = &config->outputs.gpios[i]; - int err = gpio_pin_set_dt(out_gpio, 1); + int err = gpio_pin_set_dt(&out_gpio->spec, 1); if (err) { - LOG_ERR("Failed to set output %i active: %i", o, err); + LOG_ERR("Failed to set output %i active: %i", out_gpio->index, err); return err; } #if CONFIG_ZMK_KSCAN_MATRIX_WAIT_BEFORE_INPUTS > 0 k_busy_wait(CONFIG_ZMK_KSCAN_MATRIX_WAIT_BEFORE_INPUTS); #endif + struct kscan_gpio_port_state state = {0}; - for (int i = 0; i < config->inputs.len; i++) { - const struct gpio_dt_spec *in_gpio = &config->inputs.gpios[i]; + for (int j = 0; j < data->inputs.len; j++) { + const struct kscan_gpio *in_gpio = &data->inputs.gpios[j]; - const int index = state_index_io(config, i, o); - const bool active = gpio_pin_get_dt(in_gpio); + const int index = state_index_io(config, in_gpio->index, out_gpio->index); + const int active = kscan_gpio_pin_get(in_gpio, &state); + if (active < 0) { + LOG_ERR("Failed to read port %s: %i", in_gpio->spec.port->name, active); + return active; + } debounce_update(&data->matrix_state[index], active, config->debounce_scan_period_ms, &config->debounce_config); } - err = gpio_pin_set_dt(out_gpio, 0); + err = gpio_pin_set_dt(&out_gpio->spec, 0); if (err) { - LOG_ERR("Failed to set output %i inactive: %i", o, err); + LOG_ERR("Failed to set output %i inactive: %i", out_gpio->index, err); return err; } @@ -263,8 +260,8 @@ static int kscan_matrix_read(const struct device *dev) { // Process the new state. bool continue_scan = false; - for (int r = 0; r < config->rows.len; r++) { - for (int c = 0; c < config->cols.len; c++) { + for (int r = 0; r < config->rows; r++) { + for (int c = 0; c < config->cols; c++) { const int index = state_index_rc(config, r, c); struct debounce_state *state = &data->matrix_state[index]; @@ -329,28 +326,28 @@ static int kscan_matrix_disable(const struct device *dev) { #endif } -static int kscan_matrix_init_input_inst(const struct device *dev, const struct gpio_dt_spec *gpio, - const int index) { - if (!device_is_ready(gpio->port)) { - LOG_ERR("GPIO is not ready: %s", gpio->port->name); +static int kscan_matrix_init_input_inst(const struct device *dev, const struct kscan_gpio *gpio) { + if (!device_is_ready(gpio->spec.port)) { + LOG_ERR("GPIO is not ready: %s", gpio->spec.port->name); return -ENODEV; } - int err = gpio_pin_configure_dt(gpio, GPIO_INPUT); + int err = gpio_pin_configure_dt(&gpio->spec, GPIO_INPUT); if (err) { - LOG_ERR("Unable to configure pin %u on %s for input", gpio->pin, gpio->port->name); + LOG_ERR("Unable to configure pin %u on %s for input", gpio->spec.pin, + gpio->spec.port->name); return err; } - LOG_DBG("Configured pin %u on %s for input", gpio->pin, gpio->port->name); + LOG_DBG("Configured pin %u on %s for input", gpio->spec.pin, gpio->spec.port->name); #if USE_INTERRUPTS struct kscan_matrix_data *data = dev->data; - struct kscan_matrix_irq_callback *irq = &data->irqs[index]; + struct kscan_matrix_irq_callback *irq = &data->irqs[gpio->index]; irq->dev = dev; - gpio_init_callback(&irq->callback, kscan_matrix_irq_callback_handler, BIT(gpio->pin)); - err = gpio_add_callback(gpio->port, &irq->callback); + gpio_init_callback(&irq->callback, kscan_matrix_irq_callback_handler, BIT(gpio->spec.pin)); + err = gpio_add_callback(gpio->spec.port, &irq->callback); if (err) { LOG_ERR("Error adding the callback to the input device: %i", err); return err; @@ -361,11 +358,11 @@ static int kscan_matrix_init_input_inst(const struct device *dev, const struct g } static int kscan_matrix_init_inputs(const struct device *dev) { - const struct kscan_matrix_config *config = dev->config; + const struct kscan_matrix_data *data = dev->data; - for (int i = 0; i < config->inputs.len; i++) { - const struct gpio_dt_spec *gpio = &config->inputs.gpios[i]; - int err = kscan_matrix_init_input_inst(dev, gpio, i); + for (int i = 0; i < data->inputs.len; i++) { + const struct kscan_gpio *gpio = &data->inputs.gpios[i]; + int err = kscan_matrix_init_input_inst(dev, gpio); if (err) { return err; } @@ -396,7 +393,7 @@ static int kscan_matrix_init_outputs(const struct device *dev) { const struct kscan_matrix_config *config = dev->config; for (int i = 0; i < config->outputs.len; i++) { - const struct gpio_dt_spec *gpio = &config->outputs.gpios[i]; + const struct gpio_dt_spec *gpio = &config->outputs.gpios[i].spec; int err = kscan_matrix_init_output_inst(dev, gpio); if (err) { return err; @@ -411,6 +408,9 @@ static int kscan_matrix_init(const struct device *dev) { data->dev = dev; + // Sort inputs by port so we can read each port just once per scan. + kscan_gpio_list_sort_by_port(&data->inputs); + kscan_matrix_init_inputs(dev); kscan_matrix_init_outputs(dev); kscan_matrix_set_all_outputs(dev, 0); @@ -432,10 +432,10 @@ static const struct kscan_driver_api kscan_matrix_api = { BUILD_ASSERT(INST_DEBOUNCE_RELEASE_MS(n) <= DEBOUNCE_COUNTER_MAX, \ "ZMK_KSCAN_DEBOUNCE_RELEASE_MS or debounce-release-ms is too large"); \ \ - static const struct gpio_dt_spec kscan_matrix_rows_##n[] = { \ + static struct kscan_gpio kscan_matrix_rows_##n[] = { \ LISTIFY(INST_ROWS_LEN(n), KSCAN_GPIO_ROW_CFG_INIT, (, ), n)}; \ \ - static const struct gpio_dt_spec kscan_matrix_cols_##n[] = { \ + static struct kscan_gpio kscan_matrix_cols_##n[] = { \ LISTIFY(INST_COLS_LEN(n), KSCAN_GPIO_COL_CFG_INIT, (, ), n)}; \ \ static struct debounce_state kscan_matrix_state_##n[INST_MATRIX_LEN(n)]; \ @@ -444,14 +444,14 @@ static const struct kscan_driver_api kscan_matrix_api = { (static struct kscan_matrix_irq_callback kscan_matrix_irqs_##n[INST_INPUTS_LEN(n)];)) \ \ static struct kscan_matrix_data kscan_matrix_data_##n = { \ + .inputs = \ + KSCAN_GPIO_LIST(COND_DIODE_DIR(n, (kscan_matrix_cols_##n), (kscan_matrix_rows_##n))), \ .matrix_state = kscan_matrix_state_##n, \ COND_INTERRUPTS((.irqs = kscan_matrix_irqs_##n, ))}; \ \ static struct kscan_matrix_config kscan_matrix_config_##n = { \ - .rows = KSCAN_GPIO_LIST(kscan_matrix_rows_##n), \ - .cols = KSCAN_GPIO_LIST(kscan_matrix_cols_##n), \ - .inputs = \ - KSCAN_GPIO_LIST(COND_DIODE_DIR(n, (kscan_matrix_cols_##n), (kscan_matrix_rows_##n))), \ + .rows = ARRAY_SIZE(kscan_matrix_rows_##n), \ + .cols = ARRAY_SIZE(kscan_matrix_cols_##n), \ .outputs = \ KSCAN_GPIO_LIST(COND_DIODE_DIR(n, (kscan_matrix_rows_##n), (kscan_matrix_cols_##n))), \ .debounce_config = \ From a2af74f5ab4d2d7142791ae55cab11d59b29bc4d Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Mon, 29 May 2023 21:25:12 -0700 Subject: [PATCH 019/160] feat(docs): Add note on modifier functions to macros --- docs/docs/behaviors/macros.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/docs/behaviors/macros.md b/docs/docs/behaviors/macros.md index 1648892e9f7..1628e0cb554 100644 --- a/docs/docs/behaviors/macros.md +++ b/docs/docs/behaviors/macros.md @@ -33,7 +33,7 @@ A macro definition looks like: :::note The text before the colon (`:`) in the declaration of the macro node is the "node label", and is the text -used to reference the macro in your keymap +used to reference the macro in your keymap. ::: The macro can then be bound in your keymap by referencing it by the label `&zed_em_kay`, e.g.: @@ -44,6 +44,11 @@ The macro can then be bound in your keymap by referencing it by the label `&zed_ }; ``` +:::note +For use cases involving sending a single keycode with modifiers, for instance ctrl+tab, the [key press behavior](key-press.md) +with [modifier functions](../codes/modifiers.mdx#modifier-functions) can be used instead of a macro. +::: + ### Bindings Like [hold-taps](/docs/behaviors/hold-tap), macros are created by composing other behaviors, and any of those behaviors can From 0508718d6ce8b40adbe932b0bd9bb30ee5e0bbf5 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Mon, 29 May 2023 21:52:16 -0700 Subject: [PATCH 020/160] feat(docs): Add behavior types section for hold-tap --- docs/docs/behaviors/hold-tap.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/docs/behaviors/hold-tap.md b/docs/docs/behaviors/hold-tap.md index f0096606938..2a8489a15ab 100644 --- a/docs/docs/behaviors/hold-tap.md +++ b/docs/docs/behaviors/hold-tap.md @@ -133,6 +133,23 @@ See the following example, which uses a hold-tap behavior definition, configured By default, `hold-trigger-key-positions` are evaluated upon the first _key press_ after the hold-tap. For homerow mods, this is not always ideal, because it prevents combining multiple modifiers unless they are included in `hold-trigger-key-positions`. To overwrite this behavior, one can set `hold-trigger-on-release`. If set to true, the evaluation of `hold-trigger-key-positions` gets delayed until _key release_. This allows combining multiple modifiers when the next key is _held_, while still deciding the hold-tap in favor of a tap when the next key is _tapped_. +#### Using different behavior types with hold-taps + +You can create instances of hold-taps invoking most [behavior types](../features/keymaps.md#behaviors) for hold or tap actions, by referencing their node labels in the `bindings` value. +The two parameters that are passed to the hold-tap in your keymap will be forwarded to the referred behaviors, first one to the hold behavior and second one to the tap. + +If you use behaviors that accept no parameters such as [mod-morphs](mod-morph.md) or [macros](macros.md), you can pass a dummy parameter value such as `0` to the hold-tap when you use it in your keymap. +For instance, a hold-tap with node label `caps` and `bindings = <&kp>, <&caps_word>;` can be used in the keymap as below to send the caps lock keycode on hold and invoke the [caps word behavior](caps-word.md) on tap: + +``` +&caps CAPS 0 +``` + +:::info +You cannot use behaviors that expect more than one parameter such as [`&bt`](bluetooth.md) and [`&rgb_ug`](underglow.md) with hold-taps, due to the limitations of the [devicetree keymap format](../config/index.md#devicetree-files). +One workaround is to create a [macro](macros.md) that invokes those behaviors and use the macro as the hold or tap action. +::: + ### Example Use-Cases Date: Mon, 29 May 2023 22:03:24 -0700 Subject: [PATCH 021/160] feat(docs): Add troubleshooting for Windows issue --- docs/docs/features/bluetooth.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/docs/features/bluetooth.md b/docs/docs/features/bluetooth.md index f1a3e2416fe..ff1823984b4 100644 --- a/docs/docs/features/bluetooth.md +++ b/docs/docs/features/bluetooth.md @@ -57,3 +57,18 @@ If you attempt to pair a ZMK keyboard from macOS in a way that causes a bonding 1. Remove the keyboard from macOS using the Bluetooth control panel. 1. Invoke `&bt BT_CLR` on the keyboard while the profile associated with the macOS device is active, by pressing the correct keys for your particular keymap. 1. Try connecting again from macOS. + +### Windows Connected But Not Working + +Occasionally pairing the keyboard to a Windows device might result in a state where the keyboard is connected but does not send any key strokes. +If this occurs: + +1. Remove the keyboard from Windows using the Bluetooth settings. +1. Invoke `&bt BT_CLR` on the keyboard while the profile associated with the Windows device is active, by pressing the correct keys for your particular keymap. +1. Turn off Bluetooth from Windows settings, then turn it back on. +1. Pair the keyboard to the Windows device. + +If this doesn't help, try following the procedure above but replace step 3 with one of the following: + +- Restart the Windows device +- Open "Device Manager," turn on "Show hidden devices" from the "View" menu, then find and delete the keyboard under the "Bluetooth" item From 30ba4b08aed896d77fb7ade96ef0334d8f30af5d Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Mon, 29 May 2023 22:06:09 -0700 Subject: [PATCH 022/160] feat(docs): Add pointer to Bluetooth page in troubleshooting --- docs/docs/troubleshooting.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index 96f729b9631..e8a05b6bb46 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -5,6 +5,8 @@ sidebar_title: Troubleshooting The following page provides suggestions for common errors that may occur during firmware compilation or other issues with keyboard usage. If the information provided is insufficient to resolve the issue, feel free to seek out help from the [ZMK Discord](https://zmk.dev/community/discord/invite). +Please also see [the troubleshooting section](features/bluetooth.md#troubleshooting) under the Bluetooth feature page. + ### File Transfer Error Variations of the warnings shown below occur when flashing the `.uf2` onto the microcontroller. This is because the microcontroller resets itself before the OS receives confirmation that the file transfer is complete. Errors like this are normal and can generally be ignored. Verification of a functional board can be done by attempting to pair your newly flashed keyboard to your computer via Bluetooth or plugging in a USB cable if `ZMK_USB` is enabled in your Kconfig.defconfig. From a9ad11f91e82e214d91cf9bf1586431060759f06 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 2 Jun 2023 18:42:50 -0700 Subject: [PATCH 023/160] refactor(docs): Move BT troubleshooting items to BT page --- docs/docs/features/bluetooth.md | 14 ++++++++++++++ docs/docs/troubleshooting.md | 16 +--------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/docs/features/bluetooth.md b/docs/docs/features/bluetooth.md index ff1823984b4..386ad70e7f0 100644 --- a/docs/docs/features/bluetooth.md +++ b/docs/docs/features/bluetooth.md @@ -38,6 +38,20 @@ Management of the bluetooth in ZMK is accomplished using the [`&bt` behavior](.. ## Troubleshooting +### Connectivity Issues + +Some users may experience a poor connection between the keyboard and the host. This might be due to poor quality BLE hardware, a metal enclosure on the keyboard or host, or the distance between them. Increasing the transmit power of the keyboard's BLE radio may reduce the severity of this problem. To do this, set the `CONFIG_BT_CTLR_TX_PWR_PLUS_8` configuration value in the `.conf` file of your user config directory as such: + +``` +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y +``` + +For the `nRF52840`, the value `PLUS_8` can be set to any multiple of four between `MINUS_20` and `PLUS_8`. The default value for this config is `0`, but if you are having connection issues it is recommended to set it to `PLUS_8` because the power consumption difference is negligible. For more information on changing the transmit power of your BLE device, please refer to [the Zephyr docs.](https://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_CTLR_TX_PWR) + +### Using bluetooth output with USB power + +If you want to test bluetooth output on your keyboard and are powering it through the USB connection rather than a battery, you will be able to pair with a host device but may not see keystrokes sent. In this case you need to use the [output selection behavior](../docs/behaviors/outputs.md) to prefer sending keystrokes over bluetooth rather than USB. This might be necessary even if you are not powering from a device capable of receiving USB inputs, such as a USB charger. + ## Known Issues There are a few known issues related to BLE and ZMK: diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index e8a05b6bb46..d47671bce36 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -5,7 +5,7 @@ sidebar_title: Troubleshooting The following page provides suggestions for common errors that may occur during firmware compilation or other issues with keyboard usage. If the information provided is insufficient to resolve the issue, feel free to seek out help from the [ZMK Discord](https://zmk.dev/community/discord/invite). -Please also see [the troubleshooting section](features/bluetooth.md#troubleshooting) under the Bluetooth feature page. +Please also see [the troubleshooting section](features/bluetooth.md#troubleshooting) under the Bluetooth feature page for issues related to bluetooth. ### File Transfer Error @@ -102,17 +102,3 @@ Perform the following steps to reset both halves of your split keyboard: 1. Flash the actual image for each half of the split keyboard (e.g `my_board_left.uf2` to the left half, `my_board_right.uf2` to the right half). After completing these steps, pair the halves of the split keyboard together by resetting them at the same time. Most commonly, this is done by grounding the reset pins for each of your keyboard's microcontrollers or pressing the reset buttons at the same time. - -### Connectivity Issues - -Some users may experience a poor connection between the keyboard and the host. This might be due to poor quality BLE hardware, a metal enclosure on the keyboard or host, or the distance between them. Increasing the transmit power of the keyboard's BLE radio may reduce the severity of this problem. To do this, set the `CONFIG_BT_CTLR_TX_PWR_PLUS_8` configuration value in the `.conf` file of your user config directory as such: - -``` -CONFIG_BT_CTLR_TX_PWR_PLUS_8=y -``` - -For the `nRF52840`, the value `PLUS_8` can be set to any multiple of four between `MINUS_20` and `PLUS_8`. The default value for this config is `0`, but if you are having connection issues it is recommended to set it to `PLUS_8` because the power consumption difference is negligible. For more information on changing the transmit power of your BLE device, please refer to [the Zephyr docs.](https://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_CTLR_TX_PWR) - -### Other notes and warnings - -- If you want to test bluetooth output on your keyboard and are powering it through the USB connection rather than a battery, you will be able to pair with a host device but may not see keystrokes sent. In this case you need to use the [output selection behavior](../docs/behaviors/outputs.md) to prefer sending keystrokes over bluetooth rather than USB. This might be necessary even if you are not powering from a device capable of receiving USB inputs, such as a USB charger. From 0682bc3aa6d9b9deac48b5aa6c781241075819b3 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 2 Jun 2023 18:45:15 -0700 Subject: [PATCH 024/160] feat(docs): Note split connectivity improvement with TX power --- docs/docs/features/bluetooth.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docs/features/bluetooth.md b/docs/docs/features/bluetooth.md index 386ad70e7f0..9637c4d00c9 100644 --- a/docs/docs/features/bluetooth.md +++ b/docs/docs/features/bluetooth.md @@ -48,6 +48,10 @@ CONFIG_BT_CTLR_TX_PWR_PLUS_8=y For the `nRF52840`, the value `PLUS_8` can be set to any multiple of four between `MINUS_20` and `PLUS_8`. The default value for this config is `0`, but if you are having connection issues it is recommended to set it to `PLUS_8` because the power consumption difference is negligible. For more information on changing the transmit power of your BLE device, please refer to [the Zephyr docs.](https://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_CTLR_TX_PWR) +:::info +This setting can also improve the connection strength between the keyboard halves for split keyboards. +::: + ### Using bluetooth output with USB power If you want to test bluetooth output on your keyboard and are powering it through the USB connection rather than a battery, you will be able to pair with a host device but may not see keystrokes sent. In this case you need to use the [output selection behavior](../docs/behaviors/outputs.md) to prefer sending keystrokes over bluetooth rather than USB. This might be necessary even if you are not powering from a device capable of receiving USB inputs, such as a USB charger. From ace11e327fbfb4c4c894bb66328156d4d0b7eda0 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 2 Jun 2023 20:46:13 -0700 Subject: [PATCH 025/160] fix(docs): Fix broken link in BT troubleshooting --- docs/docs/features/bluetooth.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/features/bluetooth.md b/docs/docs/features/bluetooth.md index 9637c4d00c9..b75b89537d4 100644 --- a/docs/docs/features/bluetooth.md +++ b/docs/docs/features/bluetooth.md @@ -54,7 +54,7 @@ This setting can also improve the connection strength between the keyboard halve ### Using bluetooth output with USB power -If you want to test bluetooth output on your keyboard and are powering it through the USB connection rather than a battery, you will be able to pair with a host device but may not see keystrokes sent. In this case you need to use the [output selection behavior](../docs/behaviors/outputs.md) to prefer sending keystrokes over bluetooth rather than USB. This might be necessary even if you are not powering from a device capable of receiving USB inputs, such as a USB charger. +If you want to test bluetooth output on your keyboard and are powering it through the USB connection rather than a battery, you will be able to pair with a host device but may not see keystrokes sent. In this case you need to use the [output selection behavior](../behaviors/outputs.md) to prefer sending keystrokes over bluetooth rather than USB. This might be necessary even if you are not powering from a device capable of receiving USB inputs, such as a USB charger. ## Known Issues From 19d883cdfe679977023116dcf689ce67a6ce548d Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 3 Jun 2023 02:53:20 +0000 Subject: [PATCH 026/160] fix(bluetooth): Passkey pairing improvements. * Capture the last 6 entered digits, and then require pressing Enter/Return to submit the entered digits. This matches the messaging shown on hosts regarding how to complete pairing. * Fix the wording on the Kconfig menu item to accurately describe the feature. --- app/Kconfig | 3 ++- app/src/ble.c | 47 +++++++++++++++++++++-------------- docs/docs/config/bluetooth.md | 7 +++--- 3 files changed, 34 insertions(+), 23 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index d1b6682f507..1537bd61512 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -160,8 +160,9 @@ config BT_DEVICE_APPEARANCE default 961 config ZMK_BLE_PASSKEY_ENTRY - bool "Experimental: Requiring typing passkey from host to pair BLE connection" + bool "Require passkey entry on the keyboard to complete pairing" default n + select RING_BUFFER config BT_PERIPHERAL_PREF_MIN_INT default 6 diff --git a/app/src/ble.c b/app/src/ble.c index c7bdc401b66..383a727d268 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include @@ -42,8 +43,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #define PASSKEY_DIGITS 6 static struct bt_conn *auth_passkey_entry_conn; -static uint8_t passkey_entries[PASSKEY_DIGITS] = {}; -static uint8_t passkey_digit = 0; +RING_BUF_DECLARE(passkey_entries, PASSKEY_DIGITS); #endif /* IS_ENABLED(CONFIG_ZMK_BLE_PASSKEY_ENTRY) */ @@ -469,7 +469,7 @@ static void auth_passkey_entry(struct bt_conn *conn) { bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr)); LOG_DBG("Passkey entry requested for %s", addr); - passkey_digit = 0; + ring_buf_reset(&passkey_entries); auth_passkey_entry_conn = bt_conn_ref(conn); } @@ -486,7 +486,7 @@ static void auth_cancel(struct bt_conn *conn) { auth_passkey_entry_conn = NULL; } - passkey_digit = 0; + ring_buf_reset(&passkey_entries); #endif LOG_DBG("Pairing cancelled: %s", addr); @@ -605,7 +605,7 @@ static int zmk_ble_init(const struct device *_arg) { #if IS_ENABLED(CONFIG_ZMK_BLE_PASSKEY_ENTRY) static bool zmk_ble_numeric_usage_to_value(const zmk_key_t key, const zmk_key_t one, - const zmk_key_t zero, uint32_t *value) { + const zmk_key_t zero, uint8_t *value) { if (key < one || key > zero) { return false; } @@ -634,29 +634,38 @@ static int zmk_ble_handle_key_user(struct zmk_keycode_state_changed *event) { return ZMK_EV_EVENT_HANDLED; } - uint32_t val; - if (!(zmk_ble_numeric_usage_to_value(key, HID_USAGE_KEY_KEYBOARD_1_AND_EXCLAMATION, - HID_USAGE_KEY_KEYBOARD_0_AND_RIGHT_PARENTHESIS, &val) || - zmk_ble_numeric_usage_to_value(key, HID_USAGE_KEY_KEYPAD_1_AND_END, - HID_USAGE_KEY_KEYPAD_0_AND_INSERT, &val))) { - LOG_DBG("Key not a number, ignoring"); - return ZMK_EV_EVENT_BUBBLE; - } - - passkey_entries[passkey_digit++] = val; - LOG_DBG("value entered: %d, digits collected so far: %d", val, passkey_digit); + if (key == HID_USAGE_KEY_KEYBOARD_RETURN || key == HID_USAGE_KEY_KEYBOARD_RETURN_ENTER) { + uint8_t digits[PASSKEY_DIGITS]; + uint32_t count = ring_buf_get(&passkey_entries, digits, PASSKEY_DIGITS); - if (passkey_digit == PASSKEY_DIGITS) { uint32_t passkey = 0; - for (int i = 0; i < PASSKEY_DIGITS; i++) { - passkey = (passkey * 10) + passkey_entries[i]; + for (int i = 0; i < count; i++) { + passkey = (passkey * 10) + digits[i]; } LOG_DBG("Final passkey: %d", passkey); bt_conn_auth_passkey_entry(auth_passkey_entry_conn, passkey); bt_conn_unref(auth_passkey_entry_conn); auth_passkey_entry_conn = NULL; + return ZMK_EV_EVENT_HANDLED; + } + + uint8_t val; + if (!(zmk_ble_numeric_usage_to_value(key, HID_USAGE_KEY_KEYBOARD_1_AND_EXCLAMATION, + HID_USAGE_KEY_KEYBOARD_0_AND_RIGHT_PARENTHESIS, &val) || + zmk_ble_numeric_usage_to_value(key, HID_USAGE_KEY_KEYPAD_1_AND_END, + HID_USAGE_KEY_KEYPAD_0_AND_INSERT, &val))) { + LOG_DBG("Key not a number, ignoring"); + return ZMK_EV_EVENT_BUBBLE; + } + + if (ring_buf_space_get(&passkey_entries) <= 0) { + uint8_t discard_val; + ring_buf_get(&passkey_entries, &discard_val, 1); } + ring_buf_put(&passkey_entries, &val, 1); + LOG_DBG("value entered: %d, digits collected so far: %d", val, + ring_buf_size_get(&passkey_entries)); return ZMK_EV_EVENT_HANDLED; } diff --git a/docs/docs/config/bluetooth.md b/docs/docs/config/bluetooth.md index 420dd5c3627..d2ddefddbd1 100644 --- a/docs/docs/config/bluetooth.md +++ b/docs/docs/config/bluetooth.md @@ -9,6 +9,7 @@ See [Configuration Overview](index.md) for instructions on how to change these s ## Kconfig -| Option | Type | Description | Default | -| ------------------------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------- | ------- | -| `CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION` | bool | Low level setting for GATT subscriptions. Set to `n` to work around an annoying Windows bug with battery notifications. | y | +| Option | Type | Description | Default | +| ------------------------------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| `CONFIG_ZMK_BLE_PASSKEY_ENTRY` | bool | Enable passkey entry during pairing for enhanced security. (Note: After enabling this, you will need to re-pair all previously paired hosts) | n | +| `CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION` | bool | Low level setting for GATT subscriptions. Set to `n` to work around an annoying Windows bug with battery notifications. | y | From f08802eaa735b87fa089b81512a941a1bcc8ca4b Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 5 Jun 2023 05:04:13 +0000 Subject: [PATCH 027/160] fix(boards): Proper i2c pinctrl for BlueMicro840 * Use the proper pin assignmets after the move to pinctrl for the Zephyr 3.2 migration. --- .../arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi b/app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi index 15c48509202..868d3c27ad7 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi +++ b/app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi @@ -17,22 +17,22 @@ uart0_sleep: uart0_sleep { group1 { psels = , - ; + ; low-power-enable; }; }; i2c0_default: i2c0_default { group1 { - psels = , - ; + psels = , + ; }; }; i2c0_sleep: i2c0_sleep { group1 { - psels = , - ; + psels = , + ; low-power-enable; }; }; From 5d9ae8fffa869f36e3e0911bed92d41ed8640826 Mon Sep 17 00:00:00 2001 From: Xudong Zheng <7pkvm5aw@slicealias.com> Date: Fri, 17 Jun 2022 17:44:31 -0400 Subject: [PATCH 028/160] feat(split): allow central to connect to multiple peripherals --- app/include/zmk/ble.h | 6 +- app/src/ble.c | 54 ++++++++---- app/src/split/bluetooth/Kconfig | 4 + app/src/split/bluetooth/central.c | 138 ++++++++++++++++++------------ 4 files changed, 130 insertions(+), 72 deletions(-) diff --git a/app/include/zmk/ble.h b/app/include/zmk/ble.h index 1c84777d757..435fde49654 100644 --- a/app/include/zmk/ble.h +++ b/app/include/zmk/ble.h @@ -14,8 +14,8 @@ IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)) #if ZMK_BLE_IS_CENTRAL -#define ZMK_BLE_PROFILE_COUNT (CONFIG_BT_MAX_PAIRED - 1) -#define ZMK_SPLIT_BLE_PERIPHERAL_COUNT 1 +#define ZMK_BLE_PROFILE_COUNT (CONFIG_BT_MAX_PAIRED - CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS) +#define ZMK_SPLIT_BLE_PERIPHERAL_COUNT CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS #else #define ZMK_BLE_PROFILE_COUNT CONFIG_BT_MAX_PAIRED #endif @@ -34,5 +34,5 @@ char *zmk_ble_active_profile_name(); int zmk_ble_unpair_all(); #if IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) -void zmk_ble_set_peripheral_addr(bt_addr_le_t *addr); +int zmk_ble_put_peripheral_addr(const bt_addr_le_t *addr); #endif /* IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) */ diff --git a/app/src/ble.c b/app/src/ble.c index 383a727d268..ff82f3cf40a 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -47,12 +47,6 @@ RING_BUF_DECLARE(passkey_entries, PASSKEY_DIGITS); #endif /* IS_ENABLED(CONFIG_ZMK_BLE_PASSKEY_ENTRY) */ -#if IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) -#define PROFILE_COUNT (CONFIG_BT_MAX_PAIRED - 1) -#else -#define PROFILE_COUNT CONFIG_BT_MAX_PAIRED -#endif - enum advertising_type { ZMK_ADV_NONE, ZMK_ADV_DIR, @@ -84,7 +78,7 @@ static const struct bt_data zmk_ble_ad[] = { #if IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) -static bt_addr_le_t peripheral_addr; +static bt_addr_le_t peripheral_addrs[ZMK_SPLIT_BLE_PERIPHERAL_COUNT]; #endif /* IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) */ @@ -283,9 +277,34 @@ char *zmk_ble_active_profile_name() { return profiles[active_profile].name; } #if IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) -void zmk_ble_set_peripheral_addr(bt_addr_le_t *addr) { - memcpy(&peripheral_addr, addr, sizeof(bt_addr_le_t)); - settings_save_one("ble/peripheral_address", addr, sizeof(bt_addr_le_t)); +int zmk_ble_put_peripheral_addr(const bt_addr_le_t *addr) { + for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { + // If the address is recognized and already stored in settings, return + // index and no additional action is necessary. + if (!bt_addr_le_cmp(&peripheral_addrs[i], addr)) { + return i; + } + + // If the peripheral address slot is open, store new peripheral in the + // slot and return index. This compares against BT_ADDR_LE_ANY as that + // is the zero value. + if (!bt_addr_le_cmp(&peripheral_addrs[i], BT_ADDR_LE_ANY)) { + char addr_str[BT_ADDR_LE_STR_LEN]; + bt_addr_le_to_str(addr, addr_str, sizeof(addr_str)); + LOG_DBG("Storing peripheral %s in slot %d", addr_str, i); + bt_addr_le_copy(&peripheral_addrs[i], addr); + + char setting_name[32]; + sprintf(setting_name, "ble/peripheral_addresses/%d", i); + settings_save_one(setting_name, addr, sizeof(bt_addr_le_t)); + + return i; + } + } + + // The peripheral does not match a known peripheral and there is no + // available slot. + return -ENOMEM; } #endif /* IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) */ @@ -340,15 +359,20 @@ static int ble_profiles_handle_set(const char *name, size_t len, settings_read_c } } #if IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) - else if (settings_name_steq(name, "peripheral_address", &next) && !next) { + else if (settings_name_steq(name, "peripheral_addresses", &next) && next) { if (len != sizeof(bt_addr_le_t)) { return -EINVAL; } - int err = read_cb(cb_arg, &peripheral_addr, sizeof(bt_addr_le_t)); - if (err <= 0) { - LOG_ERR("Failed to handle peripheral address from settings (err %d)", err); - return err; + int i = atoi(next); + if (i < 0 || i >= ZMK_SPLIT_BLE_PERIPHERAL_COUNT) { + LOG_ERR("Failed to store peripheral address in memory"); + } else { + int err = read_cb(cb_arg, &peripheral_addrs[i], sizeof(bt_addr_le_t)); + if (err <= 0) { + LOG_ERR("Failed to handle peripheral address from settings (err %d)", err); + return err; + } } } #endif diff --git a/app/src/split/bluetooth/Kconfig b/app/src/split/bluetooth/Kconfig index 005d75fd43b..e2c8d5c3395 100644 --- a/app/src/split/bluetooth/Kconfig +++ b/app/src/split/bluetooth/Kconfig @@ -17,6 +17,10 @@ config ZMK_SPLIT_ROLE_CENTRAL if ZMK_SPLIT_ROLE_CENTRAL +config ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS + int "Number of peripherals that will connect to the central." + default 1 + config ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE int "Max number of key position state events to queue when received from peripherals" default 5 diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index a7c0d8a9964..53e61be621a 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -26,7 +26,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include -static int start_scan(void); +static int start_scanning(void); #define POSITION_STATE_DATA_LEN 16 @@ -49,6 +49,8 @@ struct peripheral_slot { static struct peripheral_slot peripherals[ZMK_SPLIT_BLE_PERIPHERAL_COUNT]; +static bool is_scanning = false; + static const struct bt_uuid_128 split_service_uuid = BT_UUID_INIT_128(ZMK_SPLIT_BT_SERVICE_UUID); K_MSGQ_DEFINE(peripheral_event_msgq, sizeof(struct zmk_position_state_changed), @@ -130,8 +132,9 @@ int release_peripheral_slot(int index) { return 0; } -int reserve_peripheral_slot() { - for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { +int reserve_peripheral_slot(const bt_addr_le_t *addr) { + int i = zmk_ble_put_peripheral_addr(addr); + if (i >= 0) { if (peripherals[i].state == PERIPHERAL_SLOT_STATE_OPEN) { // Be sure the slot is fully reinitialized. release_peripheral_slot(i); @@ -344,9 +347,54 @@ static void split_central_process_connection(struct bt_conn *conn) { LOG_DBG("New connection params: Interval: %d, Latency: %d, PHY: %d", info.le.interval, info.le.latency, info.le.phy->rx_phy); + + // Restart scanning if necessary. + start_scanning(); +} + +static int stop_scanning() { + LOG_DBG("Stopping peripheral scanning"); + is_scanning = false; + + int err = bt_le_scan_stop(); + if (err < 0) { + LOG_ERR("Stop LE scan failed (err %d)", err); + return err; + } + + return 0; } -static bool split_central_eir_found(struct bt_data *data, void *user_data) { +static bool split_central_eir_found(const bt_addr_le_t *addr) { + LOG_DBG("Found the split service"); + + // Stop scanning so we can connect to the peripheral device. + int err = stop_scanning(); + if (err < 0) { + return false; + } + + int slot_idx = reserve_peripheral_slot(addr); + if (slot_idx < 0) { + LOG_ERR("Failed to reserve peripheral slot (err %d)", slot_idx); + return false; + } + + struct peripheral_slot *slot = &peripherals[slot_idx]; + + LOG_DBG("Initiating new connnection"); + struct bt_le_conn_param *param = BT_LE_CONN_PARAM(0x0006, 0x0006, 30, 400); + err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, param, &slot->conn); + if (err < 0) { + LOG_ERR("Create conn failed (err %d) (create conn? 0x%04x)", err, BT_HCI_OP_LE_CREATE_CONN); + release_peripheral_slot(slot_idx); + start_scanning(); + } + + return false; +} + +static bool split_central_eir_parse(struct bt_data *data, void *user_data) { bt_addr_le_t *addr = user_data; int i; @@ -361,9 +409,7 @@ static bool split_central_eir_found(struct bt_data *data, void *user_data) { } for (i = 0; i < data->data_len; i += 16) { - struct bt_le_conn_param *param; struct bt_uuid_128 uuid; - int err; if (!bt_uuid_create(&uuid.uuid, &data->data[i], 16)) { LOG_ERR("Unable to load UUID"); @@ -381,46 +427,7 @@ static bool split_central_eir_found(struct bt_data *data, void *user_data) { continue; } - LOG_DBG("Found the split service"); - - zmk_ble_set_peripheral_addr(addr); - - err = bt_le_scan_stop(); - if (err) { - LOG_ERR("Stop LE scan failed (err %d)", err); - continue; - } - - uint8_t slot_idx = reserve_peripheral_slot(); - if (slot_idx < 0) { - LOG_ERR("Faild to reserve peripheral slot (err %d)", slot_idx); - continue; - } - - struct peripheral_slot *slot = &peripherals[slot_idx]; - - slot->conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, addr); - if (slot->conn) { - LOG_DBG("Found existing connection"); - split_central_process_connection(slot->conn); - err = bt_conn_le_phy_update(slot->conn, BT_CONN_LE_PHY_PARAM_2M); - if (err) { - LOG_ERR("Update phy conn failed (err %d)", err); - } - } else { - param = BT_LE_CONN_PARAM(0x0006, 0x0006, 30, 400); - - LOG_DBG("Initiating new connnection"); - - err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, param, &slot->conn); - if (err) { - LOG_ERR("Create conn failed (err %d) (create conn? 0x%04x)", err, - BT_HCI_OP_LE_CREATE_CONN); - start_scan(); - } - } - - return false; + return split_central_eir_found(addr); } } @@ -436,15 +443,34 @@ static void split_central_device_found(const bt_addr_le_t *addr, int8_t rssi, ui /* We're only interested in connectable events */ if (type == BT_GAP_ADV_TYPE_ADV_IND || type == BT_GAP_ADV_TYPE_ADV_DIRECT_IND) { - bt_data_parse(ad, split_central_eir_found, (void *)addr); + bt_data_parse(ad, split_central_eir_parse, (void *)addr); } } -static int start_scan(void) { - int err; +static int start_scanning(void) { + // No action is necessary if central is already scanning. + if (is_scanning) { + LOG_DBG("Scanning already running"); + return 0; + } - err = bt_le_scan_start(BT_LE_SCAN_PASSIVE, split_central_device_found); - if (err) { + // If all the devices are connected, there is no need to scan. + bool has_unconnected = false; + for (int i = 0; i < CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS; i++) { + if (peripherals[i].conn == NULL) { + has_unconnected = true; + break; + } + } + if (!has_unconnected) { + LOG_DBG("All devices are connected, scanning is unnecessary"); + return 0; + } + + // Start scanning otherwise. + is_scanning = true; + int err = bt_le_scan_start(BT_LE_SCAN_PASSIVE, split_central_device_found); + if (err < 0) { LOG_ERR("Scanning failed to start (err %d)", err); return err; } @@ -471,7 +497,7 @@ static void split_central_connected(struct bt_conn *conn, uint8_t conn_err) { release_peripheral_slot_for_conn(conn); - start_scan(); + start_scanning(); return; } @@ -495,7 +521,7 @@ static void split_central_disconnected(struct bt_conn *conn, uint8_t reason) { return; } - start_scan(); + start_scanning(); } static struct bt_conn_cb conn_callbacks = { @@ -527,6 +553,10 @@ void split_central_split_run_callback(struct k_work *work) { LOG_ERR("Source not connected"); continue; } + if (!peripherals[payload_wrapper.source].run_behavior_handle) { + LOG_ERR("Run behavior handle not found"); + continue; + } int err = bt_gatt_write_without_response( peripherals[payload_wrapper.source].conn, @@ -590,7 +620,7 @@ int zmk_split_bt_central_init(const struct device *_arg) { CONFIG_ZMK_BLE_THREAD_PRIORITY, NULL); bt_conn_cb_register(&conn_callbacks); - return start_scan(); + return start_scanning(); } SYS_INIT(zmk_split_bt_central_init, APPLICATION, CONFIG_ZMK_BLE_INIT_PRIORITY); From a5c57fa224ba410100dde4e64222505bfb2b89ea Mon Sep 17 00:00:00 2001 From: Albert Y <76888457+filterpaper@users.noreply.github.com> Date: Tue, 6 Jun 2023 13:22:39 +0800 Subject: [PATCH 029/160] feat(docs): Add an example for combining just modifiers (#1826) Co-authored-by: Cem Aksoylar --- docs/docs/codes/modifiers.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/codes/modifiers.mdx b/docs/docs/codes/modifiers.mdx index 483e34af026..db88ee926d2 100644 --- a/docs/docs/codes/modifiers.mdx +++ b/docs/docs/codes/modifiers.mdx @@ -38,6 +38,8 @@ These functions take the form: `XX(code)` - `&kp LS(A)` = `LEFT_SHIFT`+`A` (a capitalized **A**). - They can be combined: - `&kp LC(RA(B))` = `LEFT_CONTROL`+`RIGHT_ALT`+`B` +- They can be applied to a modifier keycode to create combined modifier keys: + - `&kp LS(LALT)` = `LEFT_SHIFT` + `LEFT_ALT` - Some basic codes already include a modifier function in their definition: - `DOLLAR` = `LS(NUMBER_4)` - There are left- and right-handed versions of each modifier (also see table above): From 98524a95671fe9d819a65d1515f9bc37895efc3d Mon Sep 17 00:00:00 2001 From: kadoyau <11990327+kadoyau@users.noreply.github.com> Date: Sun, 11 Jun 2023 04:32:50 +0900 Subject: [PATCH 030/160] fix(docs): Fix INT6 keycode description --- docs/src/data/hid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/data/hid.js b/docs/src/data/hid.js index 00d48f3fe67..457671728f8 100644 --- a/docs/src/data/hid.js +++ b/docs/src/data/hid.js @@ -3477,7 +3477,7 @@ export default [ }, { names: ["INTERNATIONAL_6", "INT6", "INT_KPJPCOMMA"], - description: ", [カソマ] (International 6)", + description: ", [カンマ] (International 6)", context: "Keyboard", clarify: false, usages: [ From 9d39a87f67668b4c083e09b04adf006d6fd1385d Mon Sep 17 00:00:00 2001 From: pixls Date: Sat, 10 Jun 2023 20:49:30 -0400 Subject: [PATCH 031/160] fix(docs): Change user-setup.md order to agree with order in setup script Fixes #1281 Co-authored-by: Cem Aksoylar --- docs/docs/user-setup.md | 43 +++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/docs/docs/user-setup.md b/docs/docs/user-setup.md index a2e491b8957..8faa72df85f 100644 --- a/docs/docs/user-setup.md +++ b/docs/docs/user-setup.md @@ -88,34 +88,39 @@ powershell -Command "iex ((New-Object System.Net.WebClient).DownloadString('http -### MCU Board Selection +### Keyboard Selection -When prompted, enter the number for the corresponding MCU board you would like to target: +When prompted, enter the number for the corresponding keyboard you would like to target: ``` -MCU Board Selection: -1) nice!nano -2) QMK Proton-C -3) Quit -Pick an MCU board: +Keyboard Selection: + 1) 2% Milk 19) Ferris 0.2 37) Nibble + 2) A. Dux 20) Fourier Rev. 1 38) nice!60 + 3) BAT43 21) Helix 39) Osprette + 4) BDN9 Rev2 22) Hummingbird 40) Pancake + 5) BFO-9000 23) Iris 41) Planck Rev6 + 6) Boardsource 3x4 Macropad 24) etc... +Pick an keyboard: ``` -### Keyboard Shield Selection - -:::note -If you are building firmware for a new keyboard shield that is not included in the built-in -list of shields, you can choose any shield from the list that is similar to yours to generate the repository, -and edit / add necessary files according to the [guide for adding new keyboard shield](development/new-shield.md). +:::note For a keyboard not in the included list: +If you are building firmware for a new keyboard that is not included in the built-in +list of keyboards, you can choose any keyboard from the list that is similar to yours (e.g. in terms of unibody/split and [onboard controller](hardware.mdx#onboard)/[composite](hardware.mdx#composite)) to generate the repository, +and edit / add necessary files. You can follow the [new shield guide](development/new-shield.md) if you are adding support for a composite keyboard. ::: -When prompted, enter the number for the corresponding keyboard shield you would like to target: +### MCU Board Selection + +If the keyboard selected uses an onboard controller you will skip this step. +When prompted, enter the number for the corresponding MCU board you would like to target: ``` -Keyboard Shield Selection: -1) Kyria -2) Lily58 -3) Quit -Pick an keyboard: +MCU Board Selection: +1) BlueMicro840 v1 5) nRF52840 M.2 Module 9) QMK Proton-C +2) Mikoto 5.20 6) nRFMicro 1.1 (flipped) 10) Seeeduino XIAO +3) nice!nano v1 7) nRFMicro 1.1/1.2 11) Seeeduino XIAO BLE +4) nice!nano v2 8) nRFMicro 1.3/1.4 12) Quit +Pick an MCU board: ``` ### Keymap Customization From 0be0d0763081de0c163dd26c29752d1085381dbb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 11 Jun 2023 04:35:54 +0000 Subject: [PATCH 032/160] chore(deps): bump minimatch and serve-handler in /docs Bumps [minimatch](https://github.com/isaacs/minimatch) and [serve-handler](https://github.com/zeit/serve-handler). These dependencies needed to be updated together. Updates `minimatch` from 3.0.4 to 3.1.2 - [Release notes](https://github.com/isaacs/minimatch/releases) - [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2) Updates `serve-handler` from 6.1.3 to 6.1.5 - [Release notes](https://github.com/zeit/serve-handler/releases) - [Commits](https://github.com/zeit/serve-handler/compare/6.1.3...6.1.5) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect - dependency-name: serve-handler dependency-type: indirect ... Signed-off-by: dependabot[bot] --- docs/package-lock.json | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index 3183a51c144..f0cd1fc88ae 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -13612,31 +13612,20 @@ } }, "node_modules/serve-handler": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", - "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.5.tgz", + "integrity": "sha512-ijPFle6Hwe8zfmBxJdE+5fta53fdIY0lHISJvuikXB3VYFafRjMRpOffSPvCYsbKyBA7pvy9oYr/BT1O3EArlg==", "dependencies": { "bytes": "3.0.0", "content-disposition": "0.5.2", "fast-url-parser": "1.1.3", "mime-types": "2.1.18", - "minimatch": "3.0.4", + "minimatch": "3.1.2", "path-is-inside": "1.0.2", "path-to-regexp": "2.2.1", "range-parser": "1.2.0" } }, - "node_modules/serve-handler/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/serve-handler/node_modules/path-to-regexp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", @@ -25765,28 +25754,20 @@ } }, "serve-handler": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", - "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.5.tgz", + "integrity": "sha512-ijPFle6Hwe8zfmBxJdE+5fta53fdIY0lHISJvuikXB3VYFafRjMRpOffSPvCYsbKyBA7pvy9oYr/BT1O3EArlg==", "requires": { "bytes": "3.0.0", "content-disposition": "0.5.2", "fast-url-parser": "1.1.3", "mime-types": "2.1.18", - "minimatch": "3.0.4", + "minimatch": "3.1.2", "path-is-inside": "1.0.2", "path-to-regexp": "2.2.1", "range-parser": "1.2.0" }, "dependencies": { - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, "path-to-regexp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", From 9d714c0b69fee2098a010d29e534051aeca26386 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 11 Jun 2023 06:47:34 +0000 Subject: [PATCH 033/160] chore(deps-dev): bump webpack from 5.80.0 to 5.86.0 in /docs Bumps [webpack](https://github.com/webpack/webpack) from 5.80.0 to 5.86.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.80.0...v5.86.0) --- updated-dependencies: - dependency-name: webpack dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- docs/package-lock.json | 46 +++++++++++++++++++++--------------------- docs/package.json | 2 +- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index f0cd1fc88ae..5badb07e389 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -42,7 +42,7 @@ "prettier": "^2.8.7", "string-replace-loader": "^3.1.0", "typescript": "^5.0.4", - "webpack": "^5.80.0" + "webpack": "^5.86.0" } }, "node_modules/@algolia/autocomplete-core": { @@ -3950,9 +3950,9 @@ } }, "node_modules/acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", "peerDependencies": { "acorn": "^8" } @@ -6069,9 +6069,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.13.0.tgz", - "integrity": "sha512-eyV8f0y1+bzyfh8xAwW/WTSZpLbjhqc4ne9eGSH4Zo2ejdyiNG9pU6mf9DG8a7+Auk6MFTlNOT4Y2y/9k8GKVg==", + "version": "5.14.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.1.tgz", + "integrity": "sha512-Vklwq2vDKtl0y/vtwjSesgJ5MYS7Etuk5txS8VdKL4AOS1aUlD96zqIfsOSLQsdv3xgMRbtkWM8eG9XDfKUPow==", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -15390,9 +15390,9 @@ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/webpack": { - "version": "5.80.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.80.0.tgz", - "integrity": "sha512-OIMiq37XK1rWO8mH9ssfFKZsXg4n6klTEDL7S8/HqbAOBBaiy8ABvXvz0dDCXeEF9gqwxSvVk611zFPjS8hJxA==", + "version": "5.86.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.86.0.tgz", + "integrity": "sha512-3BOvworZ8SO/D4GVP+GoRC3fVeg5MO4vzmq8TJJEkdmopxyazGDxN8ClqN12uzrZW9Tv8EED8v5VSb6Sqyi0pg==", "dependencies": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.0", @@ -15400,10 +15400,10 @@ "@webassemblyjs/wasm-edit": "^1.11.5", "@webassemblyjs/wasm-parser": "^1.11.5", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.7.6", + "acorn-import-assertions": "^1.9.0", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.13.0", + "enhanced-resolve": "^5.14.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", @@ -18899,9 +18899,9 @@ "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==" }, "acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", "requires": {} }, "acorn-jsx": { @@ -20426,9 +20426,9 @@ } }, "enhanced-resolve": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.13.0.tgz", - "integrity": "sha512-eyV8f0y1+bzyfh8xAwW/WTSZpLbjhqc4ne9eGSH4Zo2ejdyiNG9pU6mf9DG8a7+Auk6MFTlNOT4Y2y/9k8GKVg==", + "version": "5.14.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.1.tgz", + "integrity": "sha512-Vklwq2vDKtl0y/vtwjSesgJ5MYS7Etuk5txS8VdKL4AOS1aUlD96zqIfsOSLQsdv3xgMRbtkWM8eG9XDfKUPow==", "requires": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -27031,9 +27031,9 @@ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "webpack": { - "version": "5.80.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.80.0.tgz", - "integrity": "sha512-OIMiq37XK1rWO8mH9ssfFKZsXg4n6klTEDL7S8/HqbAOBBaiy8ABvXvz0dDCXeEF9gqwxSvVk611zFPjS8hJxA==", + "version": "5.86.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.86.0.tgz", + "integrity": "sha512-3BOvworZ8SO/D4GVP+GoRC3fVeg5MO4vzmq8TJJEkdmopxyazGDxN8ClqN12uzrZW9Tv8EED8v5VSb6Sqyi0pg==", "requires": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.0", @@ -27041,10 +27041,10 @@ "@webassemblyjs/wasm-edit": "^1.11.5", "@webassemblyjs/wasm-parser": "^1.11.5", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.7.6", + "acorn-import-assertions": "^1.9.0", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.13.0", + "enhanced-resolve": "^5.14.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", diff --git a/docs/package.json b/docs/package.json index 15d5aa38eea..d82e54ec8c9 100644 --- a/docs/package.json +++ b/docs/package.json @@ -61,6 +61,6 @@ "prettier": "^2.8.7", "string-replace-loader": "^3.1.0", "typescript": "^5.0.4", - "webpack": "^5.80.0" + "webpack": "^5.86.0" } } From 9ff1eaeb5a5f892d17ca87c38697466fd48fc301 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 14 May 2023 11:44:49 -0500 Subject: [PATCH 034/160] fix: Enable BT_TINYCRYPT_ECC when using HCI BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY to work on setups that use BT HCI like the nRF5340. --- app/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Kconfig b/app/Kconfig index 1537bd61512..18ee473d5db 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -120,6 +120,10 @@ menuconfig ZMK_BLE if ZMK_BLE +# BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY when using HCI +config BT_TINYCRYPT_ECC + default y if BT_HCI && !BT_CTLR + choice BT_LL_SW_LLCP_IMPL default BT_LL_SW_LLCP_LEGACY From dcf5e75fa674184d9615793882db1c3f4c4194b9 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 14 May 2023 13:08:33 -0500 Subject: [PATCH 035/160] fix(boards): Bump nRF5340 DK I2C buffer size Increased the I2C buffer size again, since it needs to be at least 641 to support 128x64 displays. --- app/boards/nrf5340dk_nrf5340_cpuapp.overlay | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/boards/nrf5340dk_nrf5340_cpuapp.overlay b/app/boards/nrf5340dk_nrf5340_cpuapp.overlay index 66d2332f1a2..9427d9ca150 100644 --- a/app/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/app/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -6,5 +6,5 @@ &arduino_i2c { // Default buffer size is too small for use with displays. - zephyr,concat-buf-size = <512>; + zephyr,concat-buf-size = <1024>; }; From 2244bd3d81931753dfd170e804a90a487a205aa1 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 1 Sep 2021 03:49:18 +0000 Subject: [PATCH 036/160] refactor(sensors): Sensor event channel data, resolution tweaks. * Refactor sensor events to include channel data, necessary for prop split encoders, and avoiding duplicate calls, to fetch channel data twice, etc. * More consistent behavior driver API. * Allow setting triggers per resolution at the behavior level optionally. --- app/Kconfig | 20 +++ app/dts/bindings/zmk,keymap-sensors.yaml | 12 +- app/include/drivers/behavior.h | 28 ++-- app/include/zmk/events/sensor_event.h | 17 ++- app/include/zmk/sensors.h | 14 ++ app/include/zmk/virtual_key_position.h | 5 + app/src/behaviors/behavior_sensor_rotate.c | 8 +- .../behaviors/behavior_sensor_rotate_common.c | 59 ++++++--- .../behaviors/behavior_sensor_rotate_common.h | 16 ++- .../behaviors/behavior_sensor_rotate_var.c | 6 +- app/src/keymap.c | 25 ++-- app/src/sensors.c | 123 +++++++++++++----- 12 files changed, 254 insertions(+), 79 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 18ee473d5db..1766bf07abe 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -194,6 +194,18 @@ rsource "src/split/Kconfig" #Basic Keyboard Setup endmenu +menu "Encoders" + +config ZMK_ENCODERS_DEFAULT_TRIGGERS_PER_ROTATION + int "Default behavior triggers per rotation" + help + Unless overridden for a specific behavior in the keymap/devicetree, this value + determines how many times to trigger the bound behavior per full rotation. + For tactile encoders with detents, this usually should match the number of + detents per rotation of the encoder. + default 30 + +endmenu menu "Display/LED Options" rsource "src/display/Kconfig" @@ -523,6 +535,14 @@ config ZMK_WPM config SENSOR default y +if ZMK_KEYMAP_SENSORS + +config ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION + int "Default triggers per rotation" + default 20 + +endif # ZMK_KEYMAP_SENSORS + choice CBPRINTF_IMPLEMENTATION default CBPRINTF_NANO diff --git a/app/dts/bindings/zmk,keymap-sensors.yaml b/app/dts/bindings/zmk,keymap-sensors.yaml index a879684f4f9..5282f25b04e 100644 --- a/app/dts/bindings/zmk,keymap-sensors.yaml +++ b/app/dts/bindings/zmk,keymap-sensors.yaml @@ -9,4 +9,14 @@ compatible: "zmk,keymap-sensors" properties: sensors: type: phandles - required: true + required: false + triggers-per-rotation: + type: int + required: false + +child-binding: + description: Per-sensor configuration settings + properties: + triggers-per-rotation: + type: int + required: false diff --git a/app/include/drivers/behavior.h b/app/include/drivers/behavior.h index 380fc76f9ba..0aa5d85e79a 100644 --- a/app/include/drivers/behavior.h +++ b/app/include/drivers/behavior.h @@ -12,6 +12,7 @@ #include #include #include +#include #include /** @@ -24,9 +25,10 @@ typedef int (*behavior_keymap_binding_callback_t)(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event); -typedef int (*behavior_sensor_keymap_binding_callback_t)(struct zmk_behavior_binding *binding, - const struct device *sensor, - struct zmk_behavior_binding_event event); +typedef int (*behavior_sensor_keymap_binding_callback_t)( + struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, + const struct zmk_sensor_config *sensor_config, size_t channel_data_size, + const struct zmk_sensor_channel_data channel_data[channel_data_size]); enum behavior_locality { BEHAVIOR_LOCALITY_CENTRAL, @@ -158,14 +160,15 @@ static inline int z_impl_behavior_keymap_binding_released(struct zmk_behavior_bi * @retval 0 If successful. * @retval Negative errno code if failure. */ -__syscall int behavior_sensor_keymap_binding_triggered(struct zmk_behavior_binding *binding, - const struct device *sensor, - struct zmk_behavior_binding_event event); - -static inline int -z_impl_behavior_sensor_keymap_binding_triggered(struct zmk_behavior_binding *binding, - const struct device *sensor, - struct zmk_behavior_binding_event event) { +__syscall int behavior_sensor_keymap_binding_triggered( + struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, + const struct zmk_sensor_config *sensor_config, size_t channel_data_size, + const struct zmk_sensor_channel_data *channel_data); + +static inline int z_impl_behavior_sensor_keymap_binding_triggered( + struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, + const struct zmk_sensor_config *sensor_config, size_t channel_data_size, + const struct zmk_sensor_channel_data *channel_data) { const struct device *dev = device_get_binding(binding->behavior_dev); if (dev == NULL) { @@ -178,7 +181,8 @@ z_impl_behavior_sensor_keymap_binding_triggered(struct zmk_behavior_binding *bin return -ENOTSUP; } - return api->sensor_binding_triggered(binding, sensor, event); + return api->sensor_binding_triggered(binding, event, sensor_config, channel_data_size, + channel_data); } /** diff --git a/app/include/zmk/events/sensor_event.h b/app/include/zmk/events/sensor_event.h index 9398bcbb713..5a5aa3ac711 100644 --- a/app/include/zmk/events/sensor_event.h +++ b/app/include/zmk/events/sensor_event.h @@ -6,12 +6,21 @@ #pragma once -#include + +#include #include -#include +#include +#include + +// TODO: Move to Kconfig when we need more than one channel +#define ZMK_SENSOR_EVENT_MAX_CHANNELS 1 + struct zmk_sensor_event { - uint8_t sensor_number; - const struct device *sensor; + uint8_t sensor_position; + + size_t channel_data_size; + struct zmk_sensor_channel_data channel_data[ZMK_SENSOR_EVENT_MAX_CHANNELS]; + int64_t timestamp; }; diff --git a/app/include/zmk/sensors.h b/app/include/zmk/sensors.h index 9e54695fc19..41061127981 100644 --- a/app/include/zmk/sensors.h +++ b/app/include/zmk/sensors.h @@ -6,6 +6,9 @@ #pragma once +#include + +#define _SENSOR_CHILD_LEN(node) 1 + #define ZMK_KEYMAP_SENSORS_NODE DT_INST(0, zmk_keymap_sensors) #define ZMK_KEYMAP_HAS_SENSORS DT_NODE_HAS_STATUS(ZMK_KEYMAP_SENSORS_NODE, okay) #define ZMK_KEYMAP_SENSORS_BY_IDX(idx) DT_PHANDLE_BY_IDX(ZMK_KEYMAP_SENSORS_NODE, sensors, idx) @@ -15,3 +18,14 @@ #else #define ZMK_KEYMAP_SENSORS_LEN 0 #endif + +const struct zmk_sensor_config *zmk_sensors_get_config_at_position(uint8_t sensor_position); + +struct zmk_sensor_config { + uint16_t triggers_per_rotation; +}; + +struct zmk_sensor_channel_data { + enum sensor_channel channel; + struct sensor_value value; +}; diff --git a/app/include/zmk/virtual_key_position.h b/app/include/zmk/virtual_key_position.h index 48deee5c6c8..b8f20683d7b 100644 --- a/app/include/zmk/virtual_key_position.h +++ b/app/include/zmk/virtual_key_position.h @@ -14,6 +14,11 @@ */ #define ZMK_VIRTUAL_KEY_POSITION_SENSOR(index) (ZMK_KEYMAP_LEN + (index)) +/** + * Gets the sensor number from the virtual key position. + */ +#define ZMK_SENSOR_POSITION_FROM_VIRTUAL_KEY_POSITION(vkp) ((vkp)-ZMK_KEYMAP_LEN) + /** * Gets the virtual key position to use for the combo with the given index. */ diff --git a/app/src/behaviors/behavior_sensor_rotate.c b/app/src/behaviors/behavior_sensor_rotate.c index e12278bba1a..86846d5be0b 100644 --- a/app/src/behaviors/behavior_sensor_rotate.c +++ b/app/src/behaviors/behavior_sensor_rotate.c @@ -33,8 +33,10 @@ static int behavior_sensor_rotate_init(const struct device *dev) { return 0; }; .tap_ms = DT_INST_PROP_OR(n, tap_ms, 5), \ .override_params = false, \ }; \ - DEVICE_DT_INST_DEFINE( \ - n, behavior_sensor_rotate_init, NULL, NULL, &behavior_sensor_rotate_config_##n, \ - APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_sensor_rotate_driver_api); + static struct behavior_sensor_rotate_data behavior_sensor_rotate_data_##n = {}; \ + DEVICE_DT_INST_DEFINE(n, behavior_sensor_rotate_init, NULL, &behavior_sensor_rotate_data_##n, \ + &behavior_sensor_rotate_config_##n, APPLICATION, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ + &behavior_sensor_rotate_driver_api); DT_INST_FOREACH_STATUS_OKAY(SENSOR_ROTATE_INST) diff --git a/app/src/behaviors/behavior_sensor_rotate_common.c b/app/src/behaviors/behavior_sensor_rotate_common.c index bd31170eda0..99e4e019ba1 100644 --- a/app/src/behaviors/behavior_sensor_rotate_common.c +++ b/app/src/behaviors/behavior_sensor_rotate_common.c @@ -5,48 +5,75 @@ #include #include +#include #include "behavior_sensor_rotate_common.h" LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); int zmk_behavior_sensor_rotate_common_trigger(struct zmk_behavior_binding *binding, - const struct device *sensor, - struct zmk_behavior_binding_event event) { + struct zmk_behavior_binding_event event, + const struct zmk_sensor_config *sensor_config, + size_t channel_data_size, + const struct zmk_sensor_channel_data *channel_data) { const struct device *dev = device_get_binding(binding->behavior_dev); const struct behavior_sensor_rotate_config *cfg = dev->config; + struct behavior_sensor_rotate_data *data = dev->data; - struct sensor_value value; + const struct sensor_value value = channel_data[0].value; + int triggers; + int sensor_position = ZMK_SENSOR_POSITION_FROM_VIRTUAL_KEY_POSITION(event.position); - const int err = sensor_channel_get(sensor, SENSOR_CHAN_ROTATION, &value); + // Some funky special casing for "old encoder behavior" where ticks where reported in val2 only, + // instead of rotational degrees in val1. + // REMOVE ME: Remove after a grace period of old ec11 sensor behavior + if (value.val1 == 0) { + triggers = value.val2; + } else { + struct sensor_value remainder = data->remainder[sensor_position]; - if (err < 0) { - LOG_WRN("Failed to get sensor rotation value: %d", err); - return err; + remainder.val1 += value.val1; + remainder.val2 += value.val2; + + if (remainder.val2 >= 1000000 || remainder.val2 <= 1000000) { + remainder.val1 += remainder.val2 / 1000000; + remainder.val2 %= 1000000; + } + + int trigger_degrees = 360 / sensor_config->triggers_per_rotation; + triggers = remainder.val1 / trigger_degrees; + remainder.val1 %= trigger_degrees; + + data->remainder[sensor_position] = remainder; } + LOG_DBG( + "val1: %d, val2: %d, remainder: %d/%d triggers: %d inc keycode 0x%02X dec keycode 0x%02X", + value.val1, value.val2, data->remainder[sensor_position].val1, + data->remainder[sensor_position].val2, triggers, binding->param1, binding->param2); + struct zmk_behavior_binding triggered_binding; - switch (value.val1) { - case 1: + if (triggers > 0) { triggered_binding = cfg->cw_binding; if (cfg->override_params) { triggered_binding.param1 = binding->param1; } - break; - case -1: + } else if (triggers < 0) { + triggers = -triggers; triggered_binding = cfg->ccw_binding; if (cfg->override_params) { triggered_binding.param1 = binding->param2; } - break; - default: - return -ENOTSUP; + } else { + return 0; } LOG_DBG("Sensor binding: %s", binding->behavior_dev); - zmk_behavior_queue_add(event.position, triggered_binding, true, cfg->tap_ms); - zmk_behavior_queue_add(event.position, triggered_binding, false, 0); + for (int i = 0; i < triggers; i++) { + zmk_behavior_queue_add(event.position, triggered_binding, true, cfg->tap_ms); + zmk_behavior_queue_add(event.position, triggered_binding, false, 0); + } return ZMK_BEHAVIOR_OPAQUE; } diff --git a/app/src/behaviors/behavior_sensor_rotate_common.h b/app/src/behaviors/behavior_sensor_rotate_common.h index 2d58218d8ad..eab443a3987 100644 --- a/app/src/behaviors/behavior_sensor_rotate_common.h +++ b/app/src/behaviors/behavior_sensor_rotate_common.h @@ -1,5 +1,11 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ #include +#include struct behavior_sensor_rotate_config { struct zmk_behavior_binding cw_binding; @@ -8,6 +14,12 @@ struct behavior_sensor_rotate_config { bool override_params; }; +struct behavior_sensor_rotate_data { + struct sensor_value remainder[ZMK_KEYMAP_SENSORS_LEN]; +}; + int zmk_behavior_sensor_rotate_common_trigger(struct zmk_behavior_binding *binding, - const struct device *sensor, - struct zmk_behavior_binding_event event); \ No newline at end of file + struct zmk_behavior_binding_event event, + const struct zmk_sensor_config *sensor_config, + size_t channel_data_size, + const struct zmk_sensor_channel_data *channel_data); \ No newline at end of file diff --git a/app/src/behaviors/behavior_sensor_rotate_var.c b/app/src/behaviors/behavior_sensor_rotate_var.c index a82267a55e9..95bb99610ba 100644 --- a/app/src/behaviors/behavior_sensor_rotate_var.c +++ b/app/src/behaviors/behavior_sensor_rotate_var.c @@ -24,8 +24,10 @@ static int behavior_sensor_rotate_var_init(const struct device *dev) { return 0; .tap_ms = DT_INST_PROP(n, tap_ms), \ .override_params = true, \ }; \ + static struct behavior_sensor_rotate_data behavior_sensor_rotate_var_data_##n = {}; \ DEVICE_DT_INST_DEFINE( \ - n, behavior_sensor_rotate_var_init, NULL, NULL, &behavior_sensor_rotate_var_config_##n, \ - APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_sensor_rotate_var_driver_api); + n, behavior_sensor_rotate_var_init, NULL, &behavior_sensor_rotate_var_data_##n, \ + &behavior_sensor_rotate_var_config_##n, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ + &behavior_sensor_rotate_var_driver_api); DT_INST_FOREACH_STATUS_OKAY(SENSOR_ROTATE_VAR_INST) diff --git a/app/src/keymap.c b/app/src/keymap.c index da25fc096ca..16543d37840 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -252,27 +252,34 @@ int zmk_keymap_position_state_changed(uint8_t source, uint32_t position, bool pr } #if ZMK_KEYMAP_HAS_SENSORS -int zmk_keymap_sensor_triggered(uint8_t sensor_number, const struct device *sensor, - int64_t timestamp) { +int zmk_keymap_sensor_triggered( + uint8_t sensor_position, size_t channel_data_size, + const struct zmk_sensor_channel_data channel_data[channel_data_size], int64_t timestamp) { for (int layer = ZMK_KEYMAP_LAYERS_LEN - 1; layer >= _zmk_keymap_layer_default; layer--) { if (zmk_keymap_layer_active(layer)) { - struct zmk_behavior_binding *binding = &zmk_sensor_keymap[layer][sensor_number]; + struct zmk_behavior_binding *binding = &zmk_sensor_keymap[layer][sensor_position]; const struct device *behavior; int ret; - LOG_DBG("layer: %d sensor_number: %d, binding name: %s", layer, sensor_number, + LOG_DBG("layer: %d sensor_position: %d, binding name: %s", layer, sensor_position, binding->behavior_dev); behavior = device_get_binding(binding->behavior_dev); if (!behavior) { - LOG_DBG("No behavior assigned to %d on layer %d", sensor_number, layer); + LOG_DBG("No behavior assigned to %d on layer %d", sensor_position, layer); continue; } struct zmk_behavior_binding_event event = { - .position = ZMK_VIRTUAL_KEY_POSITION_SENSOR(sensor_number), .timestamp = timestamp}; - ret = behavior_sensor_keymap_binding_triggered(binding, sensor, event); + .layer = layer, + .position = ZMK_VIRTUAL_KEY_POSITION_SENSOR(sensor_position), + .timestamp = timestamp, + }; + + ret = behavior_sensor_keymap_binding_triggered( + binding, event, zmk_sensors_get_config_at_position(sensor_position), + channel_data_size, channel_data); if (ret > 0) { LOG_DBG("behavior processing to continue to next layer"); @@ -301,8 +308,8 @@ int keymap_listener(const zmk_event_t *eh) { #if ZMK_KEYMAP_HAS_SENSORS const struct zmk_sensor_event *sensor_ev; if ((sensor_ev = as_zmk_sensor_event(eh)) != NULL) { - return zmk_keymap_sensor_triggered(sensor_ev->sensor_number, sensor_ev->sensor, - sensor_ev->timestamp); + return zmk_keymap_sensor_triggered(sensor_ev->sensor_position, sensor_ev->channel_data_size, + sensor_ev->channel_data, sensor_ev->timestamp); } #endif /* ZMK_KEYMAP_HAS_SENSORS */ diff --git a/app/src/sensors.c b/app/src/sensors.c index 1b92147f8ca..5f41c4f2f20 100644 --- a/app/src/sensors.c +++ b/app/src/sensors.c @@ -18,65 +18,128 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if ZMK_KEYMAP_HAS_SENSORS -struct sensors_data_item { - uint8_t sensor_number; +struct sensors_item_cfg { + uint8_t sensor_position; + const struct zmk_sensor_config *config; const struct device *dev; struct sensor_trigger trigger; }; -#define _SENSOR_ITEM(node) \ +#define _SENSOR_ITEM(idx, node) \ { \ - .dev = NULL, .trigger = {.type = SENSOR_TRIG_DELTA, .chan = SENSOR_CHAN_ROTATION } \ + .dev = DEVICE_DT_GET_OR_NULL(node), \ + .trigger = {.type = SENSOR_TRIG_DATA_READY, .chan = SENSOR_CHAN_ROTATION}, \ + .config = &configs[idx] \ } +#define SENSOR_ITEM(idx, _i) _SENSOR_ITEM(idx, ZMK_KEYMAP_SENSORS_BY_IDX(idx)) -#define SENSOR_ITEM(idx, _node) \ - COND_CODE_1(DT_NODE_HAS_STATUS(ZMK_KEYMAP_SENSORS_BY_IDX(idx), okay), \ - (_SENSOR_ITEM(ZMK_KEYMAP_SENSORS_BY_IDX(idx))), ({})) +#define PLUS_ONE(n) +1 +#define ZMK_KEYMAP_SENSORS_CHILD_COUNT (0 DT_FOREACH_CHILD(ZMK_KEYMAP_SENSORS_NODE, PLUS_ONE)) +#define SENSOR_CHILD_ITEM(node) \ + { \ + .triggers_per_rotation = \ + DT_PROP_OR(node, triggers_per_rotation, \ + DT_PROP_OR(ZMK_KEYMAP_SENSORS_NODE, triggers_per_rotation, \ + CONFIG_ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION)) \ + } +#define SENSOR_CHILD_DEFAULTS(idx, arg) \ + { .triggers_per_rotation = DT_PROP_OR(ZMK_KEYMAP_SENSORS_NODE, triggers_per_rotation, 20) } + +static struct zmk_sensor_config configs[] = { +#if ZMK_KEYMAP_SENSORS_CHILD_COUNT > 0 + DT_FOREACH_CHILD_SEP(ZMK_KEYMAP_SENSORS_NODE, SENSOR_CHILD_ITEM, (, )) +#else + LISTIFY(ZMK_KEYMAP_SENSORS_LEN, SENSOR_CHILD_DEFAULTS, (, ), 0) +#endif +}; -static struct sensors_data_item sensors[] = {LISTIFY(ZMK_KEYMAP_SENSORS_LEN, SENSOR_ITEM, (, ), 0)}; +static struct sensors_item_cfg sensors[] = {LISTIFY(ZMK_KEYMAP_SENSORS_LEN, SENSOR_ITEM, (, ), 0)}; -static void zmk_sensors_trigger_handler(const struct device *dev, - const struct sensor_trigger *trigger) { - int err; - const struct sensors_data_item *item = CONTAINER_OF(trigger, struct sensors_data_item, trigger); +static ATOMIC_DEFINE(pending_sensors, ZMK_KEYMAP_SENSORS_LEN); + +const struct zmk_sensor_config *zmk_sensors_get_config_at_position(uint8_t sensor_position) { + if (sensor_position > ARRAY_SIZE(configs)) { + return NULL; + } - LOG_DBG("sensor %d", item->sensor_number); + return &configs[sensor_position]; +} - err = sensor_sample_fetch(dev); +static void trigger_sensor_data_for_position(uint32_t sensor_position) { + int err; + const struct sensors_item_cfg *item = &sensors[sensor_position]; + + err = sensor_sample_fetch(item->dev); if (err) { LOG_WRN("Failed to fetch sample from device %d", err); return; } - ZMK_EVENT_RAISE(new_zmk_sensor_event((struct zmk_sensor_event){ - .sensor_number = item->sensor_number, .sensor = dev, .timestamp = k_uptime_get()})); + struct sensor_value value; + err = sensor_channel_get(item->dev, item->trigger.chan, &value); + + if (err) { + LOG_WRN("Failed to get channel data from device %d", err); + return; + } + + ZMK_EVENT_RAISE(new_zmk_sensor_event( + (struct zmk_sensor_event){.sensor_position = item->sensor_position, + .channel_data = {(struct zmk_sensor_channel_data){ + .value = value, .channel = item->trigger.chan}}, + .timestamp = k_uptime_get()})); } -static void zmk_sensors_init_item(const char *node, uint8_t i, uint8_t abs_i) { - LOG_DBG("Init %s at index %d with sensor_number %d", node, i, abs_i); +static void run_sensors_data_trigger(struct k_work *work) { + for (int i = 0; i < ARRAY_SIZE(sensors); i++) { + if (atomic_test_and_clear_bit(pending_sensors, i)) { + trigger_sensor_data_for_position(i); + } + } +} + +K_WORK_DEFINE(sensor_data_work, run_sensors_data_trigger); + +static void zmk_sensors_trigger_handler(const struct device *dev, + const struct sensor_trigger *trigger) { + const struct sensors_item_cfg *test_item = + CONTAINER_OF(trigger, struct sensors_item_cfg, trigger); + int sensor_index = test_item - sensors; + + if (sensor_index < 0 || sensor_index >= ARRAY_SIZE(sensors)) { + LOG_ERR("Invalid sensor item triggered our callback"); + return; + } - sensors[i].dev = device_get_binding(node); - sensors[i].sensor_number = abs_i; + if (k_is_in_isr()) { + atomic_set_bit(pending_sensors, sensor_index); + k_work_submit(&sensor_data_work); + } else { + trigger_sensor_data_for_position(sensor_index); + } +} + +static void zmk_sensors_init_item(uint8_t i) { + LOG_DBG("Init sensor at index %d", i); + + sensors[i].sensor_position = i; if (!sensors[i].dev) { - LOG_WRN("Failed to find device for %s", node); + LOG_DBG("No local device for %d", i); return; } - sensor_trigger_set(sensors[i].dev, &sensors[i].trigger, zmk_sensors_trigger_handler); + int err = sensor_trigger_set(sensors[i].dev, &sensors[i].trigger, zmk_sensors_trigger_handler); + if (err) { + LOG_WRN("Failed to set sensor trigger (%d)", err); + } } -#define _SENSOR_INIT(node) \ - zmk_sensors_init_item(DT_PROP(node, label), local_index++, absolute_index++); -#define SENSOR_INIT(idx, _i) \ - COND_CODE_1(DT_NODE_HAS_STATUS(ZMK_KEYMAP_SENSORS_BY_IDX(idx), okay), \ - (_SENSOR_INIT(ZMK_KEYMAP_SENSORS_BY_IDX(idx))), (absolute_index++;)) +#define SENSOR_INIT(idx, _t) zmk_sensors_init_item(idx); static int zmk_sensors_init(const struct device *_arg) { - int local_index = 0; - int absolute_index = 0; - LISTIFY(ZMK_KEYMAP_SENSORS_LEN, SENSOR_INIT, (), 0) + return 0; } From 295ed83409ab0bede761eb2e51f4e4670e4dbf08 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 2 Dec 2021 15:07:29 +0000 Subject: [PATCH 037/160] refactor(sensors): ec11 rotation sensor value in degrees. * Add new `steps` property to the `aips,ec11` binding, to make the driver properly report degrees in the rotation delta channel. * Handle old sensor values in sensor rotate behavior. --- app/drivers/sensor/ec11/Kconfig | 2 ++ app/drivers/sensor/ec11/ec11.c | 33 +++++++++++++++---- app/drivers/sensor/ec11/ec11.h | 1 + .../zephyr/dts/bindings/sensor/alps,ec11.yaml | 5 +++ app/include/zmk/events/sensor_event.h | 4 +-- app/include/zmk/sensors.h | 2 +- 6 files changed, 38 insertions(+), 9 deletions(-) diff --git a/app/drivers/sensor/ec11/Kconfig b/app/drivers/sensor/ec11/Kconfig index e86d092a127..5da327280a8 100644 --- a/app/drivers/sensor/ec11/Kconfig +++ b/app/drivers/sensor/ec11/Kconfig @@ -3,6 +3,8 @@ menuconfig EC11 bool "EC11 Incremental Encoder Sensor" + default y + depends on DT_HAS_ALPS_EC11_ENABLED depends on GPIO help Enable driver for EC11 incremental encoder sensors. diff --git a/app/drivers/sensor/ec11/ec11.c b/app/drivers/sensor/ec11/ec11.c index 7091f73e739..ee8b41e74c8 100644 --- a/app/drivers/sensor/ec11/ec11.c +++ b/app/drivers/sensor/ec11/ec11.c @@ -16,6 +16,8 @@ #include "ec11.h" +#define FULL_ROTATION 360 + LOG_MODULE_REGISTER(EC11, CONFIG_SENSOR_LOG_LEVEL); static int ec11_get_ab_state(const struct device *dev) { @@ -59,9 +61,14 @@ static int ec11_sample_fetch(const struct device *dev, enum sensor_channel chan) drv_data->pulses += delta; drv_data->ab_state = val; - drv_data->ticks = drv_data->pulses / drv_cfg->resolution; - drv_data->delta = delta; - drv_data->pulses %= drv_cfg->resolution; + // TODO: Temporary code for backwards compatibility to support + // the sensor channel rotation reporting *ticks* instead of delta of degrees. + // REMOVE ME + if (drv_cfg->steps == 0) { + drv_data->ticks = drv_data->pulses / drv_cfg->resolution; + drv_data->delta = delta; + drv_data->pulses %= drv_cfg->resolution; + } return 0; } @@ -69,13 +76,26 @@ static int ec11_sample_fetch(const struct device *dev, enum sensor_channel chan) static int ec11_channel_get(const struct device *dev, enum sensor_channel chan, struct sensor_value *val) { struct ec11_data *drv_data = dev->data; + const struct ec11_config *drv_cfg = dev->config; + int32_t pulses = drv_data->pulses; if (chan != SENSOR_CHAN_ROTATION) { return -ENOTSUP; } - val->val1 = drv_data->ticks; - val->val2 = drv_data->delta; + drv_data->pulses = 0; + + if (drv_cfg->steps > 0) { + val->val1 = (pulses * FULL_ROTATION) / drv_cfg->steps; + val->val2 = (pulses * FULL_ROTATION) % drv_cfg->steps; + if (val->val2 != 0) { + val->val2 *= 1000000; + val->val2 /= drv_cfg->steps; + } + } else { + val->val1 = drv_data->ticks; + val->val2 = drv_data->delta; + } return 0; } @@ -132,7 +152,8 @@ int ec11_init(const struct device *dev) { const struct ec11_config ec11_cfg_##n = { \ .a = GPIO_DT_SPEC_INST_GET(n, a_gpios), \ .b = GPIO_DT_SPEC_INST_GET(n, b_gpios), \ - COND_CODE_0(DT_INST_NODE_HAS_PROP(n, resolution), (1), (DT_INST_PROP(n, resolution))), \ + .resolution = DT_INST_PROP_OR(n, resolution, 1), \ + .steps = DT_INST_PROP_OR(n, steps, 0), \ }; \ DEVICE_DT_INST_DEFINE(n, ec11_init, NULL, &ec11_data_##n, &ec11_cfg_##n, POST_KERNEL, \ CONFIG_SENSOR_INIT_PRIORITY, &ec11_driver_api); diff --git a/app/drivers/sensor/ec11/ec11.h b/app/drivers/sensor/ec11/ec11.h index 82c21572329..4e2e5d2641c 100644 --- a/app/drivers/sensor/ec11/ec11.h +++ b/app/drivers/sensor/ec11/ec11.h @@ -14,6 +14,7 @@ struct ec11_config { const struct gpio_dt_spec a; const struct gpio_dt_spec b; + const uint16_t steps; const uint8_t resolution; }; diff --git a/app/drivers/zephyr/dts/bindings/sensor/alps,ec11.yaml b/app/drivers/zephyr/dts/bindings/sensor/alps,ec11.yaml index 5cbe77a2ad0..3672ea30579 100644 --- a/app/drivers/zephyr/dts/bindings/sensor/alps,ec11.yaml +++ b/app/drivers/zephyr/dts/bindings/sensor/alps,ec11.yaml @@ -18,4 +18,9 @@ properties: resolution: type: int description: Number of pulses per tick + deprecated: true + required: false + steps: + type: int + description: Number of pulses in one full rotation required: false diff --git a/app/include/zmk/events/sensor_event.h b/app/include/zmk/events/sensor_event.h index 5a5aa3ac711..c5157447dd4 100644 --- a/app/include/zmk/events/sensor_event.h +++ b/app/include/zmk/events/sensor_event.h @@ -6,11 +6,11 @@ #pragma once - +#include #include + #include #include -#include // TODO: Move to Kconfig when we need more than one channel #define ZMK_SENSOR_EVENT_MAX_CHANNELS 1 diff --git a/app/include/zmk/sensors.h b/app/include/zmk/sensors.h index 41061127981..06fbc63e564 100644 --- a/app/include/zmk/sensors.h +++ b/app/include/zmk/sensors.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #define _SENSOR_CHILD_LEN(node) 1 + #define ZMK_KEYMAP_SENSORS_NODE DT_INST(0, zmk_keymap_sensors) From f0f7e2081b5a4aa5bc35d7d8855b0e73e962319b Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 26 May 2022 16:53:41 +0000 Subject: [PATCH 038/160] refactor(config): Select SENSOR as needed. * Don't force on SENSOR Kconfig setting unless needed based on the detected DT. --- app/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Kconfig b/app/Kconfig index 1766bf07abe..5b313effcdc 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -532,8 +532,11 @@ config ZMK_WPM bool "Calculate WPM" default n -config SENSOR +config ZMK_KEYMAP_SENSORS + bool "Enable Keymap Sensors support" default y + depends on DT_HAS_ZMK_KEYMAP_SENSORS_ENABLED + select SENSOR if ZMK_KEYMAP_SENSORS From 621d946d2926f28aa866947f110182726fa9ca10 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sun, 21 May 2023 21:27:41 -0700 Subject: [PATCH 039/160] refactor(bluetooth): Bump HoG stack size. * Bump the default stack size for the HoG processing thread to avoid issues w/ some pathways. --- app/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Kconfig b/app/Kconfig index 5b313effcdc..a54ad38967d 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -135,7 +135,7 @@ config SYSTEM_WORKQUEUE_STACK_SIZE config ZMK_BLE_THREAD_STACK_SIZE int "BLE notify thread stack size" - default 512 + default 768 config ZMK_BLE_THREAD_PRIORITY int "BLE notify thread priority" From f8aaaff556e1c43c6646ea1c1ee7faa2907cdf51 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sun, 16 Apr 2023 08:18:57 +0000 Subject: [PATCH 040/160] refactor(shields): Updated ZMK Uno encoder config. * Move to new steps/triggers-per-rotation config. * Leverage QDEC Nordic driver when used on Nordic DK. --- .../boards/nrf52840dk_nrf52840.overlay | 24 +++++++++ app/boards/shields/zmk_uno/zmk_uno.overlay | 49 ++++++++++--------- 2 files changed, 50 insertions(+), 23 deletions(-) create mode 100644 app/boards/shields/zmk_uno/boards/nrf52840dk_nrf52840.overlay diff --git a/app/boards/shields/zmk_uno/boards/nrf52840dk_nrf52840.overlay b/app/boards/shields/zmk_uno/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 00000000000..5ac7af7c532 --- /dev/null +++ b/app/boards/shields/zmk_uno/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,24 @@ + +/ { + // First, delete the existing basic GPIO based instance. + /delete-node/ encoder; +}; + +&pinctrl { + qdec_default: qdec_default { + group1 { + psels = , + ; + bias-pull-up; + }; + }; +}; + +// Set up the QDEC hardware based driver and give it the same label as the deleted node. +encoder: &qdec0 { + status = "okay"; + led-pre = <0>; + steps = <80>; + pinctrl-0 = <&qdec_default>; + pinctrl-names = "default"; +}; diff --git a/app/boards/shields/zmk_uno/zmk_uno.overlay b/app/boards/shields/zmk_uno/zmk_uno.overlay index 04332911e9b..78f3b4a7146 100644 --- a/app/boards/shields/zmk_uno/zmk_uno.overlay +++ b/app/boards/shields/zmk_uno/zmk_uno.overlay @@ -40,10 +40,10 @@ // Commented out until we add more powerful power domain support // external_power { - // compatible = "zmk,ext-power-generic"; - // label = "EXT_POWER"; - // init-delay-ms = <200>; - // control-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>; + // compatible = "zmk,ext-power-generic"; + // label = "EXT_POWER"; + // init-delay-ms = <200>; + // control-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>; // }; rgb_power { @@ -128,14 +128,14 @@ diode-direction = "col2row"; col-gpios - = <&arduino_header 10 GPIO_ACTIVE_HIGH> - , <&arduino_header 9 GPIO_ACTIVE_HIGH> - ; + = <&arduino_header 10 GPIO_ACTIVE_HIGH> + , <&arduino_header 9 GPIO_ACTIVE_HIGH> + ; row-gpios - = <&arduino_header 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&arduino_header 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + = <&arduino_header 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&arduino_header 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; }; @@ -144,11 +144,11 @@ status = "disabled"; input-gpios - = <&arduino_header 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&arduino_header 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&arduino_header 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&arduino_header 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; + = <&arduino_header 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&arduino_header 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&arduino_header 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&arduino_header 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; }; @@ -157,23 +157,26 @@ toggle-mode; input-gpios - = <&arduino_header 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&arduino_header 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&arduino_header 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; + = <&arduino_header 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&arduino_header 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&arduino_header 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; }; encoder: encoder { label = "ENCODER"; - resolution = <4>; + steps = <80>; compatible = "alps,ec11"; - a-gpios = <&arduino_header 14 GPIO_PULL_UP>; - b-gpios = <&arduino_header 15 GPIO_PULL_UP>; + a-gpios = <&arduino_header 15 GPIO_PULL_UP>; + b-gpios = <&arduino_header 14 GPIO_PULL_UP>; }; - sensors { compatible = "zmk,keymap-sensors"; sensors = <&encoder>; + triggers-per-rotation = <20>; + left { + triggers-per-rotation = <20>; + }; }; }; From d781ec795b9d9e053ce71c30450ba2b979eab43b Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 18 Apr 2023 07:14:18 +0000 Subject: [PATCH 041/160] refactor(bluetooth): Add battery reporting config. * Add dedicated battery reporting Kconfig that is `imply`d by enabling ZMK_BLE. --- app/CMakeLists.txt | 4 ++-- app/Kconfig | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index a647e88363f..ea3b8f73364 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -77,8 +77,8 @@ endif() target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c) target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/behaviors/behavior_backlight.c) -target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/battery_state_changed.c) -target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/battery.c) +target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/events/battery_state_changed.c) +target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/battery.c) target_sources_ifdef(CONFIG_ZMK_SPLIT app PRIVATE src/events/split_peripheral_status_changed.c) add_subdirectory(src/split) diff --git a/app/Kconfig b/app/Kconfig index a54ad38967d..9c0606b02fc 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -114,9 +114,9 @@ menuconfig ZMK_BLE select BT_SMP_APP_PAIRING_ACCEPT select BT_PERIPHERAL select BT_DIS - select BT_BAS select BT_SETTINGS select SETTINGS + imply ZMK_BATTERY_REPORTING if ZMK_BLE @@ -322,6 +322,12 @@ endmenu menu "Power Management" +config ZMK_BATTERY_REPORTING + bool "Battery level detection/reporting" + default n + select SENSOR + select BT_BAS if ZMK_BLE + config ZMK_IDLE_TIMEOUT int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)" default 30000 From 8b29f6d34556d98df60f529e84ee66e49e6bf0c0 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 4 May 2023 00:04:20 +0000 Subject: [PATCH 042/160] refactor(sensors): Split data handling from triggers. * All sensor behaviors should see sensor data, then selectively only have some trigger their behaviors. --- app/include/drivers/behavior.h | 59 ++++++++++++-- app/src/behaviors/behavior_sensor_rotate.c | 3 +- .../behaviors/behavior_sensor_rotate_common.c | 31 +++++-- .../behaviors/behavior_sensor_rotate_common.h | 13 ++- .../behaviors/behavior_sensor_rotate_var.c | 3 +- app/src/keymap.c | 81 +++++++++++-------- 6 files changed, 135 insertions(+), 55 deletions(-) diff --git a/app/include/drivers/behavior.h b/app/include/drivers/behavior.h index 0aa5d85e79a..d7e57d02433 100644 --- a/app/include/drivers/behavior.h +++ b/app/include/drivers/behavior.h @@ -23,9 +23,17 @@ * (Internal use only.) */ +enum behavior_sensor_binding_process_mode { + BEHAVIOR_SENSOR_BINDING_PROCESS_MODE_TRIGGER, + BEHAVIOR_SENSOR_BINDING_PROCESS_MODE_DISCARD, +}; + typedef int (*behavior_keymap_binding_callback_t)(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event); -typedef int (*behavior_sensor_keymap_binding_callback_t)( +typedef int (*behavior_sensor_keymap_binding_process_callback_t)( + struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, + enum behavior_sensor_binding_process_mode mode); +typedef int (*behavior_sensor_keymap_binding_data_callback_t)( struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, const struct zmk_sensor_config *sensor_config, size_t channel_data_size, const struct zmk_sensor_channel_data channel_data[channel_data_size]); @@ -41,7 +49,8 @@ __subsystem struct behavior_driver_api { behavior_keymap_binding_callback_t binding_convert_central_state_dependent_params; behavior_keymap_binding_callback_t binding_pressed; behavior_keymap_binding_callback_t binding_released; - behavior_sensor_keymap_binding_callback_t sensor_binding_triggered; + behavior_sensor_keymap_binding_data_callback_t sensor_binding_data; + behavior_sensor_keymap_binding_process_callback_t sensor_binding_process; }; /** * @endcond @@ -151,7 +160,7 @@ static inline int z_impl_behavior_keymap_binding_released(struct zmk_behavior_bi } /** - * @brief Handle the a sensor keymap binding being triggered + * @brief Handle the a sensor keymap binding processing any incoming data from the sensor * @param binding Sensor keymap binding which was triggered. * @param sensor Pointer to the sensor device structure for the sensor driver instance. * @param virtual_key_position ZMK_KEYMAP_LEN + sensor number @@ -160,12 +169,12 @@ static inline int z_impl_behavior_keymap_binding_released(struct zmk_behavior_bi * @retval 0 If successful. * @retval Negative errno code if failure. */ -__syscall int behavior_sensor_keymap_binding_triggered( +__syscall int behavior_sensor_keymap_binding_data( struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, const struct zmk_sensor_config *sensor_config, size_t channel_data_size, const struct zmk_sensor_channel_data *channel_data); -static inline int z_impl_behavior_sensor_keymap_binding_triggered( +static inline int z_impl_behavior_sensor_keymap_binding_data( struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, const struct zmk_sensor_config *sensor_config, size_t channel_data_size, const struct zmk_sensor_channel_data *channel_data) { @@ -177,12 +186,46 @@ static inline int z_impl_behavior_sensor_keymap_binding_triggered( const struct behavior_driver_api *api = (const struct behavior_driver_api *)dev->api; - if (api->sensor_binding_triggered == NULL) { + if (api->sensor_binding_data == NULL) { + return -ENOTSUP; + } + + return api->sensor_binding_data(binding, event, sensor_config, channel_data_size, channel_data); +} + +/** + * @brief Handle the keymap sensor binding being triggered after updating any local data + * @param dev Pointer to the device structure for the driver instance. + * @param param1 User parameter specified at time of behavior binding. + * @param param2 User parameter specified at time of behavior binding. + * + * @retval 0 If successful. + * @retval Negative errno code if failure. + */ +// clang-format off +__syscall int behavior_sensor_keymap_binding_process( + struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event, + enum behavior_sensor_binding_process_mode mode); +// clang-format on + +static inline int +z_impl_behavior_sensor_keymap_binding_process(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event, + enum behavior_sensor_binding_process_mode mode) { + const struct device *dev = device_get_binding(binding->behavior_dev); + + if (dev == NULL) { + return -EINVAL; + } + + const struct behavior_driver_api *api = (const struct behavior_driver_api *)dev->api; + + if (api->sensor_binding_process == NULL) { return -ENOTSUP; } - return api->sensor_binding_triggered(binding, event, sensor_config, channel_data_size, - channel_data); + return api->sensor_binding_process(binding, event, mode); } /** diff --git a/app/src/behaviors/behavior_sensor_rotate.c b/app/src/behaviors/behavior_sensor_rotate.c index 86846d5be0b..3b5bef62183 100644 --- a/app/src/behaviors/behavior_sensor_rotate.c +++ b/app/src/behaviors/behavior_sensor_rotate.c @@ -13,7 +13,8 @@ #include "behavior_sensor_rotate_common.h" static const struct behavior_driver_api behavior_sensor_rotate_driver_api = { - .sensor_binding_triggered = zmk_behavior_sensor_rotate_common_trigger}; + .sensor_binding_data = zmk_behavior_sensor_rotate_common_data, + .sensor_binding_process = zmk_behavior_sensor_rotate_common_process}; static int behavior_sensor_rotate_init(const struct device *dev) { return 0; }; diff --git a/app/src/behaviors/behavior_sensor_rotate_common.c b/app/src/behaviors/behavior_sensor_rotate_common.c index 99e4e019ba1..0a2b619df81 100644 --- a/app/src/behaviors/behavior_sensor_rotate_common.c +++ b/app/src/behaviors/behavior_sensor_rotate_common.c @@ -11,13 +11,12 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); -int zmk_behavior_sensor_rotate_common_trigger(struct zmk_behavior_binding *binding, - struct zmk_behavior_binding_event event, - const struct zmk_sensor_config *sensor_config, - size_t channel_data_size, - const struct zmk_sensor_channel_data *channel_data) { +int zmk_behavior_sensor_rotate_common_data(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event, + const struct zmk_sensor_config *sensor_config, + size_t channel_data_size, + const struct zmk_sensor_channel_data *channel_data) { const struct device *dev = device_get_binding(binding->behavior_dev); - const struct behavior_sensor_rotate_config *cfg = dev->config; struct behavior_sensor_rotate_data *data = dev->data; const struct sensor_value value = channel_data[0].value; @@ -52,6 +51,26 @@ int zmk_behavior_sensor_rotate_common_trigger(struct zmk_behavior_binding *bindi value.val1, value.val2, data->remainder[sensor_position].val1, data->remainder[sensor_position].val2, triggers, binding->param1, binding->param2); + data->triggers[sensor_position] = triggers; + return 0; +} + +int zmk_behavior_sensor_rotate_common_process(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event, + enum behavior_sensor_binding_process_mode mode) { + const struct device *dev = device_get_binding(binding->behavior_dev); + const struct behavior_sensor_rotate_config *cfg = dev->config; + struct behavior_sensor_rotate_data *data = dev->data; + + const int sensor_position = ZMK_SENSOR_POSITION_FROM_VIRTUAL_KEY_POSITION(event.position); + + if (mode != BEHAVIOR_SENSOR_BINDING_PROCESS_MODE_TRIGGER) { + data->triggers[sensor_position] = 0; + return 0; + } + + int triggers = data->triggers[sensor_position]; + struct zmk_behavior_binding triggered_binding; if (triggers > 0) { triggered_binding = cfg->cw_binding; diff --git a/app/src/behaviors/behavior_sensor_rotate_common.h b/app/src/behaviors/behavior_sensor_rotate_common.h index eab443a3987..d9d4d855dfa 100644 --- a/app/src/behaviors/behavior_sensor_rotate_common.h +++ b/app/src/behaviors/behavior_sensor_rotate_common.h @@ -4,6 +4,7 @@ * SPDX-License-Identifier: MIT */ +#include #include #include @@ -16,10 +17,14 @@ struct behavior_sensor_rotate_config { struct behavior_sensor_rotate_data { struct sensor_value remainder[ZMK_KEYMAP_SENSORS_LEN]; + int triggers[ZMK_KEYMAP_SENSORS_LEN]; }; -int zmk_behavior_sensor_rotate_common_trigger(struct zmk_behavior_binding *binding, +int zmk_behavior_sensor_rotate_common_data(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event, + const struct zmk_sensor_config *sensor_config, + size_t channel_data_size, + const struct zmk_sensor_channel_data *channel_data); +int zmk_behavior_sensor_rotate_common_process(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, - const struct zmk_sensor_config *sensor_config, - size_t channel_data_size, - const struct zmk_sensor_channel_data *channel_data); \ No newline at end of file + enum behavior_sensor_binding_process_mode mode); \ No newline at end of file diff --git a/app/src/behaviors/behavior_sensor_rotate_var.c b/app/src/behaviors/behavior_sensor_rotate_var.c index 95bb99610ba..3c2373b0048 100644 --- a/app/src/behaviors/behavior_sensor_rotate_var.c +++ b/app/src/behaviors/behavior_sensor_rotate_var.c @@ -13,7 +13,8 @@ #include "behavior_sensor_rotate_common.h" static const struct behavior_driver_api behavior_sensor_rotate_var_driver_api = { - .sensor_binding_triggered = zmk_behavior_sensor_rotate_common_trigger}; + .sensor_binding_data = zmk_behavior_sensor_rotate_common_data, + .sensor_binding_process = zmk_behavior_sensor_rotate_common_process}; static int behavior_sensor_rotate_var_init(const struct device *dev) { return 0; }; diff --git a/app/src/keymap.c b/app/src/keymap.c index 16543d37840..c8121176f62 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -252,48 +252,59 @@ int zmk_keymap_position_state_changed(uint8_t source, uint32_t position, bool pr } #if ZMK_KEYMAP_HAS_SENSORS -int zmk_keymap_sensor_triggered( - uint8_t sensor_position, size_t channel_data_size, - const struct zmk_sensor_channel_data channel_data[channel_data_size], int64_t timestamp) { - for (int layer = ZMK_KEYMAP_LAYERS_LEN - 1; layer >= _zmk_keymap_layer_default; layer--) { - if (zmk_keymap_layer_active(layer)) { - struct zmk_behavior_binding *binding = &zmk_sensor_keymap[layer][sensor_position]; - const struct device *behavior; - int ret; +int zmk_keymap_sensor_event(uint8_t sensor_position, size_t channel_data_size, + const struct zmk_sensor_channel_data channel_data[channel_data_size], + int64_t timestamp) { + bool opaque_response = false; - LOG_DBG("layer: %d sensor_position: %d, binding name: %s", layer, sensor_position, - binding->behavior_dev); + for (int layer = ZMK_KEYMAP_LAYERS_LEN - 1; layer >= 0; layer--) { + struct zmk_behavior_binding *binding = &zmk_sensor_keymap[layer][sensor_position]; + const struct device *behavior; + int ret; - behavior = device_get_binding(binding->behavior_dev); + LOG_DBG("layer: %d sensor_position: %d, binding name: %s", layer, sensor_position, + binding->behavior_dev); - if (!behavior) { - LOG_DBG("No behavior assigned to %d on layer %d", sensor_position, layer); - continue; - } + behavior = device_get_binding(binding->behavior_dev); - struct zmk_behavior_binding_event event = { - .layer = layer, - .position = ZMK_VIRTUAL_KEY_POSITION_SENSOR(sensor_position), - .timestamp = timestamp, - }; + if (!behavior) { + LOG_DBG("No behavior assigned to %d on layer %d", sensor_position, layer); + continue; + } - ret = behavior_sensor_keymap_binding_triggered( - binding, event, zmk_sensors_get_config_at_position(sensor_position), - channel_data_size, channel_data); + struct zmk_behavior_binding_event event = { + .layer = layer, + .position = ZMK_VIRTUAL_KEY_POSITION_SENSOR(sensor_position), + .timestamp = timestamp, + }; - if (ret > 0) { - LOG_DBG("behavior processing to continue to next layer"); - continue; - } else if (ret < 0) { - LOG_DBG("Behavior returned error: %d", ret); - return ret; - } else { - return ret; - } + ret = behavior_sensor_keymap_binding_data( + binding, event, zmk_sensors_get_config_at_position(sensor_position), channel_data_size, + channel_data); + + if (ret > 0) { + LOG_DBG("behavior processing to continue to next layer"); + continue; + } + + enum behavior_sensor_binding_process_mode mode = + (!opaque_response && layer >= _zmk_keymap_layer_default && + zmk_keymap_layer_active(layer)) + ? BEHAVIOR_SENSOR_BINDING_PROCESS_MODE_TRIGGER + : BEHAVIOR_SENSOR_BINDING_PROCESS_MODE_DISCARD; + + ret = behavior_sensor_keymap_binding_process(binding, event, mode); + + if (ret == ZMK_BEHAVIOR_OPAQUE) { + LOG_DBG("sensor event processing complete, behavior response was opaque"); + opaque_response = true; + } else if (ret < 0) { + LOG_DBG("Behavior returned error: %d", ret); + return ret; } } - return -ENOTSUP; + return 0; } #endif /* ZMK_KEYMAP_HAS_SENSORS */ @@ -308,8 +319,8 @@ int keymap_listener(const zmk_event_t *eh) { #if ZMK_KEYMAP_HAS_SENSORS const struct zmk_sensor_event *sensor_ev; if ((sensor_ev = as_zmk_sensor_event(eh)) != NULL) { - return zmk_keymap_sensor_triggered(sensor_ev->sensor_position, sensor_ev->channel_data_size, - sensor_ev->channel_data, sensor_ev->timestamp); + return zmk_keymap_sensor_event(sensor_ev->sensor_position, sensor_ev->channel_data_size, + sensor_ev->channel_data, sensor_ev->timestamp); } #endif /* ZMK_KEYMAP_HAS_SENSORS */ From 3a91b325138dfba8ede743aec28e2cdbc85d17d2 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 16 May 2023 22:27:01 -0700 Subject: [PATCH 043/160] refactor(sensors): Use "sensor index" consistently --- app/include/drivers/behavior.h | 8 ++--- app/include/zmk/events/sensor_event.h | 4 +-- app/include/zmk/sensors.h | 3 +- .../behaviors/behavior_sensor_rotate_common.c | 18 +++++----- app/src/keymap.c | 33 +++++++++---------- app/src/sensors.c | 16 ++++----- 6 files changed, 40 insertions(+), 42 deletions(-) diff --git a/app/include/drivers/behavior.h b/app/include/drivers/behavior.h index d7e57d02433..bf2843bbe3e 100644 --- a/app/include/drivers/behavior.h +++ b/app/include/drivers/behavior.h @@ -33,7 +33,7 @@ typedef int (*behavior_keymap_binding_callback_t)(struct zmk_behavior_binding *b typedef int (*behavior_sensor_keymap_binding_process_callback_t)( struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, enum behavior_sensor_binding_process_mode mode); -typedef int (*behavior_sensor_keymap_binding_data_callback_t)( +typedef int (*behavior_sensor_keymap_binding_accept_data_callback_t)( struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, const struct zmk_sensor_config *sensor_config, size_t channel_data_size, const struct zmk_sensor_channel_data channel_data[channel_data_size]); @@ -49,7 +49,7 @@ __subsystem struct behavior_driver_api { behavior_keymap_binding_callback_t binding_convert_central_state_dependent_params; behavior_keymap_binding_callback_t binding_pressed; behavior_keymap_binding_callback_t binding_released; - behavior_sensor_keymap_binding_data_callback_t sensor_binding_data; + behavior_sensor_keymap_binding_accept_data_callback_t sensor_binding_data; behavior_sensor_keymap_binding_process_callback_t sensor_binding_process; }; /** @@ -169,12 +169,12 @@ static inline int z_impl_behavior_keymap_binding_released(struct zmk_behavior_bi * @retval 0 If successful. * @retval Negative errno code if failure. */ -__syscall int behavior_sensor_keymap_binding_data( +__syscall int behavior_sensor_keymap_binding_accept_data( struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, const struct zmk_sensor_config *sensor_config, size_t channel_data_size, const struct zmk_sensor_channel_data *channel_data); -static inline int z_impl_behavior_sensor_keymap_binding_data( +static inline int z_impl_behavior_sensor_keymap_binding_accept_data( struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, const struct zmk_sensor_config *sensor_config, size_t channel_data_size, const struct zmk_sensor_channel_data *channel_data) { diff --git a/app/include/zmk/events/sensor_event.h b/app/include/zmk/events/sensor_event.h index c5157447dd4..f6d23ac71d9 100644 --- a/app/include/zmk/events/sensor_event.h +++ b/app/include/zmk/events/sensor_event.h @@ -16,12 +16,12 @@ #define ZMK_SENSOR_EVENT_MAX_CHANNELS 1 struct zmk_sensor_event { - uint8_t sensor_position; - size_t channel_data_size; struct zmk_sensor_channel_data channel_data[ZMK_SENSOR_EVENT_MAX_CHANNELS]; int64_t timestamp; + + uint8_t sensor_index; }; ZMK_EVENT_DECLARE(zmk_sensor_event); \ No newline at end of file diff --git a/app/include/zmk/sensors.h b/app/include/zmk/sensors.h index 06fbc63e564..8ac1c283cb6 100644 --- a/app/include/zmk/sensors.h +++ b/app/include/zmk/sensors.h @@ -8,7 +8,6 @@ #include -#define _SENSOR_CHILD_LEN(node) 1 + #define ZMK_KEYMAP_SENSORS_NODE DT_INST(0, zmk_keymap_sensors) #define ZMK_KEYMAP_HAS_SENSORS DT_NODE_HAS_STATUS(ZMK_KEYMAP_SENSORS_NODE, okay) #define ZMK_KEYMAP_SENSORS_BY_IDX(idx) DT_PHANDLE_BY_IDX(ZMK_KEYMAP_SENSORS_NODE, sensors, idx) @@ -19,7 +18,7 @@ #define ZMK_KEYMAP_SENSORS_LEN 0 #endif -const struct zmk_sensor_config *zmk_sensors_get_config_at_position(uint8_t sensor_position); +const struct zmk_sensor_config *zmk_sensors_get_config_at_index(uint8_t sensor_index); struct zmk_sensor_config { uint16_t triggers_per_rotation; diff --git a/app/src/behaviors/behavior_sensor_rotate_common.c b/app/src/behaviors/behavior_sensor_rotate_common.c index 0a2b619df81..4ccfea0e4b3 100644 --- a/app/src/behaviors/behavior_sensor_rotate_common.c +++ b/app/src/behaviors/behavior_sensor_rotate_common.c @@ -21,7 +21,7 @@ int zmk_behavior_sensor_rotate_common_data(struct zmk_behavior_binding *binding, const struct sensor_value value = channel_data[0].value; int triggers; - int sensor_position = ZMK_SENSOR_POSITION_FROM_VIRTUAL_KEY_POSITION(event.position); + int sensor_index = ZMK_SENSOR_POSITION_FROM_VIRTUAL_KEY_POSITION(event.position); // Some funky special casing for "old encoder behavior" where ticks where reported in val2 only, // instead of rotational degrees in val1. @@ -29,7 +29,7 @@ int zmk_behavior_sensor_rotate_common_data(struct zmk_behavior_binding *binding, if (value.val1 == 0) { triggers = value.val2; } else { - struct sensor_value remainder = data->remainder[sensor_position]; + struct sensor_value remainder = data->remainder[sensor_index]; remainder.val1 += value.val1; remainder.val2 += value.val2; @@ -43,15 +43,15 @@ int zmk_behavior_sensor_rotate_common_data(struct zmk_behavior_binding *binding, triggers = remainder.val1 / trigger_degrees; remainder.val1 %= trigger_degrees; - data->remainder[sensor_position] = remainder; + data->remainder[sensor_index] = remainder; } LOG_DBG( "val1: %d, val2: %d, remainder: %d/%d triggers: %d inc keycode 0x%02X dec keycode 0x%02X", - value.val1, value.val2, data->remainder[sensor_position].val1, - data->remainder[sensor_position].val2, triggers, binding->param1, binding->param2); + value.val1, value.val2, data->remainder[sensor_index].val1, + data->remainder[sensor_index].val2, triggers, binding->param1, binding->param2); - data->triggers[sensor_position] = triggers; + data->triggers[sensor_index] = triggers; return 0; } @@ -62,14 +62,14 @@ int zmk_behavior_sensor_rotate_common_process(struct zmk_behavior_binding *bindi const struct behavior_sensor_rotate_config *cfg = dev->config; struct behavior_sensor_rotate_data *data = dev->data; - const int sensor_position = ZMK_SENSOR_POSITION_FROM_VIRTUAL_KEY_POSITION(event.position); + const int sensor_index = ZMK_SENSOR_POSITION_FROM_VIRTUAL_KEY_POSITION(event.position); if (mode != BEHAVIOR_SENSOR_BINDING_PROCESS_MODE_TRIGGER) { - data->triggers[sensor_position] = 0; + data->triggers[sensor_index] = 0; return 0; } - int triggers = data->triggers[sensor_position]; + int triggers = data->triggers[sensor_index]; struct zmk_behavior_binding triggered_binding; if (triggers > 0) { diff --git a/app/src/keymap.c b/app/src/keymap.c index c8121176f62..020faf3f2be 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -252,38 +252,37 @@ int zmk_keymap_position_state_changed(uint8_t source, uint32_t position, bool pr } #if ZMK_KEYMAP_HAS_SENSORS -int zmk_keymap_sensor_event(uint8_t sensor_position, size_t channel_data_size, - const struct zmk_sensor_channel_data channel_data[channel_data_size], - int64_t timestamp) { +int zmk_keymap_sensor_event(uint8_t sensor_index, + const struct zmk_sensor_channel_data *channel_data, + size_t channel_data_size, int64_t timestamp) { bool opaque_response = false; for (int layer = ZMK_KEYMAP_LAYERS_LEN - 1; layer >= 0; layer--) { - struct zmk_behavior_binding *binding = &zmk_sensor_keymap[layer][sensor_position]; - const struct device *behavior; - int ret; + struct zmk_behavior_binding *binding = &zmk_sensor_keymap[layer][sensor_index]; - LOG_DBG("layer: %d sensor_position: %d, binding name: %s", layer, sensor_position, + LOG_DBG("layer: %d sensor_index: %d, binding name: %s", layer, sensor_index, binding->behavior_dev); - behavior = device_get_binding(binding->behavior_dev); - + const struct device *behavior = device_get_binding(binding->behavior_dev); if (!behavior) { - LOG_DBG("No behavior assigned to %d on layer %d", sensor_position, layer); + LOG_DBG("No behavior assigned to %d on layer %d", sensor_index, layer); continue; } struct zmk_behavior_binding_event event = { .layer = layer, - .position = ZMK_VIRTUAL_KEY_POSITION_SENSOR(sensor_position), + .position = ZMK_VIRTUAL_KEY_POSITION_SENSOR(sensor_index), .timestamp = timestamp, }; - ret = behavior_sensor_keymap_binding_data( - binding, event, zmk_sensors_get_config_at_position(sensor_position), channel_data_size, + int ret = behavior_sensor_keymap_binding_accept_data( + binding, event, zmk_sensors_get_config_at_index(sensor_index), channel_data_size, channel_data); - if (ret > 0) { - LOG_DBG("behavior processing to continue to next layer"); + if (ret < 0) { + LOG_WRN("behavior data accept for behavior %s returned an error (%d). Processing to " + "continue to next layer", + binding->behavior_dev, ret); continue; } @@ -319,8 +318,8 @@ int keymap_listener(const zmk_event_t *eh) { #if ZMK_KEYMAP_HAS_SENSORS const struct zmk_sensor_event *sensor_ev; if ((sensor_ev = as_zmk_sensor_event(eh)) != NULL) { - return zmk_keymap_sensor_event(sensor_ev->sensor_position, sensor_ev->channel_data_size, - sensor_ev->channel_data, sensor_ev->timestamp); + return zmk_keymap_sensor_event(sensor_ev->sensor_index, sensor_ev->channel_data, + sensor_ev->channel_data_size, sensor_ev->timestamp); } #endif /* ZMK_KEYMAP_HAS_SENSORS */ diff --git a/app/src/sensors.c b/app/src/sensors.c index 5f41c4f2f20..3a34ca230f6 100644 --- a/app/src/sensors.c +++ b/app/src/sensors.c @@ -19,7 +19,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if ZMK_KEYMAP_HAS_SENSORS struct sensors_item_cfg { - uint8_t sensor_position; + uint8_t sensor_index; const struct zmk_sensor_config *config; const struct device *dev; struct sensor_trigger trigger; @@ -57,17 +57,17 @@ static struct sensors_item_cfg sensors[] = {LISTIFY(ZMK_KEYMAP_SENSORS_LEN, SENS static ATOMIC_DEFINE(pending_sensors, ZMK_KEYMAP_SENSORS_LEN); -const struct zmk_sensor_config *zmk_sensors_get_config_at_position(uint8_t sensor_position) { - if (sensor_position > ARRAY_SIZE(configs)) { +const struct zmk_sensor_config *zmk_sensors_get_config_at_index(uint8_t sensor_index) { + if (sensor_index > ARRAY_SIZE(configs)) { return NULL; } - return &configs[sensor_position]; + return &configs[sensor_index]; } -static void trigger_sensor_data_for_position(uint32_t sensor_position) { +static void trigger_sensor_data_for_position(uint32_t sensor_index) { int err; - const struct sensors_item_cfg *item = &sensors[sensor_position]; + const struct sensors_item_cfg *item = &sensors[sensor_index]; err = sensor_sample_fetch(item->dev); if (err) { @@ -84,7 +84,7 @@ static void trigger_sensor_data_for_position(uint32_t sensor_position) { } ZMK_EVENT_RAISE(new_zmk_sensor_event( - (struct zmk_sensor_event){.sensor_position = item->sensor_position, + (struct zmk_sensor_event){.sensor_index = item->sensor_index, .channel_data = {(struct zmk_sensor_channel_data){ .value = value, .channel = item->trigger.chan}}, .timestamp = k_uptime_get()})); @@ -122,7 +122,7 @@ static void zmk_sensors_trigger_handler(const struct device *dev, static void zmk_sensors_init_item(uint8_t i) { LOG_DBG("Init sensor at index %d", i); - sensors[i].sensor_position = i; + sensors[i].sensor_index = i; if (!sensors[i].dev) { LOG_DBG("No local device for %d", i); From 753802cd79ce12d2e5d86c72ced3a4cc76fe4564 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sun, 18 Jun 2023 05:59:31 +0000 Subject: [PATCH 044/160] fix(sensors): Clean ups based on code review. --- app/Kconfig | 17 +++++------------ app/include/drivers/behavior.h | 7 ++++--- app/src/behaviors/behavior_sensor_rotate.c | 2 +- .../behaviors/behavior_sensor_rotate_common.c | 9 ++++----- .../behaviors/behavior_sensor_rotate_common.h | 9 ++++----- app/src/behaviors/behavior_sensor_rotate_var.c | 2 +- app/src/sensors.c | 9 +++++++-- 7 files changed, 26 insertions(+), 29 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 9c0606b02fc..92641c14ed0 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -194,18 +194,6 @@ rsource "src/split/Kconfig" #Basic Keyboard Setup endmenu -menu "Encoders" - -config ZMK_ENCODERS_DEFAULT_TRIGGERS_PER_ROTATION - int "Default behavior triggers per rotation" - help - Unless overridden for a specific behavior in the keymap/devicetree, this value - determines how many times to trigger the bound behavior per full rotation. - For tactile encoders with detents, this usually should match the number of - detents per rotation of the encoder. - default 30 - -endmenu menu "Display/LED Options" rsource "src/display/Kconfig" @@ -548,6 +536,11 @@ if ZMK_KEYMAP_SENSORS config ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION int "Default triggers per rotation" + help + Unless overridden for a sensor in the board/shield/devicetree, this value + determines how many times to trigger the bound behavior per full rotation. + For tactile encoders with detents, this usually should match the number of + detents per rotation of the encoder. default 20 endif # ZMK_KEYMAP_SENSORS diff --git a/app/include/drivers/behavior.h b/app/include/drivers/behavior.h index bf2843bbe3e..066cc723ece 100644 --- a/app/include/drivers/behavior.h +++ b/app/include/drivers/behavior.h @@ -49,7 +49,7 @@ __subsystem struct behavior_driver_api { behavior_keymap_binding_callback_t binding_convert_central_state_dependent_params; behavior_keymap_binding_callback_t binding_pressed; behavior_keymap_binding_callback_t binding_released; - behavior_sensor_keymap_binding_accept_data_callback_t sensor_binding_data; + behavior_sensor_keymap_binding_accept_data_callback_t sensor_binding_accept_data; behavior_sensor_keymap_binding_process_callback_t sensor_binding_process; }; /** @@ -186,11 +186,12 @@ static inline int z_impl_behavior_sensor_keymap_binding_accept_data( const struct behavior_driver_api *api = (const struct behavior_driver_api *)dev->api; - if (api->sensor_binding_data == NULL) { + if (api->sensor_binding_accept_data == NULL) { return -ENOTSUP; } - return api->sensor_binding_data(binding, event, sensor_config, channel_data_size, channel_data); + return api->sensor_binding_accept_data(binding, event, sensor_config, channel_data_size, + channel_data); } /** diff --git a/app/src/behaviors/behavior_sensor_rotate.c b/app/src/behaviors/behavior_sensor_rotate.c index 3b5bef62183..822bc206b02 100644 --- a/app/src/behaviors/behavior_sensor_rotate.c +++ b/app/src/behaviors/behavior_sensor_rotate.c @@ -13,7 +13,7 @@ #include "behavior_sensor_rotate_common.h" static const struct behavior_driver_api behavior_sensor_rotate_driver_api = { - .sensor_binding_data = zmk_behavior_sensor_rotate_common_data, + .sensor_binding_accept_data = zmk_behavior_sensor_rotate_common_accept_data, .sensor_binding_process = zmk_behavior_sensor_rotate_common_process}; static int behavior_sensor_rotate_init(const struct device *dev) { return 0; }; diff --git a/app/src/behaviors/behavior_sensor_rotate_common.c b/app/src/behaviors/behavior_sensor_rotate_common.c index 4ccfea0e4b3..eea7bf48476 100644 --- a/app/src/behaviors/behavior_sensor_rotate_common.c +++ b/app/src/behaviors/behavior_sensor_rotate_common.c @@ -11,11 +11,10 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); -int zmk_behavior_sensor_rotate_common_data(struct zmk_behavior_binding *binding, - struct zmk_behavior_binding_event event, - const struct zmk_sensor_config *sensor_config, - size_t channel_data_size, - const struct zmk_sensor_channel_data *channel_data) { +int zmk_behavior_sensor_rotate_common_accept_data( + struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, + const struct zmk_sensor_config *sensor_config, size_t channel_data_size, + const struct zmk_sensor_channel_data *channel_data) { const struct device *dev = device_get_binding(binding->behavior_dev); struct behavior_sensor_rotate_data *data = dev->data; diff --git a/app/src/behaviors/behavior_sensor_rotate_common.h b/app/src/behaviors/behavior_sensor_rotate_common.h index d9d4d855dfa..d354b67937c 100644 --- a/app/src/behaviors/behavior_sensor_rotate_common.h +++ b/app/src/behaviors/behavior_sensor_rotate_common.h @@ -20,11 +20,10 @@ struct behavior_sensor_rotate_data { int triggers[ZMK_KEYMAP_SENSORS_LEN]; }; -int zmk_behavior_sensor_rotate_common_data(struct zmk_behavior_binding *binding, - struct zmk_behavior_binding_event event, - const struct zmk_sensor_config *sensor_config, - size_t channel_data_size, - const struct zmk_sensor_channel_data *channel_data); +int zmk_behavior_sensor_rotate_common_accept_data( + struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, + const struct zmk_sensor_config *sensor_config, size_t channel_data_size, + const struct zmk_sensor_channel_data *channel_data); int zmk_behavior_sensor_rotate_common_process(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, enum behavior_sensor_binding_process_mode mode); \ No newline at end of file diff --git a/app/src/behaviors/behavior_sensor_rotate_var.c b/app/src/behaviors/behavior_sensor_rotate_var.c index 3c2373b0048..e6d20cab9d1 100644 --- a/app/src/behaviors/behavior_sensor_rotate_var.c +++ b/app/src/behaviors/behavior_sensor_rotate_var.c @@ -13,7 +13,7 @@ #include "behavior_sensor_rotate_common.h" static const struct behavior_driver_api behavior_sensor_rotate_var_driver_api = { - .sensor_binding_data = zmk_behavior_sensor_rotate_common_data, + .sensor_binding_accept_data = zmk_behavior_sensor_rotate_common_accept_data, .sensor_binding_process = zmk_behavior_sensor_rotate_common_process}; static int behavior_sensor_rotate_var_init(const struct device *dev) { return 0; }; diff --git a/app/src/sensors.c b/app/src/sensors.c index 3a34ca230f6..e339afe0437 100644 --- a/app/src/sensors.c +++ b/app/src/sensors.c @@ -19,10 +19,10 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if ZMK_KEYMAP_HAS_SENSORS struct sensors_item_cfg { - uint8_t sensor_index; const struct zmk_sensor_config *config; const struct device *dev; struct sensor_trigger trigger; + uint8_t sensor_index; }; #define _SENSOR_ITEM(idx, node) \ @@ -43,7 +43,11 @@ struct sensors_item_cfg { CONFIG_ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION)) \ } #define SENSOR_CHILD_DEFAULTS(idx, arg) \ - { .triggers_per_rotation = DT_PROP_OR(ZMK_KEYMAP_SENSORS_NODE, triggers_per_rotation, 20) } + { \ + .triggers_per_rotation = \ + DT_PROP_OR(ZMK_KEYMAP_SENSORS_NODE, triggers_per_rotation, \ + CONFIG_ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION) \ + } static struct zmk_sensor_config configs[] = { #if ZMK_KEYMAP_SENSORS_CHILD_COUNT > 0 @@ -85,6 +89,7 @@ static void trigger_sensor_data_for_position(uint32_t sensor_index) { ZMK_EVENT_RAISE(new_zmk_sensor_event( (struct zmk_sensor_event){.sensor_index = item->sensor_index, + .channel_data_size = 1, .channel_data = {(struct zmk_sensor_channel_data){ .value = value, .channel = item->trigger.chan}}, .timestamp = k_uptime_get()})); From 5763558a02154ab599775c770fcf954931816e52 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 30 May 2023 02:38:28 +0000 Subject: [PATCH 045/160] feat(blog): Add post about sensor refactor. * Document changed configuration, support for other Zephyr drivers, next steps. Co-authored-by: Cem Aksoylar --- docs/blog/2023-06-18-encoder-refactors.md | 119 ++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 docs/blog/2023-06-18-encoder-refactors.md diff --git a/docs/blog/2023-06-18-encoder-refactors.md b/docs/blog/2023-06-18-encoder-refactors.md new file mode 100644 index 00000000000..26f9cee8176 --- /dev/null +++ b/docs/blog/2023-06-18-encoder-refactors.md @@ -0,0 +1,119 @@ +--- +title: "Major Encoder Refactor" +author: Pete Johanson +author_title: Project Creator +author_url: https://gitlab.com/petejohanson +author_image_url: https://www.gravatar.com/avatar/2001ceff7e9dc753cf96fcb2e6f41110 +tags: [firmware, zephyr, sensors, encoders] +--- + +Today, we merged a significant change to the low level sensor code that is used to support encoders. In particular, +this paves the way for completing the work on supporting split peripheral sensors/encoders, and other future sensors +like pointing devices. + +As part of the work, backwards compatibility for existing shields has been retained, but only for a grace period to allow out-of-tree shields to move to the new approach for encoders. + +Special thanks to [joelspadin] for the _thorough_ code review and testing throughout the development of the refactor. + +## Summary of Changes + +The following items have been merged: + +1. Split configuration of hardware details, and behavior configuration to allow more flexible functionality of sensors/encoders, in particular linear encoders that lack detents/"clicks" as they rotate. +2. Support for upstream Zephyr sensor drivers, including the NRFX QDEC driver that can be used on nRF52 based keyboards. +3. Sensor data handling changes that pave the way for split sensor handling easily. + +## Configuration Changes + +The major changes to configuration in the devicetree files relates to how the number of steps/triggers for a given encoder are set. In particular, the number of pulses/steps for a given encoder is configured first, allowing ZMK to determine the exact angular degrees of change that is represented by a single pulse on the data lines to that encoder. + +Once that angular degrees mapping is completed, now independently there is a configuration setting to control how many triggers of the behavior in the keymap should occur for each full rotation of the sensor. Another way to think of this is "how many degrees of rotation results in a triggering of the sensor behavior in your keymap layer". + +Splitting these two parts of the encoder configuration allows greater flexibility, and fine grained control of encoder behavior for linear encoders that don't have fixed detents. + +### Old Configuration + +Previously, an encoder configuration looked like: + +``` + left_encoder: encoder_left { + compatible = "alps,ec11"; + label = "LEFT_ENCODER"; + a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <4>; + }; +``` + +Here, the `resolution` property was used to indicate how many encoder pulses should trigger the sensor behavior one time. Next, the encoder is selected in the sensors node: + +``` + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + }; +``` + +That was the entirety of the configuration for encoders. + +### New Configuration + +``` + left_encoder: encoder_left { + compatible = "alps,ec11"; + label = "LEFT_ENCODER"; + a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + steps = <80>; + }; +``` + +Here, the `steps` property is now used to indicate how many encoder pulses there are in a single complete rotation of the encoder. Next, the encoder is selected in the sensors node as before, but an additional configuration is used to indicate how many times the encoder should trigger the behavior in your keymap per rotation: + +``` + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; + }; +``` + +For tactile encoders that have detents, the `triggers-per-rotation` would match the number of detents on the encoder. For linear encoders, the value can be chosen to suit your needs. + +## Zephyr Sensor Drivers + +The configuration changes bring ZMK's code in line with how upstream Zephyr sensor drivers handle rotations. This has the added advantage of allowing us to leverage other sensor drivers. On Nordic MCUs, like nRF52840, the NRFX QDEC driver can be used, for example: + +``` +&pinctrl { + qdec_default: qdec_default { + group1 { + psels = , + ; + bias-pull-up; + }; + }; +}; + +// Set up the QDEC hardware based driver and give it the same label as the deleted node. +encoder: &qdec0 { + status = "okay"; + led-pre = <0>; + steps = <80>; + pinctrl-0 = <&qdec_default>; + pinctrl-names = "default"; +}; +``` + +The NRFX QDEC driver has the advantage of supporting optical encoders as well, and although it polls, it does so in hardware without waking the MCU core; initial basic power profiling is promising. + +## Split Sensor/Encoder Support + +In addition to the refactors for splitting the configuration, the changes merged included refactors designed to simplify and move forward with the long outstanding feature of supporting encoders on the peripheral side of split keyboards. That work is planned as a follow up. + +## Deprecation + +The old configuration will be supported for a period of one month, and then removed, giving users a grace period to complete the migration to the new separated configuration. + +[petejohanson]: https://github.com/petejohanson +[joelspadin]: https://github.com/joelspadin From e686fce4d917b708da7f2baba4115043d3f0deab Mon Sep 17 00:00:00 2001 From: Xudong Zheng <7pkvm5aw@slicealias.com> Date: Fri, 19 May 2023 18:41:08 -0400 Subject: [PATCH 046/160] refactor(split): allow central to define connection parameters Fixes #1614 --- app/src/split/bluetooth/Kconfig | 17 +++++++++++++++-- app/src/split/bluetooth/central.c | 4 +++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app/src/split/bluetooth/Kconfig b/app/src/split/bluetooth/Kconfig index e2c8d5c3395..0610b667a26 100644 --- a/app/src/split/bluetooth/Kconfig +++ b/app/src/split/bluetooth/Kconfig @@ -33,6 +33,18 @@ config ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_QUEUE_SIZE int "Max number of behavior run events to queue to send to the peripheral(s)" default 5 +config ZMK_SPLIT_BLE_PREF_INT + int "Connection interval to use for split central/peripheral connection" + default 6 + +config ZMK_SPLIT_BLE_PREF_LATENCY + int "Latency to use for split central/peripheral connection" + default 30 + +config ZMK_SPLIT_BLE_PREF_TIMEOUT + int "Supervision timeout to use for split central/peripheral connection" + default 400 + endif # ZMK_SPLIT_ROLE_CENTRAL if !ZMK_SPLIT_ROLE_CENTRAL @@ -58,8 +70,9 @@ config BT_MAX_PAIRED config BT_MAX_CONN default 1 -config BT_PERIPHERAL_PREF_MAX_INT - default 6 +# Allow central to specify connection parameters. +config BT_GAP_AUTO_UPDATE_CONN_PARAMS + default n #!ZMK_SPLIT_ROLE_CENTRAL endif diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index 53e61be621a..147760ffae7 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -383,7 +383,9 @@ static bool split_central_eir_found(const bt_addr_le_t *addr) { struct peripheral_slot *slot = &peripherals[slot_idx]; LOG_DBG("Initiating new connnection"); - struct bt_le_conn_param *param = BT_LE_CONN_PARAM(0x0006, 0x0006, 30, 400); + struct bt_le_conn_param *param = + BT_LE_CONN_PARAM(CONFIG_ZMK_SPLIT_BLE_PREF_INT, CONFIG_ZMK_SPLIT_BLE_PREF_INT, + CONFIG_ZMK_SPLIT_BLE_PREF_LATENCY, CONFIG_ZMK_SPLIT_BLE_PREF_TIMEOUT); err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, param, &slot->conn); if (err < 0) { LOG_ERR("Create conn failed (err %d) (create conn? 0x%04x)", err, BT_HCI_OP_LE_CREATE_CONN); From 805dd4a53bc9ff7fe1f7eb5c9ea332a9affbc5f9 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 8 Apr 2022 15:38:46 +0000 Subject: [PATCH 047/160] feat(behaviors): Support parameterized macros. * Add two new compatibles for macros that take one or two parameters when bound in a keymap. * Use `¯o_param_1to1`, `¯o_param_1to2`, `¯o_param_2to1`, and `¯o_param_2to2` control entries in the bindings for the macro to have the next binding entry have it's values substituted. Co-authored-by: Cem Aksoylar --- app/CMakeLists.txt | 2 +- app/Kconfig.behaviors | 7 +- app/dts/behaviors/macros.dtsi | 55 +++++++-- app/dts/bindings/behaviors/macro_base.yaml | 13 +++ .../zmk,behavior-macro-one-param.yaml | 8 ++ .../zmk,behavior-macro-two-param.yaml | 8 ++ .../behaviors/zmk,behavior-macro.yaml | 13 +-- .../bindings/macros/zmk,macro-param-1to1.yaml | 8 ++ .../bindings/macros/zmk,macro-param-1to2.yaml | 8 ++ .../bindings/macros/zmk,macro-param-2to1.yaml | 8 ++ .../bindings/macros/zmk,macro-param-2to2.yaml | 8 ++ app/src/behaviors/behavior_macro.c | 104 +++++++++++++----- .../place-holder-parameters/events.patterns | 1 + .../keycode_events.snapshot | 16 +++ .../native_posix_64.keymap | 63 +++++++++++ docs/docs/behaviors/macros.md | 40 +++++++ 16 files changed, 312 insertions(+), 50 deletions(-) create mode 100644 app/dts/bindings/behaviors/macro_base.yaml create mode 100644 app/dts/bindings/behaviors/zmk,behavior-macro-one-param.yaml create mode 100644 app/dts/bindings/behaviors/zmk,behavior-macro-two-param.yaml create mode 100644 app/dts/bindings/macros/zmk,macro-param-1to1.yaml create mode 100644 app/dts/bindings/macros/zmk,macro-param-1to2.yaml create mode 100644 app/dts/bindings/macros/zmk,macro-param-2to1.yaml create mode 100644 app/dts/bindings/macros/zmk,macro-param-2to2.yaml create mode 100644 app/tests/macros/place-holder-parameters/events.patterns create mode 100644 app/tests/macros/place-holder-parameters/keycode_events.snapshot create mode 100644 app/tests/macros/place-holder-parameters/native_posix_64.keymap diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index ea3b8f73364..4c1c63c2cfa 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -43,7 +43,7 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) target_sources(app PRIVATE src/behaviors/behavior_sticky_key.c) target_sources(app PRIVATE src/behaviors/behavior_caps_word.c) target_sources(app PRIVATE src/behaviors/behavior_key_repeat.c) - target_sources(app PRIVATE src/behaviors/behavior_macro.c) + target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_MACRO app PRIVATE src/behaviors/behavior_macro.c) target_sources(app PRIVATE src/behaviors/behavior_momentary_layer.c) target_sources(app PRIVATE src/behaviors/behavior_mod_morph.c) target_sources(app PRIVATE src/behaviors/behavior_outputs.c) diff --git a/app/Kconfig.behaviors b/app/Kconfig.behaviors index 17850eae2ff..9e4a82b06e7 100644 --- a/app/Kconfig.behaviors +++ b/app/Kconfig.behaviors @@ -21,4 +21,9 @@ config ZMK_BEHAVIOR_SENSOR_ROTATE_VAR bool default y depends on DT_HAS_ZMK_BEHAVIOR_SENSOR_ROTATE_VAR_ENABLED - select ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON \ No newline at end of file + select ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON + +config ZMK_BEHAVIOR_MACRO + bool + default y + depends on DT_HAS_ZMK_BEHAVIOR_MACRO_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_ONE_PARAM_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_TWO_PARAM_ENABLED \ No newline at end of file diff --git a/app/dts/behaviors/macros.dtsi b/app/dts/behaviors/macros.dtsi index 757c046edd7..36b4a8d33f3 100644 --- a/app/dts/behaviors/macros.dtsi +++ b/app/dts/behaviors/macros.dtsi @@ -4,16 +4,33 @@ * SPDX-License-Identifier: MIT */ +#define MACRO_PLACEHOLDER 0 #define ZMK_MACRO_STRINGIFY(x) #x #define ZMK_MACRO(name,...) \ - name: name { \ - label = ZMK_MACRO_STRINGIFY(ZM_ ## name); \ - compatible = "zmk,behavior-macro"; \ - #binding-cells = <0>; \ - __VA_ARGS__ \ - }; +name: name { \ + label = ZMK_MACRO_STRINGIFY(ZM_ ## name); \ + compatible = "zmk,behavior-macro"; \ + #binding-cells = <0>; \ + __VA_ARGS__ \ +}; - / { +#define ZMK_MACRO1(name,...) \ +name: name { \ + label = ZMK_MACRO_STRINGIFY(ZM_ ## name); \ + compatible = "zmk,behavior-macro-one-param"; \ + #binding-cells = <1>; \ + __VA_ARGS__ \ +}; + +#define ZMK_MACRO2(name,...) \ +name: name { \ + label = ZMK_MACRO_STRINGIFY(ZM_ ## name); \ + compatible = "zmk,behavior-macro-two-param"; \ + #binding-cells = <2>; \ + __VA_ARGS__ \ +}; + +/ { behaviors { macro_tap: macro_control_mode_tap { compatible = "zmk,macro-control-mode-tap"; @@ -50,5 +67,29 @@ label = "MAC_WAIT_REL"; #binding-cells = <0>; }; + + macro_param_1to1: macro_param_1to1 { + compatible = "zmk,macro-param-1to1"; + label = "MAC_PARAM_1TO1"; + #binding-cells = <0>; + }; + + macro_param_1to2: macro_param_1to2 { + compatible = "zmk,macro-param-1to2"; + label = "MAC_PARAM_1TO2"; + #binding-cells = <0>; + }; + + macro_param_2to1: macro_param_2to1 { + compatible = "zmk,macro-param-2to1"; + label = "MAC_PARAM_2TO1"; + #binding-cells = <0>; + }; + + macro_param_2to2: macro_param_2to2 { + compatible = "zmk,macro-param-2to2"; + label = "MAC_PARAM_2TO2"; + #binding-cells = <0>; + }; }; }; diff --git a/app/dts/bindings/behaviors/macro_base.yaml b/app/dts/bindings/behaviors/macro_base.yaml new file mode 100644 index 00000000000..236ee33d3b2 --- /dev/null +++ b/app/dts/bindings/behaviors/macro_base.yaml @@ -0,0 +1,13 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +properties: + bindings: + type: phandle-array + required: true + wait-ms: + type: int + description: The default time to wait (in milliseconds) before triggering the next behavior in the macro bindings list. + tap-ms: + type: int + description: The default time to wait (in milliseconds) between the press and release events on a tapped macro behavior binding diff --git a/app/dts/bindings/behaviors/zmk,behavior-macro-one-param.yaml b/app/dts/bindings/behaviors/zmk,behavior-macro-one-param.yaml new file mode 100644 index 00000000000..4fe5a2fba1e --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-macro-one-param.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Macro Behavior + +compatible: "zmk,behavior-macro-one-param" + +include: [one_param.yaml, macro_base.yaml] diff --git a/app/dts/bindings/behaviors/zmk,behavior-macro-two-param.yaml b/app/dts/bindings/behaviors/zmk,behavior-macro-two-param.yaml new file mode 100644 index 00000000000..ab6e32b48ec --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-macro-two-param.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Macro Behavior + +compatible: "zmk,behavior-macro-two-param" + +include: [two_param.yaml, macro_base.yaml] diff --git a/app/dts/bindings/behaviors/zmk,behavior-macro.yaml b/app/dts/bindings/behaviors/zmk,behavior-macro.yaml index e6f6757d49a..035dd943542 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-macro.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-macro.yaml @@ -5,15 +5,4 @@ description: Macro Behavior compatible: "zmk,behavior-macro" -include: zero_param.yaml - -properties: - bindings: - type: phandle-array - required: true - wait-ms: - type: int - description: The default time to wait (in milliseconds) before triggering the next behavior in the macro bindings list. - tap-ms: - type: int - description: The default time to wait (in milliseconds) between the press and release events on a tapped macro behavior binding +include: [zero_param.yaml, macro_base.yaml] diff --git a/app/dts/bindings/macros/zmk,macro-param-1to1.yaml b/app/dts/bindings/macros/zmk,macro-param-1to1.yaml new file mode 100644 index 00000000000..ae0d54dfbeb --- /dev/null +++ b/app/dts/bindings/macros/zmk,macro-param-1to1.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Macro Parameter One Substituted Into Next Binding's First Parameter + +compatible: "zmk,macro-param-1to1" + +include: zero_param.yaml diff --git a/app/dts/bindings/macros/zmk,macro-param-1to2.yaml b/app/dts/bindings/macros/zmk,macro-param-1to2.yaml new file mode 100644 index 00000000000..1018526cbea --- /dev/null +++ b/app/dts/bindings/macros/zmk,macro-param-1to2.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Macro Parameter One Substituted Into Next Binding's Second Parameter + +compatible: "zmk,macro-param-1to2" + +include: zero_param.yaml diff --git a/app/dts/bindings/macros/zmk,macro-param-2to1.yaml b/app/dts/bindings/macros/zmk,macro-param-2to1.yaml new file mode 100644 index 00000000000..3ebf8fc905d --- /dev/null +++ b/app/dts/bindings/macros/zmk,macro-param-2to1.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Macro Parameter Two Substituted Into Next Binding's First Parameter + +compatible: "zmk,macro-param-2to1" + +include: zero_param.yaml diff --git a/app/dts/bindings/macros/zmk,macro-param-2to2.yaml b/app/dts/bindings/macros/zmk,macro-param-2to2.yaml new file mode 100644 index 00000000000..e3ebe40fb3a --- /dev/null +++ b/app/dts/bindings/macros/zmk,macro-param-2to2.yaml @@ -0,0 +1,8 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Macro Parameter Two Substituted Into Next Binding's Second Parameter + +compatible: "zmk,macro-param-2to2" + +include: zero_param.yaml diff --git a/app/src/behaviors/behavior_macro.c b/app/src/behaviors/behavior_macro.c index e84f1fc89bb..c47284531a7 100644 --- a/app/src/behaviors/behavior_macro.c +++ b/app/src/behaviors/behavior_macro.c @@ -4,8 +4,6 @@ * SPDX-License-Identifier: MIT */ -#define DT_DRV_COMPAT zmk_behavior_macro - #include #include #include @@ -15,20 +13,22 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); -#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) - enum behavior_macro_mode { MACRO_MODE_TAP, MACRO_MODE_PRESS, MACRO_MODE_RELEASE, }; +enum param_source { PARAM_SOURCE_BINDING, PARAM_SOURCE_MACRO_1ST, PARAM_SOURCE_MACRO_2ND }; + struct behavior_macro_trigger_state { uint32_t wait_ms; uint32_t tap_ms; enum behavior_macro_mode mode; uint16_t start_index; uint16_t count; + enum param_source param1_source; + enum param_source param2_source; }; struct behavior_macro_state { @@ -52,6 +52,11 @@ struct behavior_macro_config { #define WAIT_TIME DT_PROP(DT_INST(0, zmk_macro_control_wait_time), label) #define WAIT_REL DT_PROP(DT_INST(0, zmk_macro_pause_for_release), label) +#define P1TO1 DT_PROP(DT_INST(0, zmk_macro_param_1to1), label) +#define P1TO2 DT_PROP(DT_INST(0, zmk_macro_param_1to2), label) +#define P2TO1 DT_PROP(DT_INST(0, zmk_macro_param_2to1), label) +#define P2TO2 DT_PROP(DT_INST(0, zmk_macro_param_2to2), label) + #define ZM_IS_NODE_MATCH(a, b) (strcmp(a, b) == 0) #define IS_TAP_MODE(dev) ZM_IS_NODE_MATCH(dev, TAP_MODE) #define IS_PRESS_MODE(dev) ZM_IS_NODE_MATCH(dev, PRESS_MODE) @@ -61,6 +66,11 @@ struct behavior_macro_config { #define IS_WAIT_TIME(dev) ZM_IS_NODE_MATCH(dev, WAIT_TIME) #define IS_PAUSE(dev) ZM_IS_NODE_MATCH(dev, WAIT_REL) +#define IS_P1TO1(dev) ZM_IS_NODE_MATCH(dev, P1TO1) +#define IS_P1TO2(dev) ZM_IS_NODE_MATCH(dev, P1TO2) +#define IS_P2TO1(dev) ZM_IS_NODE_MATCH(dev, P2TO1) +#define IS_P2TO2(dev) ZM_IS_NODE_MATCH(dev, P2TO2) + static bool handle_control_binding(struct behavior_macro_trigger_state *state, const struct zmk_behavior_binding *binding) { if (IS_TAP_MODE(binding->behavior_dev)) { @@ -78,6 +88,18 @@ static bool handle_control_binding(struct behavior_macro_trigger_state *state, } else if (IS_WAIT_TIME(binding->behavior_dev)) { state->wait_ms = binding->param1; LOG_DBG("macro wait time set: %d", state->wait_ms); + } else if (IS_P1TO1(binding->behavior_dev)) { + state->param1_source = PARAM_SOURCE_MACRO_1ST; + LOG_DBG("macro param: 1to1"); + } else if (IS_P1TO2(binding->behavior_dev)) { + state->param2_source = PARAM_SOURCE_MACRO_1ST; + LOG_DBG("macro param: 1to2"); + } else if (IS_P2TO1(binding->behavior_dev)) { + state->param1_source = PARAM_SOURCE_MACRO_2ND; + LOG_DBG("macro param: 2to1"); + } else if (IS_P2TO2(binding->behavior_dev)) { + state->param2_source = PARAM_SOURCE_MACRO_2ND; + LOG_DBG("macro param: 2to2"); } else { return false; } @@ -110,21 +132,47 @@ static int behavior_macro_init(const struct device *dev) { return 0; }; +static uint32_t select_param(enum param_source param_source, uint32_t source_binding, + const struct zmk_behavior_binding *macro_binding) { + switch (param_source) { + case PARAM_SOURCE_MACRO_1ST: + return macro_binding->param1; + case PARAM_SOURCE_MACRO_2ND: + return macro_binding->param2; + default: + return source_binding; + } +}; + +static void replace_params(struct behavior_macro_trigger_state *state, + struct zmk_behavior_binding *binding, + const struct zmk_behavior_binding *macro_binding) { + binding->param1 = select_param(state->param1_source, binding->param1, macro_binding); + binding->param2 = select_param(state->param2_source, binding->param2, macro_binding); + + state->param1_source = PARAM_SOURCE_BINDING; + state->param2_source = PARAM_SOURCE_BINDING; +} + static void queue_macro(uint32_t position, const struct zmk_behavior_binding bindings[], - struct behavior_macro_trigger_state state) { + struct behavior_macro_trigger_state state, + const struct zmk_behavior_binding *macro_binding) { LOG_DBG("Iterating macro bindings - starting: %d, count: %d", state.start_index, state.count); for (int i = state.start_index; i < state.start_index + state.count; i++) { if (!handle_control_binding(&state, &bindings[i])) { + struct zmk_behavior_binding binding = bindings[i]; + replace_params(&state, &binding, macro_binding); + switch (state.mode) { case MACRO_MODE_TAP: - zmk_behavior_queue_add(position, bindings[i], true, state.tap_ms); - zmk_behavior_queue_add(position, bindings[i], false, state.wait_ms); + zmk_behavior_queue_add(position, binding, true, state.tap_ms); + zmk_behavior_queue_add(position, binding, false, state.wait_ms); break; case MACRO_MODE_PRESS: - zmk_behavior_queue_add(position, bindings[i], true, state.wait_ms); + zmk_behavior_queue_add(position, binding, true, state.wait_ms); break; case MACRO_MODE_RELEASE: - zmk_behavior_queue_add(position, bindings[i], false, state.wait_ms); + zmk_behavior_queue_add(position, binding, false, state.wait_ms); break; default: LOG_ERR("Unknown macro mode: %d", state.mode); @@ -145,7 +193,7 @@ static int on_macro_binding_pressed(struct zmk_behavior_binding *binding, .start_index = 0, .count = state->press_bindings_count}; - queue_macro(event.position, cfg->bindings, trigger_state); + queue_macro(event.position, cfg->bindings, trigger_state, binding); return ZMK_BEHAVIOR_OPAQUE; } @@ -156,7 +204,7 @@ static int on_macro_binding_released(struct zmk_behavior_binding *binding, const struct behavior_macro_config *cfg = dev->config; struct behavior_macro_state *state = dev->data; - queue_macro(event.position, cfg->bindings, state->release_state); + queue_macro(event.position, cfg->bindings, state->release_state, binding); return ZMK_BEHAVIOR_OPAQUE; } @@ -166,22 +214,20 @@ static const struct behavior_driver_api behavior_macro_driver_api = { .binding_released = on_macro_binding_released, }; -#define BINDING_WITH_COMMA(idx, drv_inst) ZMK_KEYMAP_EXTRACT_BINDING(idx, DT_DRV_INST(drv_inst)) - #define TRANSFORMED_BEHAVIORS(n) \ - {LISTIFY(DT_PROP_LEN(DT_DRV_INST(n), bindings), BINDING_WITH_COMMA, (, ), n)}, - -#define MACRO_INST(n) \ - static struct behavior_macro_state behavior_macro_state_##n = {}; \ - static struct behavior_macro_config behavior_macro_config_##n = { \ - .default_wait_ms = DT_INST_PROP_OR(n, wait_ms, CONFIG_ZMK_MACRO_DEFAULT_WAIT_MS), \ - .default_tap_ms = DT_INST_PROP_OR(n, tap_ms, CONFIG_ZMK_MACRO_DEFAULT_TAP_MS), \ - .count = DT_INST_PROP_LEN(n, bindings), \ - .bindings = TRANSFORMED_BEHAVIORS(n)}; \ - DEVICE_DT_INST_DEFINE(n, behavior_macro_init, NULL, &behavior_macro_state_##n, \ - &behavior_macro_config_##n, APPLICATION, \ - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_macro_driver_api); - -DT_INST_FOREACH_STATUS_OKAY(MACRO_INST) - -#endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ + {LISTIFY(DT_PROP_LEN(n, bindings), ZMK_KEYMAP_EXTRACT_BINDING, (, ), n)}, + +#define MACRO_INST(inst) \ + static struct behavior_macro_state behavior_macro_state_##inst = {}; \ + static struct behavior_macro_config behavior_macro_config_##inst = { \ + .default_wait_ms = DT_PROP_OR(inst, wait_ms, CONFIG_ZMK_MACRO_DEFAULT_WAIT_MS), \ + .default_tap_ms = DT_PROP_OR(inst, tap_ms, CONFIG_ZMK_MACRO_DEFAULT_TAP_MS), \ + .count = DT_PROP_LEN(inst, bindings), \ + .bindings = TRANSFORMED_BEHAVIORS(inst)}; \ + DEVICE_DT_DEFINE(inst, behavior_macro_init, NULL, &behavior_macro_state_##inst, \ + &behavior_macro_config_##inst, APPLICATION, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_macro_driver_api); + +DT_FOREACH_STATUS_OKAY(zmk_behavior_macro, MACRO_INST) +DT_FOREACH_STATUS_OKAY(zmk_behavior_macro_one_param, MACRO_INST) +DT_FOREACH_STATUS_OKAY(zmk_behavior_macro_two_param, MACRO_INST) diff --git a/app/tests/macros/place-holder-parameters/events.patterns b/app/tests/macros/place-holder-parameters/events.patterns new file mode 100644 index 00000000000..3c9d3f838c6 --- /dev/null +++ b/app/tests/macros/place-holder-parameters/events.patterns @@ -0,0 +1 @@ +s/.*hid_listener_keycode/kp/p \ No newline at end of file diff --git a/app/tests/macros/place-holder-parameters/keycode_events.snapshot b/app/tests/macros/place-holder-parameters/keycode_events.snapshot new file mode 100644 index 00000000000..f198a49b81e --- /dev/null +++ b/app/tests/macros/place-holder-parameters/keycode_events.snapshot @@ -0,0 +1,16 @@ +kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +kp_pressed: usage_page 0x07 keycode 0x38 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x38 implicit_mods 0x00 explicit_mods 0x00 +kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +kp_pressed: usage_page 0x07 keycode 0x34 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x34 implicit_mods 0x00 explicit_mods 0x00 +kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +kp_pressed: usage_page 0x07 keycode 0x34 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x34 implicit_mods 0x00 explicit_mods 0x00 +kp_pressed: usage_page 0x07 keycode 0x08 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x08 implicit_mods 0x00 explicit_mods 0x00 +kp_pressed: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/macros/place-holder-parameters/native_posix_64.keymap b/app/tests/macros/place-holder-parameters/native_posix_64.keymap new file mode 100644 index 00000000000..59d78b5e8fb --- /dev/null +++ b/app/tests/macros/place-holder-parameters/native_posix_64.keymap @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include + +/ { + macros { + slash_macro: slash_macro { + #binding-cells = <2>; + label = "ZM_SLASH"; + compatible = "zmk,behavior-macro-two-param"; + wait-ms = <40>; + tap-ms = <40>; + bindings = < + ¯o_param_1to1 &kp MACRO_PLACEHOLDER + &kp SLASH + ¯o_param_2to1 &kp MACRO_PLACEHOLDER>; + }; + + to_second_macro: to_second_macro { + #binding-cells = <2>; + label = "ZMK_TO_SECOND"; + compatible = "zmk,behavior-macro-two-param"; + wait-ms = <40>; + tap-ms = <40>; + bindings = < + ¯o_param_1to2 &mt LSHIFT MACRO_PLACEHOLDER + ¯o_param_2to2 &mt RSHIFT MACRO_PLACEHOLDER>; + }; + + quote_letter_macro: quote_letter_macro { + #binding-cells = <1>; + label = "ZMK_QLET"; + compatible = "zmk,behavior-macro-one-param"; + wait-ms = <40>; + tap-ms = <40>; + bindings = < + &kp QUOT + ¯o_param_1to1 &kp MACRO_PLACEHOLDER + &kp QUOT>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; + + default_layer { + bindings = < + &slash_macro A B "e_letter_macro B + &to_second_macro E F &kp C>; + }; + }; +}; + +&kscan { + events = ; +}; \ No newline at end of file diff --git a/docs/docs/behaviors/macros.md b/docs/docs/behaviors/macros.md index 1628e0cb554..40c333a9066 100644 --- a/docs/docs/behaviors/macros.md +++ b/docs/docs/behaviors/macros.md @@ -49,6 +49,22 @@ For use cases involving sending a single keycode with modifiers, for instance ct with [modifier functions](../codes/modifiers.mdx#modifier-functions) can be used instead of a macro. ::: +### Parameterized Macros + +Macros can also be "parameterized", allowing them to be bound in your keymap with unique values passed into them, e.g.: + +``` + raise_layer { + bindings = <&my_cool_macro A> + }; +``` + +When defining a parameterized macro, a different `compatible` value will be used depending on how many parameters are passed into it: + +- `zmk,behavior-macro` - a parameter that takes no parameters. +- `zmk,behavior-macro-one-param` - a parameter that takes one parameter when used. +- `zmk,behavior-macro-two-param` - a parameter that takes two parameters when used. + ### Bindings Like [hold-taps](/docs/behaviors/hold-tap), macros are created by composing other behaviors, and any of those behaviors can @@ -67,6 +83,30 @@ bindings There are a set of special macro controls that can be included in the `bindings` list to modify the way the macro is processed. +### Parameters + +When creating a macro that takes parameter(s), there are macro controls that change when the parameters passed to the macro are used +within the macro itself. All of the controls are "one shot" and will change how the passed in parameters are used for the very next non-macro control behavior in the `bindings` list of the macro. + +For example, to pass the first parameter from the macro into a `&kp` used in the macro, you would use: + +``` +bindings + = <¯o_param_1to1> + , <&kp MACRO_PLACEHOLDER> + ; +``` + +Because `kp` takes one parameter, you can't simply make the second entry `<&kp>` in the `bindings` list. Whatever value you do pass in will be replaced when the macro is triggered, so you can put _any_ value there, e.g. `0`, `A` keycode, etc. To make it very obvious that the parameter there is not actually going to be used, you can use `MACRO_PLACEHOLDER` which is simply an alias for `0`. + +The available parameter controls are: + +- `¯o_param_1to1` - pass the first parameter of the macro into the first parameter of the next behavior in the `bindings` list. +- `¯o_param_1to2` - pass the first parameter of the macro into the second parameter of the next behavior in the `bindings` list. + +* `¯o_param_2to1` - pass the second parameter of the macro into the first parameter of the next behavior in the `bindings` list. +* `¯o_param_2to2` - pass the second parameter of the macro into the second parameter of the next behavior in the `bindings` list. + ### Binding Activation Mode Bindings in a macro are activated differently, depending on the current "activation mode" of the macro. From b259d5a22e423458b94bd1aba70fd62f327528c0 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 20 Jun 2023 22:23:06 +0000 Subject: [PATCH 048/160] fix(sensors): Sensor rotate behavior fix for layers. * Properly return transparent value when processing mode for higher disabled layers means the processing is ignored. --- app/src/behaviors/behavior_sensor_rotate_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/behaviors/behavior_sensor_rotate_common.c b/app/src/behaviors/behavior_sensor_rotate_common.c index eea7bf48476..586cac3fdf2 100644 --- a/app/src/behaviors/behavior_sensor_rotate_common.c +++ b/app/src/behaviors/behavior_sensor_rotate_common.c @@ -65,7 +65,7 @@ int zmk_behavior_sensor_rotate_common_process(struct zmk_behavior_binding *bindi if (mode != BEHAVIOR_SENSOR_BINDING_PROCESS_MODE_TRIGGER) { data->triggers[sensor_index] = 0; - return 0; + return ZMK_BEHAVIOR_TRANSPARENT; } int triggers = data->triggers[sensor_index]; @@ -83,7 +83,7 @@ int zmk_behavior_sensor_rotate_common_process(struct zmk_behavior_binding *bindi triggered_binding.param1 = binding->param2; } } else { - return 0; + return ZMK_BEHAVIOR_TRANSPARENT; } LOG_DBG("Sensor binding: %s", binding->behavior_dev); From 3772ecb04e777ec4d592711427211cfac26a712d Mon Sep 17 00:00:00 2001 From: Kyle McCreery Date: Wed, 5 Jul 2023 12:50:19 -0400 Subject: [PATCH 049/160] fix(boards): Update pillbug_defconfig to enable pinctrl --- app/boards/arm/pillbug/pillbug_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/boards/arm/pillbug/pillbug_defconfig b/app/boards/arm/pillbug/pillbug_defconfig index d71d9f62626..9781cf995cc 100644 --- a/app/boards/arm/pillbug/pillbug_defconfig +++ b/app/boards/arm/pillbug/pillbug_defconfig @@ -8,6 +8,9 @@ CONFIG_BOARD_PILLBUG=y # Enable MPU CONFIG_ARM_MPU=y +# Use pinctrl +CONFIG_PINCTRL=y + # enable GPIO CONFIG_GPIO=y From bbb27ac02769c7bf5f20b76605f2b4e0f811e6e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=95=E3=82=A3=E3=83=AB=E3=82=BF=E3=83=BC=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=83=91=E3=83=BC?= <76888457+filterpaper@users.noreply.github.com> Date: Fri, 7 Jul 2023 01:39:08 +0800 Subject: [PATCH 050/160] feat(docs): Note that UF2 drive unmounts after flashing (#1859) Add a note about the UF2 drive that automatically unmounts itself to restart, which may surprise some new users. --- docs/docs/development/build-flash.md | 4 ++-- docs/docs/user-setup.md | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/docs/development/build-flash.md b/docs/docs/development/build-flash.md index 6f4ba84d23e..f57c4b5caf9 100644 --- a/docs/docs/development/build-flash.md +++ b/docs/docs/development/build-flash.md @@ -130,8 +130,8 @@ The above build commands generate a UF2 file in `build/zephyr` (or `build/left|right/zephyr` if you followed the instructions for splits) and is by default named `zmk.uf2`. If your board supports USB Flashing Format (UF2), copy that file onto the root of the USB mass storage device for your board. The -controller should flash your built firmware and automatically restart once -flashing is complete. +controller should flash your built firmware, unmount the USB storage device and +automatically restart once flashing is complete. Alternatively, if your board supports flashing and you're not developing from within a Dockerized environment, enable Device Firmware Upgrade (DFU) mode on diff --git a/docs/docs/user-setup.md b/docs/docs/user-setup.md index 8faa72df85f..9d04c347d58 100644 --- a/docs/docs/user-setup.md +++ b/docs/docs/user-setup.md @@ -198,8 +198,9 @@ To flash the firmware, first put your board into bootloader mode by double click or the one that is part of your keyboard). The controller should appear in your OS as a new USB storage device. Once this happens, copy the correct UF2 file (e.g. left or right if working on a split), and paste it onto the root of that USB mass -storage device. Once the flash is complete, the controller should automatically restart, and load your newly flashed firmware. It is -recommended that you test your keyboard works over USB first to rule out hardware issues, before trying to connect to it wirelessly. +storage device. Once the flash is complete, the controller should unmount the USB storage, automatically restart and load your newly +flashed firmware. It is recommended that you test your keyboard works over USB first to rule out hardware issues, before trying to +connect to it wirelessly. :::caution Split keyboards From aaf9958d865ac28659d16e1ea1ba356f7e742ea8 Mon Sep 17 00:00:00 2001 From: ClicketySplit <101202583+ClicketySplit@users.noreply.github.com> Date: Mon, 17 Jul 2023 15:26:27 -0600 Subject: [PATCH 051/160] feat(boards): Leeloo v2 and V2 Zephyr 3.2 fixes * Add Leeloo v2 * Leeloo-Micro v1 updates to support Zephyr 3.2 * Refactored for new Encoder Configuration Co-authored-by: Cem Aksoylar --- app/boards/shields/leeloo/Kconfig.defconfig | 15 +- app/boards/shields/leeloo/Kconfig.shield | 15 +- app/boards/shields/leeloo/README.md | 120 +++++++++++--- .../leeloo/boards/nice_nano_v2.overlay | 47 ++++++ app/boards/shields/leeloo/leeloo.conf | 11 +- app/boards/shields/leeloo/leeloo.dtsi | 85 +--------- app/boards/shields/leeloo/leeloo.keymap | 37 +++-- app/boards/shields/leeloo/leeloo_common.dtsi | 90 +++++++++++ app/boards/shields/leeloo/leeloo_left.overlay | 6 +- app/boards/shields/leeloo/leeloo_rev2.conf | 43 +++++ app/boards/shields/leeloo/leeloo_rev2.dtsi | 6 + app/boards/shields/leeloo/leeloo_rev2.keymap | 79 +++++++++ app/boards/shields/leeloo/leeloo_rev2.zmk.yml | 15 ++ .../shields/leeloo/leeloo_rev2_left.overlay | 21 +++ .../shields/leeloo/leeloo_rev2_right.overlay | 25 +++ .../shields/leeloo/leeloo_right.overlay | 6 +- .../shields/leeloo_micro/Kconfig.defconfig | 49 ++++++ .../shields/leeloo_micro/Kconfig.shield | 13 ++ app/boards/shields/leeloo_micro/README.md | 89 +++++++++++ .../leeloo_micro/boards/nice_nano_v2.overlay | 47 ++++++ .../shields/leeloo_micro/leeloo_micro.conf | 38 +++++ .../shields/leeloo_micro/leeloo_micro.dtsi | 88 ++++++++++ .../shields/leeloo_micro/leeloo_micro.keymap | 151 ++++++++++++++++++ .../shields/leeloo_micro/leeloo_micro.zmk.yml | 15 ++ .../leeloo_micro/leeloo_micro_left.overlay | 20 +++ .../leeloo_micro/leeloo_micro_right.overlay | 24 +++ 26 files changed, 1027 insertions(+), 128 deletions(-) create mode 100644 app/boards/shields/leeloo/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/leeloo/leeloo_common.dtsi create mode 100644 app/boards/shields/leeloo/leeloo_rev2.conf create mode 100644 app/boards/shields/leeloo/leeloo_rev2.dtsi create mode 100644 app/boards/shields/leeloo/leeloo_rev2.keymap create mode 100644 app/boards/shields/leeloo/leeloo_rev2.zmk.yml create mode 100644 app/boards/shields/leeloo/leeloo_rev2_left.overlay create mode 100644 app/boards/shields/leeloo/leeloo_rev2_right.overlay create mode 100644 app/boards/shields/leeloo_micro/Kconfig.defconfig create mode 100644 app/boards/shields/leeloo_micro/Kconfig.shield create mode 100644 app/boards/shields/leeloo_micro/README.md create mode 100644 app/boards/shields/leeloo_micro/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/leeloo_micro/leeloo_micro.conf create mode 100644 app/boards/shields/leeloo_micro/leeloo_micro.dtsi create mode 100644 app/boards/shields/leeloo_micro/leeloo_micro.keymap create mode 100644 app/boards/shields/leeloo_micro/leeloo_micro.zmk.yml create mode 100644 app/boards/shields/leeloo_micro/leeloo_micro_left.overlay create mode 100644 app/boards/shields/leeloo_micro/leeloo_micro_right.overlay diff --git a/app/boards/shields/leeloo/Kconfig.defconfig b/app/boards/shields/leeloo/Kconfig.defconfig index 7388a4b9af0..046bd49a3dd 100644 --- a/app/boards/shields/leeloo/Kconfig.defconfig +++ b/app/boards/shields/leeloo/Kconfig.defconfig @@ -1,6 +1,16 @@ -# Copyright (c) 2022 The ZMK Contributors +# Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT +if SHIELD_LEELOO_REV2_LEFT + +config ZMK_KEYBOARD_NAME + default "Leeloo v2" + +config ZMK_SPLIT_ROLE_CENTRAL + default y + +endif + if SHIELD_LEELOO_LEFT config ZMK_KEYBOARD_NAME @@ -11,7 +21,7 @@ config ZMK_SPLIT_ROLE_CENTRAL endif -if SHIELD_LEELOO_LEFT || SHIELD_LEELOO_RIGHT +if SHIELD_LEELOO config ZMK_SPLIT default y @@ -31,7 +41,6 @@ endif # ZMK_DISPLAY if LVGL - config LV_Z_VDB_SIZE default 64 diff --git a/app/boards/shields/leeloo/Kconfig.shield b/app/boards/shields/leeloo/Kconfig.shield index 46ea96400fb..1d7843957e5 100644 --- a/app/boards/shields/leeloo/Kconfig.shield +++ b/app/boards/shields/leeloo/Kconfig.shield @@ -1,8 +1,21 @@ -# Copyright (c) 2022 The ZMK Contributors +# Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT +config SHIELD_LEELOO + bool + config SHIELD_LEELOO_LEFT def_bool $(shields_list_contains,leeloo_left) + select SHIELD_LEELOO config SHIELD_LEELOO_RIGHT def_bool $(shields_list_contains,leeloo_right) + select SHIELD_LEELOO + +config SHIELD_LEELOO_REV2_LEFT + def_bool $(shields_list_contains,leeloo_rev2_left) + select SHIELD_LEELOO + +config SHIELD_LEELOO_REV2_RIGHT + def_bool $(shields_list_contains,leeloo_rev2_right) + select SHIELD_LEELOO \ No newline at end of file diff --git a/app/boards/shields/leeloo/README.md b/app/boards/shields/leeloo/README.md index a807843f08f..27d5e872b5a 100644 --- a/app/boards/shields/leeloo/README.md +++ b/app/boards/shields/leeloo/README.md @@ -1,41 +1,123 @@ -# Clickety Split | Leeloo +# Clickety Split | Leeloo v2 -![Leeloo](https://cdn.shopify.com/s/files/1/0599/3460/5491/files/Leeloo-rev1.0-w.jpg?v=1646798726) +![Leeloo v2](https://github.com/ClicketySplit/build-guides/blob/main/leeloo/images/gallery/Leeloo-v2-ZMK.jpg) Keyboard Designer: [clicketysplit.ca](https://clicketysplit.ca) GitHub: [ClicketySplit](https://github.com/ClicketySplit) -Hardware Supported: Pro Micro, Elite-C, nice!nano v2 +Hardware Supported: Pro Micro, Elite-C, and nice!nano v2 -Albeit, there is no doubt where Leeloo's heritage is derived from—Lily58, and Corne. It is not a copy-paste-modify implementation. +Leeloo v2 has been designed from scratch—again. Everything from the wiring schematic to its case. Leeloo v2 still keeps the column stagger that it's known for, along with its low profile design. -Leeloo has been designed from scratch; everything from the schematic to its PCB footprints, and column stagger. There are some subtle differences that may not be apparent; however, its subtle changes enable an interesting future. +## Features/Differences from Leeloo v1 -Features: +- Support for Kailh Low Profile Choc switches with 18mm x 18mm spacing. + - A version for Kailh Box/MX switches with 19.05mm x 19.05mm spacing will be available in the future. +- All switch locations are socketed. +- Rotary encoder locations are socketed. + - One of two locations on each side can be used for a rotary encoder. +- OLED Displays and nice!view Displays are natively supported, socketed, and no extra wiring is required. +- Support for per-switch RGB underglow. +- Better location for 110mAh or 700mAh batteries. + - Different location for soldering battery leads. +- Support for Alps Alpine Micro On/off switches. + +# Leeloo v1 + +![Leeloo](https://github.com/ClicketySplit/build-guides/blob/main/leeloo/images/gallery/Leeloo-v1.jpg) + +## Features - 4x6x5m Split Keyboard -- Support for MX/Box or Low Profile Choc switches. -- 90% of the switches are socketed; with the exception to the rotary encoder positions—6 positions require soldering. -- Support for 128x32 OLED Displays. -- The option to select one of three positions for an EC11 rotary encoder on each half. -- Support for Alps Alpine Micro Switch -- Support for 3.7v 301230 LiPo Battery +- Support for both Low Profile Choc switches, and Box/MX switches; 19.05mm x 19.05mm spacing. +- 90% of the switches are socketed; with the exception to the rotary encoder positions. +- Support for Alps Alpine EC11 Rotary Encoders—one on each side, in one of three locations. +- Support for OLED Displays or nice!view Displays. + - nice!view displays require a wire to be soldered from the CS Pin on nice!view display to P0.22 or D4 on the nice!nano. +- Support for both 110mAh or 700mAh batteries. +- Solder pads for battery leads. +- Support for Alps Alpine Micro On/off switches. -# Building Your Firmware +# Building Leeloo's ZMK Firmware ZMK Firmware: [Introduction to ZMK](https://zmk.dev/docs/) Installation: [Installing ZMK](https://zmk.dev/docs/user-setup) Customization: [Customizing ZMK](https://zmk.dev/docs/customization) Development Environment: [Basic Setup](https://zmk.dev/docs/development/setup) -Build command for the default keymap of Leeloo: +Build commands for the default keymap of Leeloo v1: + +``` +west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_left +west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_right +``` + +Build commands for the default keymap of Leeloo v2: + +``` +west build -d build/left_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_left +west build -d build/right_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_right +``` + +Build commands for your custom keymap of Leeloo v1: + +``` +west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo/config" +west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo/config" +``` + +Build commands for your custom keymap of Leeloo v2: + +``` +west build -d build/right_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_v2/config" +west build -d build/left_v2 -p -b nice_nano_v2 -- -DSHIELD=leeloo_rev2_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_v2/config" +``` + +## Building Leeloo's ZMK Firmware with nice!view Displays + +There are a couple of files that need to be adjusted before the build commands can be run. + +### Edit the leeloo[_rev2].keymap File + +Near the top 3rd of the leeloo[_rev2].keymap file, locate the following code block: + +``` +//nice_view_spi: &spi0 { +// cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>; +//}; +``` + +Remove the forward slashes to resemble the following: + +``` +nice_view_spi: &spi0 { + cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>; +}; +``` + +Save your changes and close the file. + +### Sample Build Commands for nice!view Displays + +Build commands for the default keymap of Leeloo v1: + +``` +west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_left nice_view_adapter nice_view" +west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_right nice_view_adapter nice_view" +``` + +Build commands for the default keymap of Leeloo v2: - west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_left - west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_right +``` +west build -d build/left_v2 -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_left nice_view_adapter nice_view" +west build -d build/right_v2 -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_right nice_view_adapter nice_view" +``` -Build command for your custom keymap of Leeloo: +Build commands for your custom keymap of Leeloo v2: - west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_right -DZMK_CONFIG="C:/dev/zmk/[yourNmae]/leeloo/config" - west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo/config" +``` +west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_left nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_v2/config" +west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_rev2_right nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_v2/config" +``` # Support diff --git a/app/boards/shields/leeloo/boards/nice_nano_v2.overlay b/app/boards/shields/leeloo/boards/nice_nano_v2.overlay new file mode 100644 index 00000000000..5c451b73eaf --- /dev/null +++ b/app/boards/shields/leeloo/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <37>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/leeloo/leeloo.conf b/app/boards/shields/leeloo/leeloo.conf index a652bb65144..466279a33e3 100644 --- a/app/boards/shields/leeloo/leeloo.conf +++ b/app/boards/shields/leeloo/leeloo.conf @@ -1,9 +1,16 @@ -# Copyright (c) 2022 The ZMK Contributors +# Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT # Uncomment the following line to enable the OLED Display # CONFIG_ZMK_DISPLAY=y +# Uncomment to turn off WPM Status. +# CONFIG_ZMK_WIDGET_WPM_STATUS=n + +# Uncomment to invert colour when using nice!view Displays +# CONFIG_ZMK_DISPLAY_INVERT=y + + # Uncomment these two lines to add support for encoders # CONFIG_EC11=y -# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y \ No newline at end of file diff --git a/app/boards/shields/leeloo/leeloo.dtsi b/app/boards/shields/leeloo/leeloo.dtsi index 438f9a9d924..dad05c55c6e 100644 --- a/app/boards/shields/leeloo/leeloo.dtsi +++ b/app/boards/shields/leeloo/leeloo.dtsi @@ -1,87 +1,6 @@ /* - * Copyright (c) 2022 The ZMK Contributors - * + * Copyright (c) 2023 The ZMK Contributors * SPDX-License-Identifier: MIT */ -#include -/ { - chosen { - zephyr,display = &oled; - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; - - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <5>; -// | 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 | SW22 | SW23 | SW24 | SW29 | | SW29 | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | -// | SW25 | SW26 | SW27 | SW28 | | SW28 | SW27 | SW26 | SW25 | - 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,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) - RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) - >; - }; - - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; - - diode-direction = "col2row"; - row-gpios - = <&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)> - , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - }; - - left_encoder: encoder_left { - compatible = "alps,ec11"; - label = "LEFT_ENCODER"; - a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; - }; - - right_encoder: encoder_right { - compatible = "alps,ec11"; - label = "RIGHT_ENCODER"; - a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; - }; - - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder &right_encoder>; - }; -}; - -&pro_micro_i2c { - status = "okay"; - - oled: ssd1306@3c { - compatible = "solomon,ssd1306fb"; - reg = <0x3c>; - label = "DISPLAY"; - width = <128>; - height = <32>; - segment-offset = <0>; - page-offset = <0>; - display-offset = <0>; - multiplex-ratio = <31>; - segment-remap; - com-invdir; - com-sequential; - prechargep = <0x22>; - }; -}; +#include "leeloo_common.dtsi" \ No newline at end of file diff --git a/app/boards/shields/leeloo/leeloo.keymap b/app/boards/shields/leeloo/leeloo.keymap index fc3b25e03e2..bdbf8988cc8 100644 --- a/app/boards/shields/leeloo/leeloo.keymap +++ b/app/boards/shields/leeloo/leeloo.keymap @@ -1,17 +1,23 @@ /* - * Copyright (c) 2022 The ZMK Contributors - * + * Copyright (c) 2023 The ZMK Contributors * SPDX-License-Identifier: MIT */ + #include #include #include #include -// Layers -#define DEFAULT 0 // default_layer -#define LOWER 1 // lower_layer -#define RAISE 2 // raise_layer +/* + * Assign the cs-gpios pin to 4. + * Uncomment these next few lines if implementing nice!view Displays + * A wire from the nice!view CS display needs to be connected to the + * High Frequency P0.22, also known as D4 if you choose to refer to + * the pins with Arduino Labels. + */ +//nice_view_spi: &spi0 { +// cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>; +//}; / { @@ -19,40 +25,43 @@ compatible = "zmk,keymap"; default_layer { + label = " QWERTY"; bindings = < &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSLH &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp GRAV &kp CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT -&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT - &kp LALT &kp LCTRL < 1 RET < 2 MINUS &kp LGUI &kp LGUI < 2 EQUAL < 1 SPACE &kp BSPC &kp DEL +&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LGUI &kp LGUI &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT + &kp LALT &kp LCTRL < 1 RET < 2 MINUS < 2 EQUAL < 1 SPACE &kp BSPC &kp DEL >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; lower_layer { + label = " Lower"; bindings = < &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &trans &trans &trans &trans &trans &trans &kp PG_UP &kp HOME &kp UP &kp END &trans &kp F12 &trans &trans &trans &trans &trans &trans &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &trans &trans -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; raise_layer { + label = " Raise"; bindings = < &trans &trans &trans &trans &trans &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &sys_reset &bootloader -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &sys_reset &bootloader &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &bt BT_CLR &trans >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; }; -}; +}; \ No newline at end of file diff --git a/app/boards/shields/leeloo/leeloo_common.dtsi b/app/boards/shields/leeloo/leeloo_common.dtsi new file mode 100644 index 00000000000..6ce93504b2d --- /dev/null +++ b/app/boards/shields/leeloo/leeloo_common.dtsi @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zephyr,display = &oled; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <5>; +// | 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 | SW22 | SW23 | SW24 | SW29 | | SW29 | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | +// | SW25 | SW26 | SW27 | SW28 | | SW28 | SW27 | SW26 | SW25 | + 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,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) + RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + diode-direction = "col2row"; + + row-gpios + = <&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)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; + + left_encoder: left_encoder { + compatible = "alps,ec11"; + label = "LEFT_ENCODER"; + a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + steps = <120>; + }; + + right_encoder: right_encoder { + compatible = "alps,ec11"; + label = "RIGHT_ENCODER"; + a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + steps = <120>; + }; + + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <30>; + }; + +}; + +&pro_micro_i2c { + status = "okay"; + + oled: ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + segment-remap; + com-invdir; + com-sequential; + prechargep = <0x22>; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/leeloo/leeloo_left.overlay b/app/boards/shields/leeloo/leeloo_left.overlay index 59fce1b0e5b..4421e1124ef 100644 --- a/app/boards/shields/leeloo/leeloo_left.overlay +++ b/app/boards/shields/leeloo/leeloo_left.overlay @@ -1,8 +1,8 @@ /* - * Copyright (c) 2022 The ZMK Contributors - * + * Copyright (c) 2023 The ZMK Contributors * SPDX-License-Identifier: MIT */ + #include "leeloo.dtsi" &kscan0 { @@ -18,4 +18,4 @@ &left_encoder { status = "okay"; -}; +}; \ No newline at end of file diff --git a/app/boards/shields/leeloo/leeloo_rev2.conf b/app/boards/shields/leeloo/leeloo_rev2.conf new file mode 100644 index 00000000000..8c1cf3eed7b --- /dev/null +++ b/app/boards/shields/leeloo/leeloo_rev2.conf @@ -0,0 +1,43 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +# Uncomment the following line to enable the OLED Display +# CONFIG_ZMK_DISPLAY=y + +# Uncomment to turn off WPM Status. +# CONFIG_ZMK_WIDGET_WPM_STATUS=n + +# Uncomment to invert colour when using nice!view Displays +# CONFIG_ZMK_DISPLAY_INVERT=y + + +# Uncomment the following line to enable per-key lighting +# CONFIG_ZMK_RGB_UNDERGLOW=y + +# Use the STRIP config specific to the LEDs you're using +# CONFIG_WS2812_STRIP=y + +# Keep OLED or nice!view Displays on even when toggling off LEDs +# Change to y if you wish to toggle Displays on and off with LEDs +# CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n + +# Turn off LEDs when idle. +# Change to n if you wish to keep LEDs on even when idle. +# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y + +# When USB is disconnected, turn off LEDs +# Change to n if you wish to keep LEDs on even when USB is unpluged. +# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_USB=y + +# Start LEDs off at 75% +# CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=75 + + +# Uncomment these two lines to add support for encoders +# CONFIG_EC11=y +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y + + +# Uncomment if you are experiencing connectivity issues; this +# configuration item boosts the BLE transmit power. +# CONFIG_BT_CTLR_TX_PWR_PLUS_8=y \ No newline at end of file diff --git a/app/boards/shields/leeloo/leeloo_rev2.dtsi b/app/boards/shields/leeloo/leeloo_rev2.dtsi new file mode 100644 index 00000000000..dad05c55c6e --- /dev/null +++ b/app/boards/shields/leeloo/leeloo_rev2.dtsi @@ -0,0 +1,6 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +#include "leeloo_common.dtsi" \ No newline at end of file diff --git a/app/boards/shields/leeloo/leeloo_rev2.keymap b/app/boards/shields/leeloo/leeloo_rev2.keymap new file mode 100644 index 00000000000..a66205b64cc --- /dev/null +++ b/app/boards/shields/leeloo/leeloo_rev2.keymap @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include + +// Short versions +#define RGBON &rgb_ug RGB_ON +#define RGBOFF &rgb_ug RGB_OFF +#define RGBTOG &rgb_ug RGB_TOG +#define RGBHUI &rgb_ug RGB_HUI +#define RGBHUD &rgb_ug RGB_HUD +#define RGBSAI &rgb_ug RGB_SAI +#define RGBSAD &rgb_ug RGB_SAD +#define RGBBRI &rgb_ug RGB_BRI +#define RGBBRD &rgb_ug RGB_BRD +#define RGBEFF &rgb_ug RGB_EFF + + +/* + * Assign the cs-gpios pin to 4. + * Uncomment these next few lines if implementing nice!view Displays + */ +//nice_view_spi: &spi0 { +// cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>; +//}; + + +/ { + + keymap { + compatible = "zmk,keymap"; + + default_layer { + label = " QWERTY"; + bindings = < +&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSLH +&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp GRAV +&kp CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT +&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LGUI &kp RGUI &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT + &kp LALT &kp LCTRL < 1 RET < 2 MINUS < 2 EQUAL < 1 SPACE &kp BSPC &kp DEL + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + + lower_layer { + label = " Lower"; + bindings = < +&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 +&trans &trans &trans &trans &trans &trans &kp PG_UP &kp HOME &kp UP &kp END &trans &kp F12 +&trans &trans &trans &trans &trans &trans &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &trans &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + + raise_layer { + label = " Raise"; + bindings = < +&trans &trans &trans &trans &trans &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &sys_reset &bootloader +RGBON RGBTOG RGBHUI RGBSAI RGBBRI &trans &trans &trans &trans &trans &trans &trans +RGBOFF RGBEFF RGBHUD RGBSAD RGBBRD &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &bt BT_CLR &trans + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + + }; +}; \ No newline at end of file diff --git a/app/boards/shields/leeloo/leeloo_rev2.zmk.yml b/app/boards/shields/leeloo/leeloo_rev2.zmk.yml new file mode 100644 index 00000000000..5e0a4db3dc5 --- /dev/null +++ b/app/boards/shields/leeloo/leeloo_rev2.zmk.yml @@ -0,0 +1,15 @@ +file_format: "1" +id: leeloo_rev2 +name: Leeloo v2 +type: shield +url: https://clicketysplit.ca/pages/leeloo +requires: [pro_micro] +exposes: [i2c_oled] +features: + - keys + - display + - encoder + - underglow +siblings: + - leeloo_rev2_left + - leeloo_rev2_right diff --git a/app/boards/shields/leeloo/leeloo_rev2_left.overlay b/app/boards/shields/leeloo/leeloo_rev2_left.overlay new file mode 100644 index 00000000000..14ddc0eceb1 --- /dev/null +++ b/app/boards/shields/leeloo/leeloo_rev2_left.overlay @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +#include "leeloo_rev2.dtsi" + +&kscan0 { + col-gpios + = <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + ; +}; + +&left_encoder { + status = "okay"; +}; \ No newline at end of file diff --git a/app/boards/shields/leeloo/leeloo_rev2_right.overlay b/app/boards/shields/leeloo/leeloo_rev2_right.overlay new file mode 100644 index 00000000000..afca41b474b --- /dev/null +++ b/app/boards/shields/leeloo/leeloo_rev2_right.overlay @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +#include "leeloo_rev2.dtsi" + +&default_transform { + col-offset = <6>; +}; + +&kscan0 { + col-gpios + = <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + ; +}; + +&right_encoder { + status = "okay"; +}; \ No newline at end of file diff --git a/app/boards/shields/leeloo/leeloo_right.overlay b/app/boards/shields/leeloo/leeloo_right.overlay index 80e89529566..b860c2ca651 100644 --- a/app/boards/shields/leeloo/leeloo_right.overlay +++ b/app/boards/shields/leeloo/leeloo_right.overlay @@ -1,8 +1,8 @@ /* - * Copyright (c) 2022 The ZMK Contributors - * + * Copyright (c) 2023 The ZMK Contributors * SPDX-License-Identifier: MIT */ + #include "leeloo.dtsi" &default_transform { @@ -22,4 +22,4 @@ &right_encoder { status = "okay"; -}; +}; \ No newline at end of file diff --git a/app/boards/shields/leeloo_micro/Kconfig.defconfig b/app/boards/shields/leeloo_micro/Kconfig.defconfig new file mode 100644 index 00000000000..26256120a76 --- /dev/null +++ b/app/boards/shields/leeloo_micro/Kconfig.defconfig @@ -0,0 +1,49 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_LEELOO_MICRO_LEFT + +config ZMK_KEYBOARD_NAME + default "Leeloo-Micro" + +config ZMK_SPLIT_ROLE_CENTRAL + default y + +endif + +if SHIELD_LEELOO_MICRO + +config ZMK_SPLIT + default y + +if ZMK_DISPLAY + +config I2C + default y + +config SSD1306 + default y + +config SSD1306_REVERSE_MODE + default y + +endif # ZMK_DISPLAY + +if LVGL + +config LV_Z_VDB_SIZE + default 64 + +config LV_Z_DPI + default 148 + +config LV_Z_BITS_PER_PIXEL + default 1 + +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 +endchoice + +endif # LVGL + +endif diff --git a/app/boards/shields/leeloo_micro/Kconfig.shield b/app/boards/shields/leeloo_micro/Kconfig.shield new file mode 100644 index 00000000000..c622f16dfcd --- /dev/null +++ b/app/boards/shields/leeloo_micro/Kconfig.shield @@ -0,0 +1,13 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_LEELOO_MICRO + bool + +config SHIELD_LEELOO_MICRO_LEFT + def_bool $(shields_list_contains,leeloo_micro_left) + select SHIELD_LEELOO_MICRO + +config SHIELD_LEELOO_MICRO_RIGHT + def_bool $(shields_list_contains,leeloo_micro_right) + select SHIELD_LEELOO_MICRO \ No newline at end of file diff --git a/app/boards/shields/leeloo_micro/README.md b/app/boards/shields/leeloo_micro/README.md new file mode 100644 index 00000000000..c1827f82b72 --- /dev/null +++ b/app/boards/shields/leeloo_micro/README.md @@ -0,0 +1,89 @@ +# Clickety Split | Leeloo-Micro + +![Leeloo-Micro v1 Wireless](https://github.com/ClicketySplit/build-guides/blob/main/leeloo/images/gallery/Leeloo-Micro-v1-ZMK.jpg) + +Keyboard Designer: [clicketysplit.ca](https://clicketysplit.ca) +GitHub: [ClicketySplit](https://github.com/ClicketySplit) +Hardware Supported: nice!nano v2, nice!view v1 + +Leeloo-Micro is a 3x5x5m derivative of Leeloo v2; inheriting the column stagger and modifiers row, yet, reducing the number of switches by removing the top row and outside columns. With Leeloo-Micro's inaugural release being wireless, it leverages nice!nanos and nice!views for its microcontrollers and displays. + +## Features + +- 3x5x5m Split Keyboard +- Support for Kailh Low Profile Choc switches with 18mm x 18mm spacing. +- All switch locations are socketed. +- Support for Alps Alpine EC11 Rotary Encoders—one on each side, in one of two locations. + - Rotary encoder locations are socketed. +- nice!view Displays are inherently supported, socketed, and no extra wiring is required. +- Support for per-switch RGB underglow. +- Support for both 110mAh or 700mAh batteries. +- Support for Alps Alpine Micro On/off switches. + +# Building Leeloo-Micro ZMK Firmware + +ZMK Firmware: [Introduction to ZMK](https://zmk.dev/docs/) +Installation: [Installing ZMK](https://zmk.dev/docs/user-setup) +Customization: [Customizing ZMK](https://zmk.dev/docs/customization) +Development Environment: [Basic Setup](https://zmk.dev/docs/development/setup) + +Build commands for the default keymap of Leeloo-Micro: + +``` +west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_left +west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_right +``` + +Build commands for your custom keymap of Leeloo-Micro: + +``` +west build -d build/right -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_right -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_micro/config" +west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_micro_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo_micro/config" +``` + +## Building Leeloo-Micro's ZMK Firmware with nice!view Displays + +There are a couple of files that need to be adjusted before the build commands can be run. + +### Edit the leeloo_micro.keymap File + +Near the top 3rd of the leeloo_micro.keymap file, locate the following code block: + +``` +//nice_view_spi: &spi0 { +// cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>; +//}; +``` + +Remove the forward slashes to resemble the following: + +``` +nice_view_spi: &spi0 { + cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>; +}; +``` + +Save your changes and close the file. + +### Sample Build Commands for nice!view Displays + +Build commands for the default keymap of Leeloo-Micro: + +``` +west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_left nice_view_adapter nice_view" +west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_right nice_view_adapter nice_view" +``` + +Build commands for your custom keymap of Leeloo-Micro: + +``` +west build -d build/left -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_left nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_micro/config" +west build -d build/right -p -b nice_nano_v2 -- -DSHIELD="leeloo_micro_right nice_view_adapter nice_view" -DZMK_CONFIG="/workspaces/zmk-config/[yourName]/leeloo_micro/config" +``` + +# Support + +If you have any questions with regards to Leeloo-Micro, please [Contact Us](https://clicketysplit.ca/pages/contact-us). + +Clickety Split +For the love of split keyboards. diff --git a/app/boards/shields/leeloo_micro/boards/nice_nano_v2.overlay b/app/boards/shields/leeloo_micro/boards/nice_nano_v2.overlay new file mode 100644 index 00000000000..be5dc54ec29 --- /dev/null +++ b/app/boards/shields/leeloo_micro/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <20>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/leeloo_micro/leeloo_micro.conf b/app/boards/shields/leeloo_micro/leeloo_micro.conf new file mode 100644 index 00000000000..02c1d60587b --- /dev/null +++ b/app/boards/shields/leeloo_micro/leeloo_micro.conf @@ -0,0 +1,38 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +# Uncomment the following line to enable the OLED Display +# CONFIG_ZMK_DISPLAY=y + +# Uncomment to turn off WPM Status. +# CONFIG_ZMK_WIDGET_WPM_STATUS=n + +# Uncomment to invert colour, if using nice!view Displays +# CONFIG_ZMK_DISPLAY_INVERT=y + + +# Uncomment the following line to enable per-key lighting +# CONFIG_ZMK_RGB_UNDERGLOW=y + +# Use the STRIP config specific to the LEDs you're using +# CONFIG_WS2812_STRIP=y + +# Keep OLED or nice!view Displays on even when toggling off LEDs +# Change to y if you wish to toggle Displays on and off with LEDs +# CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n + +# Turn off LEDs when idle. +# Change to n if you wish to keep LEDs on even when idle. +# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y + +# When USB is disconnected, turn off LEDs +# Change to n if you wish to keep LEDs on even when USB is unpluged. +# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_USB=y + +# Start LEDs off at 75% +# CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=75 + + +# Uncomment these two lines to add support for encoders +# CONFIG_EC11=y +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y \ No newline at end of file diff --git a/app/boards/shields/leeloo_micro/leeloo_micro.dtsi b/app/boards/shields/leeloo_micro/leeloo_micro.dtsi new file mode 100644 index 00000000000..afe16dfa605 --- /dev/null +++ b/app/boards/shields/leeloo_micro/leeloo_micro.dtsi @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zephyr,display = &oled; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; +// +// | SW1 | SW2 | SW3 | SW4 | SW5 | | SW15 | SW4 | SW3 | SW2 | SW1 | +// | SW6 | SW7 | SW8 | SW9 | SW10 | | SW10 | SW9 | SW8 | SW7 | SW6 | +// | SW11 | SW12 | SW13 | SW14 | SW15 | SW20 | | SW20 | SW15 | SW14 | SW13 | SW12 | SW11 | +// | SW16 | SW17 | SW18 | SW19 | | SW19 | SW18 | SW17 | SW16 | + 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(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(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(3,4) RC(3,5) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,6) RC(3,7) RC(3,8) RC(3,9) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + diode-direction = "col2row"; + + row-gpios + = <&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)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; + + left_encoder: left_encoder { + compatible = "alps,ec11"; + label = "LEFT_ENCODER"; + a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + steps = <120>; + }; + + right_encoder: right_encoder { + compatible = "alps,ec11"; + label = "RIGHT_ENCODER"; + a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + steps = <120>; + }; + + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <30>; + }; + +}; + +&pro_micro_i2c { + status = "okay"; + + oled: ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + segment-remap; + com-invdir; + com-sequential; + prechargep = <0x22>; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/leeloo_micro/leeloo_micro.keymap b/app/boards/shields/leeloo_micro/leeloo_micro.keymap new file mode 100644 index 00000000000..8526f5ac2a8 --- /dev/null +++ b/app/boards/shields/leeloo_micro/leeloo_micro.keymap @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include + +// Layers +#define QW_M 0 // Main +#define QW_L 1 // Lower +#define QW_R 2 // Raise +#define QW_A 3 // Adjust + +#define QC_N 4 // Number Pad +#define QC_B 5 // Firmware + + +// Short versions +#define BT0 BT_SEL 0 +#define BT1 BT_SEL 1 +#define BT2 BT_SEL 2 +#define BT3 BT_SEL 3 +#define BT4 BT_SEL 4 + +#define BOOTLDR &bootloader + +#define RGBON &rgb_ug RGB_ON +#define RGBOFF &rgb_ug RGB_OFF +#define RGBTOG &rgb_ug RGB_TOG +#define RGBHUI &rgb_ug RGB_HUI +#define RGBHUD &rgb_ug RGB_HUD +#define RGBSAI &rgb_ug RGB_SAI +#define RGBSAD &rgb_ug RGB_SAD +#define RGBBRI &rgb_ug RGB_BRI +#define RGBBRD &rgb_ug RGB_BRD +#define RGBEFF &rgb_ug RGB_EFF + + +/* + * Assign the cs-gpios pin to 4. + * Uncomment these next few lines if implementing nice!view Displays. + */ +//nice_view_spi: &spi0 { +// cs-gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>; +//}; + + +/ { + conditional_layers { + compatible = "zmk,conditional-layers"; + adjust_layer { + if-layers = ; + then-layer = ; + }; + }; + + combos { + compatible = "zmk,combos"; + + combo_esc { + timeout-ms = <50>; + key-positions = <0 1>; + layers = ; + bindings = <&kp ESC>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + label = " QWERTY"; + bindings = < +&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P +&kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI +&mt LSFT Z &kp X &kp C &kp V &kp B &mo QC_N &kp RGUI &kp N &kp M &kp COMMA &kp DOT &mt RSFT FSLH + &kp LALT &kp LCTRL < 1 RET < 2 MINUS < 2 EQUAL < 1 SPACE &kp BSPC &mo QC_B + >; + + sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP>; + }; + + lower_layer { + label = " Lower"; + bindings = < +&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 +&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp QUOT +&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp RSHFT + &trans &trans &trans &trans &trans &trans &trans &trans + >; + + sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP>; + }; + + raise_layer { + label = " Raise"; + bindings = < +&kp TAB &trans &trans &trans &trans &kp PG_UP &kp HOME &kp UP &kp END &kp BSLH +&kp CAPS &trans &trans &trans &trans &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &kp GRAVE +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &mt RSFT TILDE + &trans &trans &trans &trans &trans &trans &kp DEL &trans + >; + + sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP>; + }; + + adjust_layer { + label = " Adjust"; + bindings = < + +&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &trans &trans &trans &trans +&kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &trans &trans &trans &trans &trans +&kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans + >; + + sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP>; + }; + + numpad_layer { + label = " NumPad"; + bindings = < + +&trans &none &none &none &none &kp SLASH &kp N7 &kp N8 &kp N9 &kp MINUS +RGBON RGBTOG RGBHUI RGBSAI RGBBRI &kp ASTRK &kp N4 &kp N5 &kp N6 &kp PLUS +RGBOFF RGBEFF RGBHUD RGBSAD RGBBRD &trans &trans &none &kp N1 &kp N2 &kp N3 &kp EQUAL + &trans &trans &trans &trans &trans &kp N0 &kp DOT &none + >; + + sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP>; + }; + + ble_layer { + label = " BLE"; + bindings = < + +&bt BT0 &bt BT1 &bt BT2 &bt BT3 &bt BT4 &bt BT0 &bt BT1 &bt BT2 &bt BT3 &bt BT4 +BOOTLDR &sys_reset &trans &trans &trans &trans &trans &trans &sys_reset BOOTLDR +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &bt BT_CLR &trans &trans &trans &trans &bt BT_CLR &trans + >; + + sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP>; + }; + + }; +}; \ No newline at end of file diff --git a/app/boards/shields/leeloo_micro/leeloo_micro.zmk.yml b/app/boards/shields/leeloo_micro/leeloo_micro.zmk.yml new file mode 100644 index 00000000000..e78ce0a3530 --- /dev/null +++ b/app/boards/shields/leeloo_micro/leeloo_micro.zmk.yml @@ -0,0 +1,15 @@ +file_format: "1" +id: leeloo_micro +name: Leeloo-Micro +type: shield +url: https://clicketysplit.ca/pages/leeloo-micro +requires: [pro_micro] +exposes: [i2c_oled] +features: + - keys + - display + - encoder + - underglow +siblings: + - leeloo_micro_left + - leeloo_micro_right diff --git a/app/boards/shields/leeloo_micro/leeloo_micro_left.overlay b/app/boards/shields/leeloo_micro/leeloo_micro_left.overlay new file mode 100644 index 00000000000..d31fcf2c0fd --- /dev/null +++ b/app/boards/shields/leeloo_micro/leeloo_micro_left.overlay @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +#include "leeloo_micro.dtsi" + +&kscan0 { + col-gpios + = <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + ; +}; + +&left_encoder { + status = "okay"; +}; \ No newline at end of file diff --git a/app/boards/shields/leeloo_micro/leeloo_micro_right.overlay b/app/boards/shields/leeloo_micro/leeloo_micro_right.overlay new file mode 100644 index 00000000000..a3f347fb9c3 --- /dev/null +++ b/app/boards/shields/leeloo_micro/leeloo_micro_right.overlay @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +#include "leeloo_micro.dtsi" + +&default_transform { + col-offset = <5>; +}; + +&kscan0 { + col-gpios + = <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + ; +}; + +&right_encoder { + status = "okay"; +}; \ No newline at end of file From f3110d1d1ea195725551b4c997c542a4003e1452 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Tue, 18 Jul 2023 00:23:22 +0200 Subject: [PATCH 052/160] fix(docs): Fix README punctuation and add license link --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 50cb2817b8f..f112b0f9705 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ [![Build](https://github.com/zmkfirmware/zmk/workflows/Build/badge.svg)](https://github.com/zmkfirmware/zmk/actions) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md) -[ZMK Firmware](https://zmk.dev/) is an open source (MIT) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues. +[ZMK Firmware](https://zmk.dev/) is an open source ([MIT](LICENSE)) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues. -Check out the website to learn more: https://zmk.dev/ +Check out the website to learn more: https://zmk.dev/. -You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite) +You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite). To review features, check out the [feature overview](https://zmk.dev/docs/). ZMK is under active development, and new features are listed with the [enhancement label](https://github.com/zmkfirmware/zmk/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature. From 18a2b76bf085249e9d650d6664d32931c56dc7b7 Mon Sep 17 00:00:00 2001 From: Nick Winans Date: Tue, 18 Jul 2023 16:43:30 -0500 Subject: [PATCH 053/160] feat(nice!view): Custom widgets --- app/boards/shields/nice_view/CMakeLists.txt | 13 + .../shields/nice_view/Kconfig.defconfig | 53 ++- app/boards/shields/nice_view/README.md | 14 +- .../shields/nice_view/custom_status_screen.c | 28 ++ app/boards/shields/nice_view/nice_view.conf | 3 +- app/boards/shields/nice_view/widgets/art.c | 229 ++++++++++++ app/boards/shields/nice_view/widgets/bolt.c | 45 +++ .../nice_view/widgets/peripheral_status.c | 128 +++++++ .../nice_view/widgets/peripheral_status.h | 22 ++ app/boards/shields/nice_view/widgets/status.c | 330 ++++++++++++++++++ app/boards/shields/nice_view/widgets/status.h | 24 ++ app/boards/shields/nice_view/widgets/util.c | 69 ++++ app/boards/shields/nice_view/widgets/util.h | 47 +++ 13 files changed, 986 insertions(+), 19 deletions(-) create mode 100644 app/boards/shields/nice_view/CMakeLists.txt create mode 100644 app/boards/shields/nice_view/custom_status_screen.c create mode 100644 app/boards/shields/nice_view/widgets/art.c create mode 100644 app/boards/shields/nice_view/widgets/bolt.c create mode 100644 app/boards/shields/nice_view/widgets/peripheral_status.c create mode 100644 app/boards/shields/nice_view/widgets/peripheral_status.h create mode 100644 app/boards/shields/nice_view/widgets/status.c create mode 100644 app/boards/shields/nice_view/widgets/status.h create mode 100644 app/boards/shields/nice_view/widgets/util.c create mode 100644 app/boards/shields/nice_view/widgets/util.h diff --git a/app/boards/shields/nice_view/CMakeLists.txt b/app/boards/shields/nice_view/CMakeLists.txt new file mode 100644 index 00000000000..694242b2ec1 --- /dev/null +++ b/app/boards/shields/nice_view/CMakeLists.txt @@ -0,0 +1,13 @@ +if(CONFIG_ZMK_DISPLAY AND CONFIG_NICE_VIEW_WIDGET_STATUS) + zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include) + zephyr_library_sources(custom_status_screen.c) + zephyr_library_sources(widgets/bolt.c) + zephyr_library_sources(widgets/util.c) + + if(NOT CONFIG_ZMK_SPLIT OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) + zephyr_library_sources(widgets/status.c) + else() + zephyr_library_sources(widgets/art.c) + zephyr_library_sources(widgets/peripheral_status.c) + endif() +endif() diff --git a/app/boards/shields/nice_view/Kconfig.defconfig b/app/boards/shields/nice_view/Kconfig.defconfig index d2378409612..53edc1ccc7f 100644 --- a/app/boards/shields/nice_view/Kconfig.defconfig +++ b/app/boards/shields/nice_view/Kconfig.defconfig @@ -1,21 +1,13 @@ -# Copyright (c) 2022 The ZMK Contributors +# Copyright (c) 2023 The ZMK Contributors # SPDX-License-Identifier: MIT if SHIELD_NICE_VIEW -config ZMK_DISPLAY - select LV_FONT_MONTSERRAT_26 - -if ZMK_DISPLAY - -config SPI - default y - -config LS0XX - default y +config LV_Z_VDB_SIZE + default 100 -config ZMK_WIDGET_WPM_STATUS - default y if !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL +config LV_Z_DPI + default 161 config LV_Z_BITS_PER_PIXEL default 1 @@ -24,6 +16,37 @@ choice LV_COLOR_DEPTH default LV_COLOR_DEPTH_1 endchoice -endif # ZMK_DISPLAY +choice ZMK_DISPLAY_WORK_QUEUE + default ZMK_DISPLAY_WORK_QUEUE_DEDICATED +endchoice + +choice ZMK_DISPLAY_STATUS_SCREEN + default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM +endchoice + +config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM + imply NICE_VIEW_WIDGET_STATUS + +config NICE_VIEW_WIDGET_STATUS + bool "Custom nice!view status widget" + select LV_FONT_MONTSERRAT_16 + select LV_USE_IMG + select LV_USE_CANVAS + +config NICE_VIEW_WIDGET_INVERTED + bool "Invert custom status widget colors" + +if !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL + +config NICE_VIEW_WIDGET_STATUS + select LV_FONT_MONTSERRAT_18 + select LV_FONT_MONTSERRAT_14 + select LV_FONT_UNSCII_8 + select ZMK_WPM + +endif # !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL + +config ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN + select LV_FONT_MONTSERRAT_26 -endif +endif # SHIELD_NICE_VIEW diff --git a/app/boards/shields/nice_view/README.md b/app/boards/shields/nice_view/README.md index e3dffa3446e..00abfbfab1e 100644 --- a/app/boards/shields/nice_view/README.md +++ b/app/boards/shields/nice_view/README.md @@ -1,5 +1,15 @@ # nice!view -The nice!view is a low power, high refresh rate display meant to replace I2C OLEDs traditionally used. +The nice!view is a low-power, high refresh rate display meant to replace I2C OLEDs traditionally used. -This shield requires that an `&nice_view_spi` labelled SPI bus is provided with _at least_ MOSI, SCK, and CS pins defined. +This shield requires that an `&nice_view_spi` labeled SPI bus is provided with _at least_ MOSI, SCK, and CS pins defined. + +## Disable custom widget + +The nice!view shield includes a custom vertical widget. To use the built-in ZMK one, add the following item to your `.conf` file: + +``` +CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y +CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y +CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y +``` diff --git a/app/boards/shields/nice_view/custom_status_screen.c b/app/boards/shields/nice_view/custom_status_screen.c new file mode 100644 index 00000000000..c08da0eb511 --- /dev/null +++ b/app/boards/shields/nice_view/custom_status_screen.c @@ -0,0 +1,28 @@ +/* + * + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + * + */ + +#include "widgets/status.h" + +#include +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#if IS_ENABLED(CONFIG_NICE_VIEW_WIDGET_STATUS) +static struct zmk_widget_status status_widget; +#endif + +lv_obj_t *zmk_display_status_screen() { + + lv_obj_t *screen; + screen = lv_obj_create(NULL); + +#if IS_ENABLED(CONFIG_NICE_VIEW_WIDGET_STATUS) + zmk_widget_status_init(&status_widget, screen); + lv_obj_align(zmk_widget_status_obj(&status_widget), LV_ALIGN_TOP_LEFT, 0, 0); +#endif + + return screen; +} diff --git a/app/boards/shields/nice_view/nice_view.conf b/app/boards/shields/nice_view/nice_view.conf index ff57c07c9aa..e6f9158f137 100644 --- a/app/boards/shields/nice_view/nice_view.conf +++ b/app/boards/shields/nice_view/nice_view.conf @@ -1,5 +1,4 @@ # Enable nice!view CONFIG_ZMK_DISPLAY=y -CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y -CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y +# Disable idle blanking CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE=n diff --git a/app/boards/shields/nice_view/widgets/art.c b/app/boards/shields/nice_view/widgets/art.c new file mode 100644 index 00000000000..56c8914629f --- /dev/null +++ b/app/boards/shields/nice_view/widgets/art.c @@ -0,0 +1,229 @@ +/* + * + * Copyright (c) 2023 Collin Hodge + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + * + */ + +#include + +#ifndef LV_ATTRIBUTE_MEM_ALIGN +#define LV_ATTRIBUTE_MEM_ALIGN +#endif + +#ifndef LV_ATTRIBUTE_IMG_BALLOON +#define LV_ATTRIBUTE_IMG_BALLOON +#endif + +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BALLOON uint8_t + balloon_map[] = { +#if CONFIG_NICE_VIEW_WIDGET_INVERTED + 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ + 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ +#else + 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ + 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ +#endif + + 0xf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, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xe2, 0x48, + 0xfa, 0xff, 0xf0, 0x42, 0x59, 0x15, 0x54, 0x1b, 0xff, 0xff, 0xf7, 0xff, 0xbd, 0xf7, 0xff, + 0xff, 0x95, 0x55, 0x37, 0x7d, 0xf0, 0x02, 0x69, 0x0a, 0xa2, 0x1f, 0xfe, 0xff, 0xee, 0xff, + 0xff, 0xfc, 0xff, 0xff, 0x2a, 0x4a, 0x9f, 0xff, 0xf0, 0x03, 0xff, 0x55, 0x11, 0x4f, 0xff, + 0xff, 0x55, 0x7f, 0xfd, 0xff, 0x00, 0xfc, 0x55, 0x55, 0x4f, 0xff, 0xf0, 0x02, 0x01, 0xaa, + 0x88, 0x8f, 0xde, 0xff, 0xaa, 0xbf, 0xfe, 0xff, 0xff, 0x00, 0xa8, 0x02, 0xa7, 0xff, 0xf0, + 0x02, 0x01, 0x55, 0x55, 0x47, 0xff, 0x7f, 0xd5, 0x5f, 0xff, 0xff, 0xff, 0xc8, 0x47, 0x5c, + 0x53, 0xff, 0xf0, 0x82, 0x49, 0xaa, 0x8a, 0xa7, 0xfe, 0xff, 0xea, 0xbf, 0xff, 0xff, 0xff, + 0xb0, 0x3f, 0x5f, 0x89, 0xff, 0xf0, 0xc2, 0x49, 0x55, 0x45, 0x53, 0xff, 0xff, 0xf5, 0x5f, + 0xff, 0xff, 0xfe, 0x70, 0x7f, 0x5f, 0xe5, 0xff, 0xf0, 0xe2, 0x41, 0xa2, 0xa2, 0xab, 0xfe, + 0xfb, 0xfa, 0xaf, 0xef, 0xff, 0xf9, 0xe2, 0xbf, 0x5f, 0xfa, 0xff, 0xf0, 0xe2, 0x41, 0x51, + 0x51, 0x51, 0xff, 0x77, 0xfd, 0x57, 0xf9, 0xff, 0xe7, 0x85, 0x7f, 0x5f, 0xfc, 0xff, 0xf0, + 0xe3, 0xff, 0xf2, 0xa0, 0xa8, 0xff, 0xfb, 0xbe, 0xaf, 0xfe, 0x1e, 0x80, 0x6a, 0x80, 0x00, + 0x7e, 0xff, 0xb0, 0xe2, 0x60, 0x11, 0x50, 0x54, 0x7f, 0xff, 0xfd, 0x57, 0xff, 0xe0, 0x1f, + 0xc4, 0x15, 0x55, 0x06, 0x7f, 0x70, 0xee, 0x60, 0x18, 0xa8, 0x2a, 0x1f, 0xff, 0xfe, 0xaf, + 0xff, 0xe8, 0xf0, 0x00, 0x0a, 0x4a, 0xa8, 0x7f, 0xf0, 0xdf, 0xff, 0xf1, 0x54, 0x15, 0x43, + 0xff, 0xff, 0x5f, 0xff, 0xe8, 0x7b, 0xc0, 0x05, 0x55, 0x55, 0x7f, 0x70, 0xff, 0x81, 0x28, + 0xaa, 0x0a, 0xa1, 0xff, 0xfe, 0xbf, 0xf7, 0xea, 0x09, 0xe0, 0x0a, 0x4a, 0xaa, 0x7f, 0xf0, + 0xff, 0x81, 0x50, 0x54, 0x05, 0x54, 0x7f, 0xff, 0x7f, 0xfc, 0xe8, 0x4b, 0xc0, 0x05, 0x55, + 0x55, 0x7f, 0x70, 0xfe, 0x7f, 0x28, 0xaa, 0x00, 0xa8, 0xff, 0xfe, 0xbf, 0xff, 0x0a, 0xf0, + 0x00, 0x02, 0x4a, 0xa8, 0x7e, 0xb0, 0xfe, 0x7f, 0x14, 0x55, 0x00, 0x03, 0xff, 0xf7, 0x5f, + 0x7f, 0xe0, 0x1f, 0xc4, 0x01, 0x55, 0x06, 0x7f, 0x70, 0xff, 0x81, 0x08, 0x2a, 0x80, 0x07, + 0xff, 0xf6, 0xaf, 0xff, 0xfe, 0x80, 0x6a, 0x80, 0x00, 0x7e, 0xff, 0xb0, 0x7f, 0x81, 0x14, + 0x55, 0x40, 0x0f, 0xff, 0xed, 0x57, 0x7f, 0xff, 0xe7, 0x85, 0x55, 0x5f, 0xfc, 0xff, 0x70, + 0xbf, 0xff, 0xe8, 0x2a, 0xa8, 0x1f, 0xff, 0xf6, 0xae, 0xff, 0xff, 0xf9, 0xea, 0xaa, 0x5f, + 0xfa, 0xff, 0xf0, 0x5e, 0x01, 0x24, 0x15, 0x54, 0x3f, 0xff, 0xf5, 0x57, 0x7f, 0xfb, 0xfe, + 0xf0, 0x55, 0x5f, 0xe5, 0xff, 0x70, 0xbe, 0x01, 0x22, 0x2a, 0xa0, 0xff, 0xff, 0xba, 0xae, + 0xff, 0xfe, 0x1f, 0x30, 0x2a, 0x0f, 0x89, 0xbf, 0xf0, 0x5f, 0xff, 0xe5, 0x15, 0x41, 0xff, + 0xff, 0xd5, 0x57, 0x7f, 0xff, 0xe0, 0x48, 0x05, 0x54, 0x53, 0xff, 0xf0, 0xbe, 0x01, 0xa2, + 0x02, 0x03, 0xff, 0xff, 0xea, 0xaa, 0xbf, 0xff, 0xff, 0x80, 0x00, 0x02, 0xa7, 0xbf, 0xf0, + 0x5e, 0x01, 0x41, 0x00, 0x06, 0xfd, 0xff, 0xd5, 0x55, 0x5f, 0xff, 0xff, 0xfc, 0x00, 0x40, + 0x4f, 0xff, 0xf0, 0xbe, 0x49, 0x20, 0x80, 0x0f, 0x7f, 0xfe, 0xea, 0xaa, 0xbe, 0xff, 0xff, + 0xff, 0x00, 0x00, 0x1f, 0xbf, 0xf0, 0x7e, 0x49, 0x50, 0x00, 0x0f, 0x7f, 0xff, 0xd5, 0x55, + 0x5f, 0x83, 0xff, 0xff, 0x80, 0x40, 0x3f, 0xff, 0xf0, 0xfe, 0x41, 0x28, 0x00, 0x0f, 0xbf, + 0xff, 0xeb, 0xaa, 0xbf, 0xfc, 0x00, 0x03, 0xe0, 0x00, 0xff, 0xbf, 0xf0, 0xfe, 0x41, 0x14, + 0x00, 0x1f, 0xdf, 0xff, 0xd5, 0xd5, 0x57, 0xff, 0xff, 0xfc, 0x00, 0x07, 0xff, 0xdf, 0xf0, + 0xff, 0xff, 0x08, 0x00, 0x1f, 0x3f, 0xdf, 0xeb, 0xaa, 0xab, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xbf, 0xf0, 0xfe, 0x01, 0x14, 0x40, 0x3e, 0xff, 0xbf, 0xf5, 0x55, 0x57, 0xdf, 0xff, + 0xf9, 0xff, 0xff, 0xff, 0xdf, 0xf0, 0xfe, 0x01, 0x0a, 0x20, 0x3f, 0xff, 0xdf, 0xfa, 0xaa, + 0xab, 0xbf, 0xff, 0xf3, 0xff, 0xff, 0xdf, 0xbf, 0xf0, 0xde, 0x7f, 0x05, 0x10, 0x7f, 0xff, + 0xff, 0xfd, 0x55, 0x55, 0xdf, 0xff, 0xe4, 0xff, 0xff, 0xbf, 0x7f, 0xf0, 0xee, 0x7e, 0x02, + 0x88, 0x7f, 0xff, 0xff, 0xfa, 0xaa, 0xab, 0xbf, 0xff, 0xe3, 0xff, 0xbf, 0xbf, 0xbf, 0xf0, + 0xde, 0x05, 0x41, 0x54, 0x3f, 0xff, 0xff, 0xdd, 0x55, 0x55, 0xff, 0xff, 0xd7, 0xff, 0xdf, + 0x7f, 0x7f, 0xf0, 0xee, 0x06, 0xa2, 0xaa, 0x3f, 0xff, 0xff, 0xbe, 0xaa, 0xab, 0xbf, 0xff, + 0xf7, 0xff, 0xbf, 0x3f, 0xbf, 0xf0, 0xde, 0x7d, 0x55, 0x55, 0x1f, 0xfb, 0xff, 0xff, 0x55, + 0x55, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xbf, 0xff, 0xf0, 0xfe, 0x7f, 0xaa, 0xaa, 0x8f, 0xff, + 0xff, 0xba, 0xaa, 0xab, 0xff, 0xff, 0xff, 0xff, 0xbf, 0xdf, 0xbf, 0xf0, 0xfe, 0x01, 0x55, + 0x55, 0x47, 0xff, 0xff, 0xf7, 0xd5, 0x57, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, + 0xfe, 0x01, 0xaa, 0xaa, 0xa1, 0xff, 0xff, 0xbf, 0xea, 0xab, 0xff, 0xff, 0xff, 0xff, 0xbf, + 0xff, 0xff, 0xf0, 0xff, 0xff, 0x55, 0x55, 0x54, 0xff, 0xff, 0x5f, 0xf5, 0x57, 0xff, 0xfd, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xda, 0xaa, 0xaa, 0xaa, 0x7f, 0xff, 0xbf, 0xfa, + 0xab, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0x9d, 0x55, 0x55, 0x00, 0xff, + 0xff, 0x7f, 0xfd, 0x57, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xbf, 0xa2, + 0xa8, 0x03, 0xff, 0xfb, 0xbf, 0xfa, 0xaa, 0xbf, 0xfb, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xf0, + 0xff, 0x3f, 0xc0, 0x00, 0x07, 0xff, 0xff, 0x5f, 0xfd, 0x57, 0x57, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf0, 0xff, 0x3f, 0x80, 0x00, 0x0f, 0xff, 0xfb, 0xaf, 0xfe, 0xae, 0xaa, 0xfb, + 0xff, 0xbf, 0xff, 0xff, 0xff, 0xf0, 0xf6, 0x7f, 0xc0, 0x00, 0x0f, 0xff, 0xff, 0x57, 0xfd, + 0x55, 0x55, 0x77, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xf0, +}; + +const lv_img_dsc_t balloon = { + .header.cf = LV_IMG_CF_INDEXED_1BIT, + .header.always_zero = 0, + .header.reserved = 0, + .header.w = 140, + .header.h = 68, + .data_size = 1232, + .data = balloon_map, +}; + +#ifndef LV_ATTRIBUTE_IMG_MOUNTAIN +#define LV_ATTRIBUTE_IMG_MOUNTAIN +#endif + +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_MOUNTAIN uint8_t + mountain_map[] = { +#if CONFIG_NICE_VIEW_WIDGET_INVERTED + 0xff, 0xff, 0xff, 0xff, /*Color of index 0*/ + 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ +#else + 0x00, 0x00, 0x00, 0xff, /*Color of index 0*/ + 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ +#endif + + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, + 0x00, 0x00, 0x00, 0x90, 0x00, 0x30, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xa0, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x10, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xf4, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0x9f, 0xff, 0x10, 0x80, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x40, 0x00, 0x00, 0x01, 0xfe, 0x03, 0xe0, 0x0f, 0x9e, 0x01, 0x90, + 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe8, 0x00, 0x00, 0x00, 0xff, 0x07, 0xe0, 0x1f, + 0x9e, 0x00, 0x90, 0x80, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x80, 0x00, 0x00, 0x7f, + 0x8f, 0xe0, 0x1f, 0xbe, 0x00, 0x90, 0x80, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd0, + 0x00, 0x00, 0x3f, 0xcf, 0xf0, 0x1f, 0xbc, 0x00, 0x90, 0x80, 0x7f, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfe, 0x00, 0x00, 0x3f, 0xcf, 0xf0, 0x3f, 0xbc, 0x00, 0x90, 0x80, 0x7f, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xe8, 0x00, 0x00, 0x1f, 0xe7, 0xf0, 0x7f, 0x3c, 0x00, 0x90, + 0x80, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x80, 0x00, 0x00, 0x0f, 0xe7, 0xf8, 0x7f, + 0x78, 0x01, 0xb0, 0x80, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xec, 0x00, 0x00, 0x00, 0x07, + 0xf3, 0xf8, 0x3f, 0x78, 0x03, 0xd0, 0x80, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xc0, 0x00, + 0x00, 0x00, 0x07, 0xfb, 0xf8, 0x3f, 0xf8, 0x0f, 0x90, 0xc0, 0x1f, 0xff, 0xff, 0xff, 0xff, + 0xec, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfd, 0xfc, 0x3f, 0xf8, 0x0f, 0x10, 0xc0, 0x1e, 0xff, + 0xff, 0xff, 0xff, 0x40, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xfc, 0x3f, 0xf0, 0x0e, 0x10, + 0xc0, 0x0c, 0x27, 0xff, 0xff, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 0x7f, + 0xf0, 0x1e, 0x30, 0xc0, 0x00, 0x1f, 0xff, 0xff, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7f, 0xfe, 0x7f, 0xf3, 0xfc, 0x50, 0xe0, 0x00, 0x3f, 0xff, 0xfa, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x7f, 0xf7, 0xf8, 0x90, 0xe0, 0x00, 0x7f, 0xfe, 0xb0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0x7f, 0xe7, 0xf1, 0x90, 0xe0, 0x00, 0x7f, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x7f, 0xef, 0xe3, 0x90, + 0xf0, 0x00, 0x7f, 0xff, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0x7f, + 0xff, 0xe7, 0x90, 0xb0, 0x10, 0xff, 0xff, 0xf6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0xff, 0xbf, 0xff, 0xcf, 0x90, 0xf0, 0x30, 0xff, 0xff, 0xff, 0x60, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0xff, 0xf9, 0xff, 0x9f, 0x90, 0xb0, 0x30, 0xff, 0xff, 0xff, 0xf2, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf6, 0xff, 0x3e, 0x90, 0xf8, 0x70, 0xff, + 0xff, 0xff, 0xff, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf6, 0xfe, 0x7c, 0x90, + 0xf8, 0x78, 0xff, 0xff, 0xff, 0xff, 0xf4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf9, + 0xfe, 0xf8, 0x90, 0xa8, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0xff, 0xfd, 0xf3, 0x90, 0xdc, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xe8, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xfb, 0xef, 0x90, 0xf5, 0xac, 0xff, 0xff, 0xff, 0xfe, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x90, 0xff, 0xd6, 0x7f, + 0xff, 0xff, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0x90, + 0xff, 0xfa, 0x7f, 0xff, 0xff, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, + 0xff, 0xff, 0x90, 0xdd, 0xff, 0x7f, 0xff, 0xf6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0xea, 0xbf, 0x3f, 0xff, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0, 0x10, 0xff, 0x4f, 0xbf, 0xf5, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x10, 0xff, 0xff, 0x9f, + 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, + 0xff, 0xb0, 0xcb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0xff, 0xff, 0x90, 0xcd, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x1f, 0xff, 0xff, 0x90, 0xb2, 0xe0, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0c, 0x7f, 0xff, 0xff, 0x90, 0xff, 0xc0, 0x3f, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xff, 0xff, 0xff, 0x90, 0xfe, 0xc0, 0x7f, + 0xe8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf1, 0xff, 0xff, 0x7c, 0x90, + 0xfd, 0x80, 0xff, 0xfd, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xc3, 0xff, + 0xff, 0xb8, 0x90, 0xff, 0x80, 0xff, 0xff, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3f, 0x87, 0xff, 0xff, 0xc8, 0x90, 0x9f, 0x01, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7f, 0x1f, 0xff, 0xff, 0xe0, 0x90, 0x86, 0x01, 0xff, 0xff, 0xd0, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xfe, 0x3f, 0xff, 0xff, 0xe0, 0x90, 0x80, 0x01, 0xff, + 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x19, 0x83, 0xfe, 0x7f, 0xff, 0xff, 0xf0, 0x90, + 0x80, 0x01, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x7f, 0xc7, 0xee, 0x7f, 0xff, + 0xff, 0xf8, 0x90, 0x80, 0x1a, 0xbf, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x98, 0xff, 0xff, + 0xc6, 0x7f, 0xff, 0xff, 0xfc, 0x90, 0x80, 0x3f, 0x5d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0xf1, 0xff, 0xff, 0xc0, 0x7f, 0xff, 0xff, 0xfe, 0x90, 0x80, 0x3f, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0xe3, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x90, 0x80, 0x7f, 0xfe, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xc7, 0xff, 0xfe, 0x18, 0xff, 0xef, 0xff, 0xff, 0x90, + 0x80, 0x7f, 0xff, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x8f, 0xff, 0xfc, 0x7f, 0xff, 0xef, + 0xfd, 0xff, 0x90, 0x80, 0xff, 0xff, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x9f, 0xff, 0xf8, + 0xff, 0xff, 0xef, 0xfc, 0xf7, 0x90, 0x80, 0xff, 0xff, 0xff, 0x60, 0x00, 0x00, 0x00, 0x3f, + 0x1f, 0xff, 0xf1, 0xff, 0xff, 0xcf, 0xfc, 0xe1, 0x90, 0x80, 0xff, 0xff, 0xff, 0xf4, 0x00, + 0x00, 0x00, 0x7f, 0x3f, 0xff, 0xe3, 0xff, 0xff, 0xcf, 0xfe, 0x60, 0x90, 0x81, 0xff, 0xff, + 0xff, 0xfe, 0x80, 0x00, 0x00, 0x7f, 0x3f, 0xff, 0xc7, 0xff, 0xff, 0xdf, 0xfe, 0x40, 0x90, + 0x81, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x01, 0xfe, 0x3f, 0xff, 0xcf, 0xbf, 0xff, 0xdf, + 0xfe, 0x00, 0x90, 0x81, 0xff, 0xff, 0xff, 0xff, 0x40, 0x00, 0x07, 0xfe, 0x7f, 0xff, 0x8f, + 0x7f, 0xff, 0x9f, 0xfe, 0x00, 0x90, 0x80, 0xff, 0xff, 0xff, 0xe6, 0x00, 0x00, 0x1f, 0xfe, + 0x7f, 0xff, 0x1e, 0xff, 0xff, 0x91, 0xfe, 0x00, 0x90, 0x80, 0xff, 0xff, 0xfe, 0xc0, 0x00, + 0x00, 0x3f, 0xfc, 0x7f, 0xfe, 0x3c, 0xff, 0xff, 0x81, 0xff, 0x00, 0x90, 0x80, 0x7f, 0xff, + 0xec, 0x00, 0x00, 0x3c, 0xff, 0xf8, 0xff, 0xfc, 0x79, 0xfd, 0xff, 0x80, 0xff, 0x00, 0x90, + 0x80, 0x27, 0xff, 0x80, 0x00, 0x00, 0x7f, 0xff, 0xf9, 0xff, 0xfc, 0xf3, 0xfb, 0xff, 0x00, + 0xff, 0x00, 0x90, 0x80, 0x5f, 0xff, 0xd8, 0x00, 0x00, 0xff, 0xff, 0xf1, 0xff, 0xc8, 0xe7, + 0xf3, 0xff, 0x00, 0x7f, 0x00, 0x90, 0x80, 0xff, 0xff, 0xfd, 0x80, 0x01, 0xff, 0xff, 0xe3, + 0xff, 0x81, 0xcf, 0xf7, 0xff, 0x00, 0x7f, 0x00, 0x90, 0x80, 0xff, 0xff, 0xff, 0xd8, 0x03, + 0xff, 0xff, 0x87, 0xff, 0x03, 0x8f, 0xe7, 0xff, 0x00, 0x3f, 0x81, 0x90, 0x81, 0xff, 0xff, + 0xff, 0xfe, 0x83, 0xff, 0xfe, 0x0f, 0xfe, 0x3f, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xff, 0x10, + 0x80, 0x00, 0x00, 0x00, 0x2f, 0xc6, 0x00, 0x00, 0x38, 0x00, 0x60, 0x00, 0x48, 0x00, 0x00, + 0x00, 0x00, 0x10, 0xc0, 0x00, 0x00, 0x00, 0x17, 0xf4, 0x00, 0x00, 0xe0, 0x00, 0xc0, 0x00, + 0x88, 0x00, 0x00, 0x00, 0x00, 0x30, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, +}; + +const lv_img_dsc_t mountain = { + .header.cf = LV_IMG_CF_INDEXED_1BIT, + .header.always_zero = 0, + .header.reserved = 0, + .header.w = 140, + .header.h = 68, + .data_size = 1232, + .data = mountain_map, +}; diff --git a/app/boards/shields/nice_view/widgets/bolt.c b/app/boards/shields/nice_view/widgets/bolt.c new file mode 100644 index 00000000000..74dcc2b00c6 --- /dev/null +++ b/app/boards/shields/nice_view/widgets/bolt.c @@ -0,0 +1,45 @@ +/* + * + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + * + */ + +#include + +#ifndef LV_ATTRIBUTE_MEM_ALIGN +#define LV_ATTRIBUTE_MEM_ALIGN +#endif + +#ifndef LV_ATTRIBUTE_IMG_BOLT +#define LV_ATTRIBUTE_IMG_BOLT +#endif + +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BOLT uint8_t bolt_map[] = { +#if CONFIG_NICE_VIEW_WIDGET_INVERTED + 0x00, 0x00, 0x00, 0x00, /*Color of index 0*/ + 0x00, 0x00, 0x00, 0xff, /*Color of index 1*/ + 0xff, 0xff, 0xff, 0xff, /*Color of index 2*/ + 0x00, 0x00, 0x00, 0x00, /*Color of index 3*/ +#else + 0x00, 0x00, 0x00, 0x00, /*Color of index 0*/ + 0xff, 0xff, 0xff, 0xff, /*Color of index 1*/ + 0x00, 0x00, 0x00, 0xff, /*Color of index 2*/ + 0x00, 0x00, 0x00, 0x00, /*Color of index 3*/ +#endif + + 0x00, 0x14, 0x00, 0x00, 0x64, 0x00, 0x00, 0x64, 0x00, 0x01, 0xa4, 0x00, 0x01, 0xa4, + 0x00, 0x06, 0xa4, 0x00, 0x06, 0xa4, 0x00, 0x1a, 0xa5, 0x54, 0x1a, 0xaa, 0xa4, 0x6a, + 0xaa, 0x90, 0x55, 0x6a, 0x90, 0x00, 0x6a, 0x40, 0x00, 0x6a, 0x40, 0x00, 0x69, 0x00, + 0x00, 0x69, 0x00, 0x00, 0x64, 0x00, 0x00, 0x64, 0x00, 0x00, 0x50, 0x00, +}; + +const lv_img_dsc_t bolt = { + .header.cf = LV_IMG_CF_INDEXED_2BIT, + .header.always_zero = 0, + .header.reserved = 0, + .header.w = 11, + .header.h = 18, + .data_size = 70, + .data = bolt_map, +}; diff --git a/app/boards/shields/nice_view/widgets/peripheral_status.c b/app/boards/shields/nice_view/widgets/peripheral_status.c new file mode 100644 index 00000000000..85c2a1d8793 --- /dev/null +++ b/app/boards/shields/nice_view/widgets/peripheral_status.c @@ -0,0 +1,128 @@ +/* + * + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + * + */ + +#include +#include +#include + +#include +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#include +#include "peripheral_status.h" +#include +#include +#include +#include +#include +#include +#include + +LV_IMG_DECLARE(balloon); +LV_IMG_DECLARE(mountain); + +static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets); + +struct peripheral_status_state { + bool connected; +}; + +static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state state) { + lv_obj_t *canvas = lv_obj_get_child(widget, 0); + + lv_draw_label_dsc_t label_dsc; + init_label_dsc(&label_dsc, LVGL_FOREGROUND, &lv_font_montserrat_16, LV_TEXT_ALIGN_RIGHT); + lv_draw_rect_dsc_t rect_black_dsc; + init_rect_dsc(&rect_black_dsc, LVGL_BACKGROUND); + + // Fill background + lv_canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); + + // Draw battery + draw_battery(canvas, state); + + // Draw output status + lv_canvas_draw_text(canvas, 0, 0, CANVAS_SIZE, &label_dsc, + state.connected ? LV_SYMBOL_WIFI : LV_SYMBOL_CLOSE); + + // Rotate canvas + rotate_canvas(canvas, cbuf); +} + +static void set_battery_status(struct zmk_widget_status *widget, + struct battery_status_state state) { +#if IS_ENABLED(CONFIG_USB_DEVICE_STACK) + widget->state.charging = state.usb_present; +#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */ + + widget->state.battery = state.level; + + draw_top(widget->obj, widget->cbuf, widget->state); +} + +static void battery_status_update_cb(struct battery_status_state state) { + struct zmk_widget_status *widget; + SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_battery_status(widget, state); } +} + +static struct battery_status_state battery_status_get_state(const zmk_event_t *eh) { + return (struct battery_status_state) { + .level = bt_bas_get_battery_level(), +#if IS_ENABLED(CONFIG_USB_DEVICE_STACK) + .usb_present = zmk_usb_is_powered(), +#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */ + }; +} + +ZMK_DISPLAY_WIDGET_LISTENER(widget_battery_status, struct battery_status_state, + battery_status_update_cb, battery_status_get_state) + +ZMK_SUBSCRIPTION(widget_battery_status, zmk_battery_state_changed); +#if IS_ENABLED(CONFIG_USB_DEVICE_STACK) +ZMK_SUBSCRIPTION(widget_battery_status, zmk_usb_conn_state_changed); +#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */ + +static struct peripheral_status_state get_state(const zmk_event_t *_eh) { + return (struct peripheral_status_state){.connected = zmk_split_bt_peripheral_is_connected()}; +} + +static void set_connection_status(struct zmk_widget_status *widget, + struct peripheral_status_state state) { + widget->state.connected = state.connected; + + draw_top(widget->obj, widget->cbuf, widget->state); +} + +static void output_status_update_cb(struct peripheral_status_state state) { + struct zmk_widget_status *widget; + SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_connection_status(widget, state); } +} + +ZMK_DISPLAY_WIDGET_LISTENER(widget_peripheral_status, struct peripheral_status_state, + output_status_update_cb, get_state) +ZMK_SUBSCRIPTION(widget_peripheral_status, zmk_split_peripheral_status_changed); + +int zmk_widget_status_init(struct zmk_widget_status *widget, lv_obj_t *parent) { + widget->obj = lv_obj_create(parent); + lv_obj_set_size(widget->obj, 160, 68); + lv_obj_t *top = lv_canvas_create(widget->obj); + lv_obj_align(top, LV_ALIGN_TOP_RIGHT, 0, 0); + lv_canvas_set_buffer(top, widget->cbuf, CANVAS_SIZE, CANVAS_SIZE, LV_IMG_CF_TRUE_COLOR); + + lv_obj_t *art = lv_img_create(widget->obj); + bool random = sys_rand32_get() & 1; + lv_img_set_src(art, random ? &balloon : &mountain); + lv_obj_align(art, LV_ALIGN_TOP_LEFT, 0, 0); + + sys_slist_append(&widgets, &widget->node); + widget_battery_status_init(); + widget_peripheral_status_init(); + + return 0; +} + +lv_obj_t *zmk_widget_status_obj(struct zmk_widget_status *widget) { return widget->obj; } diff --git a/app/boards/shields/nice_view/widgets/peripheral_status.h b/app/boards/shields/nice_view/widgets/peripheral_status.h new file mode 100644 index 00000000000..815963572b4 --- /dev/null +++ b/app/boards/shields/nice_view/widgets/peripheral_status.h @@ -0,0 +1,22 @@ +/* + * + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + * + */ + +#pragma once + +#include +#include +#include "util.h" + +struct zmk_widget_status { + sys_snode_t node; + lv_obj_t *obj; + lv_color_t cbuf[CANVAS_SIZE * CANVAS_SIZE]; + struct status_state state; +}; + +int zmk_widget_status_init(struct zmk_widget_status *widget, lv_obj_t *parent); +lv_obj_t *zmk_widget_status_obj(struct zmk_widget_status *widget); diff --git a/app/boards/shields/nice_view/widgets/status.c b/app/boards/shields/nice_view/widgets/status.c new file mode 100644 index 00000000000..1ad9e9207d7 --- /dev/null +++ b/app/boards/shields/nice_view/widgets/status.c @@ -0,0 +1,330 @@ +/* + * + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + * + */ + +#include +#include + +#include +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#include +#include "status.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets); + +struct output_status_state { + enum zmk_endpoint selected_endpoint; + bool active_profile_connected; + bool active_profile_bonded; + uint8_t active_profile_index; +}; + +struct layer_status_state { + uint8_t index; + const char *label; +}; + +struct wpm_status_state { + uint8_t wpm; +}; + +static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state state) { + lv_obj_t *canvas = lv_obj_get_child(widget, 0); + + lv_draw_label_dsc_t label_dsc; + init_label_dsc(&label_dsc, LVGL_FOREGROUND, &lv_font_montserrat_16, LV_TEXT_ALIGN_RIGHT); + lv_draw_label_dsc_t label_dsc_wpm; + init_label_dsc(&label_dsc_wpm, LVGL_FOREGROUND, &lv_font_unscii_8, LV_TEXT_ALIGN_RIGHT); + lv_draw_rect_dsc_t rect_black_dsc; + init_rect_dsc(&rect_black_dsc, LVGL_BACKGROUND); + lv_draw_rect_dsc_t rect_white_dsc; + init_rect_dsc(&rect_white_dsc, LVGL_FOREGROUND); + lv_draw_line_dsc_t line_dsc; + init_line_dsc(&line_dsc, LVGL_FOREGROUND, 1); + + // Fill background + lv_canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); + + // Draw battery + draw_battery(canvas, state); + + // Draw output status + char output_text[10] = {}; + + switch (state.selected_endpoint) { + case ZMK_ENDPOINT_USB: + strcat(output_text, LV_SYMBOL_USB); + break; + case ZMK_ENDPOINT_BLE: + if (state.active_profile_bonded) { + if (state.active_profile_connected) { + strcat(output_text, LV_SYMBOL_WIFI); + } else { + strcat(output_text, LV_SYMBOL_CLOSE); + } + } else { + strcat(output_text, LV_SYMBOL_SETTINGS); + } + break; + } + + lv_canvas_draw_text(canvas, 0, 0, CANVAS_SIZE, &label_dsc, output_text); + + // Draw WPM + lv_canvas_draw_rect(canvas, 0, 21, 68, 42, &rect_white_dsc); + lv_canvas_draw_rect(canvas, 1, 22, 66, 40, &rect_black_dsc); + + char wpm_text[6] = {}; + snprintf(wpm_text, sizeof(wpm_text), "%d", state.wpm[9]); + lv_canvas_draw_text(canvas, 42, 52, 24, &label_dsc_wpm, wpm_text); + + int max = 0; + int min = 256; + + for (int i = 0; i < 10; i++) { + if (state.wpm[i] > max) { + max = state.wpm[i]; + } + if (state.wpm[i] < min) { + min = state.wpm[i]; + } + } + + int range = max - min; + if (range == 0) { + range = 1; + } + + lv_point_t points[10]; + for (int i = 0; i < 10; i++) { + points[i].x = 2 + i * 7; + points[i].y = 60 - (state.wpm[i] - min) * 36 / range; + } + lv_canvas_draw_line(canvas, points, 10, &line_dsc); + + // Rotate canvas + rotate_canvas(canvas, cbuf); +} + +static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], struct status_state state) { + lv_obj_t *canvas = lv_obj_get_child(widget, 1); + + lv_draw_rect_dsc_t rect_black_dsc; + init_rect_dsc(&rect_black_dsc, LVGL_BACKGROUND); + lv_draw_rect_dsc_t rect_white_dsc; + init_rect_dsc(&rect_white_dsc, LVGL_FOREGROUND); + lv_draw_arc_dsc_t arc_dsc; + init_arc_dsc(&arc_dsc, LVGL_FOREGROUND, 2); + lv_draw_arc_dsc_t arc_dsc_filled; + init_arc_dsc(&arc_dsc_filled, LVGL_FOREGROUND, 9); + lv_draw_label_dsc_t label_dsc; + init_label_dsc(&label_dsc, LVGL_FOREGROUND, &lv_font_montserrat_18, LV_TEXT_ALIGN_CENTER); + lv_draw_label_dsc_t label_dsc_black; + init_label_dsc(&label_dsc_black, LVGL_BACKGROUND, &lv_font_montserrat_18, LV_TEXT_ALIGN_CENTER); + + // Fill background + lv_canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); + + // Draw circles + int circle_offsets[5][2] = { + {13, 13}, {55, 13}, {34, 34}, {13, 55}, {55, 55}, + }; + + for (int i = 0; i < 5; i++) { + bool selected = state.active_profile_index == i; + + lv_canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 13, 0, 359, + &arc_dsc); + + if (selected) { + lv_canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 9, 0, 359, + &arc_dsc_filled); + } + + char label[2]; + snprintf(label, sizeof(label), "%d", i + 1); + lv_canvas_draw_text(canvas, circle_offsets[i][0] - 8, circle_offsets[i][1] - 10, 16, + (selected ? &label_dsc_black : &label_dsc), label); + } + + // Rotate canvas + rotate_canvas(canvas, cbuf); +} + +static void draw_bottom(lv_obj_t *widget, lv_color_t cbuf[], struct status_state state) { + lv_obj_t *canvas = lv_obj_get_child(widget, 2); + + lv_draw_rect_dsc_t rect_black_dsc; + init_rect_dsc(&rect_black_dsc, LVGL_BACKGROUND); + lv_draw_label_dsc_t label_dsc; + init_label_dsc(&label_dsc, LVGL_FOREGROUND, &lv_font_montserrat_14, LV_TEXT_ALIGN_CENTER); + + // Fill background + lv_canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); + + // Draw layer + if (state.layer_label == NULL) { + char text[9] = {}; + + sprintf(text, "LAYER %i", state.layer_index); + + lv_canvas_draw_text(canvas, 0, 5, 68, &label_dsc, text); + } else { + lv_canvas_draw_text(canvas, 0, 5, 68, &label_dsc, state.layer_label); + } + + // Rotate canvas + rotate_canvas(canvas, cbuf); +} + +static void set_battery_status(struct zmk_widget_status *widget, + struct battery_status_state state) { +#if IS_ENABLED(CONFIG_USB_DEVICE_STACK) + widget->state.charging = state.usb_present; +#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */ + + widget->state.battery = state.level; + + draw_top(widget->obj, widget->cbuf, widget->state); +} + +static void battery_status_update_cb(struct battery_status_state state) { + struct zmk_widget_status *widget; + SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_battery_status(widget, state); } +} + +static struct battery_status_state battery_status_get_state(const zmk_event_t *eh) { + return (struct battery_status_state) { + .level = bt_bas_get_battery_level(), +#if IS_ENABLED(CONFIG_USB_DEVICE_STACK) + .usb_present = zmk_usb_is_powered(), +#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */ + }; +} + +ZMK_DISPLAY_WIDGET_LISTENER(widget_battery_status, struct battery_status_state, + battery_status_update_cb, battery_status_get_state) + +ZMK_SUBSCRIPTION(widget_battery_status, zmk_battery_state_changed); +#if IS_ENABLED(CONFIG_USB_DEVICE_STACK) +ZMK_SUBSCRIPTION(widget_battery_status, zmk_usb_conn_state_changed); +#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */ + +static void set_output_status(struct zmk_widget_status *widget, struct output_status_state state) { + widget->state.selected_endpoint = state.selected_endpoint; + widget->state.active_profile_connected = state.active_profile_connected; + widget->state.active_profile_bonded = state.active_profile_bonded; + widget->state.active_profile_index = state.active_profile_index; + + draw_top(widget->obj, widget->cbuf, widget->state); + draw_middle(widget->obj, widget->cbuf2, widget->state); +} + +static void output_status_update_cb(struct output_status_state state) { + struct zmk_widget_status *widget; + SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_output_status(widget, state); } +} + +static struct output_status_state output_status_get_state(const zmk_event_t *_eh) { + return (struct output_status_state){.selected_endpoint = zmk_endpoints_selected(), + .active_profile_connected = + zmk_ble_active_profile_is_connected(), + .active_profile_bonded = !zmk_ble_active_profile_is_open(), + .active_profile_index = zmk_ble_active_profile_index()}; + ; +} + +ZMK_DISPLAY_WIDGET_LISTENER(widget_output_status, struct output_status_state, + output_status_update_cb, output_status_get_state) +ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_selection_changed); + +#if IS_ENABLED(CONFIG_USB_DEVICE_STACK) +ZMK_SUBSCRIPTION(widget_output_status, zmk_usb_conn_state_changed); +#endif +#if defined(CONFIG_ZMK_BLE) +ZMK_SUBSCRIPTION(widget_output_status, zmk_ble_active_profile_changed); +#endif + +static void set_layer_status(struct zmk_widget_status *widget, struct layer_status_state state) { + widget->state.layer_index = state.index; + widget->state.layer_label = state.label; + + draw_bottom(widget->obj, widget->cbuf3, widget->state); +} + +static void layer_status_update_cb(struct layer_status_state state) { + struct zmk_widget_status *widget; + SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_layer_status(widget, state); } +} + +static struct layer_status_state layer_status_get_state(const zmk_event_t *eh) { + uint8_t index = zmk_keymap_highest_layer_active(); + return (struct layer_status_state){.index = index, .label = zmk_keymap_layer_label(index)}; +} + +ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, layer_status_update_cb, + layer_status_get_state) + +ZMK_SUBSCRIPTION(widget_layer_status, zmk_layer_state_changed); + +static void set_wpm_status(struct zmk_widget_status *widget, struct wpm_status_state state) { + for (int i = 0; i < 9; i++) { + widget->state.wpm[i] = widget->state.wpm[i + 1]; + } + widget->state.wpm[9] = state.wpm; + + draw_top(widget->obj, widget->cbuf, widget->state); +} + +static void wpm_status_update_cb(struct wpm_status_state state) { + struct zmk_widget_status *widget; + SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_wpm_status(widget, state); } +} + +struct wpm_status_state wpm_status_get_state(const zmk_event_t *eh) { + return (struct wpm_status_state){.wpm = zmk_wpm_get_state()}; +}; + +ZMK_DISPLAY_WIDGET_LISTENER(widget_wpm_status, struct wpm_status_state, wpm_status_update_cb, + wpm_status_get_state) +ZMK_SUBSCRIPTION(widget_wpm_status, zmk_wpm_state_changed); + +int zmk_widget_status_init(struct zmk_widget_status *widget, lv_obj_t *parent) { + widget->obj = lv_obj_create(parent); + lv_obj_set_size(widget->obj, 160, 68); + lv_obj_t *top = lv_canvas_create(widget->obj); + lv_obj_align(top, LV_ALIGN_TOP_RIGHT, 0, 0); + lv_canvas_set_buffer(top, widget->cbuf, CANVAS_SIZE, CANVAS_SIZE, LV_IMG_CF_TRUE_COLOR); + lv_obj_t *middle = lv_canvas_create(widget->obj); + lv_obj_align(middle, LV_ALIGN_TOP_LEFT, 24, 0); + lv_canvas_set_buffer(middle, widget->cbuf2, CANVAS_SIZE, CANVAS_SIZE, LV_IMG_CF_TRUE_COLOR); + lv_obj_t *bottom = lv_canvas_create(widget->obj); + lv_obj_align(bottom, LV_ALIGN_TOP_LEFT, -44, 0); + lv_canvas_set_buffer(bottom, widget->cbuf3, CANVAS_SIZE, CANVAS_SIZE, LV_IMG_CF_TRUE_COLOR); + + sys_slist_append(&widgets, &widget->node); + widget_battery_status_init(); + widget_output_status_init(); + widget_layer_status_init(); + widget_wpm_status_init(); + + return 0; +} + +lv_obj_t *zmk_widget_status_obj(struct zmk_widget_status *widget) { return widget->obj; } diff --git a/app/boards/shields/nice_view/widgets/status.h b/app/boards/shields/nice_view/widgets/status.h new file mode 100644 index 00000000000..53a22518d73 --- /dev/null +++ b/app/boards/shields/nice_view/widgets/status.h @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + * + */ + +#pragma once + +#include +#include +#include "util.h" + +struct zmk_widget_status { + sys_snode_t node; + lv_obj_t *obj; + lv_color_t cbuf[CANVAS_SIZE * CANVAS_SIZE]; + lv_color_t cbuf2[CANVAS_SIZE * CANVAS_SIZE]; + lv_color_t cbuf3[CANVAS_SIZE * CANVAS_SIZE]; + struct status_state state; +}; + +int zmk_widget_status_init(struct zmk_widget_status *widget, lv_obj_t *parent); +lv_obj_t *zmk_widget_status_obj(struct zmk_widget_status *widget); diff --git a/app/boards/shields/nice_view/widgets/util.c b/app/boards/shields/nice_view/widgets/util.c new file mode 100644 index 00000000000..9655f837f6e --- /dev/null +++ b/app/boards/shields/nice_view/widgets/util.c @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + * + */ + +#include +#include "util.h" + +LV_IMG_DECLARE(bolt); + +void rotate_canvas(lv_obj_t *canvas, lv_color_t cbuf[]) { + static lv_color_t cbuf_tmp[CANVAS_SIZE * CANVAS_SIZE]; + memcpy(cbuf_tmp, cbuf, sizeof(cbuf_tmp)); + lv_img_dsc_t img; + img.data = (void *)cbuf_tmp; + img.header.cf = LV_IMG_CF_TRUE_COLOR; + img.header.w = CANVAS_SIZE; + img.header.h = CANVAS_SIZE; + + lv_canvas_fill_bg(canvas, LVGL_BACKGROUND, LV_OPA_COVER); + lv_canvas_transform(canvas, &img, 900, LV_IMG_ZOOM_NONE, -1, 0, CANVAS_SIZE / 2, + CANVAS_SIZE / 2, true); +} + +void draw_battery(lv_obj_t *canvas, struct status_state state) { + lv_draw_rect_dsc_t rect_black_dsc; + init_rect_dsc(&rect_black_dsc, LVGL_BACKGROUND); + lv_draw_rect_dsc_t rect_white_dsc; + init_rect_dsc(&rect_white_dsc, LVGL_FOREGROUND); + + lv_canvas_draw_rect(canvas, 0, 2, 29, 12, &rect_white_dsc); + lv_canvas_draw_rect(canvas, 1, 3, 27, 10, &rect_black_dsc); + lv_canvas_draw_rect(canvas, 2, 4, (state.battery + 2) / 4, 8, &rect_white_dsc); + lv_canvas_draw_rect(canvas, 30, 5, 3, 6, &rect_white_dsc); + lv_canvas_draw_rect(canvas, 31, 6, 1, 4, &rect_black_dsc); + + if (state.charging) { + lv_draw_img_dsc_t img_dsc; + lv_draw_img_dsc_init(&img_dsc); + lv_canvas_draw_img(canvas, 9, -1, &bolt, &img_dsc); + } +} + +void init_label_dsc(lv_draw_label_dsc_t *label_dsc, lv_color_t color, const lv_font_t *font, + lv_text_align_t align) { + lv_draw_label_dsc_init(label_dsc); + label_dsc->color = color; + label_dsc->font = font; + label_dsc->align = align; +} + +void init_rect_dsc(lv_draw_rect_dsc_t *rect_dsc, lv_color_t bg_color) { + lv_draw_rect_dsc_init(rect_dsc); + rect_dsc->bg_color = bg_color; +} + +void init_line_dsc(lv_draw_line_dsc_t *line_dsc, lv_color_t color, uint8_t width) { + lv_draw_line_dsc_init(line_dsc); + line_dsc->color = color; + line_dsc->width = width; +} + +void init_arc_dsc(lv_draw_arc_dsc_t *arc_dsc, lv_color_t color, uint8_t width) { + lv_draw_arc_dsc_init(arc_dsc); + arc_dsc->color = color; + arc_dsc->width = width; +} diff --git a/app/boards/shields/nice_view/widgets/util.h b/app/boards/shields/nice_view/widgets/util.h new file mode 100644 index 00000000000..e48c1082ce9 --- /dev/null +++ b/app/boards/shields/nice_view/widgets/util.h @@ -0,0 +1,47 @@ +/* + * + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + * + */ + +#include +#include + +#define CANVAS_SIZE 68 + +#define LVGL_BACKGROUND \ + IS_ENABLED(CONFIG_NICE_VIEW_WIDGET_INVERTED) ? lv_color_black() : lv_color_white() +#define LVGL_FOREGROUND \ + IS_ENABLED(CONFIG_NICE_VIEW_WIDGET_INVERTED) ? lv_color_white() : lv_color_black() + +struct status_state { + uint8_t battery; + bool charging; +#if !IS_ENABLED(CONFIG_ZMK_SPLIT) || IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) + enum zmk_endpoint selected_endpoint; + bool active_profile_connected; + bool active_profile_bonded; + uint8_t active_profile_index; + uint8_t layer_index; + const char *layer_label; + uint8_t wpm[10]; +#else + bool connected; +#endif +}; + +struct battery_status_state { + uint8_t level; +#if IS_ENABLED(CONFIG_USB_DEVICE_STACK) + bool usb_present; +#endif +}; + +void rotate_canvas(lv_obj_t *canvas, lv_color_t cbuf[]); +void draw_battery(lv_obj_t *canvas, struct status_state state); +void init_label_dsc(lv_draw_label_dsc_t *label_dsc, lv_color_t color, const lv_font_t *font, + lv_text_align_t align); +void init_rect_dsc(lv_draw_rect_dsc_t *rect_dsc, lv_color_t bg_color); +void init_line_dsc(lv_draw_line_dsc_t *line_dsc, lv_color_t color, uint8_t width); +void init_arc_dsc(lv_draw_arc_dsc_t *arc_dsc, lv_color_t color, uint8_t width); From 51a4be89355550ccdc00833c18ceaba5ddabcb51 Mon Sep 17 00:00:00 2001 From: Nick Winans Date: Tue, 18 Jul 2023 16:55:32 -0500 Subject: [PATCH 054/160] fix(displays): Don't enable built-in widget configs by default --- app/src/display/Kconfig | 6 +++++- app/src/display/widgets/Kconfig | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/display/Kconfig b/app/src/display/Kconfig index 63ba968b445..a2029481080 100644 --- a/app/src/display/Kconfig +++ b/app/src/display/Kconfig @@ -7,7 +7,6 @@ menuconfig ZMK_DISPLAY select DISPLAY select LVGL select LV_CONF_MINIMAL - imply LV_USE_THEME_MONO if ZMK_DISPLAY @@ -42,6 +41,11 @@ choice ZMK_DISPLAY_STATUS_SCREEN config ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN bool "Built in status screen" select LV_OBJ_LABEL + imply LV_USE_THEME_MONO + imply ZMK_WIDGET_LAYER_STATUS + imply ZMK_WIDGET_BATTERY_STATUS + imply ZMK_WIDGET_OUTPUT_STATUS + imply ZMK_WIDGET_PERIPHERAL_STATUS config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM bool "Custom status screen" diff --git a/app/src/display/widgets/Kconfig b/app/src/display/widgets/Kconfig index 4c056cf5e00..7ec20c1fe4d 100644 --- a/app/src/display/widgets/Kconfig +++ b/app/src/display/widgets/Kconfig @@ -5,14 +5,12 @@ menu "ZMK Display Widgets" config ZMK_WIDGET_LAYER_STATUS bool "Widget for highest, active layer using small icons" - default y depends on !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL select LV_USE_LABEL config ZMK_WIDGET_BATTERY_STATUS bool "Widget for battery charge information, using small icons" depends on BT - default y if BT select LV_USE_LABEL if ZMK_WIDGET_BATTERY_STATUS @@ -25,13 +23,11 @@ endif config ZMK_WIDGET_OUTPUT_STATUS bool "Widget for keyboard output status icons" depends on BT && (!ZMK_SPLIT_BLE || ZMK_SPLIT_ROLE_CENTRAL) - default y if BT && (!ZMK_SPLIT_BLE || ZMK_SPLIT_ROLE_CENTRAL) select LV_USE_LABEL config ZMK_WIDGET_PERIPHERAL_STATUS bool "Widget for split peripheral status icons" depends on BT && ZMK_SPLIT_BLE && !ZMK_SPLIT_ROLE_CENTRAL - default y if BT && ZMK_SPLIT_BLE && !ZMK_SPLIT_ROLE_CENTRAL select LV_USE_LABEL config ZMK_WIDGET_WPM_STATUS From ee1e13510410e9b482fd20acf112bc3f1466c362 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Tue, 18 Jul 2023 23:21:09 -0700 Subject: [PATCH 055/160] fix: Proper battery sensor Kconfig dependencies. Properly make the battery sensor Kconfig symbols depend on `SENSOR` config, and minor battery reporting Kconfig symbol dependency fix. --- app/Kconfig | 2 +- app/drivers/sensor/battery/Kconfig | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Kconfig b/app/Kconfig index 92641c14ed0..fe019918cbb 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -500,7 +500,7 @@ config ZMK_SETTINGS_SAVE_DEBOUNCE endif config ZMK_BATTERY_REPORT_INTERVAL - depends on ZMK_BLE + depends on ZMK_BATTERY_REPORTING int "Battery level report interval in seconds" default 60 diff --git a/app/drivers/sensor/battery/Kconfig b/app/drivers/sensor/battery/Kconfig index a9d7189e58a..703adebd44e 100644 --- a/app/drivers/sensor/battery/Kconfig +++ b/app/drivers/sensor/battery/Kconfig @@ -14,6 +14,7 @@ config ZMK_BATTERY_NRF_VDDH default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BATTERY_NRF_VDDH)) select ADC select ZMK_BATTERY + depends on SENSOR help Enable ZMK nRF VDDH voltage driver for battery monitoring. @@ -22,5 +23,6 @@ config ZMK_BATTERY_VOLTAGE_DIVIDER default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BATTERY_VOLTAGE_DIVIDER)) select ADC select ZMK_BATTERY + depends on SENSOR help Enable ZMK battery voltage divider driver for battery monitoring. From cec2061dada6b18580ce20f0c1c70df38aa2a379 Mon Sep 17 00:00:00 2001 From: Maciej Konieczny aka narf Date: Wed, 19 Jul 2023 21:59:29 +0200 Subject: [PATCH 056/160] fix(docs): Fix typos in parameterized macros docs. --- docs/docs/behaviors/macros.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/behaviors/macros.md b/docs/docs/behaviors/macros.md index 40c333a9066..279d135697c 100644 --- a/docs/docs/behaviors/macros.md +++ b/docs/docs/behaviors/macros.md @@ -61,9 +61,9 @@ Macros can also be "parameterized", allowing them to be bound in your keymap wit When defining a parameterized macro, a different `compatible` value will be used depending on how many parameters are passed into it: -- `zmk,behavior-macro` - a parameter that takes no parameters. -- `zmk,behavior-macro-one-param` - a parameter that takes one parameter when used. -- `zmk,behavior-macro-two-param` - a parameter that takes two parameters when used. +- `zmk,behavior-macro` - a macro that takes no parameters. +- `zmk,behavior-macro-one-param` - a macro that takes one parameter when used. +- `zmk,behavior-macro-two-param` - a macro that takes two parameters when used. ### Bindings From b945ffe943f1639bfe992ddb4bc12f968d3858f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 15:07:59 +0000 Subject: [PATCH 057/160] chore(deps): bump semver from 5.7.1 to 5.7.2 in /docs Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2. - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md) - [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2) --- updated-dependencies: - dependency-name: semver dependency-type: indirect ... Signed-off-by: dependabot[bot] --- docs/package-lock.json | 156 ++++++++++++++++++++--------------------- 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index 5badb07e389..b990f53c3dc 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -251,9 +251,9 @@ } }, "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -325,9 +325,9 @@ } }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -384,9 +384,9 @@ } }, "node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -1634,9 +1634,9 @@ } }, "node_modules/@babel/plugin-transform-runtime/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -1846,9 +1846,9 @@ } }, "node_modules/@babel/preset-env/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -2959,9 +2959,9 @@ } }, "node_modules/@mdx-js/mdx/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "bin": { "semver": "bin/semver" } @@ -4366,9 +4366,9 @@ } }, "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -6812,9 +6812,9 @@ } }, "node_modules/eslint-plugin-react/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -9456,9 +9456,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -11353,9 +11353,9 @@ } }, "node_modules/package-json/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -13008,9 +13008,9 @@ } }, "node_modules/remark-mdx/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "bin": { "semver": "bin/semver" } @@ -13522,9 +13522,9 @@ } }, "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -13547,9 +13547,9 @@ } }, "node_modules/semver-diff/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -16203,9 +16203,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" } } }, @@ -16260,9 +16260,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" } } }, @@ -16303,9 +16303,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" } } }, @@ -17113,9 +17113,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" } } }, @@ -17270,9 +17270,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" } } }, @@ -18097,9 +18097,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" }, "source-map": { "version": "0.5.7", @@ -19210,9 +19210,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" } } }, @@ -20999,9 +20999,9 @@ } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -22887,9 +22887,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" } } }, @@ -24147,9 +24147,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" } } }, @@ -25310,9 +25310,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" }, "source-map": { "version": "0.5.7", @@ -25676,9 +25676,9 @@ } }, "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "requires": { "lru-cache": "^6.0.0" } @@ -25692,9 +25692,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" } } }, From 73e1b526d56376be09908a3726fbe9553052e447 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 19 Jul 2023 14:59:40 +0000 Subject: [PATCH 058/160] fix(bluetooth): Properly clear peripheral slots * When the clear bonds Kconfig is set, also clear peripheral address slots addresses from settings as well. --- app/src/ble.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/app/src/ble.c b/app/src/ble.c index ff82f3cf40a..6607574cc44 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -606,7 +606,7 @@ static int zmk_ble_init(const struct device *_arg) { bt_unpair(BT_ID_DEFAULT, NULL); - for (int i = 0; i < ZMK_BLE_PROFILE_COUNT; i++) { + for (int i = 0; i < 8; i++) { char setting_name[15]; sprintf(setting_name, "ble/profiles/%d", i); @@ -615,7 +615,20 @@ static int zmk_ble_init(const struct device *_arg) { LOG_ERR("Failed to delete setting: %d", err); } } -#endif + + // Hardcoding a reasonable hardcoded value of peripheral addresses + // to clear so we properly clear a split central as well. + for (int i = 0; i < 8; i++) { + char setting_name[32]; + sprintf(setting_name, "ble/peripheral_addresses/%d", i); + + err = settings_delete(setting_name); + if (err) { + LOG_ERR("Failed to delete setting: %d", err); + } + } + +#endif // IS_ENABLED(CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START) bt_conn_cb_register(&conn_callbacks); bt_conn_auth_cb_register(&zmk_ble_auth_cb_display); From ed400c4feb7955bdc839fbf33b463a73c898a033 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 19 Jul 2023 16:21:06 +0000 Subject: [PATCH 059/160] fix(bluetooth): Corrected use of `bt_addr_le_cmp` * Properly compare to zero when comparing LE addresses. --- app/src/ble.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/ble.c b/app/src/ble.c index 6607574cc44..38a9833c991 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -281,14 +281,14 @@ int zmk_ble_put_peripheral_addr(const bt_addr_le_t *addr) { for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { // If the address is recognized and already stored in settings, return // index and no additional action is necessary. - if (!bt_addr_le_cmp(&peripheral_addrs[i], addr)) { + if (bt_addr_le_cmp(&peripheral_addrs[i], addr) == 0) { return i; } // If the peripheral address slot is open, store new peripheral in the // slot and return index. This compares against BT_ADDR_LE_ANY as that // is the zero value. - if (!bt_addr_le_cmp(&peripheral_addrs[i], BT_ADDR_LE_ANY)) { + if (bt_addr_le_cmp(&peripheral_addrs[i], BT_ADDR_LE_ANY) == 0) { char addr_str[BT_ADDR_LE_STR_LEN]; bt_addr_le_to_str(addr, addr_str, sizeof(addr_str)); LOG_DBG("Storing peripheral %s in slot %d", addr_str, i); From 54c2e8e155e9be71026251946c98e8e45c989388 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 20 Jul 2023 06:35:41 +0000 Subject: [PATCH 060/160] feat: Add more logging to peripheral settings. --- app/src/ble.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/ble.c b/app/src/ble.c index 38a9833c991..483bc9d79c1 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -282,7 +282,12 @@ int zmk_ble_put_peripheral_addr(const bt_addr_le_t *addr) { // If the address is recognized and already stored in settings, return // index and no additional action is necessary. if (bt_addr_le_cmp(&peripheral_addrs[i], addr) == 0) { + LOG_DBG("Found existing peripheral address in slot %d", i); return i; + } else { + char addr_str[BT_ADDR_LE_STR_LEN]; + bt_addr_le_to_str(&peripheral_addrs[i], addr_str, sizeof(addr_str)); + LOG_DBG("peripheral slot %d occupied by %s", i, addr_str); } // If the peripheral address slot is open, store new peripheral in the From 5f6a13413bba84eeb1eb89c4ff2a5710ca552e6b Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 20 Jul 2023 23:34:09 -0700 Subject: [PATCH 061/160] fix(bluetooth): Split improvements * Proper usage of bt_uuid_cmp. * Central's don't start scanning for peripherals if `ZMK_BLE_CLEAR_BONDS_ON_START` is enabled. * Split peripherals don't advertize if `ZMK_BLE_CLEAR_BONDS_ON_START` is enabled. --- app/src/split/bluetooth/central.c | 15 ++++++++------- app/src/split/bluetooth/peripheral.c | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index 147760ffae7..8a5e9d35c5a 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -251,8 +251,8 @@ static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn, LOG_DBG("[ATTRIBUTE] handle %u", attr->handle); - if (!bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid, - BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID))) { + if (bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid, + BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID)) == 0) { LOG_DBG("Found position state characteristic"); slot->discover_params.uuid = NULL; slot->discover_params.start_handle = attr->handle + 2; @@ -264,8 +264,8 @@ static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn, slot->subscribe_params.notify = split_central_notify_func; slot->subscribe_params.value = BT_GATT_CCC_NOTIFY; split_central_subscribe(conn); - } else if (!bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid, - BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_RUN_BEHAVIOR_UUID))) { + } else if (bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid, + BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_RUN_BEHAVIOR_UUID)) == 0) { LOG_DBG("Found run behavior handle"); slot->run_behavior_handle = bt_gatt_attr_value_handle(attr); } @@ -292,7 +292,8 @@ static uint8_t split_central_service_discovery_func(struct bt_conn *conn, return BT_GATT_ITER_STOP; } - if (bt_uuid_cmp(slot->discover_params.uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SERVICE_UUID))) { + if (bt_uuid_cmp(slot->discover_params.uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SERVICE_UUID)) != + 0) { LOG_DBG("Found other service"); return BT_GATT_ITER_CONTINUE; } @@ -418,7 +419,7 @@ static bool split_central_eir_parse(struct bt_data *data, void *user_data) { continue; } - if (bt_uuid_cmp(&uuid.uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SERVICE_UUID))) { + if (bt_uuid_cmp(&uuid.uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SERVICE_UUID)) != 0) { char uuid_str[BT_UUID_STR_LEN]; char service_uuid_str[BT_UUID_STR_LEN]; @@ -622,7 +623,7 @@ int zmk_split_bt_central_init(const struct device *_arg) { CONFIG_ZMK_BLE_THREAD_PRIORITY, NULL); bt_conn_cb_register(&conn_callbacks); - return start_scanning(); + return IS_ENABLED(CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START) ? 0 : start_scanning(); } SYS_INIT(zmk_split_bt_central_init, APPLICATION, CONFIG_ZMK_BLE_INIT_PRIORITY); diff --git a/app/src/split/bluetooth/peripheral.c b/app/src/split/bluetooth/peripheral.c index 6b767baa7c1..e053db8a61a 100644 --- a/app/src/split/bluetooth/peripheral.c +++ b/app/src/split/bluetooth/peripheral.c @@ -116,11 +116,11 @@ static int zmk_peripheral_ble_init(const struct device *_arg) { LOG_WRN("Clearing all existing BLE bond information from the keyboard"); bt_unpair(BT_ID_DEFAULT, NULL); -#endif - +#else bt_conn_cb_register(&conn_callbacks); start_advertising(); +#endif return 0; } From 147f7f23dca7a2eb5d7433d399948cfd51e068a9 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 20 Jul 2023 23:53:38 -0700 Subject: [PATCH 062/160] fix(shields): Make settings_reset more flexible. * Don't reference `pro_micro` nexus node in settings_reset so it can be used with other controllers. * Use mock kscan node instead. --- app/boards/shields/settings_reset/settings_reset.keymap | 4 +--- app/boards/shields/settings_reset/settings_reset.overlay | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/boards/shields/settings_reset/settings_reset.keymap b/app/boards/shields/settings_reset/settings_reset.keymap index 0afdcc2bf35..1206ef1e363 100644 --- a/app/boards/shields/settings_reset/settings_reset.keymap +++ b/app/boards/shields/settings_reset/settings_reset.keymap @@ -12,9 +12,7 @@ compatible = "zmk,keymap"; default_layer { - bindings = < - &sys_reset - >; + bindings = <&sys_reset>; }; }; }; diff --git a/app/boards/shields/settings_reset/settings_reset.overlay b/app/boards/shields/settings_reset/settings_reset.overlay index 77a9d85871d..48a5f223b65 100644 --- a/app/boards/shields/settings_reset/settings_reset.overlay +++ b/app/boards/shields/settings_reset/settings_reset.overlay @@ -12,12 +12,12 @@ }; kscan0: kscan { - compatible = "zmk,kscan-gpio-direct"; + compatible = "zmk,kscan-mock"; label = "KSCAN"; + columns = <1>; + rows = <0>; - input-gpios - = <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; + events = <>; }; }; From f743d57ff1d4d68f51fb11b99fc0217eeca42919 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 10 Jul 2023 22:44:44 -0700 Subject: [PATCH 063/160] feat(shields): Add splitkb.com Aurora Sofle * Add new shield for splitkb.com Aurora Sofle, supporting keys, encoder(s), displays, and RGB. Co-authored-by: Cem Aksoylar --- .../splitkb_aurora_sofle/Kconfig.defconfig | 53 +++++++++++++ .../splitkb_aurora_sofle/Kconfig.shield | 8 ++ .../boards/nice_nano.overlay | 46 +++++++++++ .../boards/nice_nano_v2.overlay | 46 +++++++++++ .../splitkb_aurora_sofle.conf | 9 +++ .../splitkb_aurora_sofle.dtsi | 79 +++++++++++++++++++ .../splitkb_aurora_sofle.keymap | 78 ++++++++++++++++++ .../splitkb_aurora_sofle.zmk.yml | 15 ++++ .../splitkb_aurora_sofle_left.overlay | 43 ++++++++++ .../splitkb_aurora_sofle_right.overlay | 45 +++++++++++ 10 files changed, 422 insertions(+) create mode 100644 app/boards/shields/splitkb_aurora_sofle/Kconfig.defconfig create mode 100644 app/boards/shields/splitkb_aurora_sofle/Kconfig.shield create mode 100644 app/boards/shields/splitkb_aurora_sofle/boards/nice_nano.overlay create mode 100644 app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.conf create mode 100644 app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi create mode 100644 app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.keymap create mode 100644 app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.zmk.yml create mode 100644 app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_left.overlay create mode 100644 app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_right.overlay diff --git a/app/boards/shields/splitkb_aurora_sofle/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_sofle/Kconfig.defconfig new file mode 100644 index 00000000000..b53c4c8dc16 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_sofle/Kconfig.defconfig @@ -0,0 +1,53 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_SPLITKB_AURORA_SOFLE_LEFT + +config ZMK_KEYBOARD_NAME + default "Aurora Sofle" + +config ZMK_SPLIT_ROLE_CENTRAL + default y + +endif # SHIELD_SPLITKB_AURORA_SOFLE_LEFT + +if SHIELD_SPLITKB_AURORA_SOFLE_LEFT || SHIELD_SPLITKB_AURORA_SOFLE_RIGHT + +config ZMK_SPLIT + default y + +config ZMK_RGB_UNDERGLOW + select WS2812_STRIP + select SPI + +if ZMK_DISPLAY + +config SSD1306 + default y + +config I2C + default y + +config SSD1306_REVERSE_MODE + default y + +endif # ZMK_DISPLAY + +if LVGL + +config LV_Z_VDB_SIZE + default 64 + +config LV_DPI_DEF + default 148 + +config LV_Z_BITS_PER_PIXEL + default 1 + +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 +endchoice + +endif # LVGL + +endif # SHIELD_SPLITKB_AURORA_SOFLE_LEFT || SHIELD_SPLITKB_AURORA_SOFLE_RIGHT diff --git a/app/boards/shields/splitkb_aurora_sofle/Kconfig.shield b/app/boards/shields/splitkb_aurora_sofle/Kconfig.shield new file mode 100644 index 00000000000..c72e95d9d0f --- /dev/null +++ b/app/boards/shields/splitkb_aurora_sofle/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_SPLITKB_AURORA_SOFLE_LEFT + def_bool $(shields_list_contains,splitkb_aurora_sofle_left) + +config SHIELD_SPLITKB_AURORA_SOFLE_RIGHT + def_bool $(shields_list_contains,splitkb_aurora_sofle_right) diff --git a/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano.overlay new file mode 100644 index 00000000000..8f1629ced14 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano.overlay @@ -0,0 +1,46 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <6>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay new file mode 100644 index 00000000000..8f1629ced14 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay @@ -0,0 +1,46 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <6>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.conf b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.conf new file mode 100644 index 00000000000..d456100ab74 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.conf @@ -0,0 +1,9 @@ +# Uncomment these two line to add support for encoders to your firmware +# CONFIG_EC11=y +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y + +# Uncomment the following line to enable the OLED Display +# CONFIG_ZMK_DISPLAY=y + +# Uncomment the following lines to enable RGB underglow +# CONFIG_ZMK_RGB_UNDERGLOW=y diff --git a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi new file mode 100644 index 00000000000..798cd84e5f3 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + + chosen { + zephyr,display = &oled; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <5>; +// | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | +// | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | +// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | +// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 | | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | +// | SW30 | SW29 | SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | SW29 | SW30 | + 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,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) + RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) + >; + }; + + left_encoder: left_encoder { + compatible = "alps,ec11"; + label = "L_ENCODER"; + steps = <144>; + status = "disabled"; + + a-gpios = <&pro_micro 16 GPIO_PULL_UP>; + b-gpios = <&pro_micro 10 GPIO_PULL_UP>; + }; + + right_encoder: right_encoder { + compatible = "alps,ec11"; + label = "R_ENCODER"; + steps = <144>; + status = "disabled"; + + a-gpios = <&pro_micro 16 GPIO_PULL_UP>; + b-gpios = <&pro_micro 10 GPIO_PULL_UP>; + }; + + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <36>; + }; +}; + +&pro_micro_i2c { + status = "okay"; + + oled: ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + segment-remap; + com-invdir; + com-sequential; + prechargep = <0x22>; + }; +}; diff --git a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.keymap b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.keymap new file mode 100644 index 00000000000..23127416762 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.keymap @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include + +/* Uncomment this block if using RGB +&led_strip { + chain-length = <6>; + // chain-length = <35>; // Uncomment if using both per-key and underglow LEDs + // chain-length = <29>; // Uncomment if using only per-key LEDs. +}; + */ + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { +// ------------------------------------------------------------------------------------------------------------ +// | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | +// | TAB | Q | W | E | R | T | | Y | U | I | O | P | - | +// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | +// | SHIFT | Z | X | C | V | B | "[" | | "]" | N | M | , | . | / | SHIFT | +// |CTRL | ALT | GUI | LOWER| SPACE | | ENTER | RAISE| BSPC | GUI | RALT | + bindings = < +&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp GRAVE +&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp MINUS +&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT +&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LBKT &kp RBKT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT + &kp LCTRL &kp LALT &kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp BSPC &kp RGUI &kp RALT + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + + lower_layer { +// ------------------------------------------------------------------------------------------------------------ +// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | +// | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | +// | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ | +// | | | | | | | | | | | _ | + | { | } | "|" | +// | | | | | | | | | | | | + bindings = < +&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans +&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 +&kp GRAVE &kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &kp TILDE +&trans &ext_power EP_ON &ext_power EP_OFF &ext_power EP_TOG &trans &trans &trans &trans &trans &kp MINUS &kp PLUS &kp LBRC &kp RBRC &kp PIPE + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + + raise_layer { +// ------------------------------------------------------------------------------------------------------------ +// | | | | | | | | | | | | | | +// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | +// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | v | ^ | -> | | +// | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ | +// | | | | | | | | | | | | + bindings = < +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans +&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans +&kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &kp KP_PLUS &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + }; +}; diff --git a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.zmk.yml b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.zmk.yml new file mode 100644 index 00000000000..d832d3e1053 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.zmk.yml @@ -0,0 +1,15 @@ +file_format: "1" +id: splitkb_aurora_sofle +name: splitkb.com Aurora Sofle +type: shield +url: https://splitkb.com/products/aurora-sofle-pcb-kit +requires: [pro_micro] +exposes: [i2c_oled] +features: + - keys + - display + - encoder + - underglow +siblings: + - splitkb_aurora_sofle_left + - splitkb_aurora_sofle_right diff --git a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_left.overlay b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_left.overlay new file mode 100644 index 00000000000..1adaf401563 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_left.overlay @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "splitkb_aurora_sofle.dtsi" + +/ { + chosen { + zmk,kscan = &kscan; + }; + + kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; + + label = "KSCAN"; + diode-direction = "col2row"; + + row-gpios + = <&pro_micro 20 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 18 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 19 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 14 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + ; + + col-gpios + = <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 7 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 4 GPIO_ACTIVE_HIGH> + ; + }; +}; + +&left_encoder { + status = "okay"; +}; + + diff --git a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_right.overlay b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_right.overlay new file mode 100644 index 00000000000..3249b94193c --- /dev/null +++ b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_right.overlay @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "splitkb_aurora_sofle.dtsi" + +/ { + chosen { + zmk,kscan = &kscan; + }; + + kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; + + label = "KSCAN"; + diode-direction = "col2row"; + + row-gpios + = <&pro_micro 14 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 18 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 19 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 20 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + ; + + col-gpios + = <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 7 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + ; + }; +}; + +&right_encoder { + status = "okay"; +}; + +&default_transform { + col-offset = <6>; +}; From 9a963abfc8b27c6fdfb5b6b4b38e5905d6a360a7 Mon Sep 17 00:00:00 2001 From: Xudong Zheng <7pkvm5aw@slicealias.com> Date: Mon, 17 Jul 2023 17:16:04 -0400 Subject: [PATCH 064/160] refactor: use low priority workqueue for underglow and battery reporting Blocking operations on the high priority system workqueue may result in deadlocks, particularly when Bluetooth is in use. --- app/CMakeLists.txt | 1 + app/Kconfig | 8 ++++++++ app/include/zmk/workqueue.h | 1 + app/src/battery.c | 14 +++++--------- app/src/rgb_underglow.c | 3 ++- app/src/workqueue.c | 27 +++++++++++++++++++++++++++ 6 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 app/include/zmk/workqueue.h create mode 100644 app/src/workqueue.c diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 4c1c63c2cfa..efa349052cf 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -87,6 +87,7 @@ target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/usb.c) target_sources_ifdef(CONFIG_ZMK_USB app PRIVATE src/usb_hid.c) target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/rgb_underglow.c) target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/backlight.c) +target_sources(app PRIVATE src/workqueue.c) target_sources(app PRIVATE src/main.c) add_subdirectory(src/display/) diff --git a/app/Kconfig b/app/Kconfig index fe019918cbb..89a128b5a27 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -504,6 +504,14 @@ config ZMK_BATTERY_REPORT_INTERVAL int "Battery level report interval in seconds" default 60 +config ZMK_LOW_PRIORITY_THREAD_STACK_SIZE + int "Low priority thread stack size" + default 768 + +config ZMK_LOW_PRIORITY_THREAD_PRIORITY + int "Low priority thread priority" + default 10 + #Advanced endmenu diff --git a/app/include/zmk/workqueue.h b/app/include/zmk/workqueue.h new file mode 100644 index 00000000000..41e94580846 --- /dev/null +++ b/app/include/zmk/workqueue.h @@ -0,0 +1 @@ +struct k_work_q *zmk_workqueue_lowprio_work_q(); diff --git a/app/src/battery.c b/app/src/battery.c index 540f7c3eab0..87a25e08a2d 100644 --- a/app/src/battery.c +++ b/app/src/battery.c @@ -18,6 +18,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include +#include static uint8_t last_state_of_charge = 0; @@ -77,7 +78,9 @@ static void zmk_battery_work(struct k_work *work) { K_WORK_DEFINE(battery_work, zmk_battery_work); -static void zmk_battery_timer(struct k_timer *timer) { k_work_submit(&battery_work); } +static void zmk_battery_timer(struct k_timer *timer) { + k_work_submit_to_queue(zmk_workqueue_lowprio_work_q(), &battery_work); +} K_TIMER_DEFINE(battery_timer, zmk_battery_timer, NULL); @@ -97,14 +100,7 @@ static int zmk_battery_init(const struct device *_arg) { return -ENODEV; } - int rc = zmk_battery_update(battery); - - if (rc != 0) { - LOG_DBG("Failed to update battery value: %d.", rc); - return rc; - } - - k_timer_start(&battery_timer, K_MINUTES(1), K_SECONDS(CONFIG_ZMK_BATTERY_REPORT_INTERVAL)); + k_timer_start(&battery_timer, K_NO_WAIT, K_SECONDS(CONFIG_ZMK_BATTERY_REPORT_INTERVAL)); return 0; } diff --git a/app/src/rgb_underglow.c b/app/src/rgb_underglow.c index 7b6491749e2..08ba2fb233e 100644 --- a/app/src/rgb_underglow.c +++ b/app/src/rgb_underglow.c @@ -24,6 +24,7 @@ #include #include #include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); @@ -203,7 +204,7 @@ static void zmk_rgb_underglow_tick_handler(struct k_timer *timer) { return; } - k_work_submit(&underglow_work); + k_work_submit_to_queue(zmk_workqueue_lowprio_work_q(), &underglow_work); } K_TIMER_DEFINE(underglow_tick, zmk_rgb_underglow_tick_handler, NULL); diff --git a/app/src/workqueue.c b/app/src/workqueue.c new file mode 100644 index 00000000000..a9a8bce5202 --- /dev/null +++ b/app/src/workqueue.c @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +#include + +K_THREAD_STACK_DEFINE(lowprio_q_stack, CONFIG_ZMK_LOW_PRIORITY_THREAD_STACK_SIZE); + +static struct k_work_q lowprio_work_q; + +struct k_work_q *zmk_workqueue_lowprio_work_q() { + return &lowprio_work_q; +} + +static int workqueue_init() { + static const struct k_work_queue_config queue_config = {.name = "Low Priority Work Queue"}; + k_work_queue_start(&lowprio_work_q, lowprio_q_stack, K_THREAD_STACK_SIZEOF(lowprio_q_stack), + CONFIG_ZMK_LOW_PRIORITY_THREAD_PRIORITY, &queue_config); + return 0; +} + +SYS_INIT(workqueue_init, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); From cb9c573b534dcb52ee8cf6b2cec6cb880e841301 Mon Sep 17 00:00:00 2001 From: Xudong Zheng <7pkvm5aw@slicealias.com> Date: Mon, 17 Jul 2023 17:32:14 -0400 Subject: [PATCH 065/160] refactor(underglow): turn underglow off in low priority work queue --- app/src/rgb_underglow.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/app/src/rgb_underglow.c b/app/src/rgb_underglow.c index 08ba2fb233e..b80d403953f 100644 --- a/app/src/rgb_underglow.c +++ b/app/src/rgb_underglow.c @@ -197,14 +197,14 @@ static void zmk_rgb_underglow_tick(struct k_work *work) { } } -K_WORK_DEFINE(underglow_work, zmk_rgb_underglow_tick); +K_WORK_DEFINE(underglow_tick_work, zmk_rgb_underglow_tick); static void zmk_rgb_underglow_tick_handler(struct k_timer *timer) { if (!state.on) { return; } - k_work_submit_to_queue(zmk_workqueue_lowprio_work_q(), &underglow_work); + k_work_submit_to_queue(zmk_workqueue_lowprio_work_q(), &underglow_tick_work); } K_TIMER_DEFINE(underglow_tick, zmk_rgb_underglow_tick_handler, NULL); @@ -323,6 +323,16 @@ int zmk_rgb_underglow_on() { return zmk_rgb_underglow_save_state(); } +static void zmk_rgb_underglow_off_handler(struct k_work *work) { + for (int i = 0; i < STRIP_NUM_PIXELS; i++) { + pixels[i] = (struct led_rgb){r : 0, g : 0, b : 0}; + } + + led_strip_update_rgb(led_strip, pixels, STRIP_NUM_PIXELS); +} + +K_WORK_DEFINE(underglow_off_work, zmk_rgb_underglow_off_handler); + int zmk_rgb_underglow_off() { if (!led_strip) return -ENODEV; @@ -336,11 +346,7 @@ int zmk_rgb_underglow_off() { } #endif - for (int i = 0; i < STRIP_NUM_PIXELS; i++) { - pixels[i] = (struct led_rgb){r : 0, g : 0, b : 0}; - } - - led_strip_update_rgb(led_strip, pixels, STRIP_NUM_PIXELS); + k_work_submit_to_queue(zmk_workqueue_lowprio_work_q(), &underglow_off_work); k_timer_stop(&underglow_tick); state.on = false; From e65a7e3075a7a153ea478d4fd293ae65b31e33ed Mon Sep 17 00:00:00 2001 From: Xudong Zheng <7pkvm5aw@slicealias.com> Date: Thu, 20 Jul 2023 16:48:02 -0400 Subject: [PATCH 066/160] fix(battery): change nRF52 ADC gain With ADC pin, maximum 3.6V input needs gain 1/6 to be less than the 0.6V reference. With VDDHDIV5, maximum 6V input corresponds to 1.2V so gain 1/2 will be less than the 0.6V reference and be slightly more precise. --- app/drivers/sensor/battery/battery_nrf_vddh.c | 2 +- app/drivers/sensor/battery/battery_voltage_divider.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/drivers/sensor/battery/battery_nrf_vddh.c b/app/drivers/sensor/battery/battery_nrf_vddh.c index 3f230812f4b..32c7c61eb82 100644 --- a/app/drivers/sensor/battery/battery_nrf_vddh.c +++ b/app/drivers/sensor/battery/battery_nrf_vddh.c @@ -93,7 +93,7 @@ static int vddh_init(const struct device *dev) { #ifdef CONFIG_ADC_NRFX_SAADC drv_data->acc = (struct adc_channel_cfg){ - .gain = ADC_GAIN_1_5, + .gain = ADC_GAIN_1_2, .reference = ADC_REF_INTERNAL, .acquisition_time = ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 40), .input_positive = SAADC_CH_PSELN_PSELN_VDDHDIV5, diff --git a/app/drivers/sensor/battery/battery_voltage_divider.c b/app/drivers/sensor/battery/battery_voltage_divider.c index 655af3dbd74..62a02e9c3df 100644 --- a/app/drivers/sensor/battery/battery_voltage_divider.c +++ b/app/drivers/sensor/battery/battery_voltage_divider.c @@ -140,7 +140,7 @@ static int bvd_init(const struct device *dev) { #ifdef CONFIG_ADC_NRFX_SAADC drv_data->acc = (struct adc_channel_cfg){ - .gain = ADC_GAIN_1_5, + .gain = ADC_GAIN_1_6, .reference = ADC_REF_INTERNAL, .acquisition_time = ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 40), .input_positive = SAADC_CH_PSELP_PSELP_AnalogInput0 + drv_cfg->io_channel.channel, From d17c473d45b3bd01d80b8a5eab417986be0281da Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Wed, 2 Aug 2023 12:57:00 -0400 Subject: [PATCH 067/160] feat(docs): Improve parameterized macros docs --- docs/docs/behaviors/macros.md | 150 +++++++++++++++++++++++----------- docs/docs/config/behaviors.md | 37 +++++---- 2 files changed, 122 insertions(+), 65 deletions(-) diff --git a/docs/docs/behaviors/macros.md b/docs/docs/behaviors/macros.md index 279d135697c..0757e735285 100644 --- a/docs/docs/behaviors/macros.md +++ b/docs/docs/behaviors/macros.md @@ -49,22 +49,6 @@ For use cases involving sending a single keycode with modifiers, for instance ct with [modifier functions](../codes/modifiers.mdx#modifier-functions) can be used instead of a macro. ::: -### Parameterized Macros - -Macros can also be "parameterized", allowing them to be bound in your keymap with unique values passed into them, e.g.: - -``` - raise_layer { - bindings = <&my_cool_macro A> - }; -``` - -When defining a parameterized macro, a different `compatible` value will be used depending on how many parameters are passed into it: - -- `zmk,behavior-macro` - a macro that takes no parameters. -- `zmk,behavior-macro-one-param` - a macro that takes one parameter when used. -- `zmk,behavior-macro-two-param` - a macro that takes two parameters when used. - ### Bindings Like [hold-taps](/docs/behaviors/hold-tap), macros are created by composing other behaviors, and any of those behaviors can @@ -83,30 +67,6 @@ bindings There are a set of special macro controls that can be included in the `bindings` list to modify the way the macro is processed. -### Parameters - -When creating a macro that takes parameter(s), there are macro controls that change when the parameters passed to the macro are used -within the macro itself. All of the controls are "one shot" and will change how the passed in parameters are used for the very next non-macro control behavior in the `bindings` list of the macro. - -For example, to pass the first parameter from the macro into a `&kp` used in the macro, you would use: - -``` -bindings - = <¯o_param_1to1> - , <&kp MACRO_PLACEHOLDER> - ; -``` - -Because `kp` takes one parameter, you can't simply make the second entry `<&kp>` in the `bindings` list. Whatever value you do pass in will be replaced when the macro is triggered, so you can put _any_ value there, e.g. `0`, `A` keycode, etc. To make it very obvious that the parameter there is not actually going to be used, you can use `MACRO_PLACEHOLDER` which is simply an alias for `0`. - -The available parameter controls are: - -- `¯o_param_1to1` - pass the first parameter of the macro into the first parameter of the next behavior in the `bindings` list. -- `¯o_param_1to2` - pass the first parameter of the macro into the second parameter of the next behavior in the `bindings` list. - -* `¯o_param_2to1` - pass the second parameter of the macro into the first parameter of the next behavior in the `bindings` list. -* `¯o_param_2to2` - pass the second parameter of the macro into the second parameter of the next behavior in the `bindings` list. - ### Binding Activation Mode Bindings in a macro are activated differently, depending on the current "activation mode" of the macro. @@ -185,6 +145,70 @@ Macros use an internal queue to invoke each behavior in the bindings list when t To prevent issues with longer macros, you can change the size of this queue via the `CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE` setting in your configuration, [typically through your `.conf` file](../config/index.md). For example, `CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE=512` would allow your macro to type about 256 characters. +## Parameterized Macros + +Macros can also be "parameterized", allowing them to be bound in your keymap with unique values passed into them, e.g.: + +``` + raise_layer { + bindings = <&my_one_param_macro A> + }; +``` + +### Defining Parameterized Macros + +Parameterized macros must be defined using specific values for the `compatible` and `#binding-cells` properties, depending on how many parameters they require (up to a maximum of two): + +```dts +/ { + macros { + // 0 params macro + my_macro: my_macro { + // ... + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; // Must be 0 + bindings = /* ... */; + }; + + // 1 param macro + my_one_param_macro: my_one_param_macro { + // ... + compatible = "zmk,behavior-macro-one-param"; + #binding-cells = <1>; // Must be 1 + bindings = /* ... */; + }; + + // 2 params macro + my_two_param_macro: my_two_param_macro { + // ... + compatible = "zmk,behavior-macro-two-param"; + #binding-cells = <2>; // Must be 2 + bindings = /* ... */; + }; + }; +}; +``` + +### Parameters, Bindings and Controls + +There are special macro controls which must be used in order to forward received parameters to the macro's `bindings`. These controls are "one shot" and will determine how received parameters are used on the very next (non-macro control) behavior in the macro's `bindings` list. + +For example, to pass the first parameter received into a `&kp` binding, you would use: + +```dts +bindings = <¯o_param_1to1>, <&kp MACRO_PLACEHOLDER>; +``` + +Because `kp` takes one parameter, you can't simply make the second entry `<&kp>` in the `bindings` list. Whatever value you do pass in will be replaced when the macro is triggered, so you can put _any_ value there, e.g. `0`, `A` keycode, etc. To make it very obvious that the parameter there is not actually going to be used, you can use `MACRO_PLACEHOLDER` which is simply an alias for `0`. + +The available parameter controls are: + +- `¯o_param_1to1` - pass the first parameter of the macro into the first parameter of the next behavior in the `bindings` list. +- `¯o_param_1to2` - pass the first parameter of the macro into the second parameter of the next behavior in the `bindings` list. + +* `¯o_param_2to1` - pass the second parameter of the macro into the first parameter of the next behavior in the `bindings` list. +* `¯o_param_2to2` - pass the second parameter of the macro into the second parameter of the next behavior in the `bindings` list. + ## Common Patterns Below are some examples of how the macro behavior can be used for various useful functionality. @@ -198,12 +222,36 @@ To achieve this, a combination of a 0ms wait time and splitting the press and re #### Layer + Modifier -``` -wait-ms = <0>; -bindings - = <¯o_press &mo 1 &kp LSHFT> - , <¯o_pause_for_release> - , <¯o_release &mo 1 &kp LSHFT>; +```dts +/** + * Temporarily switches to a layer (`&mo`) while a modifier is held. + * Analogous to QMK's `LM()`, using a parameterized macro. + * + * Params: + * 1. Layer to switch to + * 2. Modifier to press while layer is active + * + * Example: + * `&lm NUM_LAYER LSHIFT` + */ +lm: lm { + label = "LAYER_MOD"; + compatible = "zmk,behavior-macro-two-param"; + wait-ms = <0>; + tap-ms = <0>; + #binding-cells = <2>; + bindings + = <¯o_param_1to1> + , <¯o_press &mo MACRO_PLACEHOLDER> + , <¯o_param_2to1> + , <¯o_press &kp MACRO_PLACEHOLDER> + , <¯o_pause_for_release> + , <¯o_param_2to1> + , <¯o_release &kp MACRO_PLACEHOLDER> + , <¯o_param_1to1> + , <¯o_release &mo MACRO_PLACEHOLDER> + ; +}; ``` #### Layer + Underglow Color @@ -252,20 +300,24 @@ bindings ## Convenience C Macro -To avoid repetition or possible typos when declaring a macro, a convenience _C_ macro, named `ZMK_MACRO(name, props)` can be used to simplify things: +To avoid repetition or possible typos when declaring a **zero parameter macro**, a convenience _C_ macro, named `ZMK_MACRO(name, props)` can be used to simplify things: ``` - ZMK_MACRO(my_macro, + ZMK_MACRO(my_zero_param_macro, wait-ms = <30>; tap-ms = <40>; bindings = <&kp Z &kp M &kp K>; ) ``` +:::note +`ZMK_MACRO()` **only supports declaring non-parameterized (zero parameter) macros**; parameterized declarations are not currently supported. +::: + This can be used instead of a complete macro definition. During the firmware build process, the example above would produce the complete macro definition below: ``` - my_macro: my_macro { + my_zero_param_macro: my_zero_param_macro { compatible = "zmk,behavior-macro"; label = "ZM_my_macro"; #binding-cells = <0>; diff --git a/docs/docs/config/behaviors.md b/docs/docs/config/behaviors.md index 2ff99d58cbb..60e8b72abca 100644 --- a/docs/docs/config/behaviors.md +++ b/docs/docs/config/behaviors.md @@ -131,26 +131,31 @@ See the [macro behavior](../behaviors/macros.md) documentation for more details Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-macro.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-macro.yaml) -Applies to: `compatible = "zmk,behavior-macro"` +| Property | Type | Description | Default | +| ---------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | +| `label` | string | Unique label for the node | | +| `compatible` | string | Macro type, **must be _one_ of**:
• `"zmk,behavior-macro"`
• `"zmk,behavior-macro-one-param"`
• `"zmk,behavior-macro-two-param"` | | +| `#binding-cells` | int | Number of params accepted (depends on `compatible` property), **must be _one_ of**:
• `<0>`
• `<1>`
• `<2>` | | +| `bindings` | phandle array | List of behaviors to trigger | | +| `wait-ms` | int | The default time to wait (in milliseconds) before triggering the next behavior. | `CONFIG_ZMK_MACRO_DEFAULT_WAIT_MS` | +| `tap-ms` | int | The default time to wait (in milliseconds) between the press and release events of a tapped behavior. | `CONFIG_ZMK_MACRO_DEFAULT_TAP_MS` | -| Property | Type | Description | Default | -| ---------------- | ------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------- | -| `label` | string | Unique label for the node | | -| `#binding-cells` | int | Must be `<0>` | | -| `bindings` | phandle array | List of behaviors to trigger | | -| `wait-ms` | int | The default time to wait (in milliseconds) before triggering the next behavior. | `CONFIG_ZMK_MACRO_DEFAULT_WAIT_MS` | -| `tap-ms` | int | The default time to wait (in milliseconds) between the press and release events of a tapped behavior. | `CONFIG_ZMK_MACRO_DEFAULT_TAP_MS` | +### Macro Control Behaviors The following macro-specific behaviors can be added at any point in the `bindings` list to change how the macro triggers subsequent behaviors. -| Behavior | Description | -| -------------------------- | ----------------------------------------------------------------------------------------------------- | -| `¯o_tap` | Switches to tap mode | -| `¯o_press` | Switches to press mode | -| `¯o_release` | Switches to release mode | -| `¯o_pause_for_release` | Pauses the macro until the macro key itself is released | -| `¯o_wait_time TIME` | Changes the time to wait (in milliseconds) before triggering the next behavior. | -| `¯o_tap_time TIME` | Changes the time to wait (in milliseconds) between the press and release events of a tapped behavior. | +| Behavior | Description | +| -------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `¯o_tap` | Switches to tap mode | +| `¯o_press` | Switches to press mode | +| `¯o_release` | Switches to release mode | +| `¯o_pause_for_release` | Pauses the macro until the macro key itself is released | +| `¯o_wait_time TIME` | Changes the time to wait (in milliseconds) before triggering the next behavior. | +| `¯o_tap_time TIME` | Changes the time to wait (in milliseconds) between the press and release events of a tapped behavior. | +| `¯o_param_1to1` | Forward the first parameter received by the macro to the first parameter of the next (non-macro control) behavior. | +| `¯o_param_1to2` | Forward the first parameter received by the macro to the second parameter of the next (non-macro control) behavior. | +| `¯o_param_2to1` | Forward the second parameter received by the macro to the first parameter of the next (non-macro control) behavior. | +| `¯o_param_2to2` | Forward the second parameter received by the macro to the second parameter of the next (non-macro control) behavior. | ## Mod-Morph From c957348e6187ffde3c073e8c367a60a7ee16b12c Mon Sep 17 00:00:00 2001 From: Seth Milliken Date: Tue, 8 Aug 2023 15:12:46 -0700 Subject: [PATCH 068/160] fix(docs): detail overriding the `led_strip` `chain-length` property Quite a few people have struggled with setting the correct `chain-length` for their `led_strip`. For some, this is their first time needing to change a pre-defined devicetree property, and so they aren't familiar with the technique. I commonly see folks adding a duplicate of the entire `*.overlay` file with only the `chain-length` value changed. Having clear documentation for this specific application of the property override technique could help forestall these problems, and give those of us helping out in Discord something to easily reference. --- docs/docs/features/underglow.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/docs/features/underglow.md b/docs/docs/features/underglow.md index 00d3aa0ab8a..2b1400fc7e8 100644 --- a/docs/docs/features/underglow.md +++ b/docs/docs/features/underglow.md @@ -39,6 +39,20 @@ use Kconfig. If your board or shield does not have RGB underglow configured, refer to [Adding RGB Underglow to a Board](#adding-rgb-underglow-to-a-board). +### Modifying the number of LEDs + +A common issue when enabling underglow is that some of the installed LEDs do not illuminate. This can happen when a board's default underglow configuration accounts only for either the downward facing LEDs or the upward facing LEDs under each key. On a split keyboard, a good sign that this may be the problem is that the unilluminated LEDs on each half are symmetrical. + +The number of underglow LEDs is controlled by the `chain-length` property in the `led_strip` node. You can [change the value of this property](../config/index.md#changing-devicetree-properties) in the `.keymap` file by adding a stanza like this one outside of any other node (i.e. above or below the `/` node): + +``` +&led_strip { + chain-length = <21>; +}; +``` + +where the value is the total count of LEDs (per half, for split keyboards). + ## Configuring RGB Underglow See [RGB underglow configuration](/docs/config/underglow). From 9d4422980088fb6d2130ac9a3119809984762267 Mon Sep 17 00:00:00 2001 From: Stephen Wan Date: Mon, 15 Mar 2021 12:26:18 -0700 Subject: [PATCH 069/160] feature(split): add support for sensors from peripheral This commit adds a new GATT characteristics on the peripheral side and wires it up to read sensor values. The central side subscribes to this new characteristics and replays sensor values on its side. Co-authored-by: Peter Johanson --- app/include/zmk/sensors.h | 6 +- app/include/zmk/split/bluetooth/service.h | 15 +++- app/include/zmk/split/bluetooth/uuid.h | 1 + app/src/sensors.c | 6 +- app/src/split/bluetooth/central.c | 92 +++++++++++++++++++---- app/src/split/bluetooth/service.c | 78 ++++++++++++++++++- app/src/split/bluetooth/split_listener.c | 26 +++++-- 7 files changed, 196 insertions(+), 28 deletions(-) diff --git a/app/include/zmk/sensors.h b/app/include/zmk/sensors.h index 8ac1c283cb6..1919d4ce647 100644 --- a/app/include/zmk/sensors.h +++ b/app/include/zmk/sensors.h @@ -24,7 +24,9 @@ struct zmk_sensor_config { uint16_t triggers_per_rotation; }; +// This struct is also used for data transfer for splits, so any changes to the size, layout, etc +// is a breaking change for the split GATT service protocol. struct zmk_sensor_channel_data { - enum sensor_channel channel; struct sensor_value value; -}; + enum sensor_channel channel; +} __packed; diff --git a/app/include/zmk/split/bluetooth/service.h b/app/include/zmk/split/bluetooth/service.h index f0c1d79ff7d..112cd552942 100644 --- a/app/include/zmk/split/bluetooth/service.h +++ b/app/include/zmk/split/bluetooth/service.h @@ -6,8 +6,18 @@ #pragma once +#include +#include + #define ZMK_SPLIT_RUN_BEHAVIOR_DEV_LEN 9 +struct sensor_event { + uint8_t sensor_index; + + uint8_t channel_data_size; + struct zmk_sensor_channel_data channel_data[ZMK_SENSOR_EVENT_MAX_CHANNELS]; +} __packed; + struct zmk_split_run_behavior_data { uint8_t position; uint8_t state; @@ -21,4 +31,7 @@ struct zmk_split_run_behavior_payload { } __packed; int zmk_split_bt_position_pressed(uint8_t position); -int zmk_split_bt_position_released(uint8_t position); \ No newline at end of file +int zmk_split_bt_position_released(uint8_t position); +int zmk_split_bt_sensor_triggered(uint8_t sensor_index, + const struct zmk_sensor_channel_data channel_data[], + size_t channel_data_size); diff --git a/app/include/zmk/split/bluetooth/uuid.h b/app/include/zmk/split/bluetooth/uuid.h index cbdb17723cd..c38131dd83e 100644 --- a/app/include/zmk/split/bluetooth/uuid.h +++ b/app/include/zmk/split/bluetooth/uuid.h @@ -16,3 +16,4 @@ #define ZMK_SPLIT_BT_SERVICE_UUID ZMK_BT_SPLIT_UUID(0x00000000) #define ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID ZMK_BT_SPLIT_UUID(0x00000001) #define ZMK_SPLIT_BT_CHAR_RUN_BEHAVIOR_UUID ZMK_BT_SPLIT_UUID(0x00000002) +#define ZMK_SPLIT_BT_CHAR_SENSOR_STATE_UUID ZMK_BT_SPLIT_UUID(0x00000003) diff --git a/app/src/sensors.c b/app/src/sensors.c index e339afe0437..60f2bd2a33f 100644 --- a/app/src/sensors.c +++ b/app/src/sensors.c @@ -29,7 +29,7 @@ struct sensors_item_cfg { { \ .dev = DEVICE_DT_GET_OR_NULL(node), \ .trigger = {.type = SENSOR_TRIG_DATA_READY, .chan = SENSOR_CHAN_ROTATION}, \ - .config = &configs[idx] \ + .config = &configs[idx], .sensor_index = idx \ } #define SENSOR_ITEM(idx, _i) _SENSOR_ITEM(idx, ZMK_KEYMAP_SENSORS_BY_IDX(idx)) @@ -112,7 +112,7 @@ static void zmk_sensors_trigger_handler(const struct device *dev, int sensor_index = test_item - sensors; if (sensor_index < 0 || sensor_index >= ARRAY_SIZE(sensors)) { - LOG_ERR("Invalid sensor item triggered our callback"); + LOG_ERR("Invalid sensor item triggered our callback (%d)", sensor_index); return; } @@ -127,8 +127,6 @@ static void zmk_sensors_trigger_handler(const struct device *dev, static void zmk_sensors_init_item(uint8_t i) { LOG_DBG("Init sensor at index %d", i); - sensors[i].sensor_index = i; - if (!sensors[i].dev) { LOG_DBG("No local device for %d", i); return; diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index 8a5e9d35c5a..b70d79e3a3a 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -21,10 +21,12 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include +#include #include #include #include #include +#include static int start_scanning(void); @@ -41,6 +43,7 @@ struct peripheral_slot { struct bt_conn *conn; struct bt_gatt_discover_params discover_params; struct bt_gatt_subscribe_params subscribe_params; + struct bt_gatt_subscribe_params sensor_subscribe_params; struct bt_gatt_discover_params sub_discover_params; uint16_t run_behavior_handle; uint8_t position_state[POSITION_STATE_DATA_LEN]; @@ -165,6 +168,52 @@ int confirm_peripheral_slot_conn(struct bt_conn *conn) { return 0; } +#if ZMK_KEYMAP_HAS_SENSORS +K_MSGQ_DEFINE(peripheral_sensor_event_msgq, sizeof(struct zmk_sensor_event), + CONFIG_ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE, 4); + +void peripheral_sensor_event_work_callback(struct k_work *work) { + struct zmk_sensor_event ev; + while (k_msgq_get(&peripheral_sensor_event_msgq, &ev, K_NO_WAIT) == 0) { + LOG_DBG("Trigger sensor change for %d", ev.sensor_index); + ZMK_EVENT_RAISE(new_zmk_sensor_event(ev)); + } +} + +K_WORK_DEFINE(peripheral_sensor_event_work, peripheral_sensor_event_work_callback); + +static uint8_t split_central_sensor_notify_func(struct bt_conn *conn, + struct bt_gatt_subscribe_params *params, + const void *data, uint16_t length) { + if (!data) { + LOG_DBG("[UNSUBSCRIBED]"); + params->value_handle = 0U; + return BT_GATT_ITER_STOP; + } + + LOG_DBG("[SENSOR NOTIFICATION] data %p length %u", data, length); + + if (length < offsetof(struct sensor_event, channel_data)) { + LOG_WRN("Ignoring sensor notify with insufficient data length (%d)", length); + return BT_GATT_ITER_STOP; + } + + struct sensor_event sensor_event; + memcpy(&sensor_event, data, MIN(length, sizeof(sensor_event))); + struct zmk_sensor_event ev = { + .sensor_index = sensor_event.sensor_index, + .channel_data_size = MIN(sensor_event.channel_data_size, ZMK_SENSOR_EVENT_MAX_CHANNELS), + .timestamp = k_uptime_get()}; + + memcpy(ev.channel_data, sensor_event.channel_data, + sizeof(struct zmk_sensor_channel_data) * sensor_event.channel_data_size); + k_msgq_put(&peripheral_sensor_event_msgq, &ev, K_NO_WAIT); + k_work_submit(&peripheral_sensor_event_work); + + return BT_GATT_ITER_CONTINUE; +} +#endif /* ZMK_KEYMAP_HAS_SENSORS */ + static uint8_t split_central_notify_func(struct bt_conn *conn, struct bt_gatt_subscribe_params *params, const void *data, uint16_t length) { @@ -209,14 +258,8 @@ static uint8_t split_central_notify_func(struct bt_conn *conn, return BT_GATT_ITER_CONTINUE; } -static void split_central_subscribe(struct bt_conn *conn) { - struct peripheral_slot *slot = peripheral_slot_for_conn(conn); - if (slot == NULL) { - LOG_ERR("No peripheral state found for connection"); - return; - } - - int err = bt_gatt_subscribe(conn, &slot->subscribe_params); +static int split_central_subscribe(struct bt_conn *conn, struct bt_gatt_subscribe_params *params) { + int err = bt_gatt_subscribe(conn, params); switch (err) { case -EALREADY: LOG_DBG("[ALREADY SUBSCRIBED]"); @@ -228,6 +271,8 @@ static void split_central_subscribe(struct bt_conn *conn) { LOG_ERR("Subscribe failed (err %d)", err); break; } + + return err; } static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn, @@ -250,9 +295,9 @@ static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn, } LOG_DBG("[ATTRIBUTE] handle %u", attr->handle); + const struct bt_uuid *chrc_uuid = ((struct bt_gatt_chrc *)attr->user_data)->uuid; - if (bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid, - BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID)) == 0) { + if (bt_uuid_cmp(chrc_uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID)) == 0) { LOG_DBG("Found position state characteristic"); slot->discover_params.uuid = NULL; slot->discover_params.start_handle = attr->handle + 2; @@ -263,14 +308,33 @@ static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn, slot->subscribe_params.value_handle = bt_gatt_attr_value_handle(attr); slot->subscribe_params.notify = split_central_notify_func; slot->subscribe_params.value = BT_GATT_CCC_NOTIFY; - split_central_subscribe(conn); - } else if (bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid, - BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_RUN_BEHAVIOR_UUID)) == 0) { + split_central_subscribe(conn, &slot->subscribe_params); +#if ZMK_KEYMAP_HAS_SENSORS + } else if (bt_uuid_cmp(chrc_uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_SENSOR_STATE_UUID)) == + 0) { + slot->discover_params.uuid = NULL; + slot->discover_params.start_handle = attr->handle + 2; + slot->discover_params.type = BT_GATT_DISCOVER_CHARACTERISTIC; + + slot->sensor_subscribe_params.disc_params = &slot->sub_discover_params; + slot->sensor_subscribe_params.end_handle = slot->discover_params.end_handle; + slot->sensor_subscribe_params.value_handle = bt_gatt_attr_value_handle(attr); + slot->sensor_subscribe_params.notify = split_central_sensor_notify_func; + slot->sensor_subscribe_params.value = BT_GATT_CCC_NOTIFY; + split_central_subscribe(conn, &slot->sensor_subscribe_params); +#endif /* ZMK_KEYMAP_HAS_SENSORS */ + } else if (bt_uuid_cmp(chrc_uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_RUN_BEHAVIOR_UUID)) == + 0) { LOG_DBG("Found run behavior handle"); + slot->discover_params.uuid = NULL; + slot->discover_params.start_handle = attr->handle + 2; slot->run_behavior_handle = bt_gatt_attr_value_handle(attr); } - bool subscribed = (slot->run_behavior_handle && slot->subscribe_params.value_handle); + bool subscribed = slot->run_behavior_handle && slot->subscribe_params.value_handle; +#if ZMK_KEYMAP_HAS_SENSORS + subscribed = subscribed && slot->sensor_subscribe_params.value_handle; +#endif /* ZMK_KEYMAP_HAS_SENSORS */ return subscribed ? BT_GATT_ITER_STOP : BT_GATT_ITER_CONTINUE; } diff --git a/app/src/split/bluetooth/service.c b/app/src/split/bluetooth/service.c index f7b0d587b26..620df53e11c 100644 --- a/app/src/split/bluetooth/service.c +++ b/app/src/split/bluetooth/service.c @@ -4,6 +4,7 @@ * SPDX-License-Identifier: MIT */ +#include #include #include #include @@ -20,6 +21,22 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include +#include +#include + +#if ZMK_KEYMAP_HAS_SENSORS +static struct sensor_event last_sensor_event; + +static ssize_t split_svc_sensor_state(struct bt_conn *conn, const struct bt_gatt_attr *attrs, + void *buf, uint16_t len, uint16_t offset) { + return bt_gatt_attr_read(conn, attrs, buf, len, offset, &last_sensor_event, + sizeof(last_sensor_event)); +} + +static void split_svc_sensor_state_ccc(const struct bt_gatt_attr *attr, uint16_t value) { + LOG_DBG("value %d", value); +} +#endif /* ZMK_KEYMAP_HAS_SENSORS */ #define POS_STATE_LEN 16 @@ -98,7 +115,14 @@ BT_GATT_SERVICE_DEFINE( BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_WRITE_ENCRYPT, NULL, split_svc_run_behavior, &behavior_run_payload), BT_GATT_DESCRIPTOR(BT_UUID_NUM_OF_DIGITALS, BT_GATT_PERM_READ, split_svc_num_of_positions, NULL, - &num_of_positions), ); + &num_of_positions), +#if ZMK_KEYMAP_HAS_SENSORS + BT_GATT_CHARACTERISTIC(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_SENSOR_STATE_UUID), + BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY, BT_GATT_PERM_READ_ENCRYPT, + split_svc_sensor_state, NULL, &last_sensor_event), + BT_GATT_CCC(split_svc_sensor_state_ccc, BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), +#endif /* ZMK_KEYMAP_HAS_SENSORS */ +); K_THREAD_STACK_DEFINE(service_q_stack, CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE); @@ -151,6 +175,58 @@ int zmk_split_bt_position_released(uint8_t position) { return send_position_state(); } +#if ZMK_KEYMAP_HAS_SENSORS +K_MSGQ_DEFINE(sensor_state_msgq, sizeof(struct sensor_event), + CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_POSITION_QUEUE_SIZE, 4); + +void send_sensor_state_callback(struct k_work *work) { + while (k_msgq_get(&sensor_state_msgq, &last_sensor_event, K_NO_WAIT) == 0) { + int err = bt_gatt_notify(NULL, &split_svc.attrs[8], &last_sensor_event, + sizeof(last_sensor_event)); + if (err) { + LOG_DBG("Error notifying %d", err); + } + } +}; + +K_WORK_DEFINE(service_sensor_notify_work, send_sensor_state_callback); + +int send_sensor_state(struct sensor_event ev) { + int err = k_msgq_put(&sensor_state_msgq, &ev, K_MSEC(100)); + if (err) { + // retry... + switch (err) { + case -EAGAIN: { + LOG_WRN("Sensor state message queue full, popping first message and queueing again"); + struct sensor_event discarded_state; + k_msgq_get(&sensor_state_msgq, &discarded_state, K_NO_WAIT); + return send_sensor_state(ev); + } + default: + LOG_WRN("Failed to queue sensor state to send (%d)", err); + return err; + } + } + + k_work_submit_to_queue(&service_work_q, &service_sensor_notify_work); + return 0; +} + +int zmk_split_bt_sensor_triggered(uint8_t sensor_index, + const struct zmk_sensor_channel_data channel_data[], + size_t channel_data_size) { + if (channel_data_size > ZMK_SENSOR_EVENT_MAX_CHANNELS) { + return -EINVAL; + } + + struct sensor_event ev = + (struct sensor_event){.sensor_index = sensor_index, .channel_data_size = channel_data_size}; + memcpy(ev.channel_data, channel_data, + channel_data_size * sizeof(struct zmk_sensor_channel_data)); + return send_sensor_state(ev); +} +#endif /* ZMK_KEYMAP_HAS_SENSORS */ + int service_init(const struct device *_arg) { static const struct k_work_queue_config queue_config = { .name = "Split Peripheral Notification Queue"}; diff --git a/app/src/split/bluetooth/split_listener.c b/app/src/split/bluetooth/split_listener.c index eb5398c42d6..9b680d2c89c 100644 --- a/app/src/split/bluetooth/split_listener.c +++ b/app/src/split/bluetooth/split_listener.c @@ -13,21 +13,35 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include +#include #include +#include #include int split_listener(const zmk_event_t *eh) { LOG_DBG(""); - const struct zmk_position_state_changed *ev = as_zmk_position_state_changed(eh); - if (ev != NULL) { - if (ev->state) { - return zmk_split_bt_position_pressed(ev->position); + const struct zmk_position_state_changed *pos_ev; + if ((pos_ev = as_zmk_position_state_changed(eh)) != NULL) { + if (pos_ev->state) { + return zmk_split_bt_position_pressed(pos_ev->position); } else { - return zmk_split_bt_position_released(ev->position); + return zmk_split_bt_position_released(pos_ev->position); } } + +#if ZMK_KEYMAP_HAS_SENSORS + const struct zmk_sensor_event *sensor_ev; + if ((sensor_ev = as_zmk_sensor_event(eh)) != NULL) { + return zmk_split_bt_sensor_triggered(sensor_ev->sensor_index, sensor_ev->channel_data, + sensor_ev->channel_data_size); + } +#endif /* ZMK_KEYMAP_HAS_SENSORS */ return ZMK_EV_EVENT_BUBBLE; } ZMK_LISTENER(split_listener, split_listener); -ZMK_SUBSCRIPTION(split_listener, zmk_position_state_changed); \ No newline at end of file +ZMK_SUBSCRIPTION(split_listener, zmk_position_state_changed); + +#if ZMK_KEYMAP_HAS_SENSORS +ZMK_SUBSCRIPTION(split_listener, zmk_sensor_event); +#endif /* ZMK_KEYMAP_HAS_SENSORS */ From dcb1f8f13528effc3e2ee3dadf9b385bf2394037 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 23 Jun 2023 07:28:27 +0000 Subject: [PATCH 070/160] fix(docs): Update docs about split encoder support --- docs/docs/features/encoders.md | 4 ---- docs/docs/intro.md | 9 ++++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/docs/docs/features/encoders.md b/docs/docs/features/encoders.md index 29906c909de..0c493330cc6 100644 --- a/docs/docs/features/encoders.md +++ b/docs/docs/features/encoders.md @@ -5,10 +5,6 @@ sidebar_label: Encoders Existing support for encoders in ZMK is focused around the five pin EC11 rotary encoder with push button design used in the majority of current keyboard and macropad designs. -:::note -Encoders are currently only support on the left/central sides of splits. For progress on this, see [#728](https://github.com/zmkfirmware/zmk/pull/728). -::: - ## Enabling EC11 Encoders To enable encoders for boards that have existing encoder support, uncomment the `CONFIG_EC11=y` and `CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y` lines in your board's .conf file in your `zmk-config/config` folder. Save and push your changes, then download and flash the new firmware. diff --git a/docs/docs/intro.md b/docs/docs/intro.md index 142dcafc97e..d65ac46e405 100644 --- a/docs/docs/intro.md +++ b/docs/docs/intro.md @@ -23,11 +23,11 @@ ZMK is currently missing some features found in other popular firmware. This tab | Split Keyboard Support | ✅ | ✅ | ✅ | | [Keymaps and Layers](behaviors/layers.md) | ✅ | ✅ | ✅ | | [Hold-Tap](behaviors/hold-tap.md) (which includes [Mod-Tap](behaviors/mod-tap.md) and [Layer-Tap](behaviors/layers.md/#layer-tap)) | ✅ | ✅ | ✅ | -| [Tap-Dance](behaviors/tap-dance.md) | ✅ | ✅[^3] | ✅ | +| [Tap-Dance](behaviors/tap-dance.md) | ✅ | ✅[^2] | ✅ | | [Keyboard Codes](codes/index.mdx#keyboard) | ✅ | ✅ | ✅ | | [Media](codes/index.mdx#media-controls) & [Consumer](codes/index.mdx#consumer-controls) Codes | ✅ | ✅ | ✅ | -| [Encoders](features/encoders.md)[^1] | ✅ | ✅ | ✅ | -| [Display Support](features/displays.md)[^2] | 🚧 | 🚧 | ✅ | +| [Encoders](features/encoders.md) | ✅ | ✅ | ✅ | +| [Display Support](features/displays.md)[^1] | 🚧 | 🚧 | ✅ | | [RGB Underglow](features/underglow.md) | ✅ | ✅ | ✅ | | [Backlight](features/backlight.md) | ✅ | ✅ | ✅ | | One Shot Keys | ✅ | ✅ | ✅ | @@ -43,8 +43,7 @@ ZMK is currently missing some features found in other popular firmware. This tab | AVR/8 Bit | | | ✅ | | [Wide Range of ARM Chips Supported](https://docs.zephyrproject.org/latest/boards/index.html) | ✅ | | | -[^3]: Tap-Dances are limited to single and double-tap on BlueMicro -[^2]: Encoders are not currently supported on peripheral side splits. +[^2]: Tap-Dances are limited to single and double-tap on BlueMicro [^1]: OLEDs are currently proof of concept in ZMK. ## Code Of Conduct From a92a4967aa85f4ab19d36bcb81afc0420f2775d2 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 28 Jun 2023 19:26:33 +0000 Subject: [PATCH 071/160] fix(sensors): Only accept data once per behavior. * Don't accept data for the same behavior on multiple layers more than once, to avoid duplicate/extraneous triggers. --- app/include/zmk/keymap.h | 4 ++++ app/src/behaviors/behavior_sensor_rotate_common.c | 15 ++++++++------- app/src/behaviors/behavior_sensor_rotate_common.h | 5 +++-- app/src/keymap.c | 4 ---- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/app/include/zmk/keymap.h b/app/include/zmk/keymap.h index a47cd505643..9ce140bfa27 100644 --- a/app/include/zmk/keymap.h +++ b/app/include/zmk/keymap.h @@ -8,6 +8,10 @@ #include +#define ZMK_LAYER_CHILD_LEN_PLUS_ONE(node) 1 + +#define ZMK_KEYMAP_LAYERS_LEN \ + (DT_FOREACH_CHILD(DT_INST(0, zmk_keymap), ZMK_LAYER_CHILD_LEN_PLUS_ONE) 0) + typedef uint32_t zmk_keymap_layers_state_t; uint8_t zmk_keymap_layer_default(); diff --git a/app/src/behaviors/behavior_sensor_rotate_common.c b/app/src/behaviors/behavior_sensor_rotate_common.c index 586cac3fdf2..98b4aec1267 100644 --- a/app/src/behaviors/behavior_sensor_rotate_common.c +++ b/app/src/behaviors/behavior_sensor_rotate_common.c @@ -28,7 +28,7 @@ int zmk_behavior_sensor_rotate_common_accept_data( if (value.val1 == 0) { triggers = value.val2; } else { - struct sensor_value remainder = data->remainder[sensor_index]; + struct sensor_value remainder = data->remainder[sensor_index][event.layer]; remainder.val1 += value.val1; remainder.val2 += value.val2; @@ -42,15 +42,16 @@ int zmk_behavior_sensor_rotate_common_accept_data( triggers = remainder.val1 / trigger_degrees; remainder.val1 %= trigger_degrees; - data->remainder[sensor_index] = remainder; + data->remainder[sensor_index][event.layer] = remainder; } LOG_DBG( "val1: %d, val2: %d, remainder: %d/%d triggers: %d inc keycode 0x%02X dec keycode 0x%02X", - value.val1, value.val2, data->remainder[sensor_index].val1, - data->remainder[sensor_index].val2, triggers, binding->param1, binding->param2); + value.val1, value.val2, data->remainder[sensor_index][event.layer].val1, + data->remainder[sensor_index][event.layer].val2, triggers, binding->param1, + binding->param2); - data->triggers[sensor_index] = triggers; + data->triggers[sensor_index][event.layer] = triggers; return 0; } @@ -64,11 +65,11 @@ int zmk_behavior_sensor_rotate_common_process(struct zmk_behavior_binding *bindi const int sensor_index = ZMK_SENSOR_POSITION_FROM_VIRTUAL_KEY_POSITION(event.position); if (mode != BEHAVIOR_SENSOR_BINDING_PROCESS_MODE_TRIGGER) { - data->triggers[sensor_index] = 0; + data->triggers[sensor_index][event.layer] = 0; return ZMK_BEHAVIOR_TRANSPARENT; } - int triggers = data->triggers[sensor_index]; + int triggers = data->triggers[sensor_index][event.layer]; struct zmk_behavior_binding triggered_binding; if (triggers > 0) { diff --git a/app/src/behaviors/behavior_sensor_rotate_common.h b/app/src/behaviors/behavior_sensor_rotate_common.h index d354b67937c..c92ac3d5e5f 100644 --- a/app/src/behaviors/behavior_sensor_rotate_common.h +++ b/app/src/behaviors/behavior_sensor_rotate_common.h @@ -6,6 +6,7 @@ #include #include +#include #include struct behavior_sensor_rotate_config { @@ -16,8 +17,8 @@ struct behavior_sensor_rotate_config { }; struct behavior_sensor_rotate_data { - struct sensor_value remainder[ZMK_KEYMAP_SENSORS_LEN]; - int triggers[ZMK_KEYMAP_SENSORS_LEN]; + struct sensor_value remainder[ZMK_KEYMAP_SENSORS_LEN][ZMK_KEYMAP_LAYERS_LEN]; + int triggers[ZMK_KEYMAP_SENSORS_LEN][ZMK_KEYMAP_LAYERS_LEN]; }; int zmk_behavior_sensor_rotate_common_accept_data( diff --git a/app/src/keymap.c b/app/src/keymap.c index 020faf3f2be..bda694276c8 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -31,10 +31,6 @@ static uint8_t _zmk_keymap_layer_default = 0; #define DT_DRV_COMPAT zmk_keymap -#define LAYER_CHILD_LEN(node) 1 + -#define ZMK_KEYMAP_NODE DT_DRV_INST(0) -#define ZMK_KEYMAP_LAYERS_LEN (DT_INST_FOREACH_CHILD(0, LAYER_CHILD_LEN) 0) - #define BINDING_WITH_COMMA(idx, drv_inst) ZMK_KEYMAP_EXTRACT_BINDING(idx, drv_inst) #define TRANSFORMED_LAYER(node) \ From 185457bc1169176037aa281edb0a9bf485a70dbd Mon Sep 17 00:00:00 2001 From: Mikhail Stralenia Date: Tue, 29 Aug 2023 18:53:30 +0300 Subject: [PATCH 072/160] fix(shields): leeloo - proper encoder status for split encoders. --- app/boards/shields/leeloo/leeloo_common.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/boards/shields/leeloo/leeloo_common.dtsi b/app/boards/shields/leeloo/leeloo_common.dtsi index 6ce93504b2d..ef775cfbe61 100644 --- a/app/boards/shields/leeloo/leeloo_common.dtsi +++ b/app/boards/shields/leeloo/leeloo_common.dtsi @@ -51,6 +51,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <120>; + status = "disabled"; }; right_encoder: right_encoder { @@ -59,6 +60,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <120>; + status = "disabled"; }; sensors { @@ -87,4 +89,4 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) com-sequential; prechargep = <0x22>; }; -}; \ No newline at end of file +}; From fd4796583810b6fa42edcee7aa33fa9db4ba4a44 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 2 Sep 2023 13:49:18 -0700 Subject: [PATCH 073/160] fix(docs): Remove diode-direction from direct GPIO driver --- docs/docs/config/kscan.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/docs/config/kscan.md b/docs/docs/config/kscan.md index 787d513661f..d240d79fe67 100644 --- a/docs/docs/config/kscan.md +++ b/docs/docs/config/kscan.md @@ -72,16 +72,15 @@ Applies to: `compatible = "zmk,kscan-gpio-direct"` Definition file: [zmk/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/kscan/zmk%2Ckscan-gpio-direct.yaml) -| Property | Type | Description | Default | -| ------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------- | ----------- | -| `label` | string | Unique label for the node | | -| `input-gpios` | GPIO array | Input GPIOs (one per key) | | -| `debounce-press-ms` | int | Debounce time for key press in milliseconds. Use 0 for eager debouncing. | 5 | -| `debounce-release-ms` | int | Debounce time for key release in milliseconds. | 5 | -| `debounce-scan-period-ms` | int | Time between reads in milliseconds when any key is pressed. | 1 | -| `diode-direction` | string | The direction of the matrix diodes | `"row2col"` | -| `poll-period-ms` | int | Time between reads in milliseconds when no key is pressed and `CONFIG_ZMK_KSCAN_DIRECT_POLLING` is enabled. | 10 | -| `toggle-mode` | bool | Use toggle switch mode. | n | +| Property | Type | Description | Default | +| ------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------- | ------- | +| `label` | string | Unique label for the node | | +| `input-gpios` | GPIO array | Input GPIOs (one per key) | | +| `debounce-press-ms` | int | Debounce time for key press in milliseconds. Use 0 for eager debouncing. | 5 | +| `debounce-release-ms` | int | Debounce time for key release in milliseconds. | 5 | +| `debounce-scan-period-ms` | int | Time between reads in milliseconds when any key is pressed. | 1 | +| `poll-period-ms` | int | Time between reads in milliseconds when no key is pressed and `CONFIG_ZMK_KSCAN_DIRECT_POLLING` is enabled. | 10 | +| `toggle-mode` | bool | Use toggle switch mode. | n | By default, a switch will drain current through the internal pull up/down resistor whenever it is pressed. This is not ideal for a toggle switch, where the switch may be left in the "pressed" state for a long time. Enabling `toggle-mode` will make the driver flip between pull up and down as the switch is toggled to optimize for power. From 1e11e84d0d367a90d155df1d13824077f61bf158 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 2 Sep 2023 14:44:37 -0700 Subject: [PATCH 074/160] fix(docs): Fix row/col comments in matrix examples --- docs/docs/config/kscan.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/docs/config/kscan.md b/docs/docs/config/kscan.md index d240d79fe67..5c70f4ba1b1 100644 --- a/docs/docs/config/kscan.md +++ b/docs/docs/config/kscan.md @@ -296,9 +296,7 @@ Any keyboard which is not a grid of 1 unit keys will likely have some unused pos kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - rows = <5>; - columns = <4>; - // define the matrix... + // define row-gpios with 5 elements and col-gpios with 4... }; default_transform: matrix_transform { @@ -358,9 +356,7 @@ Consider a keyboard with a [duplex matrix](https://wiki.ai03.com/books/pcb-desig kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - rows = <12>; - columns = <8>; - // define the matrix... + // define row-gpios with 12 elements and col-gpios with 8... }; default_transform: matrix_transform { From 3d938033b002c78ce24245e3cf37b7ba55876145 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 2 Sep 2023 14:45:25 -0700 Subject: [PATCH 075/160] feat(docs): Note GPIO flags and add examples --- docs/docs/config/kscan.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/docs/config/kscan.md b/docs/docs/config/kscan.md index 5c70f4ba1b1..296cb4a179c 100644 --- a/docs/docs/config/kscan.md +++ b/docs/docs/config/kscan.md @@ -86,6 +86,18 @@ By default, a switch will drain current through the internal pull up/down resist `toggle-mode` applies to all switches handled by the instance of the driver. To use a toggle switch with other, non-toggle, direct GPIO switches, create two instances of the direct GPIO driver, one with `toggle-mode` and the other without. Then, use a [composite driver](#composite-driver) to combine them. +Assuming the switches connect each GPIO pin to the ground, the [GPIO flags](https://docs.zephyrproject.org/3.2.0/hardware/peripherals/gpio.html#api-reference) for the elements in `input-gpios` should be `(GPIO_ACTIVE_LOW | GPIO_PULL_UP)`: + +```devicetree + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + input-gpios + = <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; +``` + ## Matrix Driver Keyboard scan driver where keys are arranged on a matrix with one GPIO per row and column. @@ -122,6 +134,24 @@ The `diode-direction` property must be one of: | `"row2col"` | Diodes point from rows to columns (cathodes are connected to columns) | | `"col2row"` | Diodes point from columns to rows (cathodes are connected to rows) | +Given the `diode-direction`, the [GPIO flags](https://docs.zephyrproject.org/3.2.0/hardware/peripherals/gpio.html#api-reference) for the elements in `row-` and `col-gpios` should be set appropriately. +The output pins (e.g. columns for `col2row`) should have the flag `GPIO_ACTIVE_HIGH`, and input pins (e.g. rows for `col2row`) should have the flags `(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)`: + +```devicetree + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + diode-direction = "col2row"; + col-gpios + = <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + ; + row-gpios + = <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; +``` + ## Composite Driver Keyboard scan driver which combines multiple other keyboard scan drivers. From 369c7c1721861c9a0e5e47c6b1090abe8cfb0566 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 2 Sep 2023 14:10:59 -0700 Subject: [PATCH 076/160] fix(docs): Correct default macro wait/tap ms --- docs/docs/behaviors/macros.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/docs/behaviors/macros.md b/docs/docs/behaviors/macros.md index 0757e735285..4836c205e41 100644 --- a/docs/docs/behaviors/macros.md +++ b/docs/docs/behaviors/macros.md @@ -111,7 +111,8 @@ bindings ### Wait Time -The wait time setting controls how long of a delay is introduced between behaviors in the `bindings` list. The initial wait time for a macro, 100ms by default, can +The wait time setting controls how long of a delay is introduced between behaviors in the `bindings` list. The initial wait time for a macro, +which is equal to the value of [`CONFIG_ZMK_MACRO_DEFAULT_WAIT_MS`](../config/behaviors.md#macro) by default, can be set by assigning a value to the `wait-ms` property of the macro, e.g. `wait-ms = <20>;`. If you want to update the wait time at any point in the macro bindings list, use `¯o_wait_time`, e.g. `¯o_wait_time 30`. A full example: @@ -126,7 +127,8 @@ bindings ### Tap Time -The tap time setting controls how long a tapped behavior is held in the `bindings` list. The initial tap time for a macro, 100ms by default, can +The tap time setting controls how long a tapped behavior is held in the `bindings` list. The initial tap time for a macro, +which is equal to the value of [`CONFIG_ZMK_MACRO_DEFAULT_TAP_MS`](../config/behaviors.md#macro) by default, can be set by assigning a value to the `tap-ms` property of the macro, e.g. `tap-ms = <20>;`. If you want to update the tap time at any point in a macro bindings list, use `¯o_tap_time`, e.g. `¯o_tap_time 30`. A full example: From b20d3178b9d681f2b959cc7980d7252cda415189 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 2 Sep 2023 14:11:30 -0700 Subject: [PATCH 077/160] feat(docs): Note devicetree limits re: macro bindings --- docs/docs/behaviors/macros.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/behaviors/macros.md b/docs/docs/behaviors/macros.md index 4836c205e41..377ce7fecdb 100644 --- a/docs/docs/behaviors/macros.md +++ b/docs/docs/behaviors/macros.md @@ -147,6 +147,8 @@ Macros use an internal queue to invoke each behavior in the bindings list when t To prevent issues with longer macros, you can change the size of this queue via the `CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE` setting in your configuration, [typically through your `.conf` file](../config/index.md). For example, `CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE=512` would allow your macro to type about 256 characters. +Another limit worth noting is that the maximum number of bindings you can pass to a `bindings` field in the [Devicetree](../config/index.md#devicetree-files) is 256, which also constrains how many behaviors can be invoked by a macro. + ## Parameterized Macros Macros can also be "parameterized", allowing them to be bound in your keymap with unique values passed into them, e.g.: From 4e18b879bdeab047e901856cf6a0cbf3a4855adc Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 2 Sep 2023 15:26:00 -0700 Subject: [PATCH 078/160] feat(docs): Document persisted settings and debouncing --- docs/docs/behaviors/backlight.md | 6 ++++++ docs/docs/behaviors/bluetooth.md | 5 +++++ docs/docs/behaviors/outputs.md | 5 +++++ docs/docs/behaviors/power.md | 5 +++++ docs/docs/behaviors/underglow.md | 6 ++++++ 5 files changed, 27 insertions(+) diff --git a/docs/docs/behaviors/backlight.md b/docs/docs/behaviors/backlight.md index cb9a85a830e..8c613fe6bd1 100644 --- a/docs/docs/behaviors/backlight.md +++ b/docs/docs/behaviors/backlight.md @@ -36,6 +36,12 @@ Here is a table describing the action for each define: - Parameter #1: The backlight action define, e.g. `BL_TOG` or `BL_INC` - Parameter #2: Only applies to `BL_SET`and is the brightness value +:::note Backlight settings persistence +The backlight settings that are changed via the `&bl` behavior will be saved to flash storage and hence persist across restarts and firmware flashes. +They will also override the start values set by [`CONFIG_ZMK_BACKLIGHT_*_START` settings](../config/backlight.md#kconfig). +However the settings will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. +::: + ### Examples 1. Toggle backlight on/off diff --git a/docs/docs/behaviors/bluetooth.md b/docs/docs/behaviors/bluetooth.md index 7c77c4ad2b7..89496948d50 100644 --- a/docs/docs/behaviors/bluetooth.md +++ b/docs/docs/behaviors/bluetooth.md @@ -35,6 +35,11 @@ Here is a table describing the command for each define: | `BT_PRV` | Switch to the previous profile, cycling through to the last one when the beginning is reached. | | `BT_SEL` | Select the 0-indexed profile by number. Please note: this definition must include a number as an argument in the keymap to work correctly. eg. `BT_SEL 0` | +:::note Selected profile persistence +The profile that is selected by the `BT_SEL`/`BT_PRV`/`BT_NXT` actions will be saved to flash storage and hence persist across restarts and firmware flashes. +However it will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. +::: + ## Bluetooth Behavior The bluetooth behavior completes an bluetooth action given on press. diff --git a/docs/docs/behaviors/outputs.md b/docs/docs/behaviors/outputs.md index 198d9acc617..dad52be2ccb 100644 --- a/docs/docs/behaviors/outputs.md +++ b/docs/docs/behaviors/outputs.md @@ -44,6 +44,11 @@ The output selection behavior changes the preferred output on press. - Reference: `&out` - Parameter #1: Command, e.g. `OUT_BLE` +:::note External power state persistence +The endpoint that is selected by the `&out` behavior will be saved to flash storage and hence persist across restarts and firmware flashes. +However it will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. +::: + ### Examples 1. Behavior binding to prefer sending keyboard output to USB diff --git a/docs/docs/behaviors/power.md b/docs/docs/behaviors/power.md index 805806095ac..11f920845a3 100644 --- a/docs/docs/behaviors/power.md +++ b/docs/docs/behaviors/power.md @@ -43,6 +43,11 @@ Here is a table describing the command for each define: - Reference: `&ext_power` - Parameter#1: Command, e.g `EP_ON` +:::note External power state persistence +The on/off state that is set by the `&ext_power` behavior will be saved to flash storage and hence persist across restarts and firmware flashes. +However it will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. +::: + ### Example: 1. Behavior binding to enable the external power diff --git a/docs/docs/behaviors/underglow.md b/docs/docs/behaviors/underglow.md index 52429e69987..29f34c2ab0b 100644 --- a/docs/docs/behaviors/underglow.md +++ b/docs/docs/behaviors/underglow.md @@ -55,6 +55,12 @@ Value Limits: ::: +:::note RGB settings persistence +The RGB settings that are changed via the `&rgb_ug` behavior will be saved to flash storage and hence persist across restarts and firmware flashes. +They will also override the start values set by [`CONFIG_ZMK_RGB_*_START` settings](../config/underglow.md#kconfig). +However the settings will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. +::: + ## Examples 1. Toggle underglow on/off From 544612c8c0929ff3089bcdb86f9ea8a2f77081eb Mon Sep 17 00:00:00 2001 From: Xudong Zheng <7pkvm5aw@slicealias.com> Date: Fri, 1 Sep 2023 23:32:17 -0400 Subject: [PATCH 079/160] fix(split): reserve peripheral slot before stopping scanning In the event that the peripheral MAC address does not match, this allows scanning to continue. --- app/src/split/bluetooth/central.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index b70d79e3a3a..ccf1cc28ced 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -433,20 +433,22 @@ static int stop_scanning() { static bool split_central_eir_found(const bt_addr_le_t *addr) { LOG_DBG("Found the split service"); - // Stop scanning so we can connect to the peripheral device. - int err = stop_scanning(); - if (err < 0) { - return false; - } - + // Reserve peripheral slot. Once the central has bonded to its peripherals, + // the peripheral MAC addresses will be validated internally and the slot + // reservation will fail if there is a mismatch. int slot_idx = reserve_peripheral_slot(addr); if (slot_idx < 0) { - LOG_ERR("Failed to reserve peripheral slot (err %d)", slot_idx); + LOG_INF("Unable to reserve peripheral slot (err %d)", slot_idx); return false; } - struct peripheral_slot *slot = &peripherals[slot_idx]; + // Stop scanning so we can connect to the peripheral device. + int err = stop_scanning(); + if (err < 0) { + return false; + } + LOG_DBG("Initiating new connnection"); struct bt_le_conn_param *param = BT_LE_CONN_PARAM(CONFIG_ZMK_SPLIT_BLE_PREF_INT, CONFIG_ZMK_SPLIT_BLE_PREF_INT, From ac0691471f1adb8336fb7eb5d01f18c988c5bad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=95=E3=82=A3=E3=83=AB=E3=82=BF=E3=83=BC=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=83=91=E3=83=BC?= <76888457+filterpaper@users.noreply.github.com> Date: Thu, 3 Aug 2023 10:26:34 +0800 Subject: [PATCH 080/160] feat(shields): Add Bluetooth bindings to kyria keymaps Bluetooth bindings are useful for handling pairings with hosts. This change adds the header and a few default commands as template for new users to work with. --- app/boards/shields/kyria/kyria.keymap | 20 +++++++++++++++-- app/boards/shields/kyria/kyria_rev2.keymap | 20 +++++++++++++++-- app/boards/shields/kyria/kyria_rev3.keymap | 26 +++++++++++++++++----- 3 files changed, 57 insertions(+), 9 deletions(-) diff --git a/app/boards/shields/kyria/kyria.keymap b/app/boards/shields/kyria/kyria.keymap index 9a2163db549..a11c13259e1 100644 --- a/app/boards/shields/kyria/kyria.keymap +++ b/app/boards/shields/kyria/kyria.keymap @@ -5,6 +5,7 @@ */ #include +#include #include / { @@ -15,15 +16,30 @@ // --------------------------------------------------------------------------------------------------------------------------------- // | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ | // | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | -// | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | L SHIFT | L SHIFT | N | M | , | . | / | CTRL | +// | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | LAYER 1 | L SHIFT | N | M | , | . | / | CTRL | // | GUI | DEL | RET | SPACE | ESC | | RET | SPACE | TAB | BSPC | R-ALT | bindings = < &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH &kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &kp LSHFT &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &mo 1 &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL &kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + function_layer { +// --------------------------------------------------------------------------------------------------------------------------------- +// | | |BT_CLR|BTSEL0|BTSEL1|BTSEL2| | | | | | | | +// | | | |BTSEL3|BTSEL4| | | | | | | | | +// | | | | | | | | | | | | | | | | | | | +// | | | | | | | | | | | | | + bindings = < + &trans &trans &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans + &trans &trans &trans &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; }; diff --git a/app/boards/shields/kyria/kyria_rev2.keymap b/app/boards/shields/kyria/kyria_rev2.keymap index 9a2163db549..a11c13259e1 100644 --- a/app/boards/shields/kyria/kyria_rev2.keymap +++ b/app/boards/shields/kyria/kyria_rev2.keymap @@ -5,6 +5,7 @@ */ #include +#include #include / { @@ -15,15 +16,30 @@ // --------------------------------------------------------------------------------------------------------------------------------- // | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ | // | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | -// | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | L SHIFT | L SHIFT | N | M | , | . | / | CTRL | +// | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | LAYER 1 | L SHIFT | N | M | , | . | / | CTRL | // | GUI | DEL | RET | SPACE | ESC | | RET | SPACE | TAB | BSPC | R-ALT | bindings = < &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH &kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &kp LSHFT &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &mo 1 &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL &kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + function_layer { +// --------------------------------------------------------------------------------------------------------------------------------- +// | | |BT_CLR|BTSEL0|BTSEL1|BTSEL2| | | | | | | | +// | | | |BTSEL3|BTSEL4| | | | | | | | | +// | | | | | | | | | | | | | | | | | | | +// | | | | | | | | | | | | | + bindings = < + &trans &trans &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans + &trans &trans &trans &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; }; diff --git a/app/boards/shields/kyria/kyria_rev3.keymap b/app/boards/shields/kyria/kyria_rev3.keymap index d74757cad7d..ac2fc044e73 100644 --- a/app/boards/shields/kyria/kyria_rev3.keymap +++ b/app/boards/shields/kyria/kyria_rev3.keymap @@ -5,6 +5,7 @@ */ #include +#include #include /* Uncomment this block if using RGB @@ -23,13 +24,28 @@ // --------------------------------------------------------------------------------------------------------------------------------- // | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ | // | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | - // | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | L SHIFT | L SHIFT | N | M | , | . | / | CTRL | + // | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | LAYER 1 | L SHIFT | N | M | , | . | / | CTRL | // | GUI | DEL | RET | SPACE | ESC | | RET | SPACE | TAB | BSPC | R-ALT | bindings = < - &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH - &kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &kp LSHFT &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL - &kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT + &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH + &kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LSHFT &mo 1 &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL + &kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + function_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | | |BT_CLR|BTSEL0|BTSEL1|BTSEL2| | | | | | | | + // | | | |BTSEL3|BTSEL4| | | | | | | | | + // | | | | | | | | | | | | | | | | | | | + // | | | | | | | | | | | | | + bindings = < + &trans &trans &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans + &trans &trans &trans &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; From 3de23938d687badb346cd97f2e4003bc4357508c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Jul 2023 08:51:44 +0000 Subject: [PATCH 081/160] chore(deps): bump word-wrap from 1.2.3 to 1.2.4 in /docs Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] --- docs/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index b990f53c3dc..3aec8dd5014 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -15859,9 +15859,9 @@ "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "devOptional": true, "engines": { "node": ">=0.10.0" @@ -27353,9 +27353,9 @@ "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "devOptional": true }, "wrap-ansi": { From 8984e12f0d0442b15e6fd18dfd48666bc4cbceb2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Aug 2023 05:10:14 +0000 Subject: [PATCH 082/160] chore(deps-dev): bump json-schema-to-typescript in /docs Bumps [json-schema-to-typescript](https://github.com/bcherny/json-schema-to-typescript) from 12.0.0 to 13.1.1. - [Changelog](https://github.com/bcherny/json-schema-to-typescript/blob/master/CHANGELOG.md) - [Commits](https://github.com/bcherny/json-schema-to-typescript/commits) --- updated-dependencies: - dependency-name: json-schema-to-typescript dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- docs/package-lock.json | 14 +++++++------- docs/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index 3aec8dd5014..38eae2b7dc8 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -35,7 +35,7 @@ "eslint-config-prettier": "^8.8.0", "eslint-plugin-mdx": "^2.0.5", "eslint-plugin-react": "^7.32.2", - "json-schema-to-typescript": "^12.0.0", + "json-schema-to-typescript": "^13.1.1", "mustache": "^4.2.0", "null-loader": "^4.0.0", "prebuild-webpack-plugin": "^1.1.1", @@ -9163,9 +9163,9 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "node_modules/json-schema-to-typescript": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-12.0.0.tgz", - "integrity": "sha512-Uk/BDIAo8vqepPBhM86UhNMHgCv7JulicNj/BgnQPHE1fGCoej0UTtcEYzXU/uk6lSvbZCf7pccW+dnNMrr5rg==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-13.1.1.tgz", + "integrity": "sha512-F3CYhtA7F3yPbb8vF7sFchk/2dnr1/yTKf8RcvoNpjnh67ZS/ZMH1ElLt5KHAtf2/bymiejLQQszszPWEeTdSw==", "dev": true, "dependencies": { "@bcherny/json-schema-ref-parser": "10.0.5-fork", @@ -22663,9 +22663,9 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "json-schema-to-typescript": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-12.0.0.tgz", - "integrity": "sha512-Uk/BDIAo8vqepPBhM86UhNMHgCv7JulicNj/BgnQPHE1fGCoej0UTtcEYzXU/uk6lSvbZCf7pccW+dnNMrr5rg==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-13.1.1.tgz", + "integrity": "sha512-F3CYhtA7F3yPbb8vF7sFchk/2dnr1/yTKf8RcvoNpjnh67ZS/ZMH1ElLt5KHAtf2/bymiejLQQszszPWEeTdSw==", "dev": true, "requires": { "@bcherny/json-schema-ref-parser": "10.0.5-fork", diff --git a/docs/package.json b/docs/package.json index d82e54ec8c9..9b38bef8b67 100644 --- a/docs/package.json +++ b/docs/package.json @@ -54,7 +54,7 @@ "eslint-config-prettier": "^8.8.0", "eslint-plugin-mdx": "^2.0.5", "eslint-plugin-react": "^7.32.2", - "json-schema-to-typescript": "^12.0.0", + "json-schema-to-typescript": "^13.1.1", "mustache": "^4.2.0", "null-loader": "^4.0.0", "prebuild-webpack-plugin": "^1.1.1", From 647945d9f8c80b7de8df8f9dc54bdcf865d531ad Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 17 Jul 2023 07:20:45 -0700 Subject: [PATCH 083/160] feat(shields): Add splitkb.com Aurora Helix * Add new shield for splitkb.com Aurora Helix, supporting keys, encoder(s), displays, and RGB. --- .../splitkb_aurora_helix/Kconfig.defconfig | 53 ++++++++++ .../splitkb_aurora_helix/Kconfig.shield | 8 ++ .../boards/nice_nano.overlay | 46 +++++++++ .../boards/nice_nano_v2.overlay | 46 +++++++++ .../splitkb_aurora_helix.conf | 9 ++ .../splitkb_aurora_helix.dtsi | 79 +++++++++++++++ .../splitkb_aurora_helix.keymap | 96 +++++++++++++++++++ .../splitkb_aurora_helix.zmk.yml | 15 +++ .../splitkb_aurora_helix_left.overlay | 42 ++++++++ .../splitkb_aurora_helix_right.overlay | 46 +++++++++ 10 files changed, 440 insertions(+) create mode 100644 app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig create mode 100644 app/boards/shields/splitkb_aurora_helix/Kconfig.shield create mode 100644 app/boards/shields/splitkb_aurora_helix/boards/nice_nano.overlay create mode 100644 app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.conf create mode 100644 app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.dtsi create mode 100644 app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.keymap create mode 100644 app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.zmk.yml create mode 100644 app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_left.overlay create mode 100644 app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_right.overlay diff --git a/app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig new file mode 100644 index 00000000000..6d7a55691e2 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/Kconfig.defconfig @@ -0,0 +1,53 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_SPLITKB_AURORA_HELIX_LEFT + +config ZMK_KEYBOARD_NAME + default "Aurora Helix" + +config ZMK_SPLIT_ROLE_CENTRAL + default y + +endif # SHIELD_SPLITKB_AURORA_HELIX_LEFT + +if SHIELD_SPLITKB_AURORA_HELIX_LEFT || SHIELD_SPLITKB_AURORA_HELIX_RIGHT + +config ZMK_SPLIT + default y + +config ZMK_RGB_UNDERGLOW + select WS2812_STRIP + select SPI + +if ZMK_DISPLAY + +config SSD1306 + default y + +config I2C + default y + +config SSD1306_REVERSE_MODE + default y + +endif # ZMK_DISPLAY + +if LVGL + +config LV_Z_VDB_SIZE + default 64 + +config LV_DPI_DEF + default 148 + +config LV_Z_BITS_PER_PIXEL + default 1 + +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 +endchoice + +endif # LVGL + +endif # SHIELD_SPLITKB_AURORA_HELIX_LEFT || SHIELD_SPLITKB_AURORA_HELIX_RIGHT diff --git a/app/boards/shields/splitkb_aurora_helix/Kconfig.shield b/app/boards/shields/splitkb_aurora_helix/Kconfig.shield new file mode 100644 index 00000000000..c64ef8798e1 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_SPLITKB_AURORA_HELIX_LEFT + def_bool $(shields_list_contains,splitkb_aurora_helix_left) + +config SHIELD_SPLITKB_AURORA_HELIX_RIGHT + def_bool $(shields_list_contains,splitkb_aurora_helix_right) diff --git a/app/boards/shields/splitkb_aurora_helix/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_helix/boards/nice_nano.overlay new file mode 100644 index 00000000000..8f1629ced14 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/boards/nice_nano.overlay @@ -0,0 +1,46 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <6>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay new file mode 100644 index 00000000000..8f1629ced14 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay @@ -0,0 +1,46 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <6>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.conf b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.conf new file mode 100644 index 00000000000..af482abcc4b --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.conf @@ -0,0 +1,9 @@ +# Uncomment these two line to add support for encoders to your firmware +# CONFIG_EC11=y +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y + +# Uncomment the following line to enable the OLED Display +# CONFIG_ZMK_DISPLAY=y + +# Uncomment the following line to enable RGB underglow +# CONFIG_ZMK_RGB_UNDERGLOW=y diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.dtsi b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.dtsi new file mode 100644 index 00000000000..e580e87daba --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.dtsi @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + + chosen { + zephyr,display = &oled; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <5>; + // | 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 | SW22 | SW23 | SW24 | SW25 | | SW25 | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | + // | SW26 | SW27 | SW28 | SW29 | SW30 | SW31 | SW32 | | SW32 | SW31 | SW30 | SW29 | SW28 | SW27 | SW26 | + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) + RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) + >; + }; + + left_encoder: left_encoder { + compatible = "alps,ec11"; + label = "L_ENCODER"; + steps = <144>; + status = "disabled"; + + a-gpios = <&pro_micro 7 GPIO_PULL_UP>; + b-gpios = <&pro_micro 8 GPIO_PULL_UP>; + }; + + right_encoder: right_encoder { + compatible = "alps,ec11"; + label = "R_ENCODER"; + steps = <144>; + status = "disabled"; + + a-gpios = <&pro_micro 16 GPIO_PULL_UP>; + b-gpios = <&pro_micro 14 GPIO_PULL_UP>; + }; + + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <36>; + }; +}; + +&pro_micro_i2c { + status = "okay"; + + oled: ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + segment-remap; + com-invdir; + com-sequential; + prechargep = <0x22>; + }; +}; diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.keymap b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.keymap new file mode 100644 index 00000000000..edec8fec306 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.keymap @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include +#include + +#define DEFAULT 0 +#define LOWER 1 +#define RAISE 2 +#define ADJUST 3 + +/* Uncomment this block if using RGB +&led_strip { + chain-length = <6>; + // chain-length = <38>; // Uncomment if using both per-key and underglow LEDs + // chain-length = <32>; // Uncomment if using only per-key LEDs. +}; + */ + +/* NOTE: At the time of the creation of this keymap, there are no specified codes for 'eisuu' and 'kana' input in ZMK. +However, 'LANG1' and 'LANG2' are fully-functioning candidates for 'kana' and 'eisuu' input respectively. +As such, those are in use within the default layer at this time.*/ + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | GRAVE | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL | + // | TAB | Q | W | E | R | T | | Y | U | I | O | P | BSPC | + // | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | + // | SHIFT | Z | X | C | V | B | LBKT | | RBKT | N | M | , | . | / | RET | + // | ADJUST | ESC | ALT | LGUI | EISUU | LOWER | SPACE | | SPACE | RAISE | KANA | LEFT | DOWN | UP | RIGHT | + bindings = < + &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DEL + &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC + &kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LBKT &kp RBKT &kp N &kp M &kp COMMA &kp PERIOD &kp SLASH &kp RET + &mo ADJUST &kp ESC &kp LALT &kp LGUI &kp LANG2 &mo LOWER &kp SPACE &kp SPACE &mo RAISE &kp LANG1 &kp LEFT &kp DOWN &kp UP &kp RIGHT + >; + }; + lower_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | | | | | | | | | | | | | | + // | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + // | | | | | | | | | _ | + | { | } | PIPE | + // | | | | | | | ( | | ) | | | | HOME | END | | + // | | | | | | | | | | | | | | | | + bindings = < + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &trans + &trans &trans &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE + &trans &trans &trans &trans &trans &trans &kp LPAR &kp RPAR &trans &trans &trans &kp HOME &kp END &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; + raise_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | | | | | | | | | | | | | | + // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL | + // | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + // | | F7 | F8 | F9 | F10 | F11 | | | | F12 | | PSCRN | PG_DN | PG_UP | | + // | | | | | | | | | | | | NEXT | VOL- | VOL+ | PLAY | + bindings = < + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DEL + &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH + &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &trans &trans &kp F12 &trans &kp PSCRN &kp PG_DN &kp PG_UP &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP + >; + }; + adjust_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | EP TOG | + // | BT CLR | BT SEL0 | BT SEL1 | BT SEL2 | BGT SEL3 | BT SEL4 | | RGB EFF+ | RGB HUE+ | RGB SAT+ | RGB SPD+ | RGB BRI+ | RGB TOG | + // | BT NXT | OUT TOG | OUT USB | OUT BLE | | | | RGB EFF- | RGB HUE- | RGB SAT- | RGB SPD- | RGB BRI- | | + // | BT PRV | | | | | | { | | } | | | | | | | + // | | | | | | | | | | | | | | | | + bindings = < + &kp GRAVE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &ext_power EP_TOG + &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &rgb_ug RGB_EFF &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_SPI &rgb_ug RGB_BRI &rgb_ug RGB_TOG + &bt BT_NXT &out OUT_TOG &out OUT_USB &out OUT_BLE &trans &trans &rgb_ug RGB_EFR &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_SPD &rgb_ug RGB_BRD &trans + &bt BT_PRV &trans &trans &trans &trans &trans &kp LBRC &kp RBRC &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; + }; +}; diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.zmk.yml b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.zmk.yml new file mode 100644 index 00000000000..d83c74ecca8 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.zmk.yml @@ -0,0 +1,15 @@ +file_format: "1" +id: splitkb_aurora_helix +name: splitkb.com Aurora Helix +type: shield +url: https://splitkb.com/products/aurora-helix-pcb-kit +requires: [pro_micro] +exposes: [i2c_oled] +features: + - keys + - display + - encoder + - underglow +siblings: + - splitkb_aurora_helix_left + - splitkb_aurora_helix_right diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_left.overlay b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_left.overlay new file mode 100644 index 00000000000..c9830658b00 --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_left.overlay @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "splitkb_aurora_helix.dtsi" + +/ { + chosen { + zmk,kscan = &kscan; + }; + + kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; + + label = "KSCAN"; + diode-direction = "col2row"; + + row-gpios + = <&pro_micro 21 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 20 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 4 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 5 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 6 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + ; + + col-gpios + = <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 9 GPIO_ACTIVE_HIGH> + ; + }; +}; + +&left_encoder { + status = "okay"; +}; diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_right.overlay b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_right.overlay new file mode 100644 index 00000000000..48572de902d --- /dev/null +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_right.overlay @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "splitkb_aurora_helix.dtsi" + +/ { + chosen { + zmk,kscan = &kscan; + }; + + kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; + + label = "KSCAN"; + diode-direction = "col2row"; + + row-gpios + = <&pro_micro 21 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 20 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 19 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 18 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + ; + + col-gpios + = <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 7 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 4 GPIO_ACTIVE_HIGH> + ; + }; +}; + +&right_encoder { + status = "okay"; +}; + +&default_transform { + col-offset = <7>; +}; From 3936298260699d88f8fb8c839991128ed0edfafa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 05:18:02 +0000 Subject: [PATCH 084/160] chore(deps-dev): bump eslint-plugin-react from 7.32.2 to 7.33.2 in /docs Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.32.2 to 7.33.2. - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md) - [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.32.2...v7.33.2) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- docs/package-lock.json | 1004 ++++++++++++++++++++++++++++++++++++---- docs/package.json | 2 +- 2 files changed, 914 insertions(+), 92 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index 38eae2b7dc8..ded7bf838cb 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -34,7 +34,7 @@ "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-mdx": "^2.0.5", - "eslint-plugin-react": "^7.32.2", + "eslint-plugin-react": "^7.33.2", "json-schema-to-typescript": "^13.1.1", "mustache": "^4.2.0", "null-loader": "^4.0.0", @@ -4172,6 +4172,19 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-flatten": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", @@ -4235,11 +4248,40 @@ "get-intrinsic": "^1.1.3" } }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz", + "integrity": "sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, + "node_modules/asynciterator.prototype": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz", + "integrity": "sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.3" + } + }, "node_modules/at-least-node": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", @@ -4280,6 +4322,18 @@ "postcss": "^8.1.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/axios": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", @@ -5750,9 +5804,9 @@ } }, "node_modules/define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", "dependencies": { "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" @@ -6100,35 +6154,50 @@ } }, "node_modules/es-abstract": { - "version": "1.20.4", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.4.tgz", - "integrity": "sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", + "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==", "dev": true, "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.1", + "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.3", + "get-intrinsic": "^1.2.1", "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", "has": "^1.0.3", "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", "is-callable": "^1.2.7", "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.2", + "object-inspect": "^1.12.3", "object-keys": "^1.1.1", "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", + "regexp.prototype.flags": "^1.5.0", + "safe-array-concat": "^1.0.0", "safe-regex-test": "^1.0.0", - "string.prototype.trimend": "^1.0.5", - "string.prototype.trimstart": "^1.0.5", - "unbox-primitive": "^1.0.2" + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.10" }, "engines": { "node": ">= 0.4" @@ -6137,11 +6206,47 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-iterator-helpers": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.14.tgz", + "integrity": "sha512-JgtVnwiuoRuzLvqelrvN3Xu7H9bu2ap/kQ2CrM62iidP8SKuD99rWU3CJy++s7IVL2qb/AjXPGR/E7i9ngd/Cw==", + "dev": true, + "dependencies": { + "asynciterator.prototype": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-set-tostringtag": "^2.0.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.2.1", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "iterator.prototype": "^1.1.0", + "safe-array-concat": "^1.0.0" + } + }, "node_modules/es-module-lexer": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.2.1.tgz", "integrity": "sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg==" }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-shim-unscopables": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", @@ -6754,15 +6859,16 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.32.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz", - "integrity": "sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==", + "version": "7.33.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz", + "integrity": "sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==", "dev": true, "dependencies": { "array-includes": "^3.1.6", "array.prototype.flatmap": "^1.3.1", "array.prototype.tosorted": "^1.1.1", "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.0.12", "estraverse": "^5.3.0", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", @@ -6772,7 +6878,7 @@ "object.values": "^1.1.6", "prop-types": "^15.8.1", "resolve": "^2.0.0-next.4", - "semver": "^6.3.0", + "semver": "^6.3.1", "string.prototype.matchall": "^4.0.8" }, "engines": { @@ -7454,6 +7560,15 @@ } } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/fork-ts-checker-webpack-plugin": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.2.tgz", @@ -7651,12 +7766,13 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" }, "funding": { @@ -7831,6 +7947,21 @@ "node": ">=4" } }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globalyzer": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", @@ -7862,6 +7993,18 @@ "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", "dev": true }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/got": { "version": "9.6.0", "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", @@ -7986,6 +8129,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -8553,12 +8707,12 @@ "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" }, "node_modules/internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.0", + "get-intrinsic": "^1.2.0", "has": "^1.0.3", "side-channel": "^1.0.4" }, @@ -8612,11 +8766,40 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" }, + "node_modules/is-async-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", + "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", @@ -8771,6 +8954,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-finalizationregistry": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", + "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -8779,6 +8974,21 @@ "node": ">=8" } }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -8814,6 +9024,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", + "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -8941,6 +9160,15 @@ "node": ">=6" } }, + "node_modules/is-set": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", + "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-shared-array-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", @@ -8994,11 +9222,35 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" }, + "node_modules/is-weakmap": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", + "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -9011,6 +9263,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-weakset": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-whitespace-character": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz", @@ -9063,6 +9328,18 @@ "node": ">=0.10.0" } }, + "node_modules/iterator.prototype": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.1.tgz", + "integrity": "sha512-9E+nePc8C9cnQldmNl6bgpTY6zI4OPRZd97fhJ/iVZ1GifIUDVV5F6x1nEDqpe8KaMEZGT4xgrwKQDxXnjOIZQ==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.0", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "reflect.getprototypeof": "^1.0.3" + } + }, "node_modules/jest-util": { "version": "29.2.1", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.2.1.tgz", @@ -11088,9 +11365,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -12794,6 +13071,26 @@ "node": ">=6.0.0" } }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz", + "integrity": "sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "globalthis": "^1.0.3", + "which-builtin-type": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -12824,14 +13121,14 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" }, "engines": { "node": ">= 0.4" @@ -13424,6 +13721,30 @@ "node": ">=6" } }, + "node_modules/safe-array-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", + "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -14063,29 +14384,46 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/string.prototype.trimend": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", - "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "es-abstract": "^1.20.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", - "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "es-abstract": "^1.20.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -14619,18 +14957,83 @@ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "engines": { - "node": ">= 0.6" + "node": ">= 0.6" + } + }, + "node_modules/type-is/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/type-is/node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, "dependencies": { - "mime-db": "1.52.0" + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" }, - "engines": { - "node": ">= 0.6" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/typedarray-to-buffer": { @@ -15839,6 +16242,72 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-builtin-type": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", + "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", + "dev": true, + "dependencies": { + "function.prototype.name": "^1.1.5", + "has-tostringtag": "^1.0.0", + "is-async-function": "^2.0.0", + "is-date-object": "^1.0.5", + "is-finalizationregistry": "^1.0.2", + "is-generator-function": "^1.0.10", + "is-regex": "^1.1.4", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/which-collection": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", + "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "dev": true, + "dependencies": { + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-weakmap": "^2.0.1", + "is-weakset": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/widest-line": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", @@ -19070,6 +19539,16 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, + "array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + } + }, "array-flatten": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", @@ -19118,11 +19597,34 @@ "get-intrinsic": "^1.1.3" } }, + "arraybuffer.prototype.slice": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz", + "integrity": "sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==", + "dev": true, + "requires": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + } + }, "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, + "asynciterator.prototype": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz", + "integrity": "sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.3" + } + }, "at-least-node": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", @@ -19141,6 +19643,12 @@ "postcss-value-parser": "^4.2.0" } }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true + }, "axios": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", @@ -20186,9 +20694,9 @@ "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==" }, "define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", "requires": { "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" @@ -20448,35 +20956,72 @@ } }, "es-abstract": { - "version": "1.20.4", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.4.tgz", - "integrity": "sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", + "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==", "dev": true, "requires": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.1", + "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.3", + "get-intrinsic": "^1.2.1", "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", "has": "^1.0.3", "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", "is-callable": "^1.2.7", "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.2", + "object-inspect": "^1.12.3", "object-keys": "^1.1.1", "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", + "regexp.prototype.flags": "^1.5.0", + "safe-array-concat": "^1.0.0", "safe-regex-test": "^1.0.0", - "string.prototype.trimend": "^1.0.5", - "string.prototype.trimstart": "^1.0.5", - "unbox-primitive": "^1.0.2" + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.10" + } + }, + "es-iterator-helpers": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.14.tgz", + "integrity": "sha512-JgtVnwiuoRuzLvqelrvN3Xu7H9bu2ap/kQ2CrM62iidP8SKuD99rWU3CJy++s7IVL2qb/AjXPGR/E7i9ngd/Cw==", + "dev": true, + "requires": { + "asynciterator.prototype": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-set-tostringtag": "^2.0.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.2.1", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "iterator.prototype": "^1.1.0", + "safe-array-concat": "^1.0.0" } }, "es-module-lexer": { @@ -20484,6 +21029,17 @@ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.2.1.tgz", "integrity": "sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg==" }, + "es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + } + }, "es-shim-unscopables": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", @@ -20956,15 +21512,16 @@ } }, "eslint-plugin-react": { - "version": "7.32.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz", - "integrity": "sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==", + "version": "7.33.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz", + "integrity": "sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==", "dev": true, "requires": { "array-includes": "^3.1.6", "array.prototype.flatmap": "^1.3.1", "array.prototype.tosorted": "^1.1.1", "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.0.12", "estraverse": "^5.3.0", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", @@ -20974,7 +21531,7 @@ "object.values": "^1.1.6", "prop-types": "^15.8.1", "resolve": "^2.0.0-next.4", - "semver": "^6.3.0", + "semver": "^6.3.1", "string.prototype.matchall": "^4.0.8" }, "dependencies": { @@ -21457,6 +22014,15 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "requires": { + "is-callable": "^1.1.3" + } + }, "fork-ts-checker-webpack-plugin": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.2.tgz", @@ -21587,12 +22153,13 @@ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==" }, "get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" } }, @@ -21713,6 +22280,15 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, + "globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3" + } + }, "globalyzer": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", @@ -21738,6 +22314,15 @@ "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", "dev": true }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.3" + } + }, "got": { "version": "9.6.0", "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", @@ -21837,6 +22422,11 @@ "get-intrinsic": "^1.1.1" } }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==" + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -22255,12 +22845,12 @@ "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" }, "internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", "dev": true, "requires": { - "get-intrinsic": "^1.1.0", + "get-intrinsic": "^1.2.0", "has": "^1.0.3", "side-channel": "^1.0.4" } @@ -22297,11 +22887,31 @@ "is-decimal": "^1.0.0" } }, + "is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" }, + "is-async-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", + "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", @@ -22392,11 +23002,29 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" }, + "is-finalizationregistry": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz", + "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, + "is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -22419,6 +23047,12 @@ "is-path-inside": "^3.0.2" } }, + "is-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", + "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", + "dev": true + }, "is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -22498,6 +23132,12 @@ "resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz", "integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==" }, + "is-set": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", + "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", + "dev": true + }, "is-shared-array-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", @@ -22530,11 +23170,26 @@ "has-symbols": "^1.0.2" } }, + "is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "requires": { + "which-typed-array": "^1.1.11" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" }, + "is-weakmap": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", + "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "dev": true + }, "is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -22544,6 +23199,16 @@ "call-bind": "^1.0.2" } }, + "is-weakset": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, "is-whitespace-character": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz", @@ -22582,6 +23247,18 @@ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==" }, + "iterator.prototype": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.1.tgz", + "integrity": "sha512-9E+nePc8C9cnQldmNl6bgpTY6zI4OPRZd97fhJ/iVZ1GifIUDVV5F6x1nEDqpe8KaMEZGT4xgrwKQDxXnjOIZQ==", + "dev": true, + "requires": { + "define-properties": "^1.2.0", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "reflect.getprototypeof": "^1.0.3" + } + }, "jest-util": { "version": "29.2.1", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.2.1.tgz", @@ -23966,9 +24643,9 @@ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" }, "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" }, "object-keys": { "version": "1.1.1", @@ -25142,6 +25819,20 @@ "minimatch": "^3.0.5" } }, + "reflect.getprototypeof": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz", + "integrity": "sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "globalthis": "^1.0.3", + "which-builtin-type": "^1.1.3" + } + }, "regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -25169,14 +25860,14 @@ } }, "regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" } }, "regexpu-core": { @@ -25608,6 +26299,26 @@ "mri": "^1.1.0" } }, + "safe-array-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", + "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + } + } + }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -26111,26 +26822,37 @@ "side-channel": "^1.0.4" } }, + "string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, "string.prototype.trimend": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", - "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "es-abstract": "^1.20.4" } }, "string.prototype.trimstart": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", - "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "es-abstract": "^1.20.4" } }, "stringify-entities": { @@ -26520,6 +27242,53 @@ } } }, + "typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + } + }, + "typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + } + }, + "typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + } + }, + "typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + } + }, "typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -27339,6 +28108,59 @@ "is-symbol": "^1.0.3" } }, + "which-builtin-type": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", + "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", + "dev": true, + "requires": { + "function.prototype.name": "^1.1.5", + "has-tostringtag": "^1.0.0", + "is-async-function": "^2.0.0", + "is-date-object": "^1.0.5", + "is-finalizationregistry": "^1.0.2", + "is-generator-function": "^1.0.10", + "is-regex": "^1.1.4", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + } + } + }, + "which-collection": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", + "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "dev": true, + "requires": { + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-weakmap": "^2.0.1", + "is-weakset": "^2.0.1" + } + }, + "which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + }, "widest-line": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", diff --git a/docs/package.json b/docs/package.json index 9b38bef8b67..a3c3481d672 100644 --- a/docs/package.json +++ b/docs/package.json @@ -53,7 +53,7 @@ "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-mdx": "^2.0.5", - "eslint-plugin-react": "^7.32.2", + "eslint-plugin-react": "^7.33.2", "json-schema-to-typescript": "^13.1.1", "mustache": "^4.2.0", "null-loader": "^4.0.0", From 718500543b6d087ce8aac00caac173030b75be16 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 2 Sep 2023 01:45:12 -0700 Subject: [PATCH 085/160] feat(split): Use directed advertising. * Split centrals to scan with their identity so they receive direct advertising packets. * Split peripherals to use direct advertising if they have an existing bond to a split central. --- app/src/split/bluetooth/Kconfig | 1 + app/src/split/bluetooth/central.c | 4 ++- app/src/split/bluetooth/peripheral.c | 44 ++++++++++++++++++++++++++-- 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/app/src/split/bluetooth/Kconfig b/app/src/split/bluetooth/Kconfig index 0610b667a26..5919010ba31 100644 --- a/app/src/split/bluetooth/Kconfig +++ b/app/src/split/bluetooth/Kconfig @@ -14,6 +14,7 @@ config ZMK_SPLIT_ROLE_CENTRAL select BT_CENTRAL select BT_GATT_CLIENT select BT_GATT_AUTO_DISCOVER_CCC + select BT_SCAN_WITH_IDENTITY if ZMK_SPLIT_ROLE_CENTRAL diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index ccf1cc28ced..860e89a5f3e 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -511,8 +511,10 @@ static void split_central_device_found(const bt_addr_le_t *addr, int8_t rssi, ui LOG_DBG("[DEVICE]: %s, AD evt type %u, AD data len %u, RSSI %i", dev, type, ad->len, rssi); /* We're only interested in connectable events */ - if (type == BT_GAP_ADV_TYPE_ADV_IND || type == BT_GAP_ADV_TYPE_ADV_DIRECT_IND) { + if (type == BT_GAP_ADV_TYPE_ADV_IND) { bt_data_parse(ad, split_central_eir_parse, (void *)addr); + } else if (type == BT_GAP_ADV_TYPE_ADV_DIRECT_IND) { + split_central_eir_found(addr); } } diff --git a/app/src/split/bluetooth/peripheral.c b/app/src/split/bluetooth/peripheral.c index e053db8a61a..1d649f71221 100644 --- a/app/src/split/bluetooth/peripheral.c +++ b/app/src/split/bluetooth/peripheral.c @@ -43,15 +43,49 @@ static const struct bt_data zmk_ble_ad[] = { static bool is_connected = false; -static int start_advertising() { - return bt_le_adv_start(BT_LE_ADV_CONN, zmk_ble_ad, ARRAY_SIZE(zmk_ble_ad), NULL, 0); +static void each_bond(const struct bt_bond_info *info, void *user_data) { + bt_addr_le_t *addr = (bt_addr_le_t *)user_data; + + if (bt_addr_le_cmp(&info->addr, BT_ADDR_LE_NONE) != 0) { + bt_addr_le_copy(addr, &info->addr); + } +} + +static int start_advertising(bool low_duty) { + bt_addr_le_t central_addr = bt_addr_le_none; + + bt_foreach_bond(BT_ID_DEFAULT, each_bond, ¢ral_addr); + + if (bt_addr_le_cmp(¢ral_addr, BT_ADDR_LE_NONE) != 0) { + struct bt_le_adv_param adv_param = low_duty ? *BT_LE_ADV_CONN_DIR_LOW_DUTY(¢ral_addr) + : *BT_LE_ADV_CONN_DIR(¢ral_addr); + return bt_le_adv_start(&adv_param, NULL, 0, NULL, 0); + } else { + return bt_le_adv_start(BT_LE_ADV_CONN, zmk_ble_ad, ARRAY_SIZE(zmk_ble_ad), NULL, 0); + } }; +static bool low_duty_advertising = false; + +static void advertising_cb(struct k_work *work) { + const int err = start_advertising(low_duty_advertising); + if (err < 0) { + LOG_ERR("Failed to start advertising (%d)", err); + } +} + +K_WORK_DEFINE(advertising_work, advertising_cb); + static void connected(struct bt_conn *conn, uint8_t err) { is_connected = (err == 0); ZMK_EVENT_RAISE(new_zmk_split_peripheral_status_changed( (struct zmk_split_peripheral_status_changed){.connected = is_connected})); + + if (err == BT_HCI_ERR_ADV_TIMEOUT) { + low_duty_advertising = true; + k_work_submit(&advertising_work); + } } static void disconnected(struct bt_conn *conn, uint8_t reason) { @@ -65,6 +99,9 @@ static void disconnected(struct bt_conn *conn, uint8_t reason) { ZMK_EVENT_RAISE(new_zmk_split_peripheral_status_changed( (struct zmk_split_peripheral_status_changed){.connected = is_connected})); + + low_duty_advertising = false; + k_work_submit(&advertising_work); } static void security_changed(struct bt_conn *conn, bt_security_t level, enum bt_security_err err) { @@ -119,7 +156,8 @@ static int zmk_peripheral_ble_init(const struct device *_arg) { #else bt_conn_cb_register(&conn_callbacks); - start_advertising(); + low_duty_advertising = false; + k_work_submit(&advertising_work); #endif return 0; From 693875675fec96b46c687540ef46a17fa4132779 Mon Sep 17 00:00:00 2001 From: Nate Eagleson Date: Mon, 4 Sep 2023 19:59:59 -0400 Subject: [PATCH 086/160] fix(docs): Fix typo in caps-word.md (#1924) --- docs/docs/behaviors/caps-word.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/behaviors/caps-word.md b/docs/docs/behaviors/caps-word.md index e85d7ecae98..e5d862d785b 100644 --- a/docs/docs/behaviors/caps-word.md +++ b/docs/docs/behaviors/caps-word.md @@ -7,7 +7,7 @@ sidebar_label: Caps Word The caps word behavior behaves similar to a caps lock, but will automatically deactivate when any key not in a continue list is pressed, or if the caps word key is pressed again. For smaller keyboards using [mod-taps](/docs/behaviors/mod-tap), this can help avoid repeated alternating holds when typing words in all caps. -The modifiers are applied only to to the alphabetic (`A` to `Z`) keycodes, to avoid automatically appliying them to numeric values, etc. +The modifiers are applied only to to the alphabetic (`A` to `Z`) keycodes, to avoid automatically applying them to numeric values, etc. ### Behavior Binding From 8087fa3b2b8bb0590e7cf5de6d22b03acd9411a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 05:12:55 +0000 Subject: [PATCH 087/160] chore(deps): bump @fortawesome/fontawesome-svg-core in /docs Bumps [@fortawesome/fontawesome-svg-core](https://github.com/FortAwesome/Font-Awesome) from 6.4.0 to 6.4.2. - [Release notes](https://github.com/FortAwesome/Font-Awesome/releases) - [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md) - [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.4.0...6.4.2) --- updated-dependencies: - dependency-name: "@fortawesome/fontawesome-svg-core" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- docs/package-lock.json | 34 +++++++++++++++++++++++++--------- docs/package.json | 2 +- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index ded7bf838cb..f17adc4bde9 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@docusaurus/core": "^2.4.0", "@docusaurus/preset-classic": "^2.4.0", - "@fortawesome/fontawesome-svg-core": "^6.4.0", + "@fortawesome/fontawesome-svg-core": "^6.4.2", "@fortawesome/free-solid-svg-icons": "^6.4.0", "@fortawesome/react-fontawesome": "^0.2.0", "@mdx-js/react": "^1.6.22", @@ -2704,17 +2704,26 @@ } }, "node_modules/@fortawesome/fontawesome-svg-core": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.4.0.tgz", - "integrity": "sha512-Bertv8xOiVELz5raB2FlXDPKt+m94MQ3JgDfsVbrqNpLU9+UE2E18GKjLKw+d3XbeYPqg1pzyQKGsrzbw+pPaw==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.4.2.tgz", + "integrity": "sha512-gjYDSKv3TrM2sLTOKBc5rH9ckje8Wrwgx1CxAPbN5N3Fm4prfi7NsJVWd1jklp7i5uSCVwhZS5qlhMXqLrpAIg==", "hasInstallScript": true, "dependencies": { - "@fortawesome/fontawesome-common-types": "6.4.0" + "@fortawesome/fontawesome-common-types": "6.4.2" }, "engines": { "node": ">=6" } }, + "node_modules/@fortawesome/fontawesome-svg-core/node_modules/@fortawesome/fontawesome-common-types": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.4.2.tgz", + "integrity": "sha512-1DgP7f+XQIJbLFCTX1V2QnxVmpLdKdzzo2k8EmvDOePfchaIGQ9eCHj2up3/jNEbZuBqel5OxiaOJf37TWauRA==", + "hasInstallScript": true, + "engines": { + "node": ">=6" + } + }, "node_modules/@fortawesome/free-solid-svg-icons": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.4.0.tgz", @@ -18363,11 +18372,18 @@ "integrity": "sha512-HNii132xfomg5QVZw0HwXXpN22s7VBHQBv9CeOu9tfJnhsWQNd2lmTNi8CSrnw5B+5YOmzu1UoPAyxaXsJ6RgQ==" }, "@fortawesome/fontawesome-svg-core": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.4.0.tgz", - "integrity": "sha512-Bertv8xOiVELz5raB2FlXDPKt+m94MQ3JgDfsVbrqNpLU9+UE2E18GKjLKw+d3XbeYPqg1pzyQKGsrzbw+pPaw==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.4.2.tgz", + "integrity": "sha512-gjYDSKv3TrM2sLTOKBc5rH9ckje8Wrwgx1CxAPbN5N3Fm4prfi7NsJVWd1jklp7i5uSCVwhZS5qlhMXqLrpAIg==", "requires": { - "@fortawesome/fontawesome-common-types": "6.4.0" + "@fortawesome/fontawesome-common-types": "6.4.2" + }, + "dependencies": { + "@fortawesome/fontawesome-common-types": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.4.2.tgz", + "integrity": "sha512-1DgP7f+XQIJbLFCTX1V2QnxVmpLdKdzzo2k8EmvDOePfchaIGQ9eCHj2up3/jNEbZuBqel5OxiaOJf37TWauRA==" + } } }, "@fortawesome/free-solid-svg-icons": { diff --git a/docs/package.json b/docs/package.json index a3c3481d672..aa48af24d3c 100644 --- a/docs/package.json +++ b/docs/package.json @@ -17,7 +17,7 @@ "dependencies": { "@docusaurus/core": "^2.4.0", "@docusaurus/preset-classic": "^2.4.0", - "@fortawesome/fontawesome-svg-core": "^6.4.0", + "@fortawesome/fontawesome-svg-core": "^6.4.2", "@fortawesome/free-solid-svg-icons": "^6.4.0", "@fortawesome/react-fontawesome": "^0.2.0", "@mdx-js/react": "^1.6.22", From f442776fe2bea2a3644d0767a2cf1e975c6d9b38 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 10 Jun 2023 17:41:22 -0700 Subject: [PATCH 088/160] feat(docs): Detail logging and note extra useful options --- docs/docs/development/usb-logging.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/docs/development/usb-logging.md b/docs/docs/development/usb-logging.md index 9a2980ae6c8..87cd0e7d853 100644 --- a/docs/docs/development/usb-logging.md +++ b/docs/docs/development/usb-logging.md @@ -20,13 +20,16 @@ It is recommended to only enable logging when needed, and not leaving it on by d ## Kconfig -The `CONFIG_ZMK_USB_LOGGING` KConfig value needs to be set, either by copy and pasting into the `app/prj.conf` file, or by running -`west build -t menuconfig` and manually enabling the setting in that UI at `ZMK -> Advanced -> USB Logging`. +The `CONFIG_ZMK_USB_LOGGING` Kconfig enables USB logging. This can be set at the keyboard level, typically in the `config/.conf` +file if you are using a [user config repository](user-setup.md). It can also be enabled at the ZMK level using the `app/prj.conf` file, or other +search locations described in the [configuration overview](config/index.md#config-file-locations). + +Logging can be further configured using Kconfig described in [the Zephyr documentation](https://docs.zephyrproject.org/3.2.0/services/logging/index.html). +For instance, setting `CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS` to a large value such as `8000` might help catch issues that happen near keyboard +boot, before you can connect to view the logs. :::note -If you are debugging your own keyboard in your [user config repository](user-setup.md), use -`config/boards/shields//.conf` instead of `app/prj.conf`. In Github -Actions, you can search the `Kconfig file` build log to verify the options above have been enabled +In Github Actions, you can check the ` Kconfig file` step output to verify the options above have been enabled for you successfully. ::: From 7f9e9f8c64f3128c2c3e7af3f22ced665fe1b873 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Tue, 5 Sep 2023 22:23:44 -0700 Subject: [PATCH 089/160] fix(boards): Disable QSPI for Xiao BLE The GD25Q16 flash connected via QSPI seems to be causing issues with excessive battery use and inability to sleep. Since ZMK doesn't use it, disable it. Resolves #1901 --- app/boards/seeeduino_xiao_ble.overlay | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/boards/seeeduino_xiao_ble.overlay b/app/boards/seeeduino_xiao_ble.overlay index 51671a803b4..e6a5b62c738 100644 --- a/app/boards/seeeduino_xiao_ble.overlay +++ b/app/boards/seeeduino_xiao_ble.overlay @@ -32,3 +32,6 @@ }; }; +&qspi { + status = "disabled"; +}; From eaeea4bdfa2d67c7faea8e5f77b638723ebfe5e9 Mon Sep 17 00:00:00 2001 From: Jeppe Klitgaard Date: Tue, 12 Sep 2023 08:32:09 +0200 Subject: [PATCH 090/160] feat(docs): Add missing `&kp` tip for `devicetree_unfixed.h` error --- docs/docs/troubleshooting.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index d47671bce36..1418f327feb 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -58,10 +58,14 @@ A `devicetree_unfixed.h` error that follows with an "undeclared here" string ind In this example, the error string `DT_N_S_keymap_S_symbol_layer_P_bindings_IDX_12_PH_P_label` indicates a problem with the key binding in position `12` in the `symbol_layer` of the keymap. -:::note +:::info Key positions are numbered starting from `0` at the top left key on the keymap, incrementing horizontally, row by row. ::: +:::tip +A common mistake that leads to this error is to use [key press keycodes](behaviors/key-press.md) without the leading `&kp` binding. That is, having entries such as `SPACE` that should have been `&kp SPACE`. +::: + ### Split Keyboard Halves Unable to Pair Split keyboard halves pairing issue can be resolved by flashing a settings reset firmware to both controllers. You will first need to acquire the reset UF2 image file with one of the following options: From 690bc1bb44b1b62228900906cb308dc6f1a05eb8 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 2 Sep 2023 20:07:31 -0700 Subject: [PATCH 091/160] refactor: Move drivers into properly module. * Align our driver module layout to properly match Zephyr conventions, allowing proper CMake setup to amend the library for each type of driver. --- app/CMakeLists.txt | 2 +- app/Kconfig | 10 +++++++--- app/drivers/CMakeLists.txt | 7 ------- app/drivers/display/CMakeLists.txt | 4 ---- app/include/dt-bindings/zmk/kscan-mock.h | 9 --------- app/module/CMakeLists.txt | 3 +++ app/module/Kconfig | 2 ++ app/module/drivers/CMakeLists.txt | 7 +++++++ app/{ => module}/drivers/Kconfig | 0 app/module/drivers/display/CMakeLists.txt | 6 ++++++ app/{ => module}/drivers/display/Kconfig | 6 +++++- app/{ => module}/drivers/display/Kconfig.il0323 | 0 app/{ => module}/drivers/display/il0323.c | 0 app/{ => module}/drivers/display/il0323_regs.h | 0 app/{ => module}/drivers/gpio/CMakeLists.txt | 3 +-- app/{ => module}/drivers/gpio/Kconfig | 6 ++++-- app/{ => module}/drivers/gpio/Kconfig.595 | 1 - app/{ => module}/drivers/gpio/Kconfig.max7318 | 1 - app/{ => module}/drivers/gpio/gpio_595.c | 0 app/{ => module}/drivers/gpio/gpio_max7318.c | 0 app/{ => module}/drivers/kscan/CMakeLists.txt | 3 +-- app/{ => module}/drivers/kscan/Kconfig | 14 +++++++++----- app/{ => module}/drivers/kscan/debounce.c | 0 app/{ => module}/drivers/kscan/debounce.h | 0 app/{ => module}/drivers/kscan/kscan_composite.c | 0 app/{ => module}/drivers/kscan/kscan_gpio.c | 0 app/{ => module}/drivers/kscan/kscan_gpio.h | 0 app/{ => module}/drivers/kscan/kscan_gpio_demux.c | 0 app/{ => module}/drivers/kscan/kscan_gpio_direct.c | 0 app/{ => module}/drivers/kscan/kscan_gpio_matrix.c | 0 app/{ => module}/drivers/kscan/kscan_mock.c | 0 app/{ => module}/drivers/sensor/CMakeLists.txt | 0 app/{ => module}/drivers/sensor/Kconfig | 6 +++++- .../drivers/sensor/battery/CMakeLists.txt | 0 app/{ => module}/drivers/sensor/battery/Kconfig | 0 .../drivers/sensor/battery/battery_common.c | 0 .../drivers/sensor/battery/battery_common.h | 0 .../drivers/sensor/battery/battery_nrf_vddh.c | 0 .../sensor/battery/battery_voltage_divider.c | 0 .../drivers/sensor/ec11/CMakeLists.txt | 0 app/{ => module}/drivers/sensor/ec11/Kconfig | 0 app/{ => module}/drivers/sensor/ec11/ec11.c | 0 app/{ => module}/drivers/sensor/ec11/ec11.h | 0 .../drivers/sensor/ec11/ec11_trigger.c | 0 .../dts/bindings/display/gooddisplay,il0323.yaml | 0 .../dts/bindings/gpio/maxim,max7318.yaml | 0 .../dts/bindings/gpio/zmk,gpio-595.yaml | 0 .../dts/bindings/kscan/zmk,kscan-gpio-demux.yaml | 0 .../dts/bindings/kscan/zmk,kscan-gpio-direct.yaml | 0 .../dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml | 0 .../dts/bindings/sensor/alps,ec11.yaml | 0 .../dts/bindings/sensor/zmk,battery-nrf-vddh.yaml | 0 .../sensor/zmk,battery-voltage-divider.yaml | 0 .../include/dt-bindings/zmk/kscan_mock.h | 0 app/{drivers => module}/zephyr/module.yml | 2 ++ 55 files changed, 53 insertions(+), 39 deletions(-) delete mode 100644 app/drivers/CMakeLists.txt delete mode 100644 app/drivers/display/CMakeLists.txt delete mode 100644 app/include/dt-bindings/zmk/kscan-mock.h create mode 100644 app/module/CMakeLists.txt create mode 100644 app/module/Kconfig create mode 100644 app/module/drivers/CMakeLists.txt rename app/{ => module}/drivers/Kconfig (100%) create mode 100644 app/module/drivers/display/CMakeLists.txt rename app/{ => module}/drivers/display/Kconfig (58%) rename app/{ => module}/drivers/display/Kconfig.il0323 (100%) rename app/{ => module}/drivers/display/il0323.c (100%) rename app/{ => module}/drivers/display/il0323_regs.h (100%) rename app/{ => module}/drivers/gpio/CMakeLists.txt (65%) rename app/{ => module}/drivers/gpio/Kconfig (52%) rename app/{ => module}/drivers/gpio/Kconfig.595 (95%) rename app/{ => module}/drivers/gpio/Kconfig.max7318 (95%) rename app/{ => module}/drivers/gpio/gpio_595.c (100%) rename app/{ => module}/drivers/gpio/gpio_max7318.c (100%) rename app/{ => module}/drivers/kscan/CMakeLists.txt (85%) rename app/{ => module}/drivers/kscan/Kconfig (94%) rename app/{ => module}/drivers/kscan/debounce.c (100%) rename app/{ => module}/drivers/kscan/debounce.h (100%) rename app/{ => module}/drivers/kscan/kscan_composite.c (100%) rename app/{ => module}/drivers/kscan/kscan_gpio.c (100%) rename app/{ => module}/drivers/kscan/kscan_gpio.h (100%) rename app/{ => module}/drivers/kscan/kscan_gpio_demux.c (100%) rename app/{ => module}/drivers/kscan/kscan_gpio_direct.c (100%) rename app/{ => module}/drivers/kscan/kscan_gpio_matrix.c (100%) rename app/{ => module}/drivers/kscan/kscan_mock.c (100%) rename app/{ => module}/drivers/sensor/CMakeLists.txt (100%) rename app/{ => module}/drivers/sensor/Kconfig (67%) rename app/{ => module}/drivers/sensor/battery/CMakeLists.txt (100%) rename app/{ => module}/drivers/sensor/battery/Kconfig (100%) rename app/{ => module}/drivers/sensor/battery/battery_common.c (100%) rename app/{ => module}/drivers/sensor/battery/battery_common.h (100%) rename app/{ => module}/drivers/sensor/battery/battery_nrf_vddh.c (100%) rename app/{ => module}/drivers/sensor/battery/battery_voltage_divider.c (100%) rename app/{ => module}/drivers/sensor/ec11/CMakeLists.txt (100%) rename app/{ => module}/drivers/sensor/ec11/Kconfig (100%) rename app/{ => module}/drivers/sensor/ec11/ec11.c (100%) rename app/{ => module}/drivers/sensor/ec11/ec11.h (100%) rename app/{ => module}/drivers/sensor/ec11/ec11_trigger.c (100%) rename app/{ => module}/dts/bindings/display/gooddisplay,il0323.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/gpio/maxim,max7318.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/gpio/zmk,gpio-595.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/sensor/alps,ec11.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml (100%) rename app/{drivers/zephyr => module}/dts/bindings/sensor/zmk,battery-voltage-divider.yaml (100%) rename app/{ => module}/include/dt-bindings/zmk/kscan_mock.h (100%) rename app/{drivers => module}/zephyr/module.yml (56%) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index efa349052cf..29944753f80 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -8,7 +8,7 @@ list(APPEND DTS_ROOT ${CMAKE_SOURCE_DIR}/drivers/zephyr) set(ZephyrBuildConfiguration_ROOT ${CMAKE_SOURCE_DIR}/cmake) list(APPEND ZEPHYR_EXTRA_MODULES - ${CMAKE_CURRENT_SOURCE_DIR}/drivers + ${CMAKE_CURRENT_SOURCE_DIR}/module ) # Find Zephyr. This also loads Zephyr's build system. diff --git a/app/Kconfig b/app/Kconfig index 89a128b5a27..0dd9316a2a7 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -403,14 +403,18 @@ endif #Initialization Priorities endmenu -menu "KSCAN Settings" +menuconfig ZMK_KSCAN + bool "ZMK KScan Integration" + default y + select KSCAN + +if ZMK_KSCAN config ZMK_KSCAN_EVENT_QUEUE_SIZE int "Size of the event queue for KSCAN events to buffer events" default 4 -#KSCAN Settings -endmenu +endif # ZMK_KSCAN menu "Logging" diff --git a/app/drivers/CMakeLists.txt b/app/drivers/CMakeLists.txt deleted file mode 100644 index 44d69ac37a2..00000000000 --- a/app/drivers/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -add_subdirectory_ifdef(CONFIG_ZMK_DRIVERS_GPIO gpio) -add_subdirectory(kscan) -add_subdirectory(sensor) -add_subdirectory(display) diff --git a/app/drivers/display/CMakeLists.txt b/app/drivers/display/CMakeLists.txt deleted file mode 100644 index d5e83c1dc4e..00000000000 --- a/app/drivers/display/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright (c) 2021 The ZMK Contributors -# SPDX-License-Identifier: MIT - -zephyr_sources_ifdef(CONFIG_IL0323 il0323.c) \ No newline at end of file diff --git a/app/include/dt-bindings/zmk/kscan-mock.h b/app/include/dt-bindings/zmk/kscan-mock.h deleted file mode 100644 index 4ed666c61ca..00000000000 --- a/app/include/dt-bindings/zmk/kscan-mock.h +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -#warning "kscan-mock.h has been deprecated and superseded by kscan_mock.h" - -#include "kscan_mock.h" \ No newline at end of file diff --git a/app/module/CMakeLists.txt b/app/module/CMakeLists.txt new file mode 100644 index 00000000000..1c140d33d4a --- /dev/null +++ b/app/module/CMakeLists.txt @@ -0,0 +1,3 @@ +zephyr_include_directories(include) + +add_subdirectory(drivers) \ No newline at end of file diff --git a/app/module/Kconfig b/app/module/Kconfig new file mode 100644 index 00000000000..cb2ae20cd7c --- /dev/null +++ b/app/module/Kconfig @@ -0,0 +1,2 @@ + +rsource "drivers/Kconfig" \ No newline at end of file diff --git a/app/module/drivers/CMakeLists.txt b/app/module/drivers/CMakeLists.txt new file mode 100644 index 00000000000..5281c3dcb21 --- /dev/null +++ b/app/module/drivers/CMakeLists.txt @@ -0,0 +1,7 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +add_subdirectory_ifdef(CONFIG_GPIO gpio) +add_subdirectory_ifdef(CONFIG_KSCAN kscan) +add_subdirectory_ifdef(CONFIG_SENSOR sensor) +add_subdirectory_ifdef(CONFIG_DISPLAY display) diff --git a/app/drivers/Kconfig b/app/module/drivers/Kconfig similarity index 100% rename from app/drivers/Kconfig rename to app/module/drivers/Kconfig diff --git a/app/module/drivers/display/CMakeLists.txt b/app/module/drivers/display/CMakeLists.txt new file mode 100644 index 00000000000..6fc98c95a9d --- /dev/null +++ b/app/module/drivers/display/CMakeLists.txt @@ -0,0 +1,6 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +zephyr_library_amend() + +zephyr_library_sources_ifdef(CONFIG_IL0323 il0323.c) \ No newline at end of file diff --git a/app/drivers/display/Kconfig b/app/module/drivers/display/Kconfig similarity index 58% rename from app/drivers/display/Kconfig rename to app/module/drivers/display/Kconfig index efa064d4f6b..d70aff7c40a 100644 --- a/app/drivers/display/Kconfig +++ b/app/module/drivers/display/Kconfig @@ -1,4 +1,8 @@ # Copyright (c) 2021 The ZMK Contributors # SPDX-License-Identifier: MIT -rsource "Kconfig.il0323" \ No newline at end of file +if DISPLAY + +rsource "Kconfig.il0323" + +endif # DISPLAY \ No newline at end of file diff --git a/app/drivers/display/Kconfig.il0323 b/app/module/drivers/display/Kconfig.il0323 similarity index 100% rename from app/drivers/display/Kconfig.il0323 rename to app/module/drivers/display/Kconfig.il0323 diff --git a/app/drivers/display/il0323.c b/app/module/drivers/display/il0323.c similarity index 100% rename from app/drivers/display/il0323.c rename to app/module/drivers/display/il0323.c diff --git a/app/drivers/display/il0323_regs.h b/app/module/drivers/display/il0323_regs.h similarity index 100% rename from app/drivers/display/il0323_regs.h rename to app/module/drivers/display/il0323_regs.h diff --git a/app/drivers/gpio/CMakeLists.txt b/app/module/drivers/gpio/CMakeLists.txt similarity index 65% rename from app/drivers/gpio/CMakeLists.txt rename to app/module/drivers/gpio/CMakeLists.txt index 0756ed386b4..b5647e87bd7 100644 --- a/app/drivers/gpio/CMakeLists.txt +++ b/app/module/drivers/gpio/CMakeLists.txt @@ -1,8 +1,7 @@ # Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT -zephyr_library_named(zmk__drivers__gpio) -zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include) +zephyr_library_amend() zephyr_library_sources_ifdef(CONFIG_GPIO_595 gpio_595.c) zephyr_library_sources_ifdef(CONFIG_GPIO_MAX7318 gpio_max7318.c) diff --git a/app/drivers/gpio/Kconfig b/app/module/drivers/gpio/Kconfig similarity index 52% rename from app/drivers/gpio/Kconfig rename to app/module/drivers/gpio/Kconfig index 54b30590e1c..a6c7b4a19ef 100644 --- a/app/drivers/gpio/Kconfig +++ b/app/module/drivers/gpio/Kconfig @@ -1,5 +1,7 @@ -menuconfig ZMK_DRIVERS_GPIO - bool "GPIO" + +if GPIO rsource "Kconfig.max7318" rsource "Kconfig.595" + +endif # GPIO \ No newline at end of file diff --git a/app/drivers/gpio/Kconfig.595 b/app/module/drivers/gpio/Kconfig.595 similarity index 95% rename from app/drivers/gpio/Kconfig.595 rename to app/module/drivers/gpio/Kconfig.595 index b4b6bdcc2d8..7ebdc0cc54c 100644 --- a/app/drivers/gpio/Kconfig.595 +++ b/app/module/drivers/gpio/Kconfig.595 @@ -10,7 +10,6 @@ menuconfig GPIO_595 default $(dt_compat_enabled,$(DT_COMPAT_ZMK_GPIO_595)) depends on SPI select HAS_DTS_GPIO - select ZMK_DRIVERS_GPIO help Enable driver for 595 shift register chip using SPI. diff --git a/app/drivers/gpio/Kconfig.max7318 b/app/module/drivers/gpio/Kconfig.max7318 similarity index 95% rename from app/drivers/gpio/Kconfig.max7318 rename to app/module/drivers/gpio/Kconfig.max7318 index d572b97090f..b54e1dba465 100644 --- a/app/drivers/gpio/Kconfig.max7318 +++ b/app/module/drivers/gpio/Kconfig.max7318 @@ -10,7 +10,6 @@ menuconfig GPIO_MAX7318 default $(dt_compat_enabled,$(DT_COMPAT_MAXIM_MAX7318)) depends on I2C select HAS_DTS_GPIO - select ZMK_DRIVERS_GPIO help Enable driver for MAX7318 I2C-based GPIO chip. diff --git a/app/drivers/gpio/gpio_595.c b/app/module/drivers/gpio/gpio_595.c similarity index 100% rename from app/drivers/gpio/gpio_595.c rename to app/module/drivers/gpio/gpio_595.c diff --git a/app/drivers/gpio/gpio_max7318.c b/app/module/drivers/gpio/gpio_max7318.c similarity index 100% rename from app/drivers/gpio/gpio_max7318.c rename to app/module/drivers/gpio/gpio_max7318.c diff --git a/app/drivers/kscan/CMakeLists.txt b/app/module/drivers/kscan/CMakeLists.txt similarity index 85% rename from app/drivers/kscan/CMakeLists.txt rename to app/module/drivers/kscan/CMakeLists.txt index 8fc7ed58d50..0bdcd90ea72 100644 --- a/app/drivers/kscan/CMakeLists.txt +++ b/app/module/drivers/kscan/CMakeLists.txt @@ -1,8 +1,7 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -zephyr_library_named(zmk__drivers__kscan) -zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include) +zephyr_library_amend() zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DRIVER debounce.c) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DRIVER kscan_gpio.c) diff --git a/app/drivers/kscan/Kconfig b/app/module/drivers/kscan/Kconfig similarity index 94% rename from app/drivers/kscan/Kconfig rename to app/module/drivers/kscan/Kconfig index 1d1656694dc..e67c9aa8894 100644 --- a/app/drivers/kscan/Kconfig +++ b/app/module/drivers/kscan/Kconfig @@ -7,6 +7,8 @@ DT_COMPAT_ZMK_KSCAN_GPIO_DIRECT := zmk,kscan-gpio-direct DT_COMPAT_ZMK_KSCAN_GPIO_MATRIX := zmk,kscan-gpio-matrix DT_COMPAT_ZMK_KSCAN_MOCK := zmk,kscan-mock +if KSCAN + config ZMK_KSCAN_COMPOSITE_DRIVER bool default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_COMPOSITE)) @@ -87,8 +89,10 @@ config ZMK_KSCAN_DEBOUNCE_RELEASE_MS endif -config ZMK_KSCAN_INIT_PRIORITY - int "Keyboard scan driver init priority" - default 40 - help - Keyboard scan device driver initialization priority. +# config ZMK_KSCAN_INIT_PRIORITY +# int "Keyboard scan driver init priority" +# default 40 +# help +# Keyboard scan device driver initialization priority. + +endif # KSCAN diff --git a/app/drivers/kscan/debounce.c b/app/module/drivers/kscan/debounce.c similarity index 100% rename from app/drivers/kscan/debounce.c rename to app/module/drivers/kscan/debounce.c diff --git a/app/drivers/kscan/debounce.h b/app/module/drivers/kscan/debounce.h similarity index 100% rename from app/drivers/kscan/debounce.h rename to app/module/drivers/kscan/debounce.h diff --git a/app/drivers/kscan/kscan_composite.c b/app/module/drivers/kscan/kscan_composite.c similarity index 100% rename from app/drivers/kscan/kscan_composite.c rename to app/module/drivers/kscan/kscan_composite.c diff --git a/app/drivers/kscan/kscan_gpio.c b/app/module/drivers/kscan/kscan_gpio.c similarity index 100% rename from app/drivers/kscan/kscan_gpio.c rename to app/module/drivers/kscan/kscan_gpio.c diff --git a/app/drivers/kscan/kscan_gpio.h b/app/module/drivers/kscan/kscan_gpio.h similarity index 100% rename from app/drivers/kscan/kscan_gpio.h rename to app/module/drivers/kscan/kscan_gpio.h diff --git a/app/drivers/kscan/kscan_gpio_demux.c b/app/module/drivers/kscan/kscan_gpio_demux.c similarity index 100% rename from app/drivers/kscan/kscan_gpio_demux.c rename to app/module/drivers/kscan/kscan_gpio_demux.c diff --git a/app/drivers/kscan/kscan_gpio_direct.c b/app/module/drivers/kscan/kscan_gpio_direct.c similarity index 100% rename from app/drivers/kscan/kscan_gpio_direct.c rename to app/module/drivers/kscan/kscan_gpio_direct.c diff --git a/app/drivers/kscan/kscan_gpio_matrix.c b/app/module/drivers/kscan/kscan_gpio_matrix.c similarity index 100% rename from app/drivers/kscan/kscan_gpio_matrix.c rename to app/module/drivers/kscan/kscan_gpio_matrix.c diff --git a/app/drivers/kscan/kscan_mock.c b/app/module/drivers/kscan/kscan_mock.c similarity index 100% rename from app/drivers/kscan/kscan_mock.c rename to app/module/drivers/kscan/kscan_mock.c diff --git a/app/drivers/sensor/CMakeLists.txt b/app/module/drivers/sensor/CMakeLists.txt similarity index 100% rename from app/drivers/sensor/CMakeLists.txt rename to app/module/drivers/sensor/CMakeLists.txt diff --git a/app/drivers/sensor/Kconfig b/app/module/drivers/sensor/Kconfig similarity index 67% rename from app/drivers/sensor/Kconfig rename to app/module/drivers/sensor/Kconfig index a828f6c63ab..6a8ac07ea3e 100644 --- a/app/drivers/sensor/Kconfig +++ b/app/module/drivers/sensor/Kconfig @@ -1,5 +1,9 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT +if SENSOR + rsource "battery/Kconfig" -rsource "ec11/Kconfig" \ No newline at end of file +rsource "ec11/Kconfig" + +endif # SENSOR \ No newline at end of file diff --git a/app/drivers/sensor/battery/CMakeLists.txt b/app/module/drivers/sensor/battery/CMakeLists.txt similarity index 100% rename from app/drivers/sensor/battery/CMakeLists.txt rename to app/module/drivers/sensor/battery/CMakeLists.txt diff --git a/app/drivers/sensor/battery/Kconfig b/app/module/drivers/sensor/battery/Kconfig similarity index 100% rename from app/drivers/sensor/battery/Kconfig rename to app/module/drivers/sensor/battery/Kconfig diff --git a/app/drivers/sensor/battery/battery_common.c b/app/module/drivers/sensor/battery/battery_common.c similarity index 100% rename from app/drivers/sensor/battery/battery_common.c rename to app/module/drivers/sensor/battery/battery_common.c diff --git a/app/drivers/sensor/battery/battery_common.h b/app/module/drivers/sensor/battery/battery_common.h similarity index 100% rename from app/drivers/sensor/battery/battery_common.h rename to app/module/drivers/sensor/battery/battery_common.h diff --git a/app/drivers/sensor/battery/battery_nrf_vddh.c b/app/module/drivers/sensor/battery/battery_nrf_vddh.c similarity index 100% rename from app/drivers/sensor/battery/battery_nrf_vddh.c rename to app/module/drivers/sensor/battery/battery_nrf_vddh.c diff --git a/app/drivers/sensor/battery/battery_voltage_divider.c b/app/module/drivers/sensor/battery/battery_voltage_divider.c similarity index 100% rename from app/drivers/sensor/battery/battery_voltage_divider.c rename to app/module/drivers/sensor/battery/battery_voltage_divider.c diff --git a/app/drivers/sensor/ec11/CMakeLists.txt b/app/module/drivers/sensor/ec11/CMakeLists.txt similarity index 100% rename from app/drivers/sensor/ec11/CMakeLists.txt rename to app/module/drivers/sensor/ec11/CMakeLists.txt diff --git a/app/drivers/sensor/ec11/Kconfig b/app/module/drivers/sensor/ec11/Kconfig similarity index 100% rename from app/drivers/sensor/ec11/Kconfig rename to app/module/drivers/sensor/ec11/Kconfig diff --git a/app/drivers/sensor/ec11/ec11.c b/app/module/drivers/sensor/ec11/ec11.c similarity index 100% rename from app/drivers/sensor/ec11/ec11.c rename to app/module/drivers/sensor/ec11/ec11.c diff --git a/app/drivers/sensor/ec11/ec11.h b/app/module/drivers/sensor/ec11/ec11.h similarity index 100% rename from app/drivers/sensor/ec11/ec11.h rename to app/module/drivers/sensor/ec11/ec11.h diff --git a/app/drivers/sensor/ec11/ec11_trigger.c b/app/module/drivers/sensor/ec11/ec11_trigger.c similarity index 100% rename from app/drivers/sensor/ec11/ec11_trigger.c rename to app/module/drivers/sensor/ec11/ec11_trigger.c diff --git a/app/dts/bindings/display/gooddisplay,il0323.yaml b/app/module/dts/bindings/display/gooddisplay,il0323.yaml similarity index 100% rename from app/dts/bindings/display/gooddisplay,il0323.yaml rename to app/module/dts/bindings/display/gooddisplay,il0323.yaml diff --git a/app/drivers/zephyr/dts/bindings/gpio/maxim,max7318.yaml b/app/module/dts/bindings/gpio/maxim,max7318.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/gpio/maxim,max7318.yaml rename to app/module/dts/bindings/gpio/maxim,max7318.yaml diff --git a/app/drivers/zephyr/dts/bindings/gpio/zmk,gpio-595.yaml b/app/module/dts/bindings/gpio/zmk,gpio-595.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/gpio/zmk,gpio-595.yaml rename to app/module/dts/bindings/gpio/zmk,gpio-595.yaml diff --git a/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml b/app/module/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml rename to app/module/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml diff --git a/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml b/app/module/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml rename to app/module/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml diff --git a/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml b/app/module/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml rename to app/module/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml diff --git a/app/drivers/zephyr/dts/bindings/sensor/alps,ec11.yaml b/app/module/dts/bindings/sensor/alps,ec11.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/sensor/alps,ec11.yaml rename to app/module/dts/bindings/sensor/alps,ec11.yaml diff --git a/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml b/app/module/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml rename to app/module/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml diff --git a/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-voltage-divider.yaml b/app/module/dts/bindings/sensor/zmk,battery-voltage-divider.yaml similarity index 100% rename from app/drivers/zephyr/dts/bindings/sensor/zmk,battery-voltage-divider.yaml rename to app/module/dts/bindings/sensor/zmk,battery-voltage-divider.yaml diff --git a/app/include/dt-bindings/zmk/kscan_mock.h b/app/module/include/dt-bindings/zmk/kscan_mock.h similarity index 100% rename from app/include/dt-bindings/zmk/kscan_mock.h rename to app/module/include/dt-bindings/zmk/kscan_mock.h diff --git a/app/drivers/zephyr/module.yml b/app/module/zephyr/module.yml similarity index 56% rename from app/drivers/zephyr/module.yml rename to app/module/zephyr/module.yml index 0b6605945e5..219b2cfd201 100644 --- a/app/drivers/zephyr/module.yml +++ b/app/module/zephyr/module.yml @@ -1,3 +1,5 @@ build: cmake: . kconfig: Kconfig + settings: + dts_root: . From c28ef1b61e9feb748ff0823f7f226d67e14fd3aa Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 2 Sep 2023 20:28:47 -0700 Subject: [PATCH 092/160] refactor(drivers): Use proper init stage/priority. * Avoid APPLICATION stage and use the proper earlier stage for kscan drivers. --- app/module/drivers/kscan/Kconfig | 6 ------ app/module/drivers/kscan/kscan_composite.c | 2 +- app/module/drivers/kscan/kscan_gpio_demux.c | 2 +- app/module/drivers/kscan/kscan_gpio_direct.c | 2 +- app/module/drivers/kscan/kscan_gpio_matrix.c | 2 +- app/module/drivers/kscan/kscan_mock.c | 4 ++-- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/app/module/drivers/kscan/Kconfig b/app/module/drivers/kscan/Kconfig index e67c9aa8894..60b5df3b6ad 100644 --- a/app/module/drivers/kscan/Kconfig +++ b/app/module/drivers/kscan/Kconfig @@ -89,10 +89,4 @@ config ZMK_KSCAN_DEBOUNCE_RELEASE_MS endif -# config ZMK_KSCAN_INIT_PRIORITY -# int "Keyboard scan driver init priority" -# default 40 -# help -# Keyboard scan device driver initialization priority. - endif # KSCAN diff --git a/app/module/drivers/kscan/kscan_composite.c b/app/module/drivers/kscan/kscan_composite.c index 9909a4cfcfa..97311ef8e52 100644 --- a/app/module/drivers/kscan/kscan_composite.c +++ b/app/module/drivers/kscan/kscan_composite.c @@ -109,4 +109,4 @@ static const struct kscan_composite_config kscan_composite_config = {}; static struct kscan_composite_data kscan_composite_data; DEVICE_DT_INST_DEFINE(0, kscan_composite_init, NULL, &kscan_composite_data, &kscan_composite_config, - APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &mock_driver_api); + POST_KERNEL, CONFIG_KSCAN_INIT_PRIORITY, &mock_driver_api); diff --git a/app/module/drivers/kscan/kscan_gpio_demux.c b/app/module/drivers/kscan/kscan_gpio_demux.c index 812a899d89c..2cbe116d9f2 100644 --- a/app/module/drivers/kscan/kscan_gpio_demux.c +++ b/app/module/drivers/kscan/kscan_gpio_demux.c @@ -201,7 +201,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); }; \ \ DEVICE_DT_INST_DEFINE(n, kscan_gpio_init_##n, NULL, &kscan_gpio_data_##n, \ - &kscan_gpio_config_##n, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY, \ + &kscan_gpio_config_##n, POST_KERNEL, CONFIG_KSCAN_INIT_PRIORITY, \ &gpio_driver_api_##n); DT_INST_FOREACH_STATUS_OKAY(GPIO_INST_INIT) diff --git a/app/module/drivers/kscan/kscan_gpio_direct.c b/app/module/drivers/kscan/kscan_gpio_direct.c index d43d716bf64..c0990887083 100644 --- a/app/module/drivers/kscan/kscan_gpio_direct.c +++ b/app/module/drivers/kscan/kscan_gpio_direct.c @@ -354,7 +354,7 @@ static const struct kscan_driver_api kscan_direct_api = { }; \ \ DEVICE_DT_INST_DEFINE(n, &kscan_direct_init, NULL, &kscan_direct_data_##n, \ - &kscan_direct_config_##n, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY, \ + &kscan_direct_config_##n, POST_KERNEL, CONFIG_KSCAN_INIT_PRIORITY, \ &kscan_direct_api); DT_INST_FOREACH_STATUS_OKAY(KSCAN_DIRECT_INIT); diff --git a/app/module/drivers/kscan/kscan_gpio_matrix.c b/app/module/drivers/kscan/kscan_gpio_matrix.c index b8e72044928..309da204b13 100644 --- a/app/module/drivers/kscan/kscan_gpio_matrix.c +++ b/app/module/drivers/kscan/kscan_gpio_matrix.c @@ -465,7 +465,7 @@ static const struct kscan_driver_api kscan_matrix_api = { }; \ \ DEVICE_DT_INST_DEFINE(n, &kscan_matrix_init, NULL, &kscan_matrix_data_##n, \ - &kscan_matrix_config_##n, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY, \ + &kscan_matrix_config_##n, POST_KERNEL, CONFIG_KSCAN_INIT_PRIORITY, \ &kscan_matrix_api); DT_INST_FOREACH_STATUS_OKAY(KSCAN_MATRIX_INIT); diff --git a/app/module/drivers/kscan/kscan_mock.c b/app/module/drivers/kscan/kscan_mock.c index 57862b0d6f4..604e164cbc5 100644 --- a/app/module/drivers/kscan/kscan_mock.c +++ b/app/module/drivers/kscan/kscan_mock.c @@ -89,7 +89,7 @@ static int kscan_mock_configure(const struct device *dev, kscan_callback_t callb static const struct kscan_mock_config_##n kscan_mock_config_##n = { \ .events = DT_INST_PROP(n, events), .exit_after = DT_INST_PROP(n, exit_after)}; \ DEVICE_DT_INST_DEFINE(n, kscan_mock_init_##n, NULL, &kscan_mock_data_##n, \ - &kscan_mock_config_##n, APPLICATION, \ - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &mock_driver_api_##n); + &kscan_mock_config_##n, POST_KERNEL, CONFIG_KSCAN_INIT_PRIORITY, \ + &mock_driver_api_##n); DT_INST_FOREACH_STATUS_OKAY(MOCK_INST_INIT) From 0ca7f69b6d21f0e24555d635a017459a8ed0fe43 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 11 Sep 2023 21:56:37 -0700 Subject: [PATCH 093/160] refactor: Promote debounce to exposed mod lib. * Promote previously local debounce code from kscan drivers to exposed module lib, for use with other drivers as needed. * Refactor existing kscan driver to new "public" API. --- app/module/CMakeLists.txt | 3 ++- app/module/Kconfig | 3 ++- app/module/drivers/kscan/CMakeLists.txt | 1 - app/module/drivers/kscan/Kconfig | 1 + app/module/drivers/kscan/kscan_gpio_direct.c | 21 ++++++++++--------- app/module/drivers/kscan/kscan_gpio_matrix.c | 21 ++++++++++--------- .../{drivers/kscan => include/zmk}/debounce.h | 14 ++++++------- app/module/lib/CMakeLists.txt | 2 ++ app/module/lib/Kconfig | 2 ++ app/module/lib/zmk_debounce/CMakeLists.txt | 3 +++ app/module/lib/zmk_debounce/Kconfig | 3 +++ .../kscan => lib/zmk_debounce}/debounce.c | 20 +++++++++--------- 12 files changed, 54 insertions(+), 40 deletions(-) rename app/module/{drivers/kscan => include/zmk}/debounce.h (73%) create mode 100644 app/module/lib/CMakeLists.txt create mode 100644 app/module/lib/Kconfig create mode 100644 app/module/lib/zmk_debounce/CMakeLists.txt create mode 100644 app/module/lib/zmk_debounce/Kconfig rename app/module/{drivers/kscan => lib/zmk_debounce}/debounce.c (62%) diff --git a/app/module/CMakeLists.txt b/app/module/CMakeLists.txt index 1c140d33d4a..db886ac6987 100644 --- a/app/module/CMakeLists.txt +++ b/app/module/CMakeLists.txt @@ -1,3 +1,4 @@ zephyr_include_directories(include) -add_subdirectory(drivers) \ No newline at end of file +add_subdirectory(drivers) +add_subdirectory(lib) \ No newline at end of file diff --git a/app/module/Kconfig b/app/module/Kconfig index cb2ae20cd7c..52c013151a9 100644 --- a/app/module/Kconfig +++ b/app/module/Kconfig @@ -1,2 +1,3 @@ -rsource "drivers/Kconfig" \ No newline at end of file +rsource "drivers/Kconfig" +rsource "lib/Kconfig" \ No newline at end of file diff --git a/app/module/drivers/kscan/CMakeLists.txt b/app/module/drivers/kscan/CMakeLists.txt index 0bdcd90ea72..7ae9524c75f 100644 --- a/app/module/drivers/kscan/CMakeLists.txt +++ b/app/module/drivers/kscan/CMakeLists.txt @@ -3,7 +3,6 @@ zephyr_library_amend() -zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DRIVER debounce.c) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DRIVER kscan_gpio.c) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_MATRIX kscan_gpio_matrix.c) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DIRECT kscan_gpio_direct.c) diff --git a/app/module/drivers/kscan/Kconfig b/app/module/drivers/kscan/Kconfig index 60b5df3b6ad..6f60b3f919f 100644 --- a/app/module/drivers/kscan/Kconfig +++ b/app/module/drivers/kscan/Kconfig @@ -16,6 +16,7 @@ config ZMK_KSCAN_COMPOSITE_DRIVER config ZMK_KSCAN_GPIO_DRIVER bool select GPIO + select ZMK_DEBOUNCE config ZMK_KSCAN_GPIO_DEMUX bool diff --git a/app/module/drivers/kscan/kscan_gpio_direct.c b/app/module/drivers/kscan/kscan_gpio_direct.c index c0990887083..5b227784dad 100644 --- a/app/module/drivers/kscan/kscan_gpio_direct.c +++ b/app/module/drivers/kscan/kscan_gpio_direct.c @@ -4,7 +4,6 @@ * SPDX-License-Identifier: MIT */ -#include "debounce.h" #include "kscan_gpio.h" #include @@ -15,6 +14,8 @@ #include #include +#include + LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #define DT_DRV_COMPAT zmk_kscan_gpio_direct @@ -61,11 +62,11 @@ struct kscan_direct_data { /** Timestamp of the current or scheduled scan. */ int64_t scan_time; /** Current state of the inputs as an array of length config->inputs.len */ - struct debounce_state *pin_state; + struct zmk_debounce_state *pin_state; }; struct kscan_direct_config { - struct debounce_config debounce_config; + struct zmk_debounce_config debounce_config; int32_t debounce_scan_period_ms; int32_t poll_period_ms; bool toggle_mode; @@ -182,8 +183,8 @@ static int kscan_direct_read(const struct device *dev) { return active; } - debounce_update(&data->pin_state[gpio->index], active, config->debounce_scan_period_ms, - &config->debounce_config); + zmk_debounce_update(&data->pin_state[gpio->index], active, config->debounce_scan_period_ms, + &config->debounce_config); } // Process the new state. @@ -191,10 +192,10 @@ static int kscan_direct_read(const struct device *dev) { for (int i = 0; i < data->inputs.len; i++) { const struct kscan_gpio *gpio = &data->inputs.gpios[i]; - struct debounce_state *state = &data->pin_state[gpio->index]; + struct zmk_debounce_state *state = &data->pin_state[gpio->index]; - if (debounce_get_changed(state)) { - const bool pressed = debounce_is_pressed(state); + if (zmk_debounce_get_changed(state)) { + const bool pressed = zmk_debounce_is_pressed(state); LOG_DBG("Sending event at 0,%i state %s", gpio->index, pressed ? "on" : "off"); data->callback(dev, 0, gpio->index, pressed); @@ -203,7 +204,7 @@ static int kscan_direct_read(const struct device *dev) { } } - continue_scan = continue_scan || debounce_is_active(state); + continue_scan = continue_scan || zmk_debounce_is_active(state); } if (continue_scan) { @@ -332,7 +333,7 @@ static const struct kscan_driver_api kscan_direct_api = { static struct kscan_gpio kscan_direct_inputs_##n[] = { \ LISTIFY(INST_INPUTS_LEN(n), KSCAN_DIRECT_INPUT_CFG_INIT, (, ), n)}; \ \ - static struct debounce_state kscan_direct_state_##n[INST_INPUTS_LEN(n)]; \ + static struct zmk_debounce_state kscan_direct_state_##n[INST_INPUTS_LEN(n)]; \ \ COND_INTERRUPTS( \ (static struct kscan_direct_irq_callback kscan_direct_irqs_##n[INST_INPUTS_LEN(n)];)) \ diff --git a/app/module/drivers/kscan/kscan_gpio_matrix.c b/app/module/drivers/kscan/kscan_gpio_matrix.c index 309da204b13..0d8a3190659 100644 --- a/app/module/drivers/kscan/kscan_gpio_matrix.c +++ b/app/module/drivers/kscan/kscan_gpio_matrix.c @@ -4,7 +4,6 @@ * SPDX-License-Identifier: MIT */ -#include "debounce.h" #include "kscan_gpio.h" #include @@ -16,6 +15,8 @@ #include #include +#include + LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #define DT_DRV_COMPAT zmk_kscan_gpio_matrix @@ -80,12 +81,12 @@ struct kscan_matrix_data { * Current state of the matrix as a flattened 2D array of length * (config->rows * config->cols) */ - struct debounce_state *matrix_state; + struct zmk_debounce_state *matrix_state; }; struct kscan_matrix_config { struct kscan_gpio_list outputs; - struct debounce_config debounce_config; + struct zmk_debounce_config debounce_config; size_t rows; size_t cols; int32_t debounce_scan_period_ms; @@ -242,8 +243,8 @@ static int kscan_matrix_read(const struct device *dev) { return active; } - debounce_update(&data->matrix_state[index], active, config->debounce_scan_period_ms, - &config->debounce_config); + zmk_debounce_update(&data->matrix_state[index], active, config->debounce_scan_period_ms, + &config->debounce_config); } err = gpio_pin_set_dt(&out_gpio->spec, 0); @@ -263,16 +264,16 @@ static int kscan_matrix_read(const struct device *dev) { for (int r = 0; r < config->rows; r++) { for (int c = 0; c < config->cols; c++) { const int index = state_index_rc(config, r, c); - struct debounce_state *state = &data->matrix_state[index]; + struct zmk_debounce_state *state = &data->matrix_state[index]; - if (debounce_get_changed(state)) { - const bool pressed = debounce_is_pressed(state); + if (zmk_debounce_get_changed(state)) { + const bool pressed = zmk_debounce_is_pressed(state); LOG_DBG("Sending event at %i,%i state %s", r, c, pressed ? "on" : "off"); data->callback(dev, r, c, pressed); } - continue_scan = continue_scan || debounce_is_active(state); + continue_scan = continue_scan || zmk_debounce_is_active(state); } } @@ -438,7 +439,7 @@ static const struct kscan_driver_api kscan_matrix_api = { static struct kscan_gpio kscan_matrix_cols_##n[] = { \ LISTIFY(INST_COLS_LEN(n), KSCAN_GPIO_COL_CFG_INIT, (, ), n)}; \ \ - static struct debounce_state kscan_matrix_state_##n[INST_MATRIX_LEN(n)]; \ + static struct zmk_debounce_state kscan_matrix_state_##n[INST_MATRIX_LEN(n)]; \ \ COND_INTERRUPTS( \ (static struct kscan_matrix_irq_callback kscan_matrix_irqs_##n[INST_INPUTS_LEN(n)];)) \ diff --git a/app/module/drivers/kscan/debounce.h b/app/module/include/zmk/debounce.h similarity index 73% rename from app/module/drivers/kscan/debounce.h rename to app/module/include/zmk/debounce.h index 6e9faa66818..afa775a023d 100644 --- a/app/module/drivers/kscan/debounce.h +++ b/app/module/include/zmk/debounce.h @@ -13,13 +13,13 @@ #define DEBOUNCE_COUNTER_BITS 14 #define DEBOUNCE_COUNTER_MAX BIT_MASK(DEBOUNCE_COUNTER_BITS) -struct debounce_state { +struct zmk_debounce_state { bool pressed : 1; bool changed : 1; uint16_t counter : DEBOUNCE_COUNTER_BITS; }; -struct debounce_config { +struct zmk_debounce_config { /** Duration a switch must be pressed to latch as pressed. */ uint32_t debounce_press_ms; /** Duration a switch must be released to latch as released. */ @@ -34,23 +34,23 @@ struct debounce_config { * @param elapsed_ms Time elapsed since the previous update in milliseconds. * @param config Debounce settings. */ -void debounce_update(struct debounce_state *state, const bool active, const int elapsed_ms, - const struct debounce_config *config); +void zmk_debounce_update(struct zmk_debounce_state *state, const bool active, const int elapsed_ms, + const struct zmk_debounce_config *config); /** * @returns whether the switch is either latched as pressed or it is potentially * pressed but the debouncer has not yet made a decision. If this returns true, * the kscan driver should continue to poll quickly. */ -bool debounce_is_active(const struct debounce_state *state); +bool zmk_debounce_is_active(const struct zmk_debounce_state *state); /** * @returns whether the switch is latched as pressed. */ -bool debounce_is_pressed(const struct debounce_state *state); +bool zmk_debounce_is_pressed(const struct zmk_debounce_state *state); /** * @returns whether the pressed state of the switch changed in the last call to * debounce_update. */ -bool debounce_get_changed(const struct debounce_state *state); +bool zmk_debounce_get_changed(const struct zmk_debounce_state *state); diff --git a/app/module/lib/CMakeLists.txt b/app/module/lib/CMakeLists.txt new file mode 100644 index 00000000000..146b3637b68 --- /dev/null +++ b/app/module/lib/CMakeLists.txt @@ -0,0 +1,2 @@ + +add_subdirectory_ifdef(CONFIG_ZMK_DEBOUNCE zmk_debounce) \ No newline at end of file diff --git a/app/module/lib/Kconfig b/app/module/lib/Kconfig new file mode 100644 index 00000000000..8f2f06017d3 --- /dev/null +++ b/app/module/lib/Kconfig @@ -0,0 +1,2 @@ + +rsource "zmk_debounce/Kconfig" \ No newline at end of file diff --git a/app/module/lib/zmk_debounce/CMakeLists.txt b/app/module/lib/zmk_debounce/CMakeLists.txt new file mode 100644 index 00000000000..0a65dde1109 --- /dev/null +++ b/app/module/lib/zmk_debounce/CMakeLists.txt @@ -0,0 +1,3 @@ + +zephyr_library() +zephyr_library_sources(debounce.c) \ No newline at end of file diff --git a/app/module/lib/zmk_debounce/Kconfig b/app/module/lib/zmk_debounce/Kconfig new file mode 100644 index 00000000000..cd0321e8569 --- /dev/null +++ b/app/module/lib/zmk_debounce/Kconfig @@ -0,0 +1,3 @@ + +config ZMK_DEBOUNCE + bool "Debounce Support" \ No newline at end of file diff --git a/app/module/drivers/kscan/debounce.c b/app/module/lib/zmk_debounce/debounce.c similarity index 62% rename from app/module/drivers/kscan/debounce.c rename to app/module/lib/zmk_debounce/debounce.c index b38782267e8..6f4885b745c 100644 --- a/app/module/drivers/kscan/debounce.c +++ b/app/module/lib/zmk_debounce/debounce.c @@ -4,14 +4,14 @@ * SPDX-License-Identifier: MIT */ -#include "debounce.h" +#include -static uint32_t get_threshold(const struct debounce_state *state, - const struct debounce_config *config) { +static uint32_t get_threshold(const struct zmk_debounce_state *state, + const struct zmk_debounce_config *config) { return state->pressed ? config->debounce_release_ms : config->debounce_press_ms; } -static void increment_counter(struct debounce_state *state, const int elapsed_ms) { +static void increment_counter(struct zmk_debounce_state *state, const int elapsed_ms) { if (state->counter + elapsed_ms > DEBOUNCE_COUNTER_MAX) { state->counter = DEBOUNCE_COUNTER_MAX; } else { @@ -19,7 +19,7 @@ static void increment_counter(struct debounce_state *state, const int elapsed_ms } } -static void decrement_counter(struct debounce_state *state, const int elapsed_ms) { +static void decrement_counter(struct zmk_debounce_state *state, const int elapsed_ms) { if (state->counter < elapsed_ms) { state->counter = 0; } else { @@ -27,8 +27,8 @@ static void decrement_counter(struct debounce_state *state, const int elapsed_ms } } -void debounce_update(struct debounce_state *state, const bool active, const int elapsed_ms, - const struct debounce_config *config) { +void zmk_debounce_update(struct zmk_debounce_state *state, const bool active, const int elapsed_ms, + const struct zmk_debounce_config *config) { // This uses a variation of the integrator debouncing described at // https://www.kennethkuhn.com/electronics/debounce.c // Every update where "active" does not match the current state, we increment @@ -53,10 +53,10 @@ void debounce_update(struct debounce_state *state, const bool active, const int state->changed = true; } -bool debounce_is_active(const struct debounce_state *state) { +bool zmk_debounce_is_active(const struct zmk_debounce_state *state) { return state->pressed || state->counter > 0; } -bool debounce_is_pressed(const struct debounce_state *state) { return state->pressed; } +bool zmk_debounce_is_pressed(const struct zmk_debounce_state *state) { return state->pressed; } -bool debounce_get_changed(const struct debounce_state *state) { return state->changed; } \ No newline at end of file +bool zmk_debounce_get_changed(const struct zmk_debounce_state *state) { return state->changed; } \ No newline at end of file From 28ce23d4891eee3a1ef0a0d8187afe233d05cf81 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 14 Sep 2023 23:43:47 -0700 Subject: [PATCH 094/160] chore(tests): Move to proper header name. --- app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap | 2 +- app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap | 2 +- app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap | 2 +- app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap | 2 +- app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap | 2 +- app/tests/combo/layer-filter-0/native_posix_64.keymap | 2 +- app/tests/combo/layer-filter-1/native_posix_64.keymap | 2 +- app/tests/combo/multiple-timeouts/native_posix_64.keymap | 2 +- app/tests/combo/overlapping-combos-0/native_posix_64.keymap | 2 +- app/tests/combo/overlapping-combos-1/native_posix_64.keymap | 2 +- app/tests/combo/overlapping-combos-2/native_posix_64.keymap | 2 +- app/tests/combo/overlapping-combos-3/native_posix_64.keymap | 2 +- .../combo/partially-overlapping-combos/native_posix_64.keymap | 2 +- .../press-release-long-combo-complete/native_posix_64.keymap | 2 +- .../press-release-long-combo-incomplete/native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- app/tests/combo/press-release/native_posix_64.keymap | 2 +- app/tests/combo/press-timeout/native_posix_64.keymap | 2 +- .../press1-press2-release1-release2/native_posix_64.keymap | 2 +- .../press1-press2-release2-release1/native_posix_64.keymap | 2 +- .../press1-release1-press2-release2/native_posix_64.keymap | 2 +- app/tests/combo/slowrelease-disabled/native_posix_64.keymap | 2 +- app/tests/combo/slowrelease-enabled/native_posix_64.keymap | 2 +- app/tests/gresc/gresc-press-release/native_posix_64.keymap | 2 +- app/tests/gresc/gresc-two-instances/native_posix_64.keymap | 2 +- .../kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap | 2 +- app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap | 2 +- .../sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap | 2 +- app/tests/to-layer/behavior_keymap.dtsi | 2 +- app/tests/to-layer/normal/native_posix_64.keymap | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap index e6754b71128..3438f9bc77d 100644 --- a/app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap +++ b/app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include &mt { flavor = "hold-preferred"; diff --git a/app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap index 9538243291c..9120e8c3b4a 100644 --- a/app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap +++ b/app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include &mt { flavor = "hold-preferred"; diff --git a/app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap index d6d187e2046..a227fe4c91f 100644 --- a/app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap +++ b/app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include &mt { flavor = "hold-preferred"; diff --git a/app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap index f1c7eee7087..4fbf24071e6 100644 --- a/app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap +++ b/app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include &mt { flavor = "hold-preferred"; diff --git a/app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap index 134b77dfa34..59f4391f288 100644 --- a/app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap +++ b/app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include #define ZMK_COMBO(name, combo_bindings, keypos, combo_term) \ diff --git a/app/tests/combo/layer-filter-0/native_posix_64.keymap b/app/tests/combo/layer-filter-0/native_posix_64.keymap index 8d94872b658..68077849a34 100644 --- a/app/tests/combo/layer-filter-0/native_posix_64.keymap +++ b/app/tests/combo/layer-filter-0/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* it is useful to set timeout to a large value when attaching a debugger. */ #define TIMEOUT (60*60*1000) diff --git a/app/tests/combo/layer-filter-1/native_posix_64.keymap b/app/tests/combo/layer-filter-1/native_posix_64.keymap index 96eccea4ea8..a11b86ad4d9 100644 --- a/app/tests/combo/layer-filter-1/native_posix_64.keymap +++ b/app/tests/combo/layer-filter-1/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* it is useful to set timeout to a large value when attaching a debugger. */ #define TIMEOUT (60*60*1000) diff --git a/app/tests/combo/multiple-timeouts/native_posix_64.keymap b/app/tests/combo/multiple-timeouts/native_posix_64.keymap index d2176390403..a2edc32fcc3 100644 --- a/app/tests/combo/multiple-timeouts/native_posix_64.keymap +++ b/app/tests/combo/multiple-timeouts/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/overlapping-combos-0/native_posix_64.keymap b/app/tests/combo/overlapping-combos-0/native_posix_64.keymap index e82846652d3..e89a3f22d33 100644 --- a/app/tests/combo/overlapping-combos-0/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-0/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* combo 0 timeout inf diff --git a/app/tests/combo/overlapping-combos-1/native_posix_64.keymap b/app/tests/combo/overlapping-combos-1/native_posix_64.keymap index a695a388c66..4b0166bee15 100644 --- a/app/tests/combo/overlapping-combos-1/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-1/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* combo 01 timeout 50 diff --git a/app/tests/combo/overlapping-combos-2/native_posix_64.keymap b/app/tests/combo/overlapping-combos-2/native_posix_64.keymap index 6bf0e7100cd..5c38bcfc403 100644 --- a/app/tests/combo/overlapping-combos-2/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-2/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* combo 01 timeout 100 diff --git a/app/tests/combo/overlapping-combos-3/native_posix_64.keymap b/app/tests/combo/overlapping-combos-3/native_posix_64.keymap index 0a2f5ee137f..48e3397f4a6 100644 --- a/app/tests/combo/overlapping-combos-3/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-3/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* combo 12 timeout 100 diff --git a/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap b/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap index 900c4af3f1e..55e8f1e77b6 100644 --- a/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap +++ b/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap b/app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap index dac0bd5ca4c..da2e9483ff7 100644 --- a/app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap +++ b/app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap b/app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap index 19bad1d0d1d..b1494cecf20 100644 --- a/app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap +++ b/app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap b/app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap index 2eb6271e2f0..8769286413b 100644 --- a/app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap +++ b/app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press-release/native_posix_64.keymap b/app/tests/combo/press-release/native_posix_64.keymap index 6bd432f9c86..26cd241b0bb 100644 --- a/app/tests/combo/press-release/native_posix_64.keymap +++ b/app/tests/combo/press-release/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press-timeout/native_posix_64.keymap b/app/tests/combo/press-timeout/native_posix_64.keymap index 6ca6487ba93..a71de45a7d2 100644 --- a/app/tests/combo/press-timeout/native_posix_64.keymap +++ b/app/tests/combo/press-timeout/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap b/app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap index 9a395a41468..2e0a67a3e7f 100644 --- a/app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap +++ b/app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap b/app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap index 86ca3931dce..8d4838eb511 100644 --- a/app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap +++ b/app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap b/app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap index 650895784ae..9c75e5705b1 100644 --- a/app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap +++ b/app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/slowrelease-disabled/native_posix_64.keymap b/app/tests/combo/slowrelease-disabled/native_posix_64.keymap index 832e9705897..46b35be02ee 100644 --- a/app/tests/combo/slowrelease-disabled/native_posix_64.keymap +++ b/app/tests/combo/slowrelease-disabled/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/combo/slowrelease-enabled/native_posix_64.keymap b/app/tests/combo/slowrelease-enabled/native_posix_64.keymap index 7fdb012ed15..d64876da557 100644 --- a/app/tests/combo/slowrelease-enabled/native_posix_64.keymap +++ b/app/tests/combo/slowrelease-enabled/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { diff --git a/app/tests/gresc/gresc-press-release/native_posix_64.keymap b/app/tests/gresc/gresc-press-release/native_posix_64.keymap index 5e3fac42c72..c472dd6d4ad 100644 --- a/app/tests/gresc/gresc-press-release/native_posix_64.keymap +++ b/app/tests/gresc/gresc-press-release/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { keymap { diff --git a/app/tests/gresc/gresc-two-instances/native_posix_64.keymap b/app/tests/gresc/gresc-two-instances/native_posix_64.keymap index 18f94da5771..14adcf45c8e 100644 --- a/app/tests/gresc/gresc-two-instances/native_posix_64.keymap +++ b/app/tests/gresc/gresc-two-instances/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* This test checks nothing breaks if two grave-escapes are pressed at the same time. diff --git a/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap index 621945a8218..72b218f510f 100644 --- a/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap +++ b/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include &kscan { diff --git a/app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap b/app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap index 23ceeeb6161..bafdbe38d39 100644 --- a/app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap +++ b/app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* sticky layers should quick-release. diff --git a/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap b/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap index 390207515dd..38c8fb4c91c 100644 --- a/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap +++ b/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include /* sticky layers should quick-release. diff --git a/app/tests/to-layer/behavior_keymap.dtsi b/app/tests/to-layer/behavior_keymap.dtsi index 663e897d74b..7dc857fe143 100644 --- a/app/tests/to-layer/behavior_keymap.dtsi +++ b/app/tests/to-layer/behavior_keymap.dtsi @@ -1,6 +1,6 @@ #include #include -#include +#include / { keymap { diff --git a/app/tests/to-layer/normal/native_posix_64.keymap b/app/tests/to-layer/normal/native_posix_64.keymap index 4cb23809452..6ccc9088bb2 100644 --- a/app/tests/to-layer/normal/native_posix_64.keymap +++ b/app/tests/to-layer/normal/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include #include "../behavior_keymap.dtsi" // Press key A From 8abc449cc29ef35ffd5770e9f7680348b8c708f7 Mon Sep 17 00:00:00 2001 From: zhiayang <500236+zhiayang@users.noreply.github.com> Date: Mon, 25 Sep 2023 21:04:03 -0400 Subject: [PATCH 095/160] feat(drivers): add driver for MAX17048 fuel gauge Add driver for MAX17048 fuel gauge for battery reporting. --- app/module/drivers/sensor/CMakeLists.txt | 3 +- app/module/drivers/sensor/Kconfig | 3 +- .../drivers/sensor/max17048/CMakeLists.txt | 9 + app/module/drivers/sensor/max17048/Kconfig | 23 ++ app/module/drivers/sensor/max17048/max17048.c | 222 ++++++++++++++++++ app/module/drivers/sensor/max17048/max17048.h | 41 ++++ .../dts/bindings/sensor/maxim,max17048.yml | 12 + 7 files changed, 311 insertions(+), 2 deletions(-) create mode 100644 app/module/drivers/sensor/max17048/CMakeLists.txt create mode 100644 app/module/drivers/sensor/max17048/Kconfig create mode 100644 app/module/drivers/sensor/max17048/max17048.c create mode 100644 app/module/drivers/sensor/max17048/max17048.h create mode 100644 app/module/dts/bindings/sensor/maxim,max17048.yml diff --git a/app/module/drivers/sensor/CMakeLists.txt b/app/module/drivers/sensor/CMakeLists.txt index b549320f121..9654600a756 100644 --- a/app/module/drivers/sensor/CMakeLists.txt +++ b/app/module/drivers/sensor/CMakeLists.txt @@ -2,4 +2,5 @@ # SPDX-License-Identifier: MIT add_subdirectory_ifdef(CONFIG_ZMK_BATTERY battery) -add_subdirectory_ifdef(CONFIG_EC11 ec11) \ No newline at end of file +add_subdirectory_ifdef(CONFIG_EC11 ec11) +add_subdirectory_ifdef(CONFIG_MAX17048 max17048) diff --git a/app/module/drivers/sensor/Kconfig b/app/module/drivers/sensor/Kconfig index 6a8ac07ea3e..ad570c58c94 100644 --- a/app/module/drivers/sensor/Kconfig +++ b/app/module/drivers/sensor/Kconfig @@ -5,5 +5,6 @@ if SENSOR rsource "battery/Kconfig" rsource "ec11/Kconfig" +rsource "max17048/Kconfig" -endif # SENSOR \ No newline at end of file +endif # SENSOR diff --git a/app/module/drivers/sensor/max17048/CMakeLists.txt b/app/module/drivers/sensor/max17048/CMakeLists.txt new file mode 100644 index 00000000000..e895fa11fb8 --- /dev/null +++ b/app/module/drivers/sensor/max17048/CMakeLists.txt @@ -0,0 +1,9 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +zephyr_include_directories(.) + +zephyr_library() + +zephyr_library_sources_ifdef(CONFIG_MAX17048 max17048.c) +zephyr_library_sources_ifndef(CONFIG_MAX17048 ${ZEPHYR_BASE}/misc/empty_file.c) diff --git a/app/module/drivers/sensor/max17048/Kconfig b/app/module/drivers/sensor/max17048/Kconfig new file mode 100644 index 00000000000..8a7ec16e85d --- /dev/null +++ b/app/module/drivers/sensor/max17048/Kconfig @@ -0,0 +1,23 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +DT_COMPAT_MAXIM_MAX17048 := maxim,max17048 + +menuconfig MAX17048 + bool "MAX17048/9 I2C-based Fuel Gauge" + default $(dt_compat_enabled,$(DT_COMPAT_MAXIM_MAX17048)) + depends on I2C + select ZMK_BATTERY + help + Enable driver for MAX17048/9 I2C-based Fuel Gauge. Supports measuring + battery voltage and state-of-charge. + +if MAX17048 + +config SENSOR_MAX17048_INIT_PRIORITY + int "Init priority" + default 75 + help + Device driver initialization priority. + +endif #MAX17048 diff --git a/app/module/drivers/sensor/max17048/max17048.c b/app/module/drivers/sensor/max17048/max17048.c new file mode 100644 index 00000000000..24cfe093f4a --- /dev/null +++ b/app/module/drivers/sensor/max17048/max17048.c @@ -0,0 +1,222 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT maxim_max17048 + +#include +#include +#include +#include +#include +#include + +#include "max17048.h" + +#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL +#include +LOG_MODULE_REGISTER(sensor_max17048); + +static int read_register(const struct device *dev, uint8_t reg, uint16_t *value) { + + if (k_is_in_isr()) { + return -EWOULDBLOCK; + } + + struct max17048_config *config = (struct max17048_config *)dev->config; + + uint8_t data[2] = {0}; + int ret = i2c_burst_read_dt(&config->i2c_bus, reg, &data[0], sizeof(data)); + if (ret != 0) { + LOG_DBG("i2c_write_read FAIL %d\n", ret); + return ret; + } + + // the register values are returned in big endian (MSB first) + *value = sys_get_be16(data); + return 0; +} + +static int write_register(const struct device *dev, uint8_t reg, uint16_t value) { + + if (k_is_in_isr()) { + return -EWOULDBLOCK; + } + + struct max17048_config *config = (struct max17048_config *)dev->config; + + uint8_t data[2] = {0}; + sys_put_be16(value, &data[0]); + + return i2c_burst_write_dt(&config->i2c_bus, reg, &data[0], sizeof(data)); +} + +static int set_rcomp_value(const struct device *dev, uint8_t rcomp_value) { + + struct max17048_drv_data *const drv_data = (struct max17048_drv_data *const)dev->data; + k_sem_take(&drv_data->lock, K_FOREVER); + + uint16_t tmp = 0; + int err = read_register(dev, REG_CONFIG, &tmp); + if (err != 0) { + goto done; + } + + tmp = ((uint16_t)rcomp_value << 8) | (tmp & 0xFF); + err = write_register(dev, REG_CONFIG, tmp); + if (err != 0) { + goto done; + } + + LOG_DBG("set RCOMP to %d", rcomp_value); + +done: + k_sem_give(&drv_data->lock); + return err; +} + +static int set_sleep_enabled(const struct device *dev, bool sleep) { + + struct max17048_drv_data *const drv_data = (struct max17048_drv_data *const)dev->data; + k_sem_take(&drv_data->lock, K_FOREVER); + + uint16_t tmp = 0; + int err = read_register(dev, REG_CONFIG, &tmp); + if (err != 0) { + goto done; + } + + if (sleep) { + tmp |= 0x80; + } else { + tmp &= ~0x0080; + } + + err = write_register(dev, REG_CONFIG, tmp); + if (err != 0) { + goto done; + } + + LOG_DBG("sleep mode %s", sleep ? "enabled" : "disabled"); + +done: + k_sem_give(&drv_data->lock); + return err; +} + +static int max17048_sample_fetch(const struct device *dev, enum sensor_channel chan) { + + struct max17048_drv_data *const drv_data = dev->data; + k_sem_take(&drv_data->lock, K_FOREVER); + + int err = 0; + + if (chan == SENSOR_CHAN_GAUGE_STATE_OF_CHARGE || chan == SENSOR_CHAN_ALL) { + err = read_register(dev, REG_STATE_OF_CHARGE, &drv_data->raw_state_of_charge); + if (err != 0) { + LOG_WRN("failed to read state-of-charge: %d", err); + goto done; + } + LOG_DBG("read soc: %d", drv_data->raw_state_of_charge); + + } else if (chan == SENSOR_CHAN_GAUGE_VOLTAGE || chan == SENSOR_CHAN_ALL) { + err = read_register(dev, REG_VCELL, &drv_data->raw_vcell); + if (err != 0) { + LOG_WRN("failed to read vcell: %d", err); + goto done; + } + LOG_DBG("read vcell: %d", drv_data->raw_vcell); + + } else { + LOG_DBG("unsupported channel %d", chan); + err = -ENOTSUP; + } + +done: + k_sem_give(&drv_data->lock); + return err; +} + +static int max17048_channel_get(const struct device *dev, enum sensor_channel chan, + struct sensor_value *val) { + int err = 0; + + struct max17048_drv_data *const drv_data = dev->data; + k_sem_take(&drv_data->lock, K_FOREVER); + + struct max17048_drv_data *const data = dev->data; + unsigned int tmp = 0; + + switch (chan) { + case SENSOR_CHAN_GAUGE_VOLTAGE: + // 1250 / 16 = 78.125 + tmp = data->raw_vcell * 1250 / 16; + val->val1 = tmp / 1000000; + val->val2 = tmp % 1000000; + break; + + case SENSOR_CHAN_GAUGE_STATE_OF_CHARGE: + val->val1 = (data->raw_state_of_charge >> 8); + val->val2 = (data->raw_state_of_charge & 0xFF) * 1000000 / 256; + break; + + default: + err = -ENOTSUP; + break; + } + + k_sem_give(&drv_data->lock); + return err; +} + +static int max17048_init(const struct device *dev) { + struct max17048_drv_data *drv_data = dev->data; + const struct max17048_config *config = dev->config; + + if (!device_is_ready(config->i2c_bus.bus)) { + LOG_WRN("i2c bus not ready!"); + return -EINVAL; + } + + uint16_t ic_version = 0; + int err = read_register(dev, REG_VERSION, &ic_version); + if (err != 0) { + LOG_WRN("could not get IC version!"); + return err; + } + + // the functions below need the semaphore, so initialise it here + k_sem_init(&drv_data->lock, 1, 1); + + // bring the device out of sleep + set_sleep_enabled(dev, false); + + // set the default rcomp value -- 0x97, as stated in the datasheet + set_rcomp_value(dev, 0x97); + + LOG_INF("device initialised at 0x%x (version %d)", config->i2c_bus.addr, ic_version); + + return 0; +} + +static const struct sensor_driver_api max17048_api_table = {.sample_fetch = max17048_sample_fetch, + .channel_get = max17048_channel_get}; + +#define MAX17048_INIT(inst) \ + static struct max17048_config max17048_##inst##_config = {.i2c_bus = \ + I2C_DT_SPEC_INST_GET(inst)}; \ + \ + static struct max17048_drv_data max17048_##inst##_drvdata = { \ + .raw_state_of_charge = 0, \ + .raw_charge_rate = 0, \ + .raw_vcell = 0, \ + }; \ + \ + /* This has to init after SPI master */ \ + DEVICE_DT_INST_DEFINE(inst, max17048_init, NULL, &max17048_##inst##_drvdata, \ + &max17048_##inst##_config, POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY, \ + &max17048_api_table); + +DT_INST_FOREACH_STATUS_OKAY(MAX17048_INIT) diff --git a/app/module/drivers/sensor/max17048/max17048.h b/app/module/drivers/sensor/max17048/max17048.h new file mode 100644 index 00000000000..984f5c70f4e --- /dev/null +++ b/app/module/drivers/sensor/max17048/max17048.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define REG_VCELL 0x02 +#define REG_STATE_OF_CHARGE 0x04 +#define REG_MODE 0x06 +#define REG_VERSION 0x08 +#define REG_HIBERNATE 0x0A +#define REG_CONFIG 0x0C +#define REG_VALERT 0x14 +#define REG_CHARGE_RATE 0x16 +#define REG_VRESET 0x18 +#define REG_STATUS 0x1A + +struct max17048_config { + struct i2c_dt_spec i2c_bus; +}; + +struct max17048_drv_data { + struct k_sem lock; + + uint16_t raw_state_of_charge; + uint16_t raw_charge_rate; + uint16_t raw_vcell; +}; + +#ifdef __cplusplus +} +#endif diff --git a/app/module/dts/bindings/sensor/maxim,max17048.yml b/app/module/dts/bindings/sensor/maxim,max17048.yml new file mode 100644 index 00000000000..786f4b8686d --- /dev/null +++ b/app/module/dts/bindings/sensor/maxim,max17048.yml @@ -0,0 +1,12 @@ +# +# Copyright (c) 2022 The ZMK Contributors +# +# SPDX-License-Identifier: MIT +# + +description: > + This is a representation of the Maxim max17048 I2C Fuel Gauge. + +compatible: "maxim,max17048" + +include: [i2c-device.yaml] From 07c82836e032ee4db64098e3b0aa26295b29b989 Mon Sep 17 00:00:00 2001 From: ClicketySplit <101202583+ClicketySplit@users.noreply.github.com> Date: Thu, 28 Sep 2023 09:54:08 -0600 Subject: [PATCH 096/160] fix(shields): Leeloo-Micro set status disabled for encoders. --- app/boards/shields/leeloo_micro/leeloo_micro.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/boards/shields/leeloo_micro/leeloo_micro.dtsi b/app/boards/shields/leeloo_micro/leeloo_micro.dtsi index afe16dfa605..ab68a6153f1 100644 --- a/app/boards/shields/leeloo_micro/leeloo_micro.dtsi +++ b/app/boards/shields/leeloo_micro/leeloo_micro.dtsi @@ -48,7 +48,8 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(3,4) RC(3,5) RC(2,5) RC(2,6) RC(2,7) label = "LEFT_ENCODER"; a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - steps = <120>; + status = "disabled"; + steps = <60>; }; right_encoder: right_encoder { @@ -56,7 +57,8 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(3,4) RC(3,5) RC(2,5) RC(2,6) RC(2,7) label = "RIGHT_ENCODER"; a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - steps = <120>; + status = "disabled"; + steps = <60>; }; sensors { From 9b3d2cb99fe806db5897063e372a5ae45a58b0ec Mon Sep 17 00:00:00 2001 From: zhiayang <500236+zhiayang@users.noreply.github.com> Date: Thu, 28 Sep 2023 12:19:14 -0400 Subject: [PATCH 097/160] fix(driver): Fix broken compilation for MAX7318 driver --- app/module/drivers/gpio/gpio_max7318.c | 15 +++++++-------- app/module/dts/bindings/gpio/maxim,max7318.yaml | 3 --- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/app/module/drivers/gpio/gpio_max7318.c b/app/module/drivers/gpio/gpio_max7318.c index 04424b48b09..1842ce7b2d6 100644 --- a/app/module/drivers/gpio/gpio_max7318.c +++ b/app/module/drivers/gpio/gpio_max7318.c @@ -12,16 +12,15 @@ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #define LOG_LEVEL CONFIG_GPIO_LOG_LEVEL -#include +#include LOG_MODULE_REGISTER(gpio_max7318); diff --git a/app/module/dts/bindings/gpio/maxim,max7318.yaml b/app/module/dts/bindings/gpio/maxim,max7318.yaml index 94952813edd..6c309768d44 100644 --- a/app/module/dts/bindings/gpio/maxim,max7318.yaml +++ b/app/module/dts/bindings/gpio/maxim,max7318.yaml @@ -12,9 +12,6 @@ compatible: "maxim,max7318" include: [gpio-controller.yaml, i2c-device.yaml] properties: - label: - required: true - "#gpio-cells": const: 2 From c1ebadcd2a1b7cad47c2224a4fb6130cda80b7e3 Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Fri, 29 Sep 2023 21:14:31 +0100 Subject: [PATCH 098/160] feat(hid): Add apple globe keycode * feat(hid): Add apple globe keycode * Update docs/src/data/hid.js Co-authored-by: Cem Aksoylar Co-authored-by: Pete Johanson Co-authored-by: Nick Coutsos --- app/include/dt-bindings/zmk/keys.h | 4 ++++ docs/src/data/groups.js | 1 + docs/src/data/hid.js | 21 +++++++++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/app/include/dt-bindings/zmk/keys.h b/app/include/dt-bindings/zmk/keys.h index 3e67c402470..364ffa8647a 100644 --- a/app/include/dt-bindings/zmk/keys.h +++ b/app/include/dt-bindings/zmk/keys.h @@ -1439,3 +1439,7 @@ #define C_KEYBOARD_INPUT_ASSIST_CANCEL \ (ZMK_HID_USAGE(HID_USAGE_CONSUMER, HID_USAGE_CONSUMER_KEYBOARD_INPUT_ASSIST_CANCEL)) #define C_KBIA_CANCEL (C_KEYBOARD_INPUT_ASSIST_CANCEL) + +/* Apple Globe key */ +#define C_AC_NEXT_KEYBOARD_LAYOUT_SELECT (ZMK_HID_USAGE(HID_USAGE_CONSUMER, 0x029D)) +#define GLOBE (C_AC_NEXT_KEYBOARD_LAYOUT_SELECT) diff --git a/docs/src/data/groups.js b/docs/src/data/groups.js index 0eb15d27fc5..5a8dc3cfe75 100644 --- a/docs/src/data/groups.js +++ b/docs/src/data/groups.js @@ -49,6 +49,7 @@ export default { "C_AC_DESKTOP_SHOW_ALL_WINDOWS", "C_AC_DESKTOP_SHOW_ALL_APPLICATIONS", "C_VOICE_COMMAND", + "C_AC_NEXT_KEYBOARD_LAYOUT_SELECT", ], applications: [ "C_AL_NEXT_TASK", diff --git a/docs/src/data/hid.js b/docs/src/data/hid.js index 457671728f8..fc61555c8eb 100644 --- a/docs/src/data/hid.js +++ b/docs/src/data/hid.js @@ -7865,4 +7865,25 @@ export default [ }, footnotes: {}, }, + { + names: ["C_AC_NEXT_KEYBOARD_LAYOUT_SELECT", "GLOBE"], + description: "AC Next Keyboard Layout Select (Apple Globe)", + context: "Consumer AC", + clarify: true, + usages: [ + { + application: consumerApplication, + item: usage(consumerPage, 0x29d), + }, + ], + documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=153", + os: { + windows: null, + linux: null, + android: null, + macos: true, + ios: true, + }, + footnotes: {}, + }, ]; From 933e369d7cacd2680cd8c1355eb7e4a35b4e34f9 Mon Sep 17 00:00:00 2001 From: Andrew Rae Date: Mon, 29 May 2023 22:48:38 -0400 Subject: [PATCH 099/160] feat(core): Adding pre-release for keys that were already pressed. This fixes #1207 and #1076 (and maybe more?). --- app/src/hid_listener.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/src/hid_listener.c b/app/src/hid_listener.c index 3a11101d54f..796ec19b7a4 100644 --- a/app/src/hid_listener.c +++ b/app/src/hid_listener.c @@ -19,6 +19,20 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); static int hid_listener_keycode_pressed(const struct zmk_keycode_state_changed *ev) { int err, explicit_mods_changed, implicit_mods_changed; + if (zmk_hid_is_pressed(ZMK_HID_USAGE(ev->usage_page, ev->keycode))) { + LOG_DBG("unregistering usage_page 0x%02X keycode 0x%02X since it was already pressed", + ev->usage_page, ev->keycode); + err = zmk_hid_release(ZMK_HID_USAGE(ev->usage_page, ev->keycode)); + if (err < 0) { + LOG_DBG("Unable to pre-release keycode (%d)", err); + return err; + } + err = zmk_endpoints_send_report(ev->usage_page); + if (err < 0) { + LOG_ERR("Failed to send key report for pre-releasing keycode (%d)", err); + } + } + LOG_DBG("usage_page 0x%02X keycode 0x%02X implicit_mods 0x%02X explicit_mods 0x%02X", ev->usage_page, ev->keycode, ev->implicit_modifiers, ev->explicit_modifiers); err = zmk_hid_press(ZMK_HID_USAGE(ev->usage_page, ev->keycode)); From dffdb2365e1ff977020a1c62967512b196edee2c Mon Sep 17 00:00:00 2001 From: Andrew Rae Date: Tue, 6 Jun 2023 20:42:52 -0400 Subject: [PATCH 100/160] test(core): Adding coverage for key pre-releasing. Added cases for the two use cases I know of: 1. Rolling with key-repeat behavior 2. Rolling symbols that have the same base key, eg `+=` --- .../tap-when-rolling/events.patterns | 2 ++ .../tap-when-rolling/keycode_events.snapshot | 9 +++++++ .../tap-when-rolling/native_posix.keymap | 13 +++++++++ .../tap-when-rolling/native_posix_64.keymap | 13 +++++++++ .../events.patterns | 4 +++ .../keycode_events.snapshot | 9 +++++++ .../native_posix_64.keymap | 27 +++++++++++++++++++ 7 files changed, 77 insertions(+) create mode 100644 app/tests/key-repeat/tap-when-rolling/events.patterns create mode 100644 app/tests/key-repeat/tap-when-rolling/keycode_events.snapshot create mode 100644 app/tests/key-repeat/tap-when-rolling/native_posix.keymap create mode 100644 app/tests/key-repeat/tap-when-rolling/native_posix_64.keymap create mode 100644 app/tests/modifiers/implicit/kp-rolling-symbols-same-key/events.patterns create mode 100644 app/tests/modifiers/implicit/kp-rolling-symbols-same-key/keycode_events.snapshot create mode 100644 app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_posix_64.keymap diff --git a/app/tests/key-repeat/tap-when-rolling/events.patterns b/app/tests/key-repeat/tap-when-rolling/events.patterns new file mode 100644 index 00000000000..794719239fc --- /dev/null +++ b/app/tests/key-repeat/tap-when-rolling/events.patterns @@ -0,0 +1,2 @@ +s/.*hid_listener_keycode_//p +s/.*hid_implicit_modifiers_//p \ No newline at end of file diff --git a/app/tests/key-repeat/tap-when-rolling/keycode_events.snapshot b/app/tests/key-repeat/tap-when-rolling/keycode_events.snapshot new file mode 100644 index 00000000000..7d54e9de9b2 --- /dev/null +++ b/app/tests/key-repeat/tap-when-rolling/keycode_events.snapshot @@ -0,0 +1,9 @@ +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +press: Modifiers set to 0x00 +pressed: unregistering usage_page 0x07 keycode 0x04 since it was already pressed +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +press: Modifiers set to 0x00 +released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +release: Modifiers set to 0x00 +released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +release: Modifiers set to 0x00 diff --git a/app/tests/key-repeat/tap-when-rolling/native_posix.keymap b/app/tests/key-repeat/tap-when-rolling/native_posix.keymap new file mode 100644 index 00000000000..bb129d14c7a --- /dev/null +++ b/app/tests/key-repeat/tap-when-rolling/native_posix.keymap @@ -0,0 +1,13 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +&kscan { + events = < + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; diff --git a/app/tests/key-repeat/tap-when-rolling/native_posix_64.keymap b/app/tests/key-repeat/tap-when-rolling/native_posix_64.keymap new file mode 100644 index 00000000000..a947f7ab0ed --- /dev/null +++ b/app/tests/key-repeat/tap-when-rolling/native_posix_64.keymap @@ -0,0 +1,13 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +&kscan { + events = < + ZMK_MOCK_PRESS(0,1,9000) + ZMK_MOCK_PRESS(0,0,30) + ZMK_MOCK_RELEASE(0,1,30) + ZMK_MOCK_RELEASE(0,0,3000) + >; +}; diff --git a/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/events.patterns b/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/events.patterns new file mode 100644 index 00000000000..cbf21aff278 --- /dev/null +++ b/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/events.patterns @@ -0,0 +1,4 @@ +s/.*hid_listener_keycode_//p +s/.*hid_register_mod/reg/p +s/.*hid_unregister_mod/unreg/p +s/.*zmk_hid_.*Modifiers set to /mods: Modifiers set to /p \ No newline at end of file diff --git a/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/keycode_events.snapshot b/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/keycode_events.snapshot new file mode 100644 index 00000000000..0b06bd91d88 --- /dev/null +++ b/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/keycode_events.snapshot @@ -0,0 +1,9 @@ +pressed: usage_page 0x07 keycode 0x2E implicit_mods 0x02 explicit_mods 0x00 +mods: Modifiers set to 0x02 +pressed: unregistering usage_page 0x07 keycode 0x2E since it was already pressed +pressed: usage_page 0x07 keycode 0x2E implicit_mods 0x00 explicit_mods 0x00 +mods: Modifiers set to 0x00 +released: usage_page 0x07 keycode 0x2E implicit_mods 0x02 explicit_mods 0x00 +mods: Modifiers set to 0x00 +released: usage_page 0x07 keycode 0x2E implicit_mods 0x00 explicit_mods 0x00 +mods: Modifiers set to 0x00 diff --git a/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_posix_64.keymap b/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_posix_64.keymap new file mode 100644 index 00000000000..3926eb57a29 --- /dev/null +++ b/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_posix_64.keymap @@ -0,0 +1,27 @@ +#include +#include +#include + + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &kp PLUS &kp EQUAL + &none &none + >; + }; + }; +}; From 2f05ad55ca9734f1cc890dcd659d0691ce327658 Mon Sep 17 00:00:00 2001 From: Andrew Rae Date: Sat, 16 Sep 2023 17:24:39 -0400 Subject: [PATCH 101/160] fix(core): Prevent pre-releasing explicit mods. --- app/src/hid_listener.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/hid_listener.c b/app/src/hid_listener.c index 796ec19b7a4..2b8470820a1 100644 --- a/app/src/hid_listener.c +++ b/app/src/hid_listener.c @@ -19,7 +19,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); static int hid_listener_keycode_pressed(const struct zmk_keycode_state_changed *ev) { int err, explicit_mods_changed, implicit_mods_changed; - if (zmk_hid_is_pressed(ZMK_HID_USAGE(ev->usage_page, ev->keycode))) { + if (!is_mod(ev->usage_page, ev->keycode) && + zmk_hid_is_pressed(ZMK_HID_USAGE(ev->usage_page, ev->keycode))) { LOG_DBG("unregistering usage_page 0x%02X keycode 0x%02X since it was already pressed", ev->usage_page, ev->keycode); err = zmk_hid_release(ZMK_HID_USAGE(ev->usage_page, ev->keycode)); From 651ed05e9aab061703fb6e3736c974702310a9e1 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 14 May 2023 11:55:21 -0500 Subject: [PATCH 102/160] refactor: Split endpoint to transport and instance Changed the endpoints code to rename the existing endpoint types to "transport" and add the concept of "endpoint instances". A transport is the method by which data is sent, while instances allow describing multiple endpoints that use the same transport (e.g. bluetooth profiles) Also added new APIs to get the total number of possible endpoint instances and assign each instance a unique index, which can be used for tracking separate state for each endpoint in other code files. --- .../arm/corneish_zen/widgets/output_status.c | 33 ++- app/include/zmk/endpoints.h | 62 ++++- app/include/zmk/endpoints_types.h | 32 ++- ...selection_changed.h => endpoint_changed.h} | 6 +- app/src/behaviors/behavior_outputs.c | 6 +- app/src/display/widgets/output_status.c | 29 +-- app/src/endpoints.c | 220 ++++++++++++------ app/src/events/endpoint_selection_changed.c | 4 +- 8 files changed, 268 insertions(+), 124 deletions(-) rename app/include/zmk/events/{endpoint_selection_changed.h => endpoint_changed.h} (61%) diff --git a/app/boards/arm/corneish_zen/widgets/output_status.c b/app/boards/arm/corneish_zen/widgets/output_status.c index ad0c2b1a8fb..bdf90cc3d7f 100644 --- a/app/boards/arm/corneish_zen/widgets/output_status.c +++ b/app/boards/arm/corneish_zen/widgets/output_status.c @@ -14,9 +14,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include "output_status.h" #include -#include #include -#include +#include #include #include #include @@ -39,31 +38,31 @@ LV_IMG_DECLARE(USB_connected); static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets); struct output_status_state { - enum zmk_endpoint selected_endpoint; + struct zmk_endpoint_instance selected_endpoint; bool active_profile_connected; bool active_profile_bonded; uint8_t active_profile_index; }; static struct output_status_state get_state(const zmk_event_t *_eh) { - return (struct output_status_state){.selected_endpoint = zmk_endpoints_selected(), - .active_profile_connected = - zmk_ble_active_profile_is_connected(), - .active_profile_bonded = !zmk_ble_active_profile_is_open(), - .active_profile_index = zmk_ble_active_profile_index()}; + return (struct output_status_state){ + .selected_endpoint = zmk_endpoints_selected(), + .active_profile_connected = zmk_ble_active_profile_is_connected(), + .active_profile_bonded = !zmk_ble_active_profile_is_open(), + }; ; } static void set_status_symbol(lv_obj_t *icon, struct output_status_state state) { - switch (state.selected_endpoint) { - case ZMK_ENDPOINT_USB: + switch (state.selected_endpoint.transport) { + case ZMK_TRANSPORT_USB: lv_img_set_src(icon, &USB_connected); break; - case ZMK_ENDPOINT_BLE: + case ZMK_TRANSPORT_BLE: if (state.active_profile_bonded) { if (state.active_profile_connected) { // sprintf(text, LV_SYMBOL_BLUETOOTH "%i " LV_SYMBOL_OK, active_profile_index); - switch (state.active_profile_index) { + switch (state.selected_endpoint.ble.profile_index) { case 0: lv_img_set_src(icon, &bluetooth_connected_1); break; @@ -84,7 +83,7 @@ static void set_status_symbol(lv_obj_t *icon, struct output_status_state state) lv_img_set_src(icon, &bluetooth_disconnected_right); } } else { - switch (state.active_profile_index) { + switch (state.selected_endpoint.ble.profile_index) { case 0: lv_img_set_src(icon, &bluetooth_advertising_1); break; @@ -113,11 +112,9 @@ static void output_status_update_cb(struct output_status_state state) { ZMK_DISPLAY_WIDGET_LISTENER(widget_output_status, struct output_status_state, output_status_update_cb, get_state) -ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_selection_changed); - -#if IS_ENABLED(CONFIG_USB_DEVICE_STACK) -ZMK_SUBSCRIPTION(widget_output_status, zmk_usb_conn_state_changed); -#endif +ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_changed); +// We don't get an endpoint changed event when the active profile connects/disconnects +// but there wasn't another endpoint to switch from/to, so update on BLE events too. #if defined(CONFIG_ZMK_BLE) ZMK_SUBSCRIPTION(widget_output_status, zmk_ble_active_profile_changed); #endif diff --git a/app/include/zmk/endpoints.h b/app/include/zmk/endpoints.h index c8860533e1d..c5964ff8535 100644 --- a/app/include/zmk/endpoints.h +++ b/app/include/zmk/endpoints.h @@ -6,10 +6,66 @@ #pragma once +#include #include -int zmk_endpoints_select(enum zmk_endpoint endpoint); -int zmk_endpoints_toggle(); -enum zmk_endpoint zmk_endpoints_selected(); +/** + * Recommended length of string buffer for printing endpoint identifiers. + */ +#define ZMK_ENDPOINT_STR_LEN 10 + +#ifdef CONFIG_ZMK_USB +#define ZMK_ENDPOINT_USB_COUNT 1 +#else +#define ZMK_ENDPOINT_USB_COUNT 0 +#endif + +#ifdef CONFIG_ZMK_BLE +#define ZMK_ENDPOINT_BLE_COUNT ZMK_BLE_PROFILE_COUNT +#else +#define ZMK_ENDPOINT_BLE_COUNT 0 +#endif + +/** + * The total number of different (struct zmk_endpoint_instance) values that can + * be selected. + * + * Note that this value may change between firmware versions, so it should not + * be used in any persistent storage. + */ +#define ZMK_ENDPOINT_COUNT (ZMK_ENDPOINT_USB_COUNT + ZMK_ENDPOINT_BLE_COUNT) + +bool zmk_endpoint_instance_eq(struct zmk_endpoint_instance a, struct zmk_endpoint_instance b); + +/** + * Writes a string identifying an endpoint instance. + * + * @param str Address of output string buffer + * @param len Length of string buffer. See ZMK_ENDPOINT_STR_LEN for recommended length. + * + * @returns Number of characters written. + */ +int zmk_endpoint_instance_to_str(struct zmk_endpoint_instance endpoint, char *str, size_t len); + +/** + * Gets a unique index for an endpoint instance. This can be used together with + * ZMK_ENDPOINT_COUNT to manage separate state for each endpoint instance. + * + * Note that the index for a specific instance may change between firmware versions, + * so it should not be used in any persistent storage. + */ +int zmk_endpoint_instance_to_index(struct zmk_endpoint_instance endpoint); + +/** + * Sets the preferred endpoint transport to use. (If the preferred endpoint is + * not available, a different one may automatically be selected.) + */ +int zmk_endpoints_select_transport(enum zmk_transport transport); +int zmk_endpoints_toggle_transport(void); + +/** + * Gets the currently-selected endpoint. + */ +struct zmk_endpoint_instance zmk_endpoints_selected(void); int zmk_endpoints_send_report(uint16_t usage_page); diff --git a/app/include/zmk/endpoints_types.h b/app/include/zmk/endpoints_types.h index 70804a613d8..ea51c8aa93d 100644 --- a/app/include/zmk/endpoints_types.h +++ b/app/include/zmk/endpoints_types.h @@ -6,7 +6,33 @@ #pragma once -enum zmk_endpoint { - ZMK_ENDPOINT_USB, - ZMK_ENDPOINT_BLE, +/** + * The method by which data is sent. + */ +enum zmk_transport { + ZMK_TRANSPORT_USB, + ZMK_TRANSPORT_BLE, +}; + +/** + * Configuration to select an endpoint on ZMK_TRANSPORT_USB. + */ +struct zmk_transport_usb_data {}; + +/** + * Configuration to select an endpoint on ZMK_TRANSPORT_BLE. + */ +struct zmk_transport_ble_data { + int profile_index; +}; + +/** + * A specific endpoint to which data may be sent. + */ +struct zmk_endpoint_instance { + enum zmk_transport transport; + union { + struct zmk_transport_usb_data usb; // ZMK_TRANSPORT_USB + struct zmk_transport_ble_data ble; // ZMK_TRANSPORT_BLE + }; }; diff --git a/app/include/zmk/events/endpoint_selection_changed.h b/app/include/zmk/events/endpoint_changed.h similarity index 61% rename from app/include/zmk/events/endpoint_selection_changed.h rename to app/include/zmk/events/endpoint_changed.h index 198fe5a1688..2147009b84b 100644 --- a/app/include/zmk/events/endpoint_selection_changed.h +++ b/app/include/zmk/events/endpoint_changed.h @@ -11,8 +11,8 @@ #include #include -struct zmk_endpoint_selection_changed { - enum zmk_endpoint endpoint; +struct zmk_endpoint_changed { + struct zmk_endpoint_instance endpoint; }; -ZMK_EVENT_DECLARE(zmk_endpoint_selection_changed); +ZMK_EVENT_DECLARE(zmk_endpoint_changed); diff --git a/app/src/behaviors/behavior_outputs.c b/app/src/behaviors/behavior_outputs.c index 7aab8ee32c0..6ae81a0fdd7 100644 --- a/app/src/behaviors/behavior_outputs.c +++ b/app/src/behaviors/behavior_outputs.c @@ -24,11 +24,11 @@ static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { switch (binding->param1) { case OUT_TOG: - return zmk_endpoints_toggle(); + return zmk_endpoints_toggle_transport(); case OUT_USB: - return zmk_endpoints_select(ZMK_ENDPOINT_USB); + return zmk_endpoints_select_transport(ZMK_TRANSPORT_USB); case OUT_BLE: - return zmk_endpoints_select(ZMK_ENDPOINT_BLE); + return zmk_endpoints_select_transport(ZMK_TRANSPORT_BLE); default: LOG_ERR("Unknown output command: %d", binding->param1); } diff --git a/app/src/display/widgets/output_status.c b/app/src/display/widgets/output_status.c index 1c6da4b9034..da29a95f393 100644 --- a/app/src/display/widgets/output_status.c +++ b/app/src/display/widgets/output_status.c @@ -12,9 +12,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include -#include #include -#include +#include #include #include #include @@ -22,40 +21,38 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets); struct output_status_state { - enum zmk_endpoint selected_endpoint; + struct zmk_endpoint_instance selected_endpoint; bool active_profile_connected; bool active_profile_bonded; - uint8_t active_profile_index; }; static struct output_status_state get_state(const zmk_event_t *_eh) { return (struct output_status_state){.selected_endpoint = zmk_endpoints_selected(), .active_profile_connected = zmk_ble_active_profile_is_connected(), - .active_profile_bonded = !zmk_ble_active_profile_is_open(), - .active_profile_index = zmk_ble_active_profile_index()}; + .active_profile_bonded = !zmk_ble_active_profile_is_open()}; ; } static void set_status_symbol(lv_obj_t *label, struct output_status_state state) { char text[10] = {}; - switch (state.selected_endpoint) { - case ZMK_ENDPOINT_USB: + switch (state.selected_endpoint.transport) { + case ZMK_TRANSPORT_USB: strcat(text, LV_SYMBOL_USB); break; - case ZMK_ENDPOINT_BLE: + case ZMK_TRANSPORT_BLE: if (state.active_profile_bonded) { if (state.active_profile_connected) { snprintf(text, sizeof(text), LV_SYMBOL_WIFI " %i " LV_SYMBOL_OK, - state.active_profile_index + 1); + state.selected_endpoint.ble.profile_index + 1); } else { snprintf(text, sizeof(text), LV_SYMBOL_WIFI " %i " LV_SYMBOL_CLOSE, - state.active_profile_index + 1); + state.selected_endpoint.ble.profile_index + 1); } } else { snprintf(text, sizeof(text), LV_SYMBOL_WIFI " %i " LV_SYMBOL_SETTINGS, - state.active_profile_index + 1); + state.selected_endpoint.ble.profile_index + 1); } break; } @@ -70,11 +67,9 @@ static void output_status_update_cb(struct output_status_state state) { ZMK_DISPLAY_WIDGET_LISTENER(widget_output_status, struct output_status_state, output_status_update_cb, get_state) -ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_selection_changed); - -#if IS_ENABLED(CONFIG_USB_DEVICE_STACK) -ZMK_SUBSCRIPTION(widget_output_status, zmk_usb_conn_state_changed); -#endif +ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_changed); +// We don't get an endpoint changed event when the active profile connects/disconnects +// but there wasn't another endpoint to switch from/to, so update on BLE events too. #if defined(CONFIG_ZMK_BLE) ZMK_SUBSCRIPTION(widget_output_status, zmk_ble_active_profile_changed); #endif diff --git a/app/src/endpoints.c b/app/src/endpoints.c index dbd1a3e6c0e..e208a36a312 100644 --- a/app/src/endpoints.c +++ b/app/src/endpoints.c @@ -16,29 +16,29 @@ #include #include #include -#include +#include #include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); -#define DEFAULT_ENDPOINT \ - COND_CODE_1(IS_ENABLED(CONFIG_ZMK_BLE), (ZMK_ENDPOINT_BLE), (ZMK_ENDPOINT_USB)) +#define DEFAULT_TRANSPORT \ + COND_CODE_1(IS_ENABLED(CONFIG_ZMK_BLE), (ZMK_TRANSPORT_BLE), (ZMK_TRANSPORT_USB)) -static enum zmk_endpoint current_endpoint = DEFAULT_ENDPOINT; -static enum zmk_endpoint preferred_endpoint = - ZMK_ENDPOINT_USB; /* Used if multiple endpoints are ready */ +static struct zmk_endpoint_instance current_instance = {}; +static enum zmk_transport preferred_transport = + ZMK_TRANSPORT_USB; /* Used if multiple endpoints are ready */ -static void update_current_endpoint(); +static void update_current_endpoint(void); #if IS_ENABLED(CONFIG_SETTINGS) static void endpoints_save_preferred_work(struct k_work *work) { - settings_save_one("endpoints/preferred", &preferred_endpoint, sizeof(preferred_endpoint)); + settings_save_one("endpoints/preferred", &preferred_transport, sizeof(preferred_transport)); } static struct k_work_delayable endpoints_save_work; #endif -static int endpoints_save_preferred() { +static int endpoints_save_preferred(void) { #if IS_ENABLED(CONFIG_SETTINGS) return k_work_reschedule(&endpoints_save_work, K_MSEC(CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE)); #else @@ -46,14 +46,60 @@ static int endpoints_save_preferred() { #endif } -int zmk_endpoints_select(enum zmk_endpoint endpoint) { - LOG_DBG("Selected endpoint %d", endpoint); +bool zmk_endpoint_instance_eq(struct zmk_endpoint_instance a, struct zmk_endpoint_instance b) { + if (a.transport != b.transport) { + return false; + } + + switch (a.transport) { + case ZMK_TRANSPORT_USB: + return true; + + case ZMK_TRANSPORT_BLE: + return a.ble.profile_index == b.ble.profile_index; + } + + LOG_ERR("Invalid transport %d", a.transport); + return false; +} + +int zmk_endpoint_instance_to_str(struct zmk_endpoint_instance endpoint, char *str, size_t len) { + switch (endpoint.transport) { + case ZMK_TRANSPORT_USB: + return snprintf(str, len, "USB"); + + case ZMK_TRANSPORT_BLE: + return snprintf(str, len, "BLE:%d", endpoint.ble.profile_index); + + default: + return snprintf(str, len, "Invalid"); + } +} + +#define INSTANCE_INDEX_OFFSET_USB 0 +#define INSTANCE_INDEX_OFFSET_BLE ZMK_ENDPOINT_USB_COUNT + +int zmk_endpoint_instance_to_index(struct zmk_endpoint_instance endpoint) { + switch (endpoint.transport) { + case ZMK_TRANSPORT_USB: + return INSTANCE_INDEX_OFFSET_USB; + + case ZMK_TRANSPORT_BLE: + return INSTANCE_INDEX_OFFSET_BLE + endpoint.ble.profile_index; + } + + LOG_ERR("Invalid transport %d", endpoint.transport); + return 0; +} - if (preferred_endpoint == endpoint) { +int zmk_endpoints_select_transport(enum zmk_transport transport) { + LOG_DBG("Selected endpoint transport %d", transport); + + if (preferred_transport == transport) { return 0; } - preferred_endpoint = endpoint; + preferred_transport = transport; endpoints_save_preferred(); @@ -62,20 +108,22 @@ int zmk_endpoints_select(enum zmk_endpoint endpoint) { return 0; } -enum zmk_endpoint zmk_endpoints_selected() { return current_endpoint; } +int zmk_endpoints_toggle_transport(void) { + enum zmk_transport new_transport = + (preferred_transport == ZMK_TRANSPORT_USB) ? ZMK_TRANSPORT_BLE : ZMK_TRANSPORT_USB; + return zmk_endpoints_select_transport(new_transport); +} -int zmk_endpoints_toggle() { - enum zmk_endpoint new_endpoint = - (preferred_endpoint == ZMK_ENDPOINT_USB) ? ZMK_ENDPOINT_BLE : ZMK_ENDPOINT_USB; - return zmk_endpoints_select(new_endpoint); +struct zmk_endpoint_instance zmk_endpoints_selected(void) { + return current_instance; } -static int send_keyboard_report() { +static int send_keyboard_report(void) { struct zmk_hid_keyboard_report *keyboard_report = zmk_hid_get_keyboard_report(); - switch (current_endpoint) { + switch (current_instance.transport) { #if IS_ENABLED(CONFIG_ZMK_USB) - case ZMK_ENDPOINT_USB: { + case ZMK_TRANSPORT_USB: { int err = zmk_usb_hid_send_report((uint8_t *)keyboard_report, sizeof(*keyboard_report)); if (err) { LOG_ERR("FAILED TO SEND OVER USB: %d", err); @@ -85,7 +133,7 @@ static int send_keyboard_report() { #endif /* IS_ENABLED(CONFIG_ZMK_USB) */ #if IS_ENABLED(CONFIG_ZMK_BLE) - case ZMK_ENDPOINT_BLE: { + case ZMK_TRANSPORT_BLE: { int err = zmk_hog_send_keyboard_report(&keyboard_report->body); if (err) { LOG_ERR("FAILED TO SEND OVER HOG: %d", err); @@ -93,19 +141,18 @@ static int send_keyboard_report() { return err; } #endif /* IS_ENABLED(CONFIG_ZMK_BLE) */ - - default: - LOG_ERR("Unsupported endpoint %d", current_endpoint); - return -ENOTSUP; } + + LOG_ERR("Unsupported endpoint transport %d", current_instance.transport); + return -ENOTSUP; } -static int send_consumer_report() { +static int send_consumer_report(void) { struct zmk_hid_consumer_report *consumer_report = zmk_hid_get_consumer_report(); - switch (current_endpoint) { + switch (current_instance.transport) { #if IS_ENABLED(CONFIG_ZMK_USB) - case ZMK_ENDPOINT_USB: { + case ZMK_TRANSPORT_USB: { int err = zmk_usb_hid_send_report((uint8_t *)consumer_report, sizeof(*consumer_report)); if (err) { LOG_ERR("FAILED TO SEND OVER USB: %d", err); @@ -115,7 +162,7 @@ static int send_consumer_report() { #endif /* IS_ENABLED(CONFIG_ZMK_USB) */ #if IS_ENABLED(CONFIG_ZMK_BLE) - case ZMK_ENDPOINT_BLE: { + case ZMK_TRANSPORT_BLE: { int err = zmk_hog_send_consumer_report(&consumer_report->body); if (err) { LOG_ERR("FAILED TO SEND OVER HOG: %d", err); @@ -123,11 +170,10 @@ static int send_consumer_report() { return err; } #endif /* IS_ENABLED(CONFIG_ZMK_BLE) */ - - default: - LOG_ERR("Unsupported endpoint %d", current_endpoint); - return -ENOTSUP; } + + LOG_ERR("Unsupported endpoint transport %d", current_instance.transport); + return -ENOTSUP; } int zmk_endpoints_send_report(uint16_t usage_page) { @@ -136,12 +182,13 @@ int zmk_endpoints_send_report(uint16_t usage_page) { switch (usage_page) { case HID_USAGE_KEY: return send_keyboard_report(); + case HID_USAGE_CONSUMER: return send_consumer_report(); - default: - LOG_ERR("Unsupported usage page %d", usage_page); - return -ENOTSUP; } + + LOG_ERR("Unsupported usage page %d", usage_page); + return -ENOTSUP; } #if IS_ENABLED(CONFIG_SETTINGS) @@ -151,12 +198,12 @@ static int endpoints_handle_set(const char *name, size_t len, settings_read_cb r LOG_DBG("Setting endpoint value %s", name); if (settings_name_steq(name, "preferred", NULL)) { - if (len != sizeof(enum zmk_endpoint)) { - LOG_ERR("Invalid endpoint size (got %d expected %d)", len, sizeof(enum zmk_endpoint)); + if (len != sizeof(enum zmk_transport)) { + LOG_ERR("Invalid endpoint size (got %d expected %d)", len, sizeof(enum zmk_transport)); return -EINVAL; } - int err = read_cb(cb_arg, &preferred_endpoint, sizeof(enum zmk_endpoint)); + int err = read_cb(cb_arg, &preferred_transport, sizeof(enum zmk_transport)); if (err <= 0) { LOG_ERR("Failed to read preferred endpoint from settings (err %d)", err); return err; @@ -171,25 +218,7 @@ static int endpoints_handle_set(const char *name, size_t len, settings_read_cb r struct settings_handler endpoints_handler = {.name = "endpoints", .h_set = endpoints_handle_set}; #endif /* IS_ENABLED(CONFIG_SETTINGS) */ -static int zmk_endpoints_init(const struct device *_arg) { -#if IS_ENABLED(CONFIG_SETTINGS) - settings_subsys_init(); - - int err = settings_register(&endpoints_handler); - if (err) { - LOG_ERR("Failed to register the endpoints settings handler (err %d)", err); - return err; - } - - k_work_init_delayable(&endpoints_save_work, endpoints_save_preferred_work); - - settings_load_subtree("endpoints"); -#endif - - return 0; -} - -static bool is_usb_ready() { +static bool is_usb_ready(void) { #if IS_ENABLED(CONFIG_ZMK_USB) return zmk_usb_is_hid_ready(); #else @@ -197,7 +226,7 @@ static bool is_usb_ready() { #endif } -static bool is_ble_ready() { +static bool is_ble_ready(void) { #if IS_ENABLED(CONFIG_ZMK_BLE) return zmk_ble_active_profile_is_connected(); #else @@ -205,24 +234,62 @@ static bool is_ble_ready() { #endif } -static enum zmk_endpoint get_selected_endpoint() { +static enum zmk_transport get_selected_transport(void) { if (is_ble_ready()) { if (is_usb_ready()) { - LOG_DBG("Both endpoints are ready. Using %d", preferred_endpoint); - return preferred_endpoint; + LOG_DBG("Both endpoint transports are ready. Using %d", preferred_transport); + return preferred_transport; } LOG_DBG("Only BLE is ready."); - return ZMK_ENDPOINT_BLE; + return ZMK_TRANSPORT_BLE; } if (is_usb_ready()) { LOG_DBG("Only USB is ready."); - return ZMK_ENDPOINT_USB; + return ZMK_TRANSPORT_USB; + } + + LOG_DBG("No endpoint transports are ready."); + return DEFAULT_TRANSPORT; +} + +static struct zmk_endpoint_instance get_selected_instance(void) { + struct zmk_endpoint_instance instance = {.transport = get_selected_transport()}; + + switch (instance.transport) { +#if IS_ENABLED(CONFIG_ZMK_BLE) + case ZMK_TRANSPORT_BLE: + instance.ble.profile_index = zmk_ble_active_profile_index(); + break; +#endif // IS_ENABLED(CONFIG_ZMK_BLE) + + default: + // No extra data for this transport. + break; + } + + return instance; +} + +static int zmk_endpoints_init(const struct device *_arg) { +#if IS_ENABLED(CONFIG_SETTINGS) + settings_subsys_init(); + + int err = settings_register(&endpoints_handler); + if (err) { + LOG_ERR("Failed to register the endpoints settings handler (err %d)", err); + return err; } - LOG_DBG("No endpoints are ready."); - return DEFAULT_ENDPOINT; + k_work_init_delayable(&endpoints_save_work, endpoints_save_preferred_work); + + settings_load_subtree("endpoints"); +#endif + + current_instance = get_selected_instance(); + + return 0; } static void disconnect_current_endpoint() { @@ -233,18 +300,21 @@ static void disconnect_current_endpoint() { zmk_endpoints_send_report(HID_USAGE_CONSUMER); } -static void update_current_endpoint() { - enum zmk_endpoint new_endpoint = get_selected_endpoint(); +static void update_current_endpoint(void) { + struct zmk_endpoint_instance new_instance = get_selected_instance(); - if (new_endpoint != current_endpoint) { - /* Cancel all current keypresses so keys don't stay held on the old endpoint. */ + if (!zmk_endpoint_instance_eq(new_instance, current_instance)) { + // Cancel all current keypresses so keys don't stay held on the old endpoint. disconnect_current_endpoint(); - current_endpoint = new_endpoint; - LOG_INF("Endpoint changed: %d", current_endpoint); + current_instance = new_instance; + + char endpoint_str[ZMK_ENDPOINT_STR_LEN]; + zmk_endpoint_instance_to_str(current_instance, endpoint_str, sizeof(endpoint_str)); + LOG_INF("Endpoint changed: %s", endpoint_str); - ZMK_EVENT_RAISE(new_zmk_endpoint_selection_changed( - (struct zmk_endpoint_selection_changed){.endpoint = current_endpoint})); + ZMK_EVENT_RAISE( + new_zmk_endpoint_changed((struct zmk_endpoint_changed){.endpoint = current_instance})); } } diff --git a/app/src/events/endpoint_selection_changed.c b/app/src/events/endpoint_selection_changed.c index 34bc39dd2ab..6b152156feb 100644 --- a/app/src/events/endpoint_selection_changed.c +++ b/app/src/events/endpoint_selection_changed.c @@ -5,6 +5,6 @@ */ #include -#include +#include -ZMK_EVENT_IMPL(zmk_endpoint_selection_changed); +ZMK_EVENT_IMPL(zmk_endpoint_changed); From b17d896c5c30dbb038de36e7ed540318f9b048a1 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 27 Aug 2023 18:03:06 -0500 Subject: [PATCH 103/160] fix: Address review comments --- app/CMakeLists.txt | 2 +- app/boards/arm/corneish_zen/widgets/output_status.c | 2 -- app/src/endpoints.c | 2 ++ .../events/{endpoint_selection_changed.c => endpoint_changed.c} | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename app/src/events/{endpoint_selection_changed.c => endpoint_changed.c} (100%) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 29944753f80..793f386dbe3 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -59,7 +59,7 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) target_sources(app PRIVATE src/behavior_queue.c) target_sources(app PRIVATE src/conditional_layer.c) target_sources(app PRIVATE src/endpoints.c) - target_sources(app PRIVATE src/events/endpoint_selection_changed.c) + target_sources(app PRIVATE src/events/endpoint_changed.c) target_sources(app PRIVATE src/hid_listener.c) target_sources(app PRIVATE src/keymap.c) target_sources(app PRIVATE src/events/layer_state_changed.c) diff --git a/app/boards/arm/corneish_zen/widgets/output_status.c b/app/boards/arm/corneish_zen/widgets/output_status.c index bdf90cc3d7f..8e9457ebefe 100644 --- a/app/boards/arm/corneish_zen/widgets/output_status.c +++ b/app/boards/arm/corneish_zen/widgets/output_status.c @@ -41,7 +41,6 @@ struct output_status_state { struct zmk_endpoint_instance selected_endpoint; bool active_profile_connected; bool active_profile_bonded; - uint8_t active_profile_index; }; static struct output_status_state get_state(const zmk_event_t *_eh) { @@ -50,7 +49,6 @@ static struct output_status_state get_state(const zmk_event_t *_eh) { .active_profile_connected = zmk_ble_active_profile_is_connected(), .active_profile_bonded = !zmk_ble_active_profile_is_open(), }; - ; } static void set_status_symbol(lv_obj_t *icon, struct output_status_state state) { diff --git a/app/src/endpoints.c b/app/src/endpoints.c index e208a36a312..138e790fe72 100644 --- a/app/src/endpoints.c +++ b/app/src/endpoints.c @@ -7,6 +7,8 @@ #include #include +#include + #include #include #include diff --git a/app/src/events/endpoint_selection_changed.c b/app/src/events/endpoint_changed.c similarity index 100% rename from app/src/events/endpoint_selection_changed.c rename to app/src/events/endpoint_changed.c From 6a3cc914fcc0ecc01f33f81413080b882c3022c5 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 27 Aug 2023 18:33:29 -0500 Subject: [PATCH 104/160] fix: Fix nice_view display widgets --- .../nice_view/widgets/peripheral_status.c | 8 +- app/boards/shields/nice_view/widgets/status.c | 76 +++++++++---------- app/boards/shields/nice_view/widgets/util.c | 6 +- app/boards/shields/nice_view/widgets/util.h | 5 +- 4 files changed, 46 insertions(+), 49 deletions(-) diff --git a/app/boards/shields/nice_view/widgets/peripheral_status.c b/app/boards/shields/nice_view/widgets/peripheral_status.c index 85c2a1d8793..4c0c22637be 100644 --- a/app/boards/shields/nice_view/widgets/peripheral_status.c +++ b/app/boards/shields/nice_view/widgets/peripheral_status.c @@ -31,7 +31,7 @@ struct peripheral_status_state { bool connected; }; -static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state state) { +static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], const struct status_state *state) { lv_obj_t *canvas = lv_obj_get_child(widget, 0); lv_draw_label_dsc_t label_dsc; @@ -47,7 +47,7 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state st // Draw output status lv_canvas_draw_text(canvas, 0, 0, CANVAS_SIZE, &label_dsc, - state.connected ? LV_SYMBOL_WIFI : LV_SYMBOL_CLOSE); + state->connected ? LV_SYMBOL_WIFI : LV_SYMBOL_CLOSE); // Rotate canvas rotate_canvas(canvas, cbuf); @@ -61,7 +61,7 @@ static void set_battery_status(struct zmk_widget_status *widget, widget->state.battery = state.level; - draw_top(widget->obj, widget->cbuf, widget->state); + draw_top(widget->obj, widget->cbuf, &widget->state); } static void battery_status_update_cb(struct battery_status_state state) { @@ -94,7 +94,7 @@ static void set_connection_status(struct zmk_widget_status *widget, struct peripheral_status_state state) { widget->state.connected = state.connected; - draw_top(widget->obj, widget->cbuf, widget->state); + draw_top(widget->obj, widget->cbuf, &widget->state); } static void output_status_update_cb(struct peripheral_status_state state) { diff --git a/app/boards/shields/nice_view/widgets/status.c b/app/boards/shields/nice_view/widgets/status.c index 1ad9e9207d7..c629be50f59 100644 --- a/app/boards/shields/nice_view/widgets/status.c +++ b/app/boards/shields/nice_view/widgets/status.c @@ -17,7 +17,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include -#include +#include #include #include #include @@ -29,10 +29,9 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets); struct output_status_state { - enum zmk_endpoint selected_endpoint; + struct zmk_endpoint_instance selected_endpoint; bool active_profile_connected; bool active_profile_bonded; - uint8_t active_profile_index; }; struct layer_status_state { @@ -44,7 +43,7 @@ struct wpm_status_state { uint8_t wpm; }; -static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state state) { +static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], const struct status_state *state) { lv_obj_t *canvas = lv_obj_get_child(widget, 0); lv_draw_label_dsc_t label_dsc; @@ -67,13 +66,13 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state st // Draw output status char output_text[10] = {}; - switch (state.selected_endpoint) { - case ZMK_ENDPOINT_USB: + switch (state->selected_endpoint.transport) { + case ZMK_TRANSPORT_USB: strcat(output_text, LV_SYMBOL_USB); break; - case ZMK_ENDPOINT_BLE: - if (state.active_profile_bonded) { - if (state.active_profile_connected) { + case ZMK_TRANSPORT_BLE: + if (state->active_profile_bonded) { + if (state->active_profile_connected) { strcat(output_text, LV_SYMBOL_WIFI); } else { strcat(output_text, LV_SYMBOL_CLOSE); @@ -91,18 +90,18 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state st lv_canvas_draw_rect(canvas, 1, 22, 66, 40, &rect_black_dsc); char wpm_text[6] = {}; - snprintf(wpm_text, sizeof(wpm_text), "%d", state.wpm[9]); + snprintf(wpm_text, sizeof(wpm_text), "%d", state->wpm[9]); lv_canvas_draw_text(canvas, 42, 52, 24, &label_dsc_wpm, wpm_text); int max = 0; int min = 256; for (int i = 0; i < 10; i++) { - if (state.wpm[i] > max) { - max = state.wpm[i]; + if (state->wpm[i] > max) { + max = state->wpm[i]; } - if (state.wpm[i] < min) { - min = state.wpm[i]; + if (state->wpm[i] < min) { + min = state->wpm[i]; } } @@ -114,7 +113,7 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state st lv_point_t points[10]; for (int i = 0; i < 10; i++) { points[i].x = 2 + i * 7; - points[i].y = 60 - (state.wpm[i] - min) * 36 / range; + points[i].y = 60 - (state->wpm[i] - min) * 36 / range; } lv_canvas_draw_line(canvas, points, 10, &line_dsc); @@ -122,7 +121,7 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state st rotate_canvas(canvas, cbuf); } -static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], struct status_state state) { +static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], const struct status_state *state) { lv_obj_t *canvas = lv_obj_get_child(widget, 1); lv_draw_rect_dsc_t rect_black_dsc; @@ -147,7 +146,7 @@ static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], struct status_state }; for (int i = 0; i < 5; i++) { - bool selected = state.active_profile_index == i; + bool selected = state->selected_endpoint.ble.profile_index == i; lv_canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 13, 0, 359, &arc_dsc); @@ -167,7 +166,7 @@ static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], struct status_state rotate_canvas(canvas, cbuf); } -static void draw_bottom(lv_obj_t *widget, lv_color_t cbuf[], struct status_state state) { +static void draw_bottom(lv_obj_t *widget, lv_color_t cbuf[], const struct status_state *state) { lv_obj_t *canvas = lv_obj_get_child(widget, 2); lv_draw_rect_dsc_t rect_black_dsc; @@ -179,14 +178,14 @@ static void draw_bottom(lv_obj_t *widget, lv_color_t cbuf[], struct status_state lv_canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); // Draw layer - if (state.layer_label == NULL) { + if (state->layer_label == NULL) { char text[9] = {}; - sprintf(text, "LAYER %i", state.layer_index); + sprintf(text, "LAYER %i", state->layer_index); lv_canvas_draw_text(canvas, 0, 5, 68, &label_dsc, text); } else { - lv_canvas_draw_text(canvas, 0, 5, 68, &label_dsc, state.layer_label); + lv_canvas_draw_text(canvas, 0, 5, 68, &label_dsc, state->layer_label); } // Rotate canvas @@ -201,7 +200,7 @@ static void set_battery_status(struct zmk_widget_status *widget, widget->state.battery = state.level; - draw_top(widget->obj, widget->cbuf, widget->state); + draw_top(widget->obj, widget->cbuf, &widget->state); } static void battery_status_update_cb(struct battery_status_state state) { @@ -226,33 +225,32 @@ ZMK_SUBSCRIPTION(widget_battery_status, zmk_battery_state_changed); ZMK_SUBSCRIPTION(widget_battery_status, zmk_usb_conn_state_changed); #endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */ -static void set_output_status(struct zmk_widget_status *widget, struct output_status_state state) { - widget->state.selected_endpoint = state.selected_endpoint; - widget->state.active_profile_connected = state.active_profile_connected; - widget->state.active_profile_bonded = state.active_profile_bonded; - widget->state.active_profile_index = state.active_profile_index; +static void set_output_status(struct zmk_widget_status *widget, + const struct output_status_state *state) { + widget->state.selected_endpoint = state->selected_endpoint; + widget->state.active_profile_connected = state->active_profile_connected; + widget->state.active_profile_bonded = state->active_profile_bonded; - draw_top(widget->obj, widget->cbuf, widget->state); - draw_middle(widget->obj, widget->cbuf2, widget->state); + draw_top(widget->obj, widget->cbuf, &widget->state); + draw_middle(widget->obj, widget->cbuf2, &widget->state); } static void output_status_update_cb(struct output_status_state state) { struct zmk_widget_status *widget; - SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_output_status(widget, state); } + SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_output_status(widget, &state); } } static struct output_status_state output_status_get_state(const zmk_event_t *_eh) { - return (struct output_status_state){.selected_endpoint = zmk_endpoints_selected(), - .active_profile_connected = - zmk_ble_active_profile_is_connected(), - .active_profile_bonded = !zmk_ble_active_profile_is_open(), - .active_profile_index = zmk_ble_active_profile_index()}; - ; + return (struct output_status_state){ + .selected_endpoint = zmk_endpoints_selected(), + .active_profile_connected = zmk_ble_active_profile_is_connected(), + .active_profile_bonded = !zmk_ble_active_profile_is_open(), + }; } ZMK_DISPLAY_WIDGET_LISTENER(widget_output_status, struct output_status_state, output_status_update_cb, output_status_get_state) -ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_selection_changed); +ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_changed); #if IS_ENABLED(CONFIG_USB_DEVICE_STACK) ZMK_SUBSCRIPTION(widget_output_status, zmk_usb_conn_state_changed); @@ -265,7 +263,7 @@ static void set_layer_status(struct zmk_widget_status *widget, struct layer_stat widget->state.layer_index = state.index; widget->state.layer_label = state.label; - draw_bottom(widget->obj, widget->cbuf3, widget->state); + draw_bottom(widget->obj, widget->cbuf3, &widget->state); } static void layer_status_update_cb(struct layer_status_state state) { @@ -289,7 +287,7 @@ static void set_wpm_status(struct zmk_widget_status *widget, struct wpm_status_s } widget->state.wpm[9] = state.wpm; - draw_top(widget->obj, widget->cbuf, widget->state); + draw_top(widget->obj, widget->cbuf, &widget->state); } static void wpm_status_update_cb(struct wpm_status_state state) { diff --git a/app/boards/shields/nice_view/widgets/util.c b/app/boards/shields/nice_view/widgets/util.c index 9655f837f6e..b4915ab767f 100644 --- a/app/boards/shields/nice_view/widgets/util.c +++ b/app/boards/shields/nice_view/widgets/util.c @@ -24,7 +24,7 @@ void rotate_canvas(lv_obj_t *canvas, lv_color_t cbuf[]) { CANVAS_SIZE / 2, true); } -void draw_battery(lv_obj_t *canvas, struct status_state state) { +void draw_battery(lv_obj_t *canvas, const struct status_state *state) { lv_draw_rect_dsc_t rect_black_dsc; init_rect_dsc(&rect_black_dsc, LVGL_BACKGROUND); lv_draw_rect_dsc_t rect_white_dsc; @@ -32,11 +32,11 @@ void draw_battery(lv_obj_t *canvas, struct status_state state) { lv_canvas_draw_rect(canvas, 0, 2, 29, 12, &rect_white_dsc); lv_canvas_draw_rect(canvas, 1, 3, 27, 10, &rect_black_dsc); - lv_canvas_draw_rect(canvas, 2, 4, (state.battery + 2) / 4, 8, &rect_white_dsc); + lv_canvas_draw_rect(canvas, 2, 4, (state->battery + 2) / 4, 8, &rect_white_dsc); lv_canvas_draw_rect(canvas, 30, 5, 3, 6, &rect_white_dsc); lv_canvas_draw_rect(canvas, 31, 6, 1, 4, &rect_black_dsc); - if (state.charging) { + if (state->charging) { lv_draw_img_dsc_t img_dsc; lv_draw_img_dsc_init(&img_dsc); lv_canvas_draw_img(canvas, 9, -1, &bolt, &img_dsc); diff --git a/app/boards/shields/nice_view/widgets/util.h b/app/boards/shields/nice_view/widgets/util.h index e48c1082ce9..e2d2782a3f9 100644 --- a/app/boards/shields/nice_view/widgets/util.h +++ b/app/boards/shields/nice_view/widgets/util.h @@ -19,10 +19,9 @@ struct status_state { uint8_t battery; bool charging; #if !IS_ENABLED(CONFIG_ZMK_SPLIT) || IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) - enum zmk_endpoint selected_endpoint; + struct zmk_endpoint_instance selected_endpoint; bool active_profile_connected; bool active_profile_bonded; - uint8_t active_profile_index; uint8_t layer_index; const char *layer_label; uint8_t wpm[10]; @@ -39,7 +38,7 @@ struct battery_status_state { }; void rotate_canvas(lv_obj_t *canvas, lv_color_t cbuf[]); -void draw_battery(lv_obj_t *canvas, struct status_state state); +void draw_battery(lv_obj_t *canvas, const struct status_state *state); void init_label_dsc(lv_draw_label_dsc_t *label_dsc, lv_color_t color, const lv_font_t *font, lv_text_align_t align); void init_rect_dsc(lv_draw_rect_dsc_t *rect_dsc, lv_color_t bg_color); From aa4cb143bf2de89f06039fd9ba0b259f6d38fc5d Mon Sep 17 00:00:00 2001 From: Flo Kempenich Date: Tue, 3 Oct 2023 09:03:59 +0100 Subject: [PATCH 105/160] fix(combos)Fix bug with overlapping combos timeouts (#1945) * Fix bug with overlapping combos timeouts * Fix trailing whitespace * Fix log format --- app/src/combo.c | 26 +++-- .../events.patterns | 1 + .../keycode_events.snapshot | 8 ++ .../native_posix_64.keymap | 98 +++++++++++++++++++ 4 files changed, 126 insertions(+), 7 deletions(-) create mode 100644 app/tests/combo/overlapping-combos-4-different-timeouts/events.patterns create mode 100644 app/tests/combo/overlapping-combos-4-different-timeouts/keycode_events.snapshot create mode 100644 app/tests/combo/overlapping-combos-4-different-timeouts/native_posix_64.keymap diff --git a/app/src/combo.c b/app/src/combo.c index 90c89c15e73..87a931439a1 100644 --- a/app/src/combo.c +++ b/app/src/combo.c @@ -204,22 +204,34 @@ static inline bool candidate_is_completely_pressed(struct combo_cfg *candidate) static int cleanup(); static int filter_timed_out_candidates(int64_t timestamp) { - int num_candidates = 0; + int remaining_candidates = 0; for (int i = 0; i < CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY; i++) { struct combo_candidate *candidate = &candidates[i]; if (candidate->combo == NULL) { break; } if (candidate->timeout_at > timestamp) { - // reorder candidates so they're contiguous - candidates[num_candidates].combo = candidate->combo; - candidates[num_candidates].timeout_at = candidate->timeout_at; - num_candidates++; + bool need_to_bubble_up = remaining_candidates != i; + if (need_to_bubble_up) { + // bubble up => reorder candidates so they're contiguous + candidates[remaining_candidates].combo = candidate->combo; + candidates[remaining_candidates].timeout_at = candidate->timeout_at; + // clear the previous location + candidates[i].combo = NULL; + candidates[i].timeout_at = 0; + } + + remaining_candidates++; } else { candidate->combo = NULL; } } - return num_candidates; + + LOG_DBG( + "after filtering out timed out combo candidates: remaining_candidates=%d timestamp=%lld", + remaining_candidates, timestamp); + + return remaining_candidates; } static int clear_candidates() { @@ -449,7 +461,7 @@ static void combo_timeout_handler(struct k_work *item) { // timer was cancelled or rescheduled. return; } - if (filter_timed_out_candidates(timeout_task_timeout_at) < 2) { + if (filter_timed_out_candidates(timeout_task_timeout_at) == 0) { cleanup(); } update_timeout_task(); diff --git a/app/tests/combo/overlapping-combos-4-different-timeouts/events.patterns b/app/tests/combo/overlapping-combos-4-different-timeouts/events.patterns new file mode 100644 index 00000000000..89015deee06 --- /dev/null +++ b/app/tests/combo/overlapping-combos-4-different-timeouts/events.patterns @@ -0,0 +1 @@ +s/.*\(hid_listener_keycode_pressed\|filter_timed_out_candidates\): //p \ No newline at end of file diff --git a/app/tests/combo/overlapping-combos-4-different-timeouts/keycode_events.snapshot b/app/tests/combo/overlapping-combos-4-different-timeouts/keycode_events.snapshot new file mode 100644 index 00000000000..8fe441ff46e --- /dev/null +++ b/app/tests/combo/overlapping-combos-4-different-timeouts/keycode_events.snapshot @@ -0,0 +1,8 @@ +after filtering out timed out combo candidates: remaining_candidates=2 timestamp=71 +after filtering out timed out combo candidates: remaining_candidates=1 timestamp=81 +after filtering out timed out combo candidates: remaining_candidates=0 timestamp=91 +usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +after filtering out timed out combo candidates: remaining_candidates=2 timestamp=143 +after filtering out timed out combo candidates: remaining_candidates=1 timestamp=153 +after filtering out timed out combo candidates: remaining_candidates=1 timestamp=159 +usage_page 0x07 keycode 0x1D implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/combo/overlapping-combos-4-different-timeouts/native_posix_64.keymap b/app/tests/combo/overlapping-combos-4-different-timeouts/native_posix_64.keymap new file mode 100644 index 00000000000..8967207987b --- /dev/null +++ b/app/tests/combo/overlapping-combos-4-different-timeouts/native_posix_64.keymap @@ -0,0 +1,98 @@ +#include +#include +#include + +#define kA 0 +#define kB 1 +#define kC 2 +#define kD 3 + +/ { + combos { + compatible = "zmk,combos"; + + // Intentionally out of order in the config, to make sure 'combo.c' handles it properly + combo_40 { + timeout-ms = <40>; + key-positions = ; + bindings = <&kp Z>; + }; + combo_20 { + timeout-ms = <20>; + key-positions = ; + bindings = <&kp X>; + }; + combo_30 { + timeout-ms = <30>; + key-positions = ; + bindings = <&kp Y>; + }; + + }; + + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &kp A &kp B + &kp C &kp D + >; + }; + }; +}; + +#define press_A_and_wait(delay_next) \ + ZMK_MOCK_PRESS(0,0,delay_next) +#define press_B_and_wait(delay_next) \ + ZMK_MOCK_PRESS(0,1,delay_next) +#define press_C_and_wait(delay_next) \ + ZMK_MOCK_PRESS(1,0,delay_next) +#define press_D_and_wait(delay_next) \ + ZMK_MOCK_PRESS(1,1,delay_next) + +#define release_A_and_wait(delay_next) \ + ZMK_MOCK_RELEASE(0,0,delay_next) +#define release_D_and_wait(delay_next) \ + ZMK_MOCK_RELEASE(1,1,delay_next) + +&kscan { + events = < + /* Note: This starts at T+50 because the ZMK_MOCK_PRESS seems to launch the first event at T+(first wait duration). So in our case T+50 */ + + + + /*** First Phase: All 3 combos expire ***/ + + /* T+50+0= T+50: Press A and wait 50ms */ + press_A_and_wait(50) + + /* T+50+20= T+70: 'combo_20' should expire */ + /* T+50+30= T+80: 'combo_30' should expire */ + /* T+50+40= T+90: 'combo_40' should expire, and we should send the keycode 'A' */ + + /* T+50+50= T+100: We release A and wait 20ms */ + release_A_and_wait(20) + + + + /*** Second Phase: 2 combo expire, 1 combo triggers ***/ + + /* T+120+0= T+120: Press A and wait 35ms */ + press_A_and_wait(35) + + /* T+120+20= T+140: 'combo_20' should expire */ + /* T+120+30= T+150: 'combo_30' should expire */ + + /* T+120+35= T+155: We press 'D', this should trigger 'combo_40' and send the keycode 'Z'. We wait 15ms */ + press_D_and_wait(15) + + + + /*** Cleanup ***/ + /* T+120+50= T+170: We release both keys */ + release_A_and_wait(20) + release_D_and_wait(0) + >; +}; \ No newline at end of file From 2f6abff3bcb4f157d7b0d8eaa53faf2afebe7878 Mon Sep 17 00:00:00 2001 From: Andrew Rae Date: Sat, 16 Jul 2022 21:51:25 -0700 Subject: [PATCH 106/160] refactor(behaviors): Giving global-quick-tap its own term Detaching the global-quick-tap functionality from the quick-tap term. This makes way for two improvements: 1. This functionality can be added to combos under a unified name 'global-quick-tap-ms'. 2. This allows users to set a lower term for the 'global-quick-tap' (typically ~100ms), and a higher term for the regular quick-tap (typically ~200ms) This deprecates the global-quick-tap option, however if it is set, the quick-tap-ms value will be copied to global-quick-tap-ms. --- .../behaviors/zmk,behavior-hold-tap.yaml | 5 ++++- app/src/behaviors/behavior_hold_tap.c | 17 +++++++++++------ .../1-basic/native_posix_64.keymap | 2 +- .../8-global-quick-tap/behavior_keymap.dtsi | 2 +- .../1-basic/native_posix_64.keymap | 2 +- .../8-global-quick-tap/behavior_keymap.dtsi | 2 +- .../1-basic/native_posix_64.keymap | 2 +- .../2-double-hold/native_posix_64.keymap | 2 +- .../8-global-quick-tap/behavior_keymap.dtsi | 2 +- .../1-basic/native_posix_64.keymap | 2 +- .../6-global-quick-tap/behavior_keymap.dtsi | 2 +- 11 files changed, 24 insertions(+), 16 deletions(-) diff --git a/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml b/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml index a2affbf2147..cca0e96951a 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml @@ -20,8 +20,11 @@ properties: default: -1 quick_tap_ms: # deprecated type: int - global-quick-tap: + global-quick-tap: # deprecated type: boolean + global-quick-tap-ms: + type: int + default: -1 flavor: type: string required: false diff --git a/app/src/behaviors/behavior_hold_tap.c b/app/src/behaviors/behavior_hold_tap.c index 30350ef24ce..1f172e44c46 100644 --- a/app/src/behaviors/behavior_hold_tap.c +++ b/app/src/behaviors/behavior_hold_tap.c @@ -57,7 +57,7 @@ struct behavior_hold_tap_config { char *hold_behavior_dev; char *tap_behavior_dev; int quick_tap_ms; - bool global_quick_tap; + int global_quick_tap_ms; enum flavor flavor; bool retro_tap; bool hold_trigger_on_release; @@ -97,7 +97,9 @@ struct last_tapped { int64_t timestamp; }; -struct last_tapped last_tapped = {INT32_MIN, INT64_MIN}; +// Set time stamp to large negative number initially for test suites, but not +// int64 min since it will overflow if -1 is added +struct last_tapped last_tapped = {INT32_MIN, INT32_MIN}; static void store_last_tapped(int64_t timestamp) { if (timestamp > last_tapped.timestamp) { @@ -112,10 +114,11 @@ static void store_last_hold_tapped(struct active_hold_tap *hold_tap) { } static bool is_quick_tap(struct active_hold_tap *hold_tap) { - if (hold_tap->config->global_quick_tap || last_tapped.position == hold_tap->position) { - return (last_tapped.timestamp + hold_tap->config->quick_tap_ms) > hold_tap->timestamp; + if ((last_tapped.timestamp + hold_tap->config->global_quick_tap_ms) > hold_tap->timestamp) { + return true; } else { - return false; + return (last_tapped.position == hold_tap->position) && + (last_tapped.timestamp + hold_tap->config->quick_tap_ms) > hold_tap->timestamp; } } @@ -703,7 +706,9 @@ static int behavior_hold_tap_init(const struct device *dev) { .hold_behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(n, bindings, 0), label), \ .tap_behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(n, bindings, 1), label), \ .quick_tap_ms = DT_INST_PROP(n, quick_tap_ms), \ - .global_quick_tap = DT_INST_PROP(n, global_quick_tap), \ + .global_quick_tap_ms = DT_INST_PROP(n, global_quick_tap) \ + ? DT_INST_PROP(n, quick_tap_ms) \ + : DT_INST_PROP(n, global_quick_tap_ms), \ .flavor = DT_ENUM_IDX(DT_DRV_INST(n), flavor), \ .retro_tap = DT_INST_PROP(n, retro_tap), \ .hold_trigger_on_release = DT_INST_PROP(n, hold_trigger_on_release), \ diff --git a/app/tests/hold-tap/balanced/8-global-quick-tap/1-basic/native_posix_64.keymap b/app/tests/hold-tap/balanced/8-global-quick-tap/1-basic/native_posix_64.keymap index 5af001f6be1..cdbe51bfe3c 100644 --- a/app/tests/hold-tap/balanced/8-global-quick-tap/1-basic/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/8-global-quick-tap/1-basic/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < /* tap */ ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,250) /* normal quick tap */ ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_RELEASE(0,0,400) diff --git a/app/tests/hold-tap/balanced/8-global-quick-tap/behavior_keymap.dtsi b/app/tests/hold-tap/balanced/8-global-quick-tap/behavior_keymap.dtsi index ef8efd437d7..8fa363a22e6 100644 --- a/app/tests/hold-tap/balanced/8-global-quick-tap/behavior_keymap.dtsi +++ b/app/tests/hold-tap/balanced/8-global-quick-tap/behavior_keymap.dtsi @@ -11,8 +11,8 @@ flavor = "balanced"; tapping-term-ms = <300>; quick-tap-ms = <300>; + global-quick-tap-ms = <100>; bindings = <&kp>, <&kp>; - global-quick-tap; }; }; diff --git a/app/tests/hold-tap/hold-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap index e28eb4c37e8..a7ba7304c35 100644 --- a/app/tests/hold-tap/hold-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < /* tap */ ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,250) /* normal quick tap */ ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_RELEASE(0,0,400) diff --git a/app/tests/hold-tap/hold-preferred/8-global-quick-tap/behavior_keymap.dtsi b/app/tests/hold-tap/hold-preferred/8-global-quick-tap/behavior_keymap.dtsi index 392a5f83435..8b162bd6a10 100644 --- a/app/tests/hold-tap/hold-preferred/8-global-quick-tap/behavior_keymap.dtsi +++ b/app/tests/hold-tap/hold-preferred/8-global-quick-tap/behavior_keymap.dtsi @@ -11,8 +11,8 @@ flavor = "hold-preferred"; tapping-term-ms = <300>; quick-tap-ms = <300>; + global-quick-tap-ms = <100>; bindings = <&kp>, <&kp>; - global-quick-tap; }; }; diff --git a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap index 5af001f6be1..cdbe51bfe3c 100644 --- a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < /* tap */ ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,250) /* normal quick tap */ ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_RELEASE(0,0,400) diff --git a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/2-double-hold/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/8-global-quick-tap/2-double-hold/native_posix_64.keymap index 69d691cee8e..068ae81a8c6 100644 --- a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/2-double-hold/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/8-global-quick-tap/2-double-hold/native_posix_64.keymap @@ -6,7 +6,7 @@ &kscan { events = < /* hold the first mod tap */ - ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_PRESS(0,0,10) /* hold the second mod tap */ ZMK_MOCK_PRESS(0,1,400) /* press the normal key */ diff --git a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/behavior_keymap.dtsi b/app/tests/hold-tap/tap-preferred/8-global-quick-tap/behavior_keymap.dtsi index 02362ef2b09..9268da077a4 100644 --- a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/behavior_keymap.dtsi +++ b/app/tests/hold-tap/tap-preferred/8-global-quick-tap/behavior_keymap.dtsi @@ -11,8 +11,8 @@ flavor = "tap-preferred"; tapping-term-ms = <300>; quick-tap-ms = <300>; + global-quick-tap-ms = <100>; bindings = <&kp>, <&kp>; - global-quick-tap; }; }; diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/1-basic/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/1-basic/native_posix_64.keymap index 5af001f6be1..cdbe51bfe3c 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/1-basic/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/1-basic/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < /* tap */ ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,250) /* normal quick tap */ ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_RELEASE(0,0,400) diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/behavior_keymap.dtsi b/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/behavior_keymap.dtsi index 029a8128292..0ee84a0d908 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/behavior_keymap.dtsi +++ b/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/behavior_keymap.dtsi @@ -11,8 +11,8 @@ flavor = "tap-unless-interrupted"; tapping-term-ms = <300>; quick-tap-ms = <300>; + global-quick-tap-ms = <100>; bindings = <&kp>, <&kp>; - global-quick-tap; }; }; From 77eb44ba9b14d0c47eb81001d6a90a3ec4e82b19 Mon Sep 17 00:00:00 2001 From: Andrew Rae Date: Mon, 18 Jul 2022 18:27:44 -0700 Subject: [PATCH 107/160] feat(behaviors): Adding global-quick-tap-ms for combos This brings the 'global-quick-tap' functionality to combos by filtering out candidate combos that fell within their own quick tap term. I also replaced `return 0` with `return ZMK_EV_EVENT_BUBBLE` where appropriate. (I assume this was done in past as it is similar to errno returning, but being that this is to signify an event type I find this more clear) --- app/dts/bindings/zmk,combos.yaml | 3 + app/src/combo.c | 50 +++++++++++++-- .../combo/global-quick-tap/events.patterns | 1 + .../global-quick-tap/keycode_events.snapshot | 14 ++++ .../global-quick-tap/native_posix_64.keymap | 64 +++++++++++++++++++ 5 files changed, 126 insertions(+), 6 deletions(-) create mode 100644 app/tests/combo/global-quick-tap/events.patterns create mode 100644 app/tests/combo/global-quick-tap/keycode_events.snapshot create mode 100644 app/tests/combo/global-quick-tap/native_posix_64.keymap diff --git a/app/dts/bindings/zmk,combos.yaml b/app/dts/bindings/zmk,combos.yaml index d094b5c42af..6f6794baa49 100644 --- a/app/dts/bindings/zmk,combos.yaml +++ b/app/dts/bindings/zmk,combos.yaml @@ -18,6 +18,9 @@ child-binding: timeout-ms: type: int default: 50 + global-quick-tap-ms: + type: int + default: -1 slow-release: type: boolean layers: diff --git a/app/src/combo.c b/app/src/combo.c index 87a931439a1..0d6de4f11b3 100644 --- a/app/src/combo.c +++ b/app/src/combo.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -30,6 +31,7 @@ struct combo_cfg { int32_t key_position_len; struct zmk_behavior_binding behavior; int32_t timeout_ms; + int32_t global_quick_tap_ms; // if slow release is set, the combo releases when the last key is released. // otherwise, the combo releases when the first key is released. bool slow_release; @@ -72,6 +74,17 @@ int active_combo_count = 0; struct k_work_delayable timeout_task; int64_t timeout_task_timeout_at; +// this keeps track of the last non-combo, non-mod key tap +int64_t last_tapped_timestamp = INT32_MIN; +// this keeps track of the last time a combo was pressed +int64_t last_combo_timestamp = INT32_MIN; + +static void store_last_tapped(int64_t timestamp) { + if (timestamp > last_combo_timestamp) { + last_tapped_timestamp = timestamp; + } +} + // Store the combo key pointer in the combos array, one pointer for each key position // The combos are sorted shortest-first, then by virtual-key-position. static int initialize_combo(struct combo_cfg *new_combo) { @@ -122,6 +135,10 @@ static bool combo_active_on_layer(struct combo_cfg *combo, uint8_t layer) { return false; } +static bool is_quick_tap(struct combo_cfg *combo, int64_t timestamp) { + return (last_tapped_timestamp + combo->global_quick_tap_ms) > timestamp; +} + static int setup_candidates_for_first_keypress(int32_t position, int64_t timestamp) { int number_of_combo_candidates = 0; uint8_t highest_active_layer = zmk_keymap_highest_layer_active(); @@ -130,7 +147,7 @@ static int setup_candidates_for_first_keypress(int32_t position, int64_t timesta if (combo == NULL) { return number_of_combo_candidates; } - if (combo_active_on_layer(combo, highest_active_layer)) { + if (combo_active_on_layer(combo, highest_active_layer) && !is_quick_tap(combo, timestamp)) { candidates[number_of_combo_candidates].combo = combo; candidates[number_of_combo_candidates].timeout_at = timestamp + combo->timeout_ms; number_of_combo_candidates++; @@ -252,7 +269,7 @@ static int capture_pressed_key(const zmk_event_t *ev) { pressed_keys[i] = ev; return ZMK_EV_EVENT_CAPTURED; } - return 0; + return ZMK_EV_EVENT_BUBBLE; } const struct zmk_listener zmk_listener_combo; @@ -284,6 +301,8 @@ static inline int press_combo_behavior(struct combo_cfg *combo, int32_t timestam .timestamp = timestamp, }; + last_combo_timestamp = timestamp; + return behavior_keymap_binding_pressed(&combo->behavior, event); } @@ -413,7 +432,7 @@ static int position_state_down(const zmk_event_t *ev, struct zmk_position_state_ if (candidates[0].combo == NULL) { num_candidates = setup_candidates_for_first_keypress(data->position, data->timestamp); if (num_candidates == 0) { - return 0; + return ZMK_EV_EVENT_BUBBLE; } } else { filter_timed_out_candidates(data->timestamp); @@ -453,7 +472,7 @@ static int position_state_up(const zmk_event_t *ev, struct zmk_position_state_ch ZMK_EVENT_RAISE(ev); return ZMK_EV_EVENT_CAPTURED; } - return 0; + return ZMK_EV_EVENT_BUBBLE; } static void combo_timeout_handler(struct k_work *item) { @@ -470,7 +489,7 @@ static void combo_timeout_handler(struct k_work *item) { static int position_state_changed_listener(const zmk_event_t *ev) { struct zmk_position_state_changed *data = as_zmk_position_state_changed(ev); if (data == NULL) { - return 0; + return ZMK_EV_EVENT_BUBBLE; } if (data->state) { // keydown @@ -480,12 +499,31 @@ static int position_state_changed_listener(const zmk_event_t *ev) { } } -ZMK_LISTENER(combo, position_state_changed_listener); +static int keycode_state_changed_listener(const zmk_event_t *eh) { + struct zmk_keycode_state_changed *ev = as_zmk_keycode_state_changed(eh); + if (ev->state && !is_mod(ev->usage_page, ev->keycode)) { + store_last_tapped(ev->timestamp); + } + return ZMK_EV_EVENT_BUBBLE; +} + +int behavior_combo_listener(const zmk_event_t *eh) { + if (as_zmk_position_state_changed(eh) != NULL) { + return position_state_changed_listener(eh); + } else if (as_zmk_keycode_state_changed(eh) != NULL) { + return keycode_state_changed_listener(eh); + } + return ZMK_EV_EVENT_BUBBLE; +} + +ZMK_LISTENER(combo, behavior_combo_listener); ZMK_SUBSCRIPTION(combo, zmk_position_state_changed); +ZMK_SUBSCRIPTION(combo, zmk_keycode_state_changed); #define COMBO_INST(n) \ static struct combo_cfg combo_config_##n = { \ .timeout_ms = DT_PROP(n, timeout_ms), \ + .global_quick_tap_ms = DT_PROP(n, global_quick_tap_ms), \ .key_positions = DT_PROP(n, key_positions), \ .key_position_len = DT_PROP_LEN(n, key_positions), \ .behavior = ZMK_KEYMAP_EXTRACT_BINDING(0, n), \ diff --git a/app/tests/combo/global-quick-tap/events.patterns b/app/tests/combo/global-quick-tap/events.patterns new file mode 100644 index 00000000000..833100f6ac4 --- /dev/null +++ b/app/tests/combo/global-quick-tap/events.patterns @@ -0,0 +1 @@ +s/.*hid_listener_keycode_//p \ No newline at end of file diff --git a/app/tests/combo/global-quick-tap/keycode_events.snapshot b/app/tests/combo/global-quick-tap/keycode_events.snapshot new file mode 100644 index 00000000000..ee4dd064c61 --- /dev/null +++ b/app/tests/combo/global-quick-tap/keycode_events.snapshot @@ -0,0 +1,14 @@ +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x1B implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x1B implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x1B implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x1B implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x1C implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x1C implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/combo/global-quick-tap/native_posix_64.keymap b/app/tests/combo/global-quick-tap/native_posix_64.keymap new file mode 100644 index 00000000000..92b5a8ae88e --- /dev/null +++ b/app/tests/combo/global-quick-tap/native_posix_64.keymap @@ -0,0 +1,64 @@ +#include +#include +#include + +/ { + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = <50>; + key-positions = <0 1>; + bindings = <&kp X>; + global-quick-tap-ms = <100>; + }; + + combo_two { + timeout-ms = <50>; + key-positions = <0 2>; + bindings = <&kp Y>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &kp A &kp B + &kp C &kp D + >; + }; + }; +}; + +&kscan { + events = < + /* Tap A */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,60) + /* Quick Tap A and B */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,200) + /* Combo One */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + /* Combo One Again (shouldn't quick tap) */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + /* Tap A */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,60) + /* Combo 2 */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(1,0,10) + >; +}; From 1e84e265b144602431d723e1080ebe32d87871e6 Mon Sep 17 00:00:00 2001 From: Andrew Rae Date: Sun, 28 May 2023 15:35:51 -0400 Subject: [PATCH 108/160] feat(docs): Adding global-quick-tap-ms docs --- docs/docs/behaviors/hold-tap.md | 10 +++++----- docs/docs/config/combos.md | 15 ++++++++------- docs/docs/features/combos.md | 1 + 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/docs/behaviors/hold-tap.md b/docs/docs/behaviors/hold-tap.md index 2a8489a15ab..66cf5958224 100644 --- a/docs/docs/behaviors/hold-tap.md +++ b/docs/docs/behaviors/hold-tap.md @@ -49,11 +49,11 @@ Defines how long a key must be pressed to trigger Hold behavior. If you press a tapped hold-tap again within `quick-tap-ms` milliseconds, it will always trigger the tap behavior. This is useful for things like a backspace, where a quick tap+hold holds backspace pressed. Set this to a negative value to disable. The default is -1 (disabled). -#### `global-quick-tap` +#### `global-quick-tap-ms` -If `global-quick-tap` is enabled, then `quick-tap-ms` will apply not only when the given hold-tap is tapped, but for any key tapped before it. This effectively disables the hold-tap when typing quickly, which can be quite useful for homerow mods. It can also have the effect of removing the input delay when typing quickly. +If `global-quick-tap-ms` is like `quick-tap-ms` however it will apply for _any_ key tapped before it. This effectively disables the hold-tap when typing quickly, which can be quite useful for homerow mods. It can also have the effect of removing the input delay when typing quickly. -For example, the following hold-tap configuration enables `global-quick-tap` with a 125 millisecond `quick-tap-ms` term. +For example, the following hold-tap configuration enables `global-quick-tap-ms` with a 125 millisecond term, alongside a regular `quick-tap-ms` with a 200 millisecond term. ``` gqt: global-quick-tap { @@ -62,8 +62,8 @@ gqt: global-quick-tap { #binding-cells = <2>; flavor = "tap-preferred"; tapping-term-ms = <200>; - quick-tap-ms = <125>; - global-quick-tap; + quick-tap-ms = <200>; + global-quick-tap-ms = <125>; bindings = <&kp>, <&kp>; }; ``` diff --git a/docs/docs/config/combos.md b/docs/docs/config/combos.md index cd351125450..ca80245019e 100644 --- a/docs/docs/config/combos.md +++ b/docs/docs/config/combos.md @@ -31,12 +31,13 @@ The `zmk,combos` node itself has no properties. It should have one child node pe Each child node can have the following properties: -| Property | Type | Description | Default | -| --------------- | ------------- | ----------------------------------------------------------------------------------------------------- | ------- | -| `bindings` | phandle-array | A [behavior](../features/keymaps.md#behaviors) to run when the combo is triggered | | -| `key-positions` | array | A list of key position indices for the keys which should trigger the combo | | -| `timeout-ms` | int | All the keys in `key-positions` must be pressed within this time in milliseconds to trigger the combo | 50 | -| `slow-release` | bool | Releases the combo when all keys are released instead of when any key is released | false | -| `layers` | array | A list of layers on which the combo may be triggered. `-1` allows all layers. | `<-1>` | +| Property | Type | Description | Default | +| --------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------- | ------- | +| `bindings` | phandle-array | A [behavior](../features/keymaps.md#behaviors) to run when the combo is triggered | | +| `key-positions` | array | A list of key position indices for the keys which should trigger the combo | | +| `timeout-ms` | int | All the keys in `key-positions` must be pressed within this time in milliseconds to trigger the combo | 50 | +| `global-quick-tap-ms` | int | If any key is tapped within `global-quick-tap-ms` before a key in the combo, the key will not be considered for the combo | -1 | +| `slow-release` | bool | Releases the combo when all keys are released instead of when any key is released | false | +| `layers` | array | A list of layers on which the combo may be triggered. `-1` allows all layers. | `<-1>` | The `key-positions` array must not be longer than the `CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO` setting, which defaults to 4. If you want a combo that triggers when pressing 5 keys, then you must change the setting to 5. diff --git a/docs/docs/features/combos.md b/docs/docs/features/combos.md index 44313cc1dac..263c1a5383c 100644 --- a/docs/docs/features/combos.md +++ b/docs/docs/features/combos.md @@ -30,6 +30,7 @@ Combos configured in your `.keymap` file, but are separate from the `keymap` nod - `layers = <0 1...>` will allow limiting a combo to specific layers. This is an _optional_ parameter, when omitted it defaults to global scope. - `bindings` is the behavior that is activated when the behavior is pressed. - (advanced) you can specify `slow-release` if you want the combo binding to be released when all key-positions are released. The default is to release the combo as soon as any of the keys in the combo is released. +- (advanced) you can specify `global-quick-tap-ms` much like in [hold-taps](behaviors/hold-tap.md#global-quick-tap-ms). If any key is tapped within `global-quick-tap-ms` before a key in the combo, the key will not be considered for the combo. :::info From 49c393e8f80701a8736b3e07bf7479c5b9a6592c Mon Sep 17 00:00:00 2001 From: Andrew Rae <56003701+andrewjrae@users.noreply.github.com> Date: Sun, 28 May 2023 21:35:02 -0400 Subject: [PATCH 109/160] refactor(docs): Applying suggestions for gqt from @caksoylar Co-authored-by: Cem Aksoylar --- docs/docs/behaviors/hold-tap.md | 4 ++-- docs/docs/config/behaviors.md | 22 +++++++++++----------- docs/docs/config/combos.md | 16 ++++++++-------- docs/docs/features/combos.md | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/docs/behaviors/hold-tap.md b/docs/docs/behaviors/hold-tap.md index 66cf5958224..e1b1059508a 100644 --- a/docs/docs/behaviors/hold-tap.md +++ b/docs/docs/behaviors/hold-tap.md @@ -47,11 +47,11 @@ Defines how long a key must be pressed to trigger Hold behavior. #### `quick-tap-ms` -If you press a tapped hold-tap again within `quick-tap-ms` milliseconds, it will always trigger the tap behavior. This is useful for things like a backspace, where a quick tap+hold holds backspace pressed. Set this to a negative value to disable. The default is -1 (disabled). +If you press a tapped hold-tap again within `quick-tap-ms` milliseconds of the first press, it will always trigger the tap behavior. This is useful for things like a backspace, where a quick tap+hold holds backspace pressed. Set this to a negative value to disable. The default is -1 (disabled). #### `global-quick-tap-ms` -If `global-quick-tap-ms` is like `quick-tap-ms` however it will apply for _any_ key tapped before it. This effectively disables the hold-tap when typing quickly, which can be quite useful for homerow mods. It can also have the effect of removing the input delay when typing quickly. +`global-quick-tap-ms` is like `quick-tap-ms` however it will apply for _any_ non-modifier key pressed before it. This effectively disables the hold-tap when typing quickly, which can be quite useful for homerow mods. It can also have the effect of removing the input delay when typing quickly. For example, the following hold-tap configuration enables `global-quick-tap-ms` with a 125 millisecond term, alongside a regular `quick-tap-ms` with a 200 millisecond term. diff --git a/docs/docs/config/behaviors.md b/docs/docs/config/behaviors.md index 60e8b72abca..172a0f13fee 100644 --- a/docs/docs/config/behaviors.md +++ b/docs/docs/config/behaviors.md @@ -58,17 +58,17 @@ Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml](htt Applies to: `compatible = "zmk,behavior-hold-tap"` -| Property | Type | Description | Default | -| ---------------------------- | ------------- | ----------------------------------------------------------------------------------------- | ------------------ | -| `label` | string | Unique label for the node | | -| `#binding-cells` | int | Must be `<2>` | | -| `bindings` | phandle array | A list of two behaviors (without parameters): one for hold and one for tap | | -| `flavor` | string | Adjusts how the behavior chooses between hold and tap | `"hold-preferred"` | -| `tapping-term-ms` | int | How long in milliseconds the key must be held to trigger a hold | | -| `quick-tap-ms` | int | Tap twice within this period (in milliseconds) to trigger a tap, even when held | -1 (disabled) | -| `global-quick-tap` | bool | If enabled, `quick-tap-ms` also applies when tapping another key and then this one. | false | -| `retro-tap` | bool | Triggers the tap behavior on release if no other key was pressed during a hold | false | -| `hold-trigger-key-positions` | array | If set, pressing the hold-tap and then any key position _not_ in the list triggers a tap. | | +| Property | Type | Description | Default | +| ---------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------ | ------------------ | +| `label` | string | Unique label for the node | | +| `#binding-cells` | int | Must be `<2>` | | +| `bindings` | phandle array | A list of two behaviors (without parameters): one for hold and one for tap | | +| `flavor` | string | Adjusts how the behavior chooses between hold and tap | `"hold-preferred"` | +| `tapping-term-ms` | int | How long in milliseconds the key must be held to trigger a hold | | +| `quick-tap-ms` | int | Tap twice within this period (in milliseconds) to trigger a tap, even when held | -1 (disabled) | +| `global-quick-tap-ms` | int | Triggers a tap immediately if any non-modifier key was pressed within `global-quick-tap-ms` of the hold-tap. | -1 (disabled) | +| `retro-tap` | bool | Triggers the tap behavior on release if no other key was pressed during a hold | false | +| `hold-trigger-key-positions` | array | If set, pressing the hold-tap and then any key position _not_ in the list triggers a tap. | | The `flavor` property may be one of: diff --git a/docs/docs/config/combos.md b/docs/docs/config/combos.md index ca80245019e..33622a7a869 100644 --- a/docs/docs/config/combos.md +++ b/docs/docs/config/combos.md @@ -31,13 +31,13 @@ The `zmk,combos` node itself has no properties. It should have one child node pe Each child node can have the following properties: -| Property | Type | Description | Default | -| --------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------- | ------- | -| `bindings` | phandle-array | A [behavior](../features/keymaps.md#behaviors) to run when the combo is triggered | | -| `key-positions` | array | A list of key position indices for the keys which should trigger the combo | | -| `timeout-ms` | int | All the keys in `key-positions` must be pressed within this time in milliseconds to trigger the combo | 50 | -| `global-quick-tap-ms` | int | If any key is tapped within `global-quick-tap-ms` before a key in the combo, the key will not be considered for the combo | -1 | -| `slow-release` | bool | Releases the combo when all keys are released instead of when any key is released | false | -| `layers` | array | A list of layers on which the combo may be triggered. `-1` allows all layers. | `<-1>` | +| Property | Type | Description | Default | +| --------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------- | +| `bindings` | phandle-array | A [behavior](../features/keymaps.md#behaviors) to run when the combo is triggered | | +| `key-positions` | array | A list of key position indices for the keys which should trigger the combo | | +| `timeout-ms` | int | All the keys in `key-positions` must be pressed within this time in milliseconds to trigger the combo | 50 | +| `global-quick-tap-ms` | int | If any non-modifier key is pressed within `global-quick-tap-ms` before a key in the combo, the key will not be considered for the combo | -1 (disabled) | +| `slow-release` | bool | Releases the combo when all keys are released instead of when any key is released | false | +| `layers` | array | A list of layers on which the combo may be triggered. `-1` allows all layers. | `<-1>` | The `key-positions` array must not be longer than the `CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO` setting, which defaults to 4. If you want a combo that triggers when pressing 5 keys, then you must change the setting to 5. diff --git a/docs/docs/features/combos.md b/docs/docs/features/combos.md index 263c1a5383c..5ad061686a2 100644 --- a/docs/docs/features/combos.md +++ b/docs/docs/features/combos.md @@ -30,7 +30,7 @@ Combos configured in your `.keymap` file, but are separate from the `keymap` nod - `layers = <0 1...>` will allow limiting a combo to specific layers. This is an _optional_ parameter, when omitted it defaults to global scope. - `bindings` is the behavior that is activated when the behavior is pressed. - (advanced) you can specify `slow-release` if you want the combo binding to be released when all key-positions are released. The default is to release the combo as soon as any of the keys in the combo is released. -- (advanced) you can specify `global-quick-tap-ms` much like in [hold-taps](behaviors/hold-tap.md#global-quick-tap-ms). If any key is tapped within `global-quick-tap-ms` before a key in the combo, the key will not be considered for the combo. +- (advanced) you can specify a `global-quick-tap-ms` value much like for [hold-taps](behaviors/hold-tap.md#global-quick-tap-ms). If any non-modifier key is pressed within `global-quick-tap-ms` before a key in the combo, the combo will not trigger. :::info From b85ffa4b6cfb5e2a8c735534ac1b46dc52f8ad86 Mon Sep 17 00:00:00 2001 From: Andrew Rae Date: Sun, 24 Sep 2023 09:38:45 -0400 Subject: [PATCH 110/160] refactor(behaviors): global-quick-tap -> require-prior-idle Renaming global-quick-tap-ms to require-prior-idle. --- .../behaviors/zmk,behavior-hold-tap.yaml | 2 +- app/dts/bindings/zmk,combos.yaml | 2 +- app/src/behaviors/behavior_hold_tap.c | 10 ++++----- app/src/combo.c | 6 ++--- .../events.patterns | 0 .../keycode_events.snapshot | 0 .../native_posix_64.keymap | 2 +- .../1-basic/events.patterns | 0 .../1-basic/keycode_events.snapshot | 0 .../1-basic/native_posix_64.keymap | 0 .../2-double-hold/events.patterns | 0 .../2-double-hold/keycode_events.snapshot | 0 .../2-double-hold/native_posix_64.keymap | 0 .../behavior_keymap.dtsi | 2 +- .../1-basic/events.patterns | 0 .../1-basic/keycode_events.snapshot | 0 .../1-basic/native_posix_64.keymap | 0 .../2-double-hold/events.patterns | 0 .../2-double-hold/keycode_events.snapshot | 0 .../2-double-hold/native_posix_64.keymap | 0 .../behavior_keymap.dtsi | 2 +- .../1-basic/events.patterns | 0 .../1-basic/keycode_events.snapshot | 0 .../1-basic/native_posix_64.keymap | 0 .../2-double-hold/events.patterns | 0 .../2-double-hold/keycode_events.snapshot | 0 .../2-double-hold/native_posix_64.keymap | 0 .../behavior_keymap.dtsi | 2 +- .../1-basic/events.patterns | 0 .../1-basic/keycode_events.snapshot | 0 .../1-basic/native_posix_64.keymap | 0 .../2-double-hold/events.patterns | 0 .../2-double-hold/keycode_events.snapshot | 0 .../2-double-hold/native_posix_64.keymap | 0 .../behavior_keymap.dtsi | 2 +- docs/docs/behaviors/hold-tap.md | 12 +++++----- docs/docs/config/behaviors.md | 22 +++++++++---------- docs/docs/config/combos.md | 16 +++++++------- docs/docs/features/combos.md | 2 +- 39 files changed, 41 insertions(+), 41 deletions(-) rename app/tests/combo/{global-quick-tap => require-prior-idle}/events.patterns (100%) rename app/tests/combo/{global-quick-tap => require-prior-idle}/keycode_events.snapshot (100%) rename app/tests/combo/{global-quick-tap => require-prior-idle}/native_posix_64.keymap (97%) rename app/tests/hold-tap/balanced/{8-global-quick-tap => 8-require-prior-idle}/1-basic/events.patterns (100%) rename app/tests/hold-tap/balanced/{8-global-quick-tap => 8-require-prior-idle}/1-basic/keycode_events.snapshot (100%) rename app/tests/hold-tap/balanced/{8-global-quick-tap => 8-require-prior-idle}/1-basic/native_posix_64.keymap (100%) rename app/tests/hold-tap/balanced/{8-global-quick-tap => 8-require-prior-idle}/2-double-hold/events.patterns (100%) rename app/tests/hold-tap/balanced/{8-global-quick-tap => 8-require-prior-idle}/2-double-hold/keycode_events.snapshot (100%) rename app/tests/hold-tap/balanced/{8-global-quick-tap => 8-require-prior-idle}/2-double-hold/native_posix_64.keymap (100%) rename app/tests/hold-tap/balanced/{8-global-quick-tap => 8-require-prior-idle}/behavior_keymap.dtsi (94%) rename app/tests/hold-tap/hold-preferred/{8-global-quick-tap => 8-require-prior-idle}/1-basic/events.patterns (100%) rename app/tests/hold-tap/hold-preferred/{8-global-quick-tap => 8-require-prior-idle}/1-basic/keycode_events.snapshot (100%) rename app/tests/hold-tap/hold-preferred/{8-global-quick-tap => 8-require-prior-idle}/1-basic/native_posix_64.keymap (100%) rename app/tests/hold-tap/hold-preferred/{8-global-quick-tap => 8-require-prior-idle}/2-double-hold/events.patterns (100%) rename app/tests/hold-tap/hold-preferred/{8-global-quick-tap => 8-require-prior-idle}/2-double-hold/keycode_events.snapshot (100%) rename app/tests/hold-tap/hold-preferred/{8-global-quick-tap => 8-require-prior-idle}/2-double-hold/native_posix_64.keymap (100%) rename app/tests/hold-tap/hold-preferred/{8-global-quick-tap => 8-require-prior-idle}/behavior_keymap.dtsi (94%) rename app/tests/hold-tap/tap-preferred/{8-global-quick-tap => 8-require-prior-idle}/1-basic/events.patterns (100%) rename app/tests/hold-tap/tap-preferred/{8-global-quick-tap => 8-require-prior-idle}/1-basic/keycode_events.snapshot (100%) rename app/tests/hold-tap/tap-preferred/{8-global-quick-tap => 8-require-prior-idle}/1-basic/native_posix_64.keymap (100%) rename app/tests/hold-tap/tap-preferred/{8-global-quick-tap => 8-require-prior-idle}/2-double-hold/events.patterns (100%) rename app/tests/hold-tap/tap-preferred/{8-global-quick-tap => 8-require-prior-idle}/2-double-hold/keycode_events.snapshot (100%) rename app/tests/hold-tap/tap-preferred/{8-global-quick-tap => 8-require-prior-idle}/2-double-hold/native_posix_64.keymap (100%) rename app/tests/hold-tap/tap-preferred/{8-global-quick-tap => 8-require-prior-idle}/behavior_keymap.dtsi (93%) rename app/tests/hold-tap/tap-unless-interrupted/{6-global-quick-tap => 6-require-prior-idle}/1-basic/events.patterns (100%) rename app/tests/hold-tap/tap-unless-interrupted/{6-global-quick-tap => 6-require-prior-idle}/1-basic/keycode_events.snapshot (100%) rename app/tests/hold-tap/tap-unless-interrupted/{6-global-quick-tap => 6-require-prior-idle}/1-basic/native_posix_64.keymap (100%) rename app/tests/hold-tap/tap-unless-interrupted/{6-global-quick-tap => 6-require-prior-idle}/2-double-hold/events.patterns (100%) rename app/tests/hold-tap/tap-unless-interrupted/{6-global-quick-tap => 6-require-prior-idle}/2-double-hold/keycode_events.snapshot (100%) rename app/tests/hold-tap/tap-unless-interrupted/{6-global-quick-tap => 6-require-prior-idle}/2-double-hold/native_posix_64.keymap (100%) rename app/tests/hold-tap/tap-unless-interrupted/{6-global-quick-tap => 6-require-prior-idle}/behavior_keymap.dtsi (94%) diff --git a/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml b/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml index cca0e96951a..7a140f9134d 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml @@ -22,7 +22,7 @@ properties: type: int global-quick-tap: # deprecated type: boolean - global-quick-tap-ms: + require-prior-idle-ms: type: int default: -1 flavor: diff --git a/app/dts/bindings/zmk,combos.yaml b/app/dts/bindings/zmk,combos.yaml index 6f6794baa49..f146ab7a230 100644 --- a/app/dts/bindings/zmk,combos.yaml +++ b/app/dts/bindings/zmk,combos.yaml @@ -18,7 +18,7 @@ child-binding: timeout-ms: type: int default: 50 - global-quick-tap-ms: + require-prior-idle-ms: type: int default: -1 slow-release: diff --git a/app/src/behaviors/behavior_hold_tap.c b/app/src/behaviors/behavior_hold_tap.c index 1f172e44c46..d4aa0dce036 100644 --- a/app/src/behaviors/behavior_hold_tap.c +++ b/app/src/behaviors/behavior_hold_tap.c @@ -57,7 +57,7 @@ struct behavior_hold_tap_config { char *hold_behavior_dev; char *tap_behavior_dev; int quick_tap_ms; - int global_quick_tap_ms; + int require_prior_idle_ms; enum flavor flavor; bool retro_tap; bool hold_trigger_on_release; @@ -114,7 +114,7 @@ static void store_last_hold_tapped(struct active_hold_tap *hold_tap) { } static bool is_quick_tap(struct active_hold_tap *hold_tap) { - if ((last_tapped.timestamp + hold_tap->config->global_quick_tap_ms) > hold_tap->timestamp) { + if ((last_tapped.timestamp + hold_tap->config->require_prior_idle_ms) > hold_tap->timestamp) { return true; } else { return (last_tapped.position == hold_tap->position) && @@ -706,9 +706,9 @@ static int behavior_hold_tap_init(const struct device *dev) { .hold_behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(n, bindings, 0), label), \ .tap_behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(n, bindings, 1), label), \ .quick_tap_ms = DT_INST_PROP(n, quick_tap_ms), \ - .global_quick_tap_ms = DT_INST_PROP(n, global_quick_tap) \ - ? DT_INST_PROP(n, quick_tap_ms) \ - : DT_INST_PROP(n, global_quick_tap_ms), \ + .require_prior_idle_ms = DT_INST_PROP(n, global_quick_tap) \ + ? DT_INST_PROP(n, quick_tap_ms) \ + : DT_INST_PROP(n, require_prior_idle_ms), \ .flavor = DT_ENUM_IDX(DT_DRV_INST(n), flavor), \ .retro_tap = DT_INST_PROP(n, retro_tap), \ .hold_trigger_on_release = DT_INST_PROP(n, hold_trigger_on_release), \ diff --git a/app/src/combo.c b/app/src/combo.c index 0d6de4f11b3..0d5c2a6e237 100644 --- a/app/src/combo.c +++ b/app/src/combo.c @@ -31,7 +31,7 @@ struct combo_cfg { int32_t key_position_len; struct zmk_behavior_binding behavior; int32_t timeout_ms; - int32_t global_quick_tap_ms; + int32_t require_prior_idle_ms; // if slow release is set, the combo releases when the last key is released. // otherwise, the combo releases when the first key is released. bool slow_release; @@ -136,7 +136,7 @@ static bool combo_active_on_layer(struct combo_cfg *combo, uint8_t layer) { } static bool is_quick_tap(struct combo_cfg *combo, int64_t timestamp) { - return (last_tapped_timestamp + combo->global_quick_tap_ms) > timestamp; + return (last_tapped_timestamp + combo->require_prior_idle_ms) > timestamp; } static int setup_candidates_for_first_keypress(int32_t position, int64_t timestamp) { @@ -523,7 +523,7 @@ ZMK_SUBSCRIPTION(combo, zmk_keycode_state_changed); #define COMBO_INST(n) \ static struct combo_cfg combo_config_##n = { \ .timeout_ms = DT_PROP(n, timeout_ms), \ - .global_quick_tap_ms = DT_PROP(n, global_quick_tap_ms), \ + .require_prior_idle_ms = DT_PROP(n, require_prior_idle_ms), \ .key_positions = DT_PROP(n, key_positions), \ .key_position_len = DT_PROP_LEN(n, key_positions), \ .behavior = ZMK_KEYMAP_EXTRACT_BINDING(0, n), \ diff --git a/app/tests/combo/global-quick-tap/events.patterns b/app/tests/combo/require-prior-idle/events.patterns similarity index 100% rename from app/tests/combo/global-quick-tap/events.patterns rename to app/tests/combo/require-prior-idle/events.patterns diff --git a/app/tests/combo/global-quick-tap/keycode_events.snapshot b/app/tests/combo/require-prior-idle/keycode_events.snapshot similarity index 100% rename from app/tests/combo/global-quick-tap/keycode_events.snapshot rename to app/tests/combo/require-prior-idle/keycode_events.snapshot diff --git a/app/tests/combo/global-quick-tap/native_posix_64.keymap b/app/tests/combo/require-prior-idle/native_posix_64.keymap similarity index 97% rename from app/tests/combo/global-quick-tap/native_posix_64.keymap rename to app/tests/combo/require-prior-idle/native_posix_64.keymap index 92b5a8ae88e..206b230a7fa 100644 --- a/app/tests/combo/global-quick-tap/native_posix_64.keymap +++ b/app/tests/combo/require-prior-idle/native_posix_64.keymap @@ -9,7 +9,7 @@ timeout-ms = <50>; key-positions = <0 1>; bindings = <&kp X>; - global-quick-tap-ms = <100>; + require-prior-idle-ms = <100>; }; combo_two { diff --git a/app/tests/hold-tap/balanced/8-global-quick-tap/1-basic/events.patterns b/app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/events.patterns similarity index 100% rename from app/tests/hold-tap/balanced/8-global-quick-tap/1-basic/events.patterns rename to app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/events.patterns diff --git a/app/tests/hold-tap/balanced/8-global-quick-tap/1-basic/keycode_events.snapshot b/app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/keycode_events.snapshot similarity index 100% rename from app/tests/hold-tap/balanced/8-global-quick-tap/1-basic/keycode_events.snapshot rename to app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/keycode_events.snapshot diff --git a/app/tests/hold-tap/balanced/8-global-quick-tap/1-basic/native_posix_64.keymap b/app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/balanced/8-global-quick-tap/1-basic/native_posix_64.keymap rename to app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/native_posix_64.keymap diff --git a/app/tests/hold-tap/balanced/8-global-quick-tap/2-double-hold/events.patterns b/app/tests/hold-tap/balanced/8-require-prior-idle/2-double-hold/events.patterns similarity index 100% rename from app/tests/hold-tap/balanced/8-global-quick-tap/2-double-hold/events.patterns rename to app/tests/hold-tap/balanced/8-require-prior-idle/2-double-hold/events.patterns diff --git a/app/tests/hold-tap/balanced/8-global-quick-tap/2-double-hold/keycode_events.snapshot b/app/tests/hold-tap/balanced/8-require-prior-idle/2-double-hold/keycode_events.snapshot similarity index 100% rename from app/tests/hold-tap/balanced/8-global-quick-tap/2-double-hold/keycode_events.snapshot rename to app/tests/hold-tap/balanced/8-require-prior-idle/2-double-hold/keycode_events.snapshot diff --git a/app/tests/hold-tap/balanced/8-global-quick-tap/2-double-hold/native_posix_64.keymap b/app/tests/hold-tap/balanced/8-require-prior-idle/2-double-hold/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/balanced/8-global-quick-tap/2-double-hold/native_posix_64.keymap rename to app/tests/hold-tap/balanced/8-require-prior-idle/2-double-hold/native_posix_64.keymap diff --git a/app/tests/hold-tap/balanced/8-global-quick-tap/behavior_keymap.dtsi b/app/tests/hold-tap/balanced/8-require-prior-idle/behavior_keymap.dtsi similarity index 94% rename from app/tests/hold-tap/balanced/8-global-quick-tap/behavior_keymap.dtsi rename to app/tests/hold-tap/balanced/8-require-prior-idle/behavior_keymap.dtsi index 8fa363a22e6..670bdcc2650 100644 --- a/app/tests/hold-tap/balanced/8-global-quick-tap/behavior_keymap.dtsi +++ b/app/tests/hold-tap/balanced/8-require-prior-idle/behavior_keymap.dtsi @@ -11,7 +11,7 @@ flavor = "balanced"; tapping-term-ms = <300>; quick-tap-ms = <300>; - global-quick-tap-ms = <100>; + require-prior-idle-ms = <100>; bindings = <&kp>, <&kp>; }; }; diff --git a/app/tests/hold-tap/hold-preferred/8-global-quick-tap/1-basic/events.patterns b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/events.patterns similarity index 100% rename from app/tests/hold-tap/hold-preferred/8-global-quick-tap/1-basic/events.patterns rename to app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/events.patterns diff --git a/app/tests/hold-tap/hold-preferred/8-global-quick-tap/1-basic/keycode_events.snapshot b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/keycode_events.snapshot similarity index 100% rename from app/tests/hold-tap/hold-preferred/8-global-quick-tap/1-basic/keycode_events.snapshot rename to app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/keycode_events.snapshot diff --git a/app/tests/hold-tap/hold-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap diff --git a/app/tests/hold-tap/hold-preferred/8-global-quick-tap/2-double-hold/events.patterns b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/2-double-hold/events.patterns similarity index 100% rename from app/tests/hold-tap/hold-preferred/8-global-quick-tap/2-double-hold/events.patterns rename to app/tests/hold-tap/hold-preferred/8-require-prior-idle/2-double-hold/events.patterns diff --git a/app/tests/hold-tap/hold-preferred/8-global-quick-tap/2-double-hold/keycode_events.snapshot b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/2-double-hold/keycode_events.snapshot similarity index 100% rename from app/tests/hold-tap/hold-preferred/8-global-quick-tap/2-double-hold/keycode_events.snapshot rename to app/tests/hold-tap/hold-preferred/8-require-prior-idle/2-double-hold/keycode_events.snapshot diff --git a/app/tests/hold-tap/hold-preferred/8-global-quick-tap/2-double-hold/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/2-double-hold/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/hold-preferred/8-global-quick-tap/2-double-hold/native_posix_64.keymap rename to app/tests/hold-tap/hold-preferred/8-require-prior-idle/2-double-hold/native_posix_64.keymap diff --git a/app/tests/hold-tap/hold-preferred/8-global-quick-tap/behavior_keymap.dtsi b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/behavior_keymap.dtsi similarity index 94% rename from app/tests/hold-tap/hold-preferred/8-global-quick-tap/behavior_keymap.dtsi rename to app/tests/hold-tap/hold-preferred/8-require-prior-idle/behavior_keymap.dtsi index 8b162bd6a10..a99eb3f56f8 100644 --- a/app/tests/hold-tap/hold-preferred/8-global-quick-tap/behavior_keymap.dtsi +++ b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/behavior_keymap.dtsi @@ -11,7 +11,7 @@ flavor = "hold-preferred"; tapping-term-ms = <300>; quick-tap-ms = <300>; - global-quick-tap-ms = <100>; + require-prior-idle-ms = <100>; bindings = <&kp>, <&kp>; }; }; diff --git a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/1-basic/events.patterns b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/events.patterns similarity index 100% rename from app/tests/hold-tap/tap-preferred/8-global-quick-tap/1-basic/events.patterns rename to app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/events.patterns diff --git a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/1-basic/keycode_events.snapshot b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/keycode_events.snapshot similarity index 100% rename from app/tests/hold-tap/tap-preferred/8-global-quick-tap/1-basic/keycode_events.snapshot rename to app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/keycode_events.snapshot diff --git a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/8-global-quick-tap/1-basic/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap diff --git a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/2-double-hold/events.patterns b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/2-double-hold/events.patterns similarity index 100% rename from app/tests/hold-tap/tap-preferred/8-global-quick-tap/2-double-hold/events.patterns rename to app/tests/hold-tap/tap-preferred/8-require-prior-idle/2-double-hold/events.patterns diff --git a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/2-double-hold/keycode_events.snapshot b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/2-double-hold/keycode_events.snapshot similarity index 100% rename from app/tests/hold-tap/tap-preferred/8-global-quick-tap/2-double-hold/keycode_events.snapshot rename to app/tests/hold-tap/tap-preferred/8-require-prior-idle/2-double-hold/keycode_events.snapshot diff --git a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/2-double-hold/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/2-double-hold/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/tap-preferred/8-global-quick-tap/2-double-hold/native_posix_64.keymap rename to app/tests/hold-tap/tap-preferred/8-require-prior-idle/2-double-hold/native_posix_64.keymap diff --git a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/behavior_keymap.dtsi b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/behavior_keymap.dtsi similarity index 93% rename from app/tests/hold-tap/tap-preferred/8-global-quick-tap/behavior_keymap.dtsi rename to app/tests/hold-tap/tap-preferred/8-require-prior-idle/behavior_keymap.dtsi index 9268da077a4..c66dc934092 100644 --- a/app/tests/hold-tap/tap-preferred/8-global-quick-tap/behavior_keymap.dtsi +++ b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/behavior_keymap.dtsi @@ -11,7 +11,7 @@ flavor = "tap-preferred"; tapping-term-ms = <300>; quick-tap-ms = <300>; - global-quick-tap-ms = <100>; + require-prior-idle-ms = <100>; bindings = <&kp>, <&kp>; }; }; diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/1-basic/events.patterns b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/events.patterns similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/1-basic/events.patterns rename to app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/events.patterns diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/1-basic/keycode_events.snapshot b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/keycode_events.snapshot similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/1-basic/keycode_events.snapshot rename to app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/keycode_events.snapshot diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/1-basic/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/1-basic/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/native_posix_64.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/2-double-hold/events.patterns b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/2-double-hold/events.patterns similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/2-double-hold/events.patterns rename to app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/2-double-hold/events.patterns diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/2-double-hold/keycode_events.snapshot b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/2-double-hold/keycode_events.snapshot similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/2-double-hold/keycode_events.snapshot rename to app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/2-double-hold/keycode_events.snapshot diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/2-double-hold/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/2-double-hold/native_posix_64.keymap similarity index 100% rename from app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/2-double-hold/native_posix_64.keymap rename to app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/2-double-hold/native_posix_64.keymap diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/behavior_keymap.dtsi b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/behavior_keymap.dtsi similarity index 94% rename from app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/behavior_keymap.dtsi rename to app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/behavior_keymap.dtsi index 0ee84a0d908..7aa3940833f 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/6-global-quick-tap/behavior_keymap.dtsi +++ b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/behavior_keymap.dtsi @@ -11,7 +11,7 @@ flavor = "tap-unless-interrupted"; tapping-term-ms = <300>; quick-tap-ms = <300>; - global-quick-tap-ms = <100>; + require-prior-idle-ms = <100>; bindings = <&kp>, <&kp>; }; }; diff --git a/docs/docs/behaviors/hold-tap.md b/docs/docs/behaviors/hold-tap.md index e1b1059508a..e8192f684b1 100644 --- a/docs/docs/behaviors/hold-tap.md +++ b/docs/docs/behaviors/hold-tap.md @@ -49,11 +49,11 @@ Defines how long a key must be pressed to trigger Hold behavior. If you press a tapped hold-tap again within `quick-tap-ms` milliseconds of the first press, it will always trigger the tap behavior. This is useful for things like a backspace, where a quick tap+hold holds backspace pressed. Set this to a negative value to disable. The default is -1 (disabled). -#### `global-quick-tap-ms` +#### `require-prior-idle-ms` -`global-quick-tap-ms` is like `quick-tap-ms` however it will apply for _any_ non-modifier key pressed before it. This effectively disables the hold-tap when typing quickly, which can be quite useful for homerow mods. It can also have the effect of removing the input delay when typing quickly. +`require-prior-idle-ms` is like `quick-tap-ms` however it will apply for _any_ non-modifier key pressed before it. This effectively disables the hold-tap when typing quickly, which can be quite useful for homerow mods. It can also have the effect of removing the input delay when typing quickly. -For example, the following hold-tap configuration enables `global-quick-tap-ms` with a 125 millisecond term, alongside a regular `quick-tap-ms` with a 200 millisecond term. +For example, the following hold-tap configuration enables `require-prior-idle-ms` with a 125 millisecond term, alongside `quick-tap-ms` with a 200 millisecond term. ``` gqt: global-quick-tap { @@ -63,14 +63,14 @@ gqt: global-quick-tap { flavor = "tap-preferred"; tapping-term-ms = <200>; quick-tap-ms = <200>; - global-quick-tap-ms = <125>; + require-prior-idle-ms = <125>; bindings = <&kp>, <&kp>; }; ``` -If you press `&kp A` and then `&gqt LEFT_SHIFT B` **within** 125 ms, then `ab` will be output. Importantly, `b` will be output immediately since it was within the `quick-tap-ms`. This quick-tap behavior will work for any key press, whether it is within a behavior like hold-tap, or a simple `&kp`. This means the `&gqt LEFT_SHIFT B` binding will only have its underlying hold-tap behavior if it is pressed 125 ms **after** a key press. +If you press `&kp A` and then `&gqt LEFT_SHIFT B` **within** 125 ms, then `ab` will be output. Importantly, `b` will be output immediately since it was within the `require-prior-idle-ms`. This "quick-tap" behavior will work for any key press, whether it is within a behavior like hold-tap, or a simple `&kp`. This means the `&gqt LEFT_SHIFT B` binding will only have its underlying hold-tap behavior if it is pressed 125 ms **after** a key press. -Note that the greater the value of `quick-tap-ms` is, the harder it will be to invoke the hold behavior, making this feature less applicable for use-cases like capitalizing letters while typing normally. However, if the hold behavior isn't used during fast typing, then it can be an effective way to mitigate misfires. +Note that the greater the value of `require-prior-idle-ms` is, the harder it will be to invoke the hold behavior, making this feature less applicable for use-cases like capitalizing letters while typing normally. However, if the hold behavior isn't used during fast typing, then it can be an effective way to mitigate misfires. #### `retro-tap` diff --git a/docs/docs/config/behaviors.md b/docs/docs/config/behaviors.md index 172a0f13fee..f3f1f563ec8 100644 --- a/docs/docs/config/behaviors.md +++ b/docs/docs/config/behaviors.md @@ -58,17 +58,17 @@ Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml](htt Applies to: `compatible = "zmk,behavior-hold-tap"` -| Property | Type | Description | Default | -| ---------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------ | ------------------ | -| `label` | string | Unique label for the node | | -| `#binding-cells` | int | Must be `<2>` | | -| `bindings` | phandle array | A list of two behaviors (without parameters): one for hold and one for tap | | -| `flavor` | string | Adjusts how the behavior chooses between hold and tap | `"hold-preferred"` | -| `tapping-term-ms` | int | How long in milliseconds the key must be held to trigger a hold | | -| `quick-tap-ms` | int | Tap twice within this period (in milliseconds) to trigger a tap, even when held | -1 (disabled) | -| `global-quick-tap-ms` | int | Triggers a tap immediately if any non-modifier key was pressed within `global-quick-tap-ms` of the hold-tap. | -1 (disabled) | -| `retro-tap` | bool | Triggers the tap behavior on release if no other key was pressed during a hold | false | -| `hold-trigger-key-positions` | array | If set, pressing the hold-tap and then any key position _not_ in the list triggers a tap. | | +| Property | Type | Description | Default | +| ---------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------- | ------------------ | +| `label` | string | Unique label for the node | | +| `#binding-cells` | int | Must be `<2>` | | +| `bindings` | phandle array | A list of two behaviors (without parameters): one for hold and one for tap | | +| `flavor` | string | Adjusts how the behavior chooses between hold and tap | `"hold-preferred"` | +| `tapping-term-ms` | int | How long in milliseconds the key must be held to trigger a hold | | +| `quick-tap-ms` | int | Tap twice within this period (in milliseconds) to trigger a tap, even when held | -1 (disabled) | +| `require-prior-idle-ms` | int | Triggers a tap immediately if any non-modifier key was pressed within `require-prior-idle-ms` of the hold-tap. | -1 (disabled) | +| `retro-tap` | bool | Triggers the tap behavior on release if no other key was pressed during a hold | false | +| `hold-trigger-key-positions` | array | If set, pressing the hold-tap and then any key position _not_ in the list triggers a tap. | | The `flavor` property may be one of: diff --git a/docs/docs/config/combos.md b/docs/docs/config/combos.md index 33622a7a869..4f5ebba3d34 100644 --- a/docs/docs/config/combos.md +++ b/docs/docs/config/combos.md @@ -31,13 +31,13 @@ The `zmk,combos` node itself has no properties. It should have one child node pe Each child node can have the following properties: -| Property | Type | Description | Default | -| --------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -| `bindings` | phandle-array | A [behavior](../features/keymaps.md#behaviors) to run when the combo is triggered | | -| `key-positions` | array | A list of key position indices for the keys which should trigger the combo | | -| `timeout-ms` | int | All the keys in `key-positions` must be pressed within this time in milliseconds to trigger the combo | 50 | -| `global-quick-tap-ms` | int | If any non-modifier key is pressed within `global-quick-tap-ms` before a key in the combo, the key will not be considered for the combo | -1 (disabled) | -| `slow-release` | bool | Releases the combo when all keys are released instead of when any key is released | false | -| `layers` | array | A list of layers on which the combo may be triggered. `-1` allows all layers. | `<-1>` | +| Property | Type | Description | Default | +| ----------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------- | +| `bindings` | phandle-array | A [behavior](../features/keymaps.md#behaviors) to run when the combo is triggered | | +| `key-positions` | array | A list of key position indices for the keys which should trigger the combo | | +| `timeout-ms` | int | All the keys in `key-positions` must be pressed within this time in milliseconds to trigger the combo | 50 | +| `require-prior-idle-ms` | int | If any non-modifier key is pressed within `require-prior-idle-ms` before a key in the combo, the key will not be considered for the combo | -1 (disabled) | +| `slow-release` | bool | Releases the combo when all keys are released instead of when any key is released | false | +| `layers` | array | A list of layers on which the combo may be triggered. `-1` allows all layers. | `<-1>` | The `key-positions` array must not be longer than the `CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO` setting, which defaults to 4. If you want a combo that triggers when pressing 5 keys, then you must change the setting to 5. diff --git a/docs/docs/features/combos.md b/docs/docs/features/combos.md index 5ad061686a2..bc1353b416e 100644 --- a/docs/docs/features/combos.md +++ b/docs/docs/features/combos.md @@ -30,7 +30,7 @@ Combos configured in your `.keymap` file, but are separate from the `keymap` nod - `layers = <0 1...>` will allow limiting a combo to specific layers. This is an _optional_ parameter, when omitted it defaults to global scope. - `bindings` is the behavior that is activated when the behavior is pressed. - (advanced) you can specify `slow-release` if you want the combo binding to be released when all key-positions are released. The default is to release the combo as soon as any of the keys in the combo is released. -- (advanced) you can specify a `global-quick-tap-ms` value much like for [hold-taps](behaviors/hold-tap.md#global-quick-tap-ms). If any non-modifier key is pressed within `global-quick-tap-ms` before a key in the combo, the combo will not trigger. +- (advanced) you can specify a `require-prior-idle-ms` value much like for [hold-taps](behaviors/hold-tap.md#require-prior-idle-ms). If any non-modifier key is pressed within `require-prior-idle-ms` before a key in the combo, the combo will not trigger. :::info From f0f6d61e794633a06b04246ee31e276c9fbf3040 Mon Sep 17 00:00:00 2001 From: Andrew Rae Date: Sun, 24 Sep 2023 10:19:58 -0400 Subject: [PATCH 111/160] fix(tests): Updating old tests includes --- app/tests/combo/require-prior-idle/native_posix_64.keymap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/tests/combo/require-prior-idle/native_posix_64.keymap b/app/tests/combo/require-prior-idle/native_posix_64.keymap index 206b230a7fa..fcd94056c4d 100644 --- a/app/tests/combo/require-prior-idle/native_posix_64.keymap +++ b/app/tests/combo/require-prior-idle/native_posix_64.keymap @@ -1,6 +1,6 @@ #include #include -#include +#include / { combos { From 2234be0871cdab4c0d8bfc6abee3013716e5601a Mon Sep 17 00:00:00 2001 From: Andrew Rae <56003701+andrewjrae@users.noreply.github.com> Date: Mon, 25 Sep 2023 09:15:57 -0400 Subject: [PATCH 112/160] refactor(docs): Apply suggestions from @caksoylar Co-authored-by: Cem Aksoylar --- docs/docs/behaviors/hold-tap.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/behaviors/hold-tap.md b/docs/docs/behaviors/hold-tap.md index e8192f684b1..d9d86cea4a5 100644 --- a/docs/docs/behaviors/hold-tap.md +++ b/docs/docs/behaviors/hold-tap.md @@ -56,7 +56,7 @@ If you press a tapped hold-tap again within `quick-tap-ms` milliseconds of the f For example, the following hold-tap configuration enables `require-prior-idle-ms` with a 125 millisecond term, alongside `quick-tap-ms` with a 200 millisecond term. ``` -gqt: global-quick-tap { +rpi: require_prior_idle { compatible = "zmk,behavior-hold-tap"; label = "GLOBAL_QUICK_TAP"; #binding-cells = <2>; @@ -68,7 +68,7 @@ gqt: global-quick-tap { }; ``` -If you press `&kp A` and then `&gqt LEFT_SHIFT B` **within** 125 ms, then `ab` will be output. Importantly, `b` will be output immediately since it was within the `require-prior-idle-ms`. This "quick-tap" behavior will work for any key press, whether it is within a behavior like hold-tap, or a simple `&kp`. This means the `&gqt LEFT_SHIFT B` binding will only have its underlying hold-tap behavior if it is pressed 125 ms **after** a key press. +If you press `&kp A` and then `&rpi LEFT_SHIFT B` **within** 125 ms, then `ab` will be output. Importantly, `b` will be output immediately since it was within the `require-prior-idle-ms`, without waiting for a timeout or an interrupting key. In other words, the `&rpi LEFT_SHIFT B` binding will only have its underlying hold-tap behavior if it is pressed 125 ms **after** the previous key press; otherwise it will act like `&kp B`. Note that the greater the value of `require-prior-idle-ms` is, the harder it will be to invoke the hold behavior, making this feature less applicable for use-cases like capitalizing letters while typing normally. However, if the hold behavior isn't used during fast typing, then it can be an effective way to mitigate misfires. From 11996ff7f05bdbe0d5ee59dc3b695d5e9d8c5c8d Mon Sep 17 00:00:00 2001 From: Andrew Rae Date: Tue, 26 Sep 2023 22:00:23 -0400 Subject: [PATCH 113/160] refactor(behaviors): Final global-quick-tap deprecation. --- app/boards/shields/cradio/cradio.keymap | 2 +- app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml | 9 ++++++--- .../8-require-prior-idle/1-basic/native_posix_64.keymap | 2 +- .../8-require-prior-idle/1-basic/native_posix_64.keymap | 2 +- .../8-require-prior-idle/1-basic/native_posix_64.keymap | 2 +- .../6-require-prior-idle/1-basic/native_posix_64.keymap | 2 +- docs/docs/behaviors/hold-tap.md | 2 +- 7 files changed, 12 insertions(+), 9 deletions(-) diff --git a/app/boards/shields/cradio/cradio.keymap b/app/boards/shields/cradio/cradio.keymap index 3f6670da725..47bf0422a5a 100644 --- a/app/boards/shields/cradio/cradio.keymap +++ b/app/boards/shields/cradio/cradio.keymap @@ -18,7 +18,7 @@ flavor = "tap-preferred"; tapping-term-ms = <220>; quick-tap-ms = <150>; - global-quick-tap; + require-prior-idle-ms = <100>; bindings = <&kp>, <&kp>; }; }; diff --git a/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml b/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml index 7a140f9134d..575754116b1 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml @@ -13,15 +13,18 @@ properties: required: true tapping-term-ms: type: int - tapping_term_ms: # deprecated + tapping_term_ms: type: int + deprecated: true quick-tap-ms: type: int default: -1 - quick_tap_ms: # deprecated + quick_tap_ms: type: int - global-quick-tap: # deprecated + deprecated: true + global-quick-tap: type: boolean + deprecated: true require-prior-idle-ms: type: int default: -1 diff --git a/app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/native_posix_64.keymap b/app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/native_posix_64.keymap index cdbe51bfe3c..aa629498073 100644 --- a/app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/8-require-prior-idle/1-basic/native_posix_64.keymap @@ -16,7 +16,7 @@ ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,400) - /* global quick tap */ + /* require-prior-idle */ ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_RELEASE(1,0,10) diff --git a/app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap index a7ba7304c35..6db79abc381 100644 --- a/app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap @@ -16,7 +16,7 @@ ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,400) - /* global quick tap */ + /* require-prior-idle */ ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_RELEASE(1,0,10) diff --git a/app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap index cdbe51bfe3c..aa629498073 100644 --- a/app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/1-basic/native_posix_64.keymap @@ -16,7 +16,7 @@ ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,400) - /* global quick tap */ + /* require-prior-idle */ ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_RELEASE(1,0,10) diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/native_posix_64.keymap index cdbe51bfe3c..aa629498073 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/1-basic/native_posix_64.keymap @@ -16,7 +16,7 @@ ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,400) - /* global quick tap */ + /* require-prior-idle */ ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_RELEASE(1,0,10) diff --git a/docs/docs/behaviors/hold-tap.md b/docs/docs/behaviors/hold-tap.md index d9d86cea4a5..ec66b34f2af 100644 --- a/docs/docs/behaviors/hold-tap.md +++ b/docs/docs/behaviors/hold-tap.md @@ -58,7 +58,7 @@ For example, the following hold-tap configuration enables `require-prior-idle-ms ``` rpi: require_prior_idle { compatible = "zmk,behavior-hold-tap"; - label = "GLOBAL_QUICK_TAP"; + label = "REQUIRE_PRIOR_IDLE"; #binding-cells = <2>; flavor = "tap-preferred"; tapping-term-ms = <200>; From df92b0e37d5c53e23ffe60c7a8005eb311cff785 Mon Sep 17 00:00:00 2001 From: Seth Milliken Date: Wed, 4 Oct 2023 08:48:46 -0700 Subject: [PATCH 114/160] feat(shields): sofle: add underglow support with `&pinctrl` update * Sofle Shield: Add underglow support --------- Co-authored-by: Kim Streich Co-authored-by: Seth Milliken --- app/boards/shields/sofle/Kconfig.defconfig | 6 ++ .../shields/sofle/boards/nice_nano.overlay | 51 +++++++++++++ .../shields/sofle/boards/nice_nano_v2.overlay | 51 +++++++++++++ .../shields/sofle/boards/nrfmicro_11.overlay | 51 +++++++++++++ .../shields/sofle/boards/nrfmicro_13.overlay | 51 +++++++++++++ app/boards/shields/sofle/sofle.conf | 8 ++ app/boards/shields/sofle/sofle.keymap | 76 ++++++++++++++----- app/boards/shields/sofle/sofle.zmk.yml | 1 + 8 files changed, 276 insertions(+), 19 deletions(-) create mode 100644 app/boards/shields/sofle/boards/nice_nano.overlay create mode 100644 app/boards/shields/sofle/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/sofle/boards/nrfmicro_11.overlay create mode 100644 app/boards/shields/sofle/boards/nrfmicro_13.overlay diff --git a/app/boards/shields/sofle/Kconfig.defconfig b/app/boards/shields/sofle/Kconfig.defconfig index cc598d6720f..4e7bf88488e 100644 --- a/app/boards/shields/sofle/Kconfig.defconfig +++ b/app/boards/shields/sofle/Kconfig.defconfig @@ -46,4 +46,10 @@ endchoice endif # LVGL +if ZMK_RGB_UNDERGLOW + +config WS2812_STRIP + default y +endif + endif diff --git a/app/boards/shields/sofle/boards/nice_nano.overlay b/app/boards/shields/sofle/boards/nice_nano.overlay new file mode 100644 index 00000000000..336be4b0d96 --- /dev/null +++ b/app/boards/shields/sofle/boards/nice_nano.overlay @@ -0,0 +1,51 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <36>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = < + LED_COLOR_ID_GREEN + LED_COLOR_ID_RED + LED_COLOR_ID_BLUE + >; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/sofle/boards/nice_nano_v2.overlay b/app/boards/shields/sofle/boards/nice_nano_v2.overlay new file mode 100644 index 00000000000..336be4b0d96 --- /dev/null +++ b/app/boards/shields/sofle/boards/nice_nano_v2.overlay @@ -0,0 +1,51 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <36>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = < + LED_COLOR_ID_GREEN + LED_COLOR_ID_RED + LED_COLOR_ID_BLUE + >; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/sofle/boards/nrfmicro_11.overlay b/app/boards/shields/sofle/boards/nrfmicro_11.overlay new file mode 100644 index 00000000000..336be4b0d96 --- /dev/null +++ b/app/boards/shields/sofle/boards/nrfmicro_11.overlay @@ -0,0 +1,51 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <36>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = < + LED_COLOR_ID_GREEN + LED_COLOR_ID_RED + LED_COLOR_ID_BLUE + >; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/sofle/boards/nrfmicro_13.overlay b/app/boards/shields/sofle/boards/nrfmicro_13.overlay new file mode 100644 index 00000000000..336be4b0d96 --- /dev/null +++ b/app/boards/shields/sofle/boards/nrfmicro_13.overlay @@ -0,0 +1,51 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <36>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = < + LED_COLOR_ID_GREEN + LED_COLOR_ID_RED + LED_COLOR_ID_BLUE + >; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/sofle/sofle.conf b/app/boards/shields/sofle/sofle.conf index fe3f0f4f8a7..1f74aa339fc 100644 --- a/app/boards/shields/sofle/sofle.conf +++ b/app/boards/shields/sofle/sofle.conf @@ -7,3 +7,11 @@ # Uncomment these two lines to add support for encoders # CONFIG_EC11=y # CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y + +# Uncomment this line below to add rgb underglow / backlight support +# CONFIG_ZMK_RGB_UNDERGLOW=y + +# Uncomment the line below to disable external power toggling by the underglow. +# By default toggling the underglow on and off also toggles external power +# on and off. This also causes the display to turn off. +# CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n diff --git a/app/boards/shields/sofle/sofle.keymap b/app/boards/shields/sofle/sofle.keymap index 395ecf1ddd7..fbb0af7fb00 100644 --- a/app/boards/shields/sofle/sofle.keymap +++ b/app/boards/shields/sofle/sofle.keymap @@ -7,34 +7,53 @@ #include #include #include +#include +#include + +#define BASE 0 +#define LOWER 1 +#define RAISE 2 +#define ADJUST 3 / { + + // Activate ADJUST layer by pressing raise and lower + conditional_layers { + compatible = "zmk,conditional-layers"; + adjust_layer { + if-layers = ; + then-layer = ; + }; + }; + keymap { compatible = "zmk,keymap"; default_layer { + label = "default"; // ------------------------------------------------------------------------------------------------------------ -// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | +// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | // | ESC | Q | W | E | R | T | | Y | U | I | O | P | BKSPC | // | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | // | SHIFT | Z | X | C | V | B | MUTE | | | N | M | , | . | / | SHIFT | // | GUI | ALT | CTRL | LOWER| ENTER | | SPACE | RAISE| CTRL | ALT | GUI | bindings = < -&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &none -&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC -&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT -&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp C_MUTE &none &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT - &kp LGUI &kp LALT &kp LCTRL &mo 1 &kp RET &kp SPACE &mo 2 &kp RCTRL &kp RALT &kp RGUI +&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &none +&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC +&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT +&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp C_MUTE &none &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT + &kp LGUI &kp LALT &kp LCTRL &mo LOWER &kp RET &kp SPACE &mo RAISE &kp RCTRL &kp RALT &kp RGUI >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; lower_layer { + label = "lower"; // TODO: Some binds are waiting for shifted keycode support. // ------------------------------------------------------------------------------------------------------------ // | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | -// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | +// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | // | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | // | | = | - | + | { | } | | | | [ | ] | ; | : | \ | | // | | | | | | | | | | | | @@ -42,29 +61,48 @@ &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp F12 &trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp PIPE -&trans &kp EQUAL &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &trans &trans &kp LBKT &kp RBKT &kp SEMI &kp COLON &kp BSLH &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &kp EQUAL &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &trans &trans &kp LBKT &kp RBKT &kp SEMI &kp COLON &kp BSLH &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; raise_layer { + label = "raise"; // ------------------------------------------------------------------------------------------------------------ -// |BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | -// | | INS | PSCR | GUI | | | | PGUP | | ^ | | | | -// | | ALT | CTRL | SHIFT | | CAPS | | PGDN | <- | v | -> | DEL | BKSPC | -// | | UNDO | CUT | COPY | PASTE | | | | | | | | | | | -// | | | | | | | | | | | | +// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | +// | | INS | PSCR | GUI | | | | PGUP | | ^ | | | | +// | | ALT | CTRL | SHIFT | | CAPS | | PGDN | <- | v | -> | DEL | BKSPC | +// | | UNDO | CUT | COPY | PASTE | | | | | | | | | | | +// | | | | | | | | | | | | bindings = < -&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans -&trans &kp INS &kp PSCRN &kp K_CMENU &trans &trans &kp PG_UP &trans &kp UP &trans &kp N0 &trans -&trans &kp LALT &kp LCTRL &kp LSHFT &trans &kp CLCK &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &kp DEL &kp BSPC -&trans &kp K_UNDO &kp K_CUT &kp K_COPY &kp K_PASTE &trans &trans &trans &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans +&trans &kp INS &kp PSCRN &kp K_CMENU &trans &trans &kp PG_UP &trans &kp UP &trans &kp N0 &trans +&trans &kp LALT &kp LCTRL &kp LSHFT &trans &kp CLCK &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &kp DEL &kp BSPC +&trans &kp K_UNDO &kp K_CUT &kp K_COPY &kp K_PASTE &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; + + adjust_layer { +// ---------------------------------------------------------------------------------------------------------------------------- +// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | +// | EXTPWR | RGB_HUD | RGB_HUI | RGB_SAD | RGB_SAI | RGB_EFF | | | | | | | | +// | | RGB_BRD | RGB_BRI | | | | | | | | | | | +// | | | | | | | RGB_TOG | | | | | | | | | +// | | | | | | | | | | | | + label = "adjust"; + bindings = < +&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &none &none &none &none &none +&ext_power EP_TOG &rgb_ug RGB_HUD &rgb_ug RGB_HUI &rgb_ug RGB_SAD &rgb_ug RGB_SAI &rgb_ug RGB_EFF &none &none &none &none &none &none +&none &rgb_ug RGB_BRD &rgb_ug RGB_BRI &none &none &none &none &none &none &none &none &none +&none &none &none &none &none &none &rgb_ug RGB_TOG &none &none &none &none &none &none &none + &none &none &none &none &none &none &none &none &none &none + >; + }; + }; }; diff --git a/app/boards/shields/sofle/sofle.zmk.yml b/app/boards/shields/sofle/sofle.zmk.yml index 5f6f99c3fed..47b66d6777c 100644 --- a/app/boards/shields/sofle/sofle.zmk.yml +++ b/app/boards/shields/sofle/sofle.zmk.yml @@ -9,6 +9,7 @@ features: - keys - display - encoder + - underglow siblings: - sofle_left - sofle_right From 913fdb831e4445bf26df74881fa74666a590020b Mon Sep 17 00:00:00 2001 From: Amettler Thierry Date: Wed, 4 Oct 2023 22:29:06 +0200 Subject: [PATCH 115/160] feat(docs): Add configuration snippet for layer-taps --- docs/docs/behaviors/layers.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/docs/behaviors/layers.md b/docs/docs/behaviors/layers.md index cf793089be6..7d7901568f9 100644 --- a/docs/docs/behaviors/layers.md +++ b/docs/docs/behaviors/layers.md @@ -57,6 +57,22 @@ Example: < LOWER SPACE ``` +### Configuration + +You can configure a different tapping term or tweak other properties noted in the [hold-tap](hold-tap.md#advanced-configuration) documentation page in your keymap: + +``` +< { + tapping-term-ms = <200>; +}; + +/ { + keymap { + ... + }; +}; +``` + :::info Functionally, the layer-tap is a [hold-tap](hold-tap.md) of the ["tap-preferred" flavor](hold-tap.md/#flavors) and a [`tapping-term-ms`](hold-tap.md/#tapping-term-ms) of 200 that takes in a [`momentary layer`](#momentary-layer) and a [keypress](key-press.md) as its "hold" and "tap" parameters, respectively. From ca5c9b4ae6b7008b81c9f9cb02fb7d295b3290b0 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Thu, 5 Oct 2023 19:53:15 -0700 Subject: [PATCH 116/160] feat(blog): Add SOTF #6 (#1943) Co-authored-by: Pete Johanson --- docs/blog/2023-10-05-zmk-sotf-6.md | 295 +++++++++++++++++++++++++++++ 1 file changed, 295 insertions(+) create mode 100644 docs/blog/2023-10-05-zmk-sotf-6.md diff --git a/docs/blog/2023-10-05-zmk-sotf-6.md b/docs/blog/2023-10-05-zmk-sotf-6.md new file mode 100644 index 00000000000..18a52a859fd --- /dev/null +++ b/docs/blog/2023-10-05-zmk-sotf-6.md @@ -0,0 +1,295 @@ +--- +title: "ZMK State Of The Firmware #6" +author: Cem Aksoylar +author_title: Documentation maintainer +author_url: https://github.com/caksoylar +author_image_url: https://avatars.githubusercontent.com/u/7876996 +tags: [SOTF, keyboards, firmware, oss, ble] +--- + +Welcome to the sixth ZMK "State Of The Firmware" (SOTF)! + +This update will cover all the major activity since [SOTF #5](/blog/2022/04/10/zmk-sotf-5). That was over a year ago (again!), so there are many new exciting features and plenty of improvements to cover! + +## Recent Activity + +Here's a summary of the various major changes since last time, broken down by theme: + +### Keymaps/Behaviors + +#### Hold-tap improvements + +[andrewjrae] added the [`require-prior-idle-ms` property](/docs/behaviors/hold-tap#require-prior-idle-ms) to the hold-tap behavior in [#1187](https://github.com/zmkfirmware/zmk/pull/1187) and [#1387](https://github.com/zmkfirmware/zmk/pull/1387), which prevents the hold behavior from triggering if it hasn't been a certain duration since the last key press. This is a useful feature to prevent accidental hold activations during quick typing and made its way into many keymaps! The same property was added to [combos](/docs/features/combos#configuration) as well to help prevent false combo activations. + +Note that an earlier iteration of this feature was supported with the `global-quick-tap` property, which did not allow customizing the timeout and used the value of `tapping-term-ms` for it. This property is now deprecated and users are encouraged to use `require-prior-idle-ms` instead. + +[urob] added the [`hold-trigger-on-release` property](/docs/behaviors/hold-tap#positional-hold-tap-and-hold-trigger-key-positions) in [#1423](https://github.com/zmkfirmware/zmk/pull/1423). This significantly increases the usefulness of positional constraints on hold-taps, since it allows combining multiple holds such as different modifiers for home row mods usage. + +#### Masking mods in mod-morphs + +[aumuell](https://github.com/aumuell), [vrinek](https://github.com/vrinek) and [urob] contributed to improving the behavior of [mod-morphs](/docs/behaviors/mod-morph) by masking the triggering modifiers and added `keep-mods` property in [#1412](https://github.com/zmkfirmware/zmk/pull/1412). This unlocks more use cases for mod-morphs, since you are no longer constrained to emitting keycodes that work well with the triggering modifier keycodes. + +As an example, you can now define a mod-morph that swaps `;` and `:` so that the former is the shifted version of the latter, which wasn't previously possible: + +```dts + col_semi: colon_semicolon { + compatible = "zmk,behavior-mod-morph"; + label = "COLON_SEMICOLON"; + #binding-cells = <0>; + bindings = <&kp COLON>, <&kp SEMI>; + mods = <(MOD_LSFT|MOD_RSFT)>; + }; +``` + +#### Parameterized macros + +[petejohanson] added [macros that can be parameterized](/docs/behaviors/macros#parameterized-macros) with one or two parameters in [#1232](https://github.com/zmkfirmware/zmk/pull/1232). This allows users to define macros in a more modular way and is a nice quality-of-life improvement. + +As a simple example, you could define a macro that puts any keycode provided between double quotes as below, then use it like `&ql A` in your keymap: + +```dts + ql: quoted_letter_macro { + #binding-cells = <1>; + label = "QUOTED_LETTER"; + compatible = "zmk,behavior-macro-one-param"; + bindings = + <&kp DQT>, + <¯o_param_1to1 &kp MACRO_PLACEHOLDER>, + <&kp DQT>; + }; +``` + +Please see the documentation page linked above for usage and more examples. + +#### Arbitrary behaviors on encoder rotation + +[nickconway](https://github.com/nickconway) and [petejohanson] added [sensor rotation behaviors](/docs/behaviors/sensor-rotate) to allow invoking arbitrary behaviors from encoders [#1758](https://github.com/zmkfirmware/zmk/pull/1758). Previously encoder rotations could only invoke the key-press behavior `&kp` through the `&inc_dec_kp` binding, whereas now you can define new sensor rotation behaviors to invoke others. + +(Note that currently behaviors that have "locality" such as `&rgb_ug` do not work as expected via encoder rotation bindings in split keyboards, due to issue [#1494](https://github.com/zmkfirmware/zmk/issues/1494).) + +#### Pre-releasing already pressed keys + +[andrewjrae] contributed a tweak to emitting keycodes in [#1828](https://github.com/zmkfirmware/zmk/pull/1828), where rolling multiple keys that involve the same keycode now releases the keycode before sending a press event again. While this might sound like a technical distinction, it leads to more correct behavior when quickly typing sequences like `+=` and makes the [key repeat behavior](/docs/behaviors/key-repeat) work properly when it is pressed before the previous key is released. + +#### Key toggle behavior + +[cgoates](https://github.com/cgoates) added the [key toggle behavior](/docs/behaviors/key-toggle) in [#1278](https://github.com/zmkfirmware/zmk/pull/1278), which can be used via its `&kt` binding to toggle the state of a keycode between pressed and released. + +#### Apple Globe key + +[ReFil] added support for the `C_AC_NEXT_KEYBOARD_LAYOUT_SELECT` keycode with alias `GLOBE` which acts as the Globe key in macOS and iOS in [#1938](https://github.com/zmkfirmware/zmk/pull/1938). Note that this keycode doesn't exactly behave like a Globe key that is present on an Apple keyboard and its limitations are documented in [this comment](https://github.com/zmkfirmware/zmk/pull/1938#issuecomment-1744579039) thanks to testing by [SethMilliken](https://github.com/SethMilliken). These limitations will be noted in the official [keycodes documentation](/docs/codes/applications) shortly. + +#### Bug fixes and other improvements + +[petejohanson], [andrewjrae] and [okke-formsma] tracked down and fixed an issue causing stuck keys when there are combos on key positions involving hold-tap behaviors in [#1411](https://github.com/zmkfirmware/zmk/pull/1411). This was an elusive bug that took a lot of effort from the community to nail down and fix! + +[nguyendown](https://github.com/nguyendown) and [joelspadin] tracked down and fixed a couple issues causing stuck keys with [sticky keys](/docs/behaviors/sticky-key) in [#1586](https://github.com/zmkfirmware/zmk/pull/1586), [#1745](https://github.com/zmkfirmware/zmk/pull/1745). + +[okke-formsma] fixed an issue allowing tap dances to be invoked by combos in [#1518](https://github.com/zmkfirmware/zmk/pull/1518). + +[petejohanson] tweaked the caps word behavior to ignore modifiers in [#1330](https://github.com/zmkfirmware/zmk/pull/1330). + +[HelloThisIsFlo](https://github.com/HelloThisIsFlo) documented a bug with combos involving overlapping keys and different timeouts, produced a reproducing unit test, then proceeded to fix it in [#1945](https://github.com/zmkfirmware/zmk/pull/1945). + +### Bluetooth and Split Improvements + +#### Multiple peripherals + +[xudongzheng] contributed to add support for more than one peripheral per keyboard in [#836](https://github.com/zmkfirmware/zmk/pull/836). This allows setups such as split keyboards with more than two halves, or enable a BLE-based "dongle mode" via a third device running ZMK that can stay connected to a computer via USB. + +Note that documentation is still lacking for utilizing more than one peripheral and there will potentially be future changes in the build system to allow for more seamless configuration. + +#### Pairing passkey requirement + +[petejohanson] added [the option to require passkey input](/docs/config/bluetooth) while pairing to new devices in [#1822](https://github.com/zmkfirmware/zmk/pull/1822). Enabling this will require you to enter a six digit passcode via the number keys on your keymap and press enter when pairing to a new device, enhancing security during the pairing procedure. + +#### Split keyboard improvements + +[petejohanson] contributed a fix to release held keys on peripheral disconnect [#1340](https://github.com/zmkfirmware/zmk/pull/1340), which makes scenarios where a split disconnects unexpectedly less painful. + +[petejohanson] also improved [the `settings_reset` shield](/docs/troubleshooting#split-keyboard-halves-unable-to-pair) by making it clear bonds more reliably, and allow it to build for all boards in [#1879](https://github.com/zmkfirmware/zmk/pull/1879). + +[petejohanson] and [xudongzheng] contributed additional split connectivity improvements, via using directed advertising in [#1913](https://github.com/zmkfirmware/zmk/pull/1913) and improving the robustness of central scanning in [#1912](https://github.com/zmkfirmware/zmk/pull/1912). + +### Hardware Support + +#### Encoders + +[petejohanson] contributed a major refactor of encoder (and more generally sensor) functionality in [#1039](https://github.com/zmkfirmware/zmk/pull/1039). While the documentation for these changes are still in progress, check out the [dedicated blog post](/blog/2023/06/18/encoder-refactors) for more details. + +This refactor paved way to implementing a long-awaited feature, encoder support in peripheral halves of split keyboards! Building upon the work by [stephen](https://github.com/stephen) in [#728](https://github.com/zmkfirmware/zmk/pull/728), [petejohanson] implemented support in [#1841](https://github.com/zmkfirmware/zmk/pull/1841). + +#### Direct GPIO driver + +[joelspadin] extended the comprehensive debouncing framework used for matrix scan driver to the [direct GPIO driver](/docs/config/kscan#direct-gpio-driver) in [#1288](https://github.com/zmkfirmware/zmk/pull/1288). + +[kurtis-lew] added toggle mode support for direct GPIO driver in [#1305](https://github.com/zmkfirmware/zmk/pull/1305). This allows for adding toggle switches to a keyboard, by properly reading their initial state on boot and making sure the power use is efficient. + +#### IO peripheral drivers + +[petejohanson] added support for the 595 shift register commonly used with smaller controllers like Seeeduino Xiaos, in [#1325](https://github.com/zmkfirmware/zmk/pull/1325). + +[zhiayang](https://github.com/zhiayang) added the driver for the MAX7318 GPIO expander in [#1295](https://github.com/zmkfirmware/zmk/pull/1295). + +#### Underglow auto-off options + +[ReFil] added two [new RGB auto off options](/docs/config/underglow), one using an idle timeout and the other USB status in [#1010](https://github.com/zmkfirmware/zmk/pull/1010). + +#### nice!view support + +[nicell] added support for nice!view, a memory display optimized for low power use in [#1462](https://github.com/zmkfirmware/zmk/pull/1462). +He also contributed a custom vertically-oriented status screen that is automatically enabled when the `nice_view` shield is used in [#1768](https://github.com/zmkfirmware/zmk/pull/1768), since the default status screen has a horizontal orientation. +Please see the instructions in the [nice!view README](https://github.com/zmkfirmware/zmk/blob/main/app/boards/shields/nice_view/README.md) if you would like to restore the stock status screen. + +#### E-paper display initialization + +[petejohanson] contributed EPD initialization improvements in [#1098](https://github.com/zmkfirmware/zmk/pull/1098), which makes the keyboards using slow refresh displays such as the Corne-ish Zen much more responsive during initial boot. + +#### Xiao BLE improvements + +Various improvements were made for the Seeeduino Xiao BLE board in [#1293](https://github.com/zmkfirmware/zmk/pull/1293), [d0176f36](https://github.com/zmkfirmware/zmk/commit/d0176f36), [#1545](https://github.com/zmkfirmware/zmk/pull/1545) and [#1927](https://github.com/zmkfirmware/zmk/pull/1927) by [petejohanson] and [caksoylar], enabling features necessary for ZMK and improving its power use. + +### Zephyr 3.2 Upgrade + +[petejohanson] once again contributed the massive work necessary for upgrading ZMK to Zephyr 3.2 in [#1499](https://github.com/zmkfirmware/zmk/pull/1499), with review help from [joelspadin] and testing by the community. This Zephyr release brings with it upgrades to the display library LVGL, adds official support for the RP2040 controllers and many internal refactors to help future development. +Check out the [dedicated blog post](/blog/2023/04/06/zephyr-3-2) for more details! + +### Documentation + +#### Configuration docs + +[joelspadin], through a massive amount of work in [#722](https://github.com/zmkfirmware/zmk/pull/722), contributed a whole new section to the documentation: [configuration](/docs/config)! It enumerates the configuration options for each ZMK feature that might be relevant to users in dedicated pages, making it a very handy reference. + +In addition, the [overview page](/docs/config) presents an overview of how configuration works in Zephyr in the context of ZMK, in terms of devicetree files (like the keymap files or shield overlays), and Kconfig ones (like the `.conf` files). It is very helpful in de-mystifying what the various files do and what syntax is expected in them. + +#### New behavior guide + +For users or future contributors that might want to dive into writing their own ZMK behaviors, [kurtis-lew] wrote a useful [guide on how to create new behaviors](/docs/development/new-behavior) in [#1268](https://github.com/zmkfirmware/zmk/pull/1268). + +#### Tap dance and hold-tap documentation improvements + +[kurtis-lew] also improved the documentation for these two behaviors in [#1298](https://github.com/zmkfirmware/zmk/pull/1298), by updating the diagrams to better clarify how their timings work and adding examples for scenarios that are frequently asked by users. + +#### Battery sensor documentation + +[joelspadin] also added documentation for setting up battery sensors, typically required for new boards, in [#868](https://github.com/zmkfirmware/zmk/pull/868). + +#### Shield interconnects + +[petejohanson] updated the [new shield guide](/docs/development/new-shield) for non-Pro Micro interconnects including Xiao, Arduino Uno and Blackpill in [#1607](https://github.com/zmkfirmware/zmk/pull/1607). + +#### Bluetooth feature page + +[petejohanson] and [caksoylar] added a new [Bluetooth feature page](/docs/features/bluetooth) as part of [#1499](https://github.com/zmkfirmware/zmk/pull/1499) and in [#1818](https://github.com/zmkfirmware/zmk/pull/1499), detailing ZMK's Bluetooth implementation and troubleshooting for common problems. + +In addition to the specific contributions listed above, various improvements and fixes to documentation are made by many users from the community, including but not limited to [kurtis-lew], [joelspadin], [filterpaper], [byran.tech](https://github.com/byran.tech), [dxmh] and [caksoylar]. These contributions are are all very appreciated! + +### Miscellaneous + +#### Reusable GitHub build workflow + +[elagil](https://github.com/elagil) helped switch the build workflow used by the [user config repos](/docs/user-setup) to a reusable one in [#1183](https://github.com/zmkfirmware/zmk/pull/1183) and it was further tweaked by [filterpaper] in [#1258](https://github.com/zmkfirmware/zmk/pull/1258). This allows any changes in the workflow to be propagated automatically to users, rather than requiring them to make the updates. The build workflow can be customized by the users [using input parameters](https://github.com/zmkfirmware/zmk/blob/main/.github/workflows/build-user-config.yml#L5) if desired. + +#### Pre-commit hooks + +[joelspadin] added various [pre-commit](https://pre-commit.com/) hooks and added checks to the repo to run them for each commit in [#1651](https://github.com/zmkfirmware/zmk/pull/1651). These hooks and resulting updates standardize formatting across devicetree and other source files, reducing busywork on both contributors and reviewers. + +#### Zephyr usage and other refactors + +[joelspadin] also contributed a few refactor PRs such as [#1269](https://github.com/zmkfirmware/zmk/pull/1269), [#1255](https://github.com/zmkfirmware/zmk/pull/1255) and [#1803](https://github.com/zmkfirmware/zmk/pull/1803), generally improving code quality and bringing the codebase in line with the latest Zephyr conventions. + +[petejohanson] refactored the drivers structure to bring it in line with the current Zephyr conventions for out-of-tree drivers in [#1919](https://github.com/zmkfirmware/zmk/pull/1919). + +#### Updated USB polling interval default + +USB HID polling interval now defaults to 1 ms, i.e. a 1000Hz polling rate, thanks to [joelspadin]'s tweak in [#1271](https://github.com/zmkfirmware/zmk/pull/1271). + +#### Additional display config options + +[caksoylar] added a couple configuration options for displays, including a setting to invert display colors in [#1754](https://github.com/zmkfirmware/zmk/pull/1754) and an option to display the battery percentage for the stock status screen in [#1563](https://github.com/zmkfirmware/zmk/pull/1563). + +## New Shields + +- Eternal keypad [#1136](https://github.com/zmkfirmware/zmk/pull/1136) - [halcyonCorsair](https://github.com/halcyonCorsair) +- nullbits SNAP [#1319](https://github.com/zmkfirmware/zmk/pull/1319) - [jaygreco](https://github.com/jaygreco) +- Aurora Sweep [#1504](https://github.com/zmkfirmware/zmk/pull/1504), Corne [#1520](https://github.com/zmkfirmware/zmk/pull/1520), Lily58 [#1553](https://github.com/zmkfirmware/zmk/pull/1553), Sofle [#1864](https://github.com/zmkfirmware/zmk/pull/1864), and Helix [#1873](https://github.com/zmkfirmware/zmk/pull/1873) - [petejohanson] +- ZMK Uno shield [#1576](https://github.com/zmkfirmware/zmk/pull/1576) - [petejohanson] +- Waterfowl [#1554](https://github.com/zmkfirmware/zmk/pull/1554) - [JW2586](https://github.com/JW2586) +- Kyria Rev 3 [#1627](https://github.com/zmkfirmware/zmk/pull/1627) - [petejohanson] +- Leeloo v2 and Leeloo-Micro [#1762](https://github.com/zmkfirmware/zmk/pull/1762) - [ClicketySplit](https://github.com/ClicketySplit) +- Spaceman Pancake [#1400](https://github.com/zmkfirmware/zmk/pull/1400) - [jasonhazel](https://github.com/jasonhazel) +- Reviung5 [#1548](https://github.com/zmkfirmware/zmk/pull/1548) - [zblesk](https://github.com/zblesk) + +## New Boards + +- RP2040 boards, including Sparkfun Pro Micro, Adafruit KB2040 and Seeeduino Xiao RP2040 were added as part of the Zephyr 3.2 upgrade in [#1499](https://github.com/zmkfirmware/zmk/pull/1499) - [petejohanson] +- Puchi BLE [#1445](https://github.com/zmkfirmware/zmk/pull/1445) - [BenRoe](https://github.com/BenRoe) +- nRFMicro 1.3/1.4 (nRF52833) [#912](https://github.com/zmkfirmware/zmk/pull/912) - [pashutk](https://github.com/pashutk) +- nRF5340 DK [#1562](https://github.com/zmkfirmware/zmk/pull/1562) - [joelspadin] +- PillBug [#1530](https://github.com/zmkfirmware/zmk/pull/1530) - [kylemccreery](https://github.com/kylemccreery) +- Preonic Rev 3 [#1575](https://github.com/zmkfirmware/zmk/pull/1575) - [jeromeOlivier](https://github.com/jeromeOlivier) +- Corne-ish Zen v2 [#1498](https://github.com/zmkfirmware/zmk/pull/1498) and v1 [#1593](https://github.com/zmkfirmware/zmk/pull/1593) - [LOWPROKB](https://github.com/LOWPROKB) and [caksoylar] +- Polarity Works CKP family of boards [#1547](https://github.com/zmkfirmware/zmk/pull/1547) - [ReFil] + +## Coming Soon! + +Some items listed in the last coming soon section are still under active development and other new exciting items are in progress: + +- Automatic/simple BLE profile management +- Soft off support for turning the keyboard "off" through firmware +- Improved automatic power management for devices with multiple peripherals, e.g. OLED displays and RGB LEDs +- Caps/Scroll/Num Lock LED support +- Mouse keys +- Wired split support +- More modular approach to external boards/shields, custom code, user keymaps, etc. +- More shields and boards + +## Statistics + +Some statistics of interest for ZMK: + +- GitHub (lifetime stats) + - 166 Contributors + - 1256 Closed PRs + - 1883 Stars + - 1949 Forks +- Discord Chat + - 8055 total registered (130% up from last SOTF!) +- Website (last 30 days) + - 52K page views + - 4.7K new users + +## Sponsorship + +While ZMK is an open source project that uses the permissive MIT license, below are opportunities for anyone who would like to show their support to the project financially. + +### Open Collective + +The ZMK project has an [Open Collective sponsorship](https://opencollective.com/zmkfirmware) that has been going for two and a half years. +This fund helps pay for project costs like domain registration or development of hardware such as the [ZMK Uno shield](https://github.com/zmkfirmware/zmk-uno). +Note that donations to this fund do _not_ pay for the work of any individual contributor directly. + +### Contributor sponsorships + +Project creator and lead Pete Johanson has a [GitHub sponsorship](https://github.com/sponsors/petejohanson) set up that you can contribute to, in order to directly support his time and efforts in developing and maintaining ZMK. +He has also been traveling full time while focusing on ZMK and keyboard hardware design for more than a year now! +If you are curious, you can check out [his blog post](https://petejohanson.dev/blog/new-journey-2022) on deciding to embark on this adventure, in addition to his thoughts on contributor vs. project sponsorship, and sustainability of open source projects in general. + +## Thanks! + +As the first person to author a State Of The Firmware post besides Pete, I'd like to take the opportunity to thank him for his efforts on leading and developing ZMK, along with fostering a great community of contributors and users around it. + +Also a big thank you to contributors that submit patches and perform reviews, testers that help validate changes, and users that take time out of their day to help out folks with ZMK usage on [Discord channels](https://zmk.dev/community/discord/invite), GitHub issues and other communities. + +[okke-formsma]: https://github.com/okke-formsma +[andrewjrae]: https://github.com/andrewjrae +[xudongzheng]: https://github.com/xudongzheng +[nicell]: https://github.com/Nicell +[petejohanson]: https://github.com/petejohanson +[kurtis-lew]: https://github.com/kurtis-lew +[joelspadin]: https://github.com/joelspadin +[dxmh]: https://github.com/dxmh +[caksoylar]: https://github.com/caksoylar +[urob]: https://github.com/urob +[filterpaper]: https://github.com/filterpaper +[ReFil]: https://github.com/ReFil From fd05478897567bff34d607229636ae4d4507ef0f Mon Sep 17 00:00:00 2001 From: Alex Kang Date: Fri, 6 Oct 2023 12:27:38 -0700 Subject: [PATCH 117/160] feat(shields): Microdox V2 shield definition * Refactor common parts of the Microdox sheild into a separate file. This is in preparation for adding Microdox V2 as another shield in the same directory. * Refactor Microdox keymap into a common file in preparation for Microdox V2 * Add Microdox V2 shield definition * Added a README to explain v1/v2 differences. --- app/boards/shields/microdox/Kconfig.defconfig | 4 +- app/boards/shields/microdox/Kconfig.shield | 6 +++ app/boards/shields/microdox/README.md | 8 +++ app/boards/shields/microdox/microdox.dtsi | 46 +---------------- .../shields/microdox/microdox_common.dtsi | 51 +++++++++++++++++++ app/boards/shields/microdox/microdox_v2.conf | 6 +++ app/boards/shields/microdox/microdox_v2.dtsi | 15 ++++++ .../shields/microdox/microdox_v2.zmk.yml | 13 +++++ .../shields/microdox/microdox_v2_left.conf | 0 .../shields/microdox/microdox_v2_left.overlay | 23 +++++++++ .../shields/microdox/microdox_v2_right.conf | 0 .../microdox/microdox_v2_right.overlay | 32 ++++++++++++ 12 files changed, 157 insertions(+), 47 deletions(-) create mode 100644 app/boards/shields/microdox/README.md create mode 100644 app/boards/shields/microdox/microdox_common.dtsi create mode 100644 app/boards/shields/microdox/microdox_v2.conf create mode 100644 app/boards/shields/microdox/microdox_v2.dtsi create mode 100644 app/boards/shields/microdox/microdox_v2.zmk.yml create mode 100644 app/boards/shields/microdox/microdox_v2_left.conf create mode 100644 app/boards/shields/microdox/microdox_v2_left.overlay create mode 100644 app/boards/shields/microdox/microdox_v2_right.conf create mode 100644 app/boards/shields/microdox/microdox_v2_right.overlay diff --git a/app/boards/shields/microdox/Kconfig.defconfig b/app/boards/shields/microdox/Kconfig.defconfig index d05ae045803..e355c6411ee 100644 --- a/app/boards/shields/microdox/Kconfig.defconfig +++ b/app/boards/shields/microdox/Kconfig.defconfig @@ -1,7 +1,7 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -if SHIELD_MICRODOX_LEFT +if SHIELD_MICRODOX_LEFT || SHIELD_MICRODOX_V2_LEFT config ZMK_KEYBOARD_NAME default "Microdox" @@ -11,7 +11,7 @@ config ZMK_SPLIT_ROLE_CENTRAL endif -if SHIELD_MICRODOX_LEFT || SHIELD_MICRODOX_RIGHT +if SHIELD_MICRODOX_LEFT || SHIELD_MICRODOX_RIGHT || SHIELD_MICRODOX_V2_LEFT || SHIELD_MICRODOX_V2_RIGHT config ZMK_SPLIT default y diff --git a/app/boards/shields/microdox/Kconfig.shield b/app/boards/shields/microdox/Kconfig.shield index 47543760b6a..e0f461ff56f 100644 --- a/app/boards/shields/microdox/Kconfig.shield +++ b/app/boards/shields/microdox/Kconfig.shield @@ -6,3 +6,9 @@ config SHIELD_MICRODOX_LEFT config SHIELD_MICRODOX_RIGHT def_bool $(shields_list_contains,microdox_right) + +config SHIELD_MICRODOX_V2_LEFT + def_bool $(shields_list_contains,microdox_v2_left) + +config SHIELD_MICRODOX_V2_RIGHT + def_bool $(shields_list_contains,microdox_v2_right) diff --git a/app/boards/shields/microdox/README.md b/app/boards/shields/microdox/README.md new file mode 100644 index 00000000000..f92807bb7eb --- /dev/null +++ b/app/boards/shields/microdox/README.md @@ -0,0 +1,8 @@ +# Microdox + +Microdox is a 36 key split keyboard by Boardsource. + +Two variants are defined for this shield – V1 and V2. The layout is exactly the same between the +two. Per [help documentation](https://www.boardsource.xyz/help/6129be4a9c85c6050be190d2), if you +purchased your PCB before April 2022, use `microdox_left`/`microdox_right`. Otherwise, use +`microdox_v2_left`/`microdox_v2_right`. diff --git a/app/boards/shields/microdox/microdox.dtsi b/app/boards/shields/microdox/microdox.dtsi index e02aa5546f4..57247e68159 100644 --- a/app/boards/shields/microdox/microdox.dtsi +++ b/app/boards/shields/microdox/microdox.dtsi @@ -4,35 +4,12 @@ * SPDX-License-Identifier: MIT */ -#include +#include "microdox_common.dtsi" / { - chosen { - zephyr,display = &oled; - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; - - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <10>; - rows = <4>; -// | SW1 | SW2 | SW3 | SW4 | SW5 | | SW5 | SW4 | SW3 | SW2 | SW1 | -// | SW6 | SW7 | SW8 | SW9 | SW10 | | SW10 | SW9 | SW8 | SW7 | SW6 | -// | SW11 | SW12 | SW13 | SW14 | SW15 | | SW15 | SW14 | SW13 | SW12 | SW11 | -// | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | - 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(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(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,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) - >; - }; - kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; label = "KSCAN"; - diode-direction = "col2row"; row-gpios = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> @@ -40,26 +17,5 @@ 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) , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; - - }; - - // TODO: per-key RGB node(s)? -}; - -&pro_micro_i2c { - status = "okay"; - - oled: ssd1306@3c { - compatible = "solomon,ssd1306fb"; - reg = <0x3c>; - label = "DISPLAY"; - width = <128>; - height = <32>; - segment-offset = <0>; - page-offset = <0>; - display-offset = <0>; - multiplex-ratio = <31>; - com-sequential; - prechargep = <0x22>; }; }; diff --git a/app/boards/shields/microdox/microdox_common.dtsi b/app/boards/shields/microdox/microdox_common.dtsi new file mode 100644 index 00000000000..0460e012287 --- /dev/null +++ b/app/boards/shields/microdox/microdox_common.dtsi @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zephyr,display = &oled; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; +// | SW1 | SW2 | SW3 | SW4 | SW5 | | SW5 | SW4 | SW3 | SW2 | SW1 | +// | SW6 | SW7 | SW8 | SW9 | SW10 | | SW10 | SW9 | SW8 | SW7 | SW6 | +// | SW11 | SW12 | SW13 | SW14 | SW15 | | SW15 | SW14 | SW13 | SW12 | SW11 | +// | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | + 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(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(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,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) + >; + }; + + // TODO: per-key RGB node(s)? +}; + +&pro_micro_i2c { + status = "okay"; + oled: ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + com-sequential; + prechargep = <0x22>; + }; +}; diff --git a/app/boards/shields/microdox/microdox_v2.conf b/app/boards/shields/microdox/microdox_v2.conf new file mode 100644 index 00000000000..0d38398c029 --- /dev/null +++ b/app/boards/shields/microdox/microdox_v2.conf @@ -0,0 +1,6 @@ +# Uncomment the following lines to enable the Microdox RGB Underglow +# CONFIG_ZMK_RGB_UNDERGLOW=y +# CONFIG_WS2812_STRIP=y + +# Uncomment the following line to enable the Microdox OLED Display +# CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/microdox/microdox_v2.dtsi b/app/boards/shields/microdox/microdox_v2.dtsi new file mode 100644 index 00000000000..93fa44459db --- /dev/null +++ b/app/boards/shields/microdox/microdox_v2.dtsi @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "microdox_common.dtsi" + +/ { + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; + }; +}; diff --git a/app/boards/shields/microdox/microdox_v2.zmk.yml b/app/boards/shields/microdox/microdox_v2.zmk.yml new file mode 100644 index 00000000000..1b9b65b33e4 --- /dev/null +++ b/app/boards/shields/microdox/microdox_v2.zmk.yml @@ -0,0 +1,13 @@ +file_format: "1" +id: microdox_v2 +name: Microdox V2 +type: shield +url: https://boardsource.xyz/store/5f2e7e4a2902de7151494f92 +requires: [pro_micro] +exposes: [i2c_oled] +features: + - keys + - display +siblings: + - microdox_v2_left + - microdox_v2_right diff --git a/app/boards/shields/microdox/microdox_v2_left.conf b/app/boards/shields/microdox/microdox_v2_left.conf new file mode 100644 index 00000000000..e69de29bb2d diff --git a/app/boards/shields/microdox/microdox_v2_left.overlay b/app/boards/shields/microdox/microdox_v2_left.overlay new file mode 100644 index 00000000000..83326f6fdc2 --- /dev/null +++ b/app/boards/shields/microdox/microdox_v2_left.overlay @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "microdox_v2.dtsi" + +&kscan0 { + col-gpios + = <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + ; + row-gpios + = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; +}; diff --git a/app/boards/shields/microdox/microdox_v2_right.conf b/app/boards/shields/microdox/microdox_v2_right.conf new file mode 100644 index 00000000000..e69de29bb2d diff --git a/app/boards/shields/microdox/microdox_v2_right.overlay b/app/boards/shields/microdox/microdox_v2_right.overlay new file mode 100644 index 00000000000..412c42f63f4 --- /dev/null +++ b/app/boards/shields/microdox/microdox_v2_right.overlay @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "microdox.dtsi" + +&default_transform { + col-offset = <5>; +}; + +&oled { + segment-remap; + com-invdir; +}; + +&kscan0 { + col-gpios + = <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> + ; + row-gpios + = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; +}; From 8a84b7dd5b843e69c8a2e74409c282cd3056c4ce Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 8 Oct 2023 18:30:23 -0500 Subject: [PATCH 118/160] fix(shields): Fix incorrect union access in nice view Fixed an error in a previous commit where a member of the selected endpoint was used without checking if it was the correct transport type. The nice!view status screen displays the active BLE profile regardless of whether BLE is active, so we have to get that data directly from the BLE code instead of from the selected endpoint. --- app/boards/shields/nice_view/widgets/status.c | 5 ++++- app/boards/shields/nice_view/widgets/util.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/boards/shields/nice_view/widgets/status.c b/app/boards/shields/nice_view/widgets/status.c index c629be50f59..453fd650039 100644 --- a/app/boards/shields/nice_view/widgets/status.c +++ b/app/boards/shields/nice_view/widgets/status.c @@ -30,6 +30,7 @@ static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets); struct output_status_state { struct zmk_endpoint_instance selected_endpoint; + int active_profile_index; bool active_profile_connected; bool active_profile_bonded; }; @@ -146,7 +147,7 @@ static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], const struct status }; for (int i = 0; i < 5; i++) { - bool selected = state->selected_endpoint.ble.profile_index == i; + bool selected = i == state->active_profile_index; lv_canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 13, 0, 359, &arc_dsc); @@ -228,6 +229,7 @@ ZMK_SUBSCRIPTION(widget_battery_status, zmk_usb_conn_state_changed); static void set_output_status(struct zmk_widget_status *widget, const struct output_status_state *state) { widget->state.selected_endpoint = state->selected_endpoint; + widget->state.active_profile_index = state->active_profile_index; widget->state.active_profile_connected = state->active_profile_connected; widget->state.active_profile_bonded = state->active_profile_bonded; @@ -243,6 +245,7 @@ static void output_status_update_cb(struct output_status_state state) { static struct output_status_state output_status_get_state(const zmk_event_t *_eh) { return (struct output_status_state){ .selected_endpoint = zmk_endpoints_selected(), + .active_profile_index = zmk_ble_active_profile_index(), .active_profile_connected = zmk_ble_active_profile_is_connected(), .active_profile_bonded = !zmk_ble_active_profile_is_open(), }; diff --git a/app/boards/shields/nice_view/widgets/util.h b/app/boards/shields/nice_view/widgets/util.h index e2d2782a3f9..fbcb616fad3 100644 --- a/app/boards/shields/nice_view/widgets/util.h +++ b/app/boards/shields/nice_view/widgets/util.h @@ -20,6 +20,7 @@ struct status_state { bool charging; #if !IS_ENABLED(CONFIG_ZMK_SPLIT) || IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) struct zmk_endpoint_instance selected_endpoint; + int active_profile_index; bool active_profile_connected; bool active_profile_bonded; uint8_t layer_index; From 791711b5556adee55ff9f9c68cdf4ab7fa0be117 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 2 Sep 2023 14:22:18 -0700 Subject: [PATCH 119/160] feat(docs): Note how to use GPIO outside interconnect definition --- docs/docs/development/new-shield.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docs/development/new-shield.md b/docs/docs/development/new-shield.md index 186169234f2..055afcf6ec7 100644 --- a/docs/docs/development/new-shield.md +++ b/docs/docs/development/new-shield.md @@ -120,6 +120,10 @@ endif +To use GPIO pins that are not part of the interconnects as described above, you can use the GPIO labels that are specific to each controller type. +For instance, pins numbered `PX.Y` in nRF52840-based boards can be referred to via `&gpioX Y` labels. +An example is `&gpio1 7` for the `P1.07` pin that the nice!nano exposes in the middle of the board. + Date: Tue, 21 Mar 2023 14:36:53 +0100 Subject: [PATCH 120/160] feat(shields): add right encoders support to waterfowl --- app/boards/shields/waterfowl/waterfowl.dtsi | 43 +++++++++++++++---- app/boards/shields/waterfowl/waterfowl.keymap | 30 ++++++++++--- .../shields/waterfowl/waterfowl_left.overlay | 6 ++- .../shields/waterfowl/waterfowl_right.overlay | 5 ++- 4 files changed, 68 insertions(+), 16 deletions(-) diff --git a/app/boards/shields/waterfowl/waterfowl.dtsi b/app/boards/shields/waterfowl/waterfowl.dtsi index 7f4929b3451..3d9140941b4 100644 --- a/app/boards/shields/waterfowl/waterfowl.dtsi +++ b/app/boards/shields/waterfowl/waterfowl.dtsi @@ -40,28 +40,53 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; + }; + roller_left_encoder: encoder_left_roller { + compatible = "alps,ec11"; + label = "ROLLER_LEFT_ENCODER"; + a-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + steps = <80>; + status = "disabled"; + }; + + dial_left_encoder: encoder_left_dial { + compatible = "alps,ec11"; + label = "DIAL_LEFT_ENCODER"; + a-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + steps = <80>; + status = "disabled"; }; - left_encoder: encoder_left { //roller + roller_right_encoder: encoder_right_roller { compatible = "alps,ec11"; - label = "LEFT_ENCODER"; + label = "ROLLER_RIGHT_ENCODER"; a-gpios = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; + status = "disabled"; }; - right_encoder: encoder_right { //Standard encoder on left half + dial_right_encoder: encoder_right_dial { compatible = "alps,ec11"; - label = "RIGHT_ENCODER"; - a-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <2>; + label = "DIAL_RIGHT_ENCODER"; + a-gpios = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + steps = <80>; + status = "disabled"; }; sensors { compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; + sensors = < + &roller_left_encoder + &dial_left_encoder + &dial_right_encoder + &roller_right_encoder + >; }; // TODO: RGB node(s) diff --git a/app/boards/shields/waterfowl/waterfowl.keymap b/app/boards/shields/waterfowl/waterfowl.keymap index c47f188b07e..197a34fa182 100644 --- a/app/boards/shields/waterfowl/waterfowl.keymap +++ b/app/boards/shields/waterfowl/waterfowl.keymap @@ -33,7 +33,12 @@ &kp N1 < 3 DEL < 1 SPACE &kp TAB &kp N2 &kp N3 &kp ESC &kp BSPC < 2 RET &kp N4 >; - sensor-bindings = <&inc_dec_kp PAGE_UP PAGE_DOWN &inc_dec_kp TAB LS(TAB)>; + sensor-bindings = < + &inc_dec_kp PAGE_DOWN PAGE_UP + &inc_dec_kp C_VOL_DN C_VOL_UP + &inc_dec_kp DOWN UP + &inc_dec_kp LEFT RIGHT + >; }; navnum_layer { @@ -57,7 +62,12 @@ &kp N1 < 3 DEL < 1 SPACE &kp TAB &kp N2 &kp N3 &kp ESC &kp BSPC < 2 RET &kp N4 >; - sensor-bindings = <&inc_dec_kp PAGE_UP PAGE_DOWN &inc_dec_kp TAB LS(TAB)>; + sensor-bindings = < + &inc_dec_kp PAGE_DOWN PAGE_UP + &inc_dec_kp C_VOL_DN C_VOL_UP + &inc_dec_kp DOWN UP + &inc_dec_kp LEFT RIGHT + >; }; symbol_layer { @@ -81,7 +91,12 @@ &kp N1 < 3 DEL < 1 SPACE &kp TAB &kp N2 &kp N3 &kp ESC &kp BSPC < 2 RET &kp N4 >; - sensor-bindings = <&inc_dec_kp PAGE_UP PAGE_DOWN &inc_dec_kp TAB LS(TAB)>; + sensor-bindings = < + &inc_dec_kp PAGE_DOWN PAGE_UP + &inc_dec_kp C_VOL_DN C_VOL_UP + &inc_dec_kp DOWN UP + &inc_dec_kp LEFT RIGHT + >; }; function_layer { @@ -105,8 +120,13 @@ &kp N1 < 3 DEL < 1 SPACE &kp TAB &kp N2 &kp N3 &kp ESC &kp BSPC < 2 RET &kp N4 >; - sensor-bindings = <&inc_dec_kp PAGE_UP PAGE_DOWN &inc_dec_kp TAB LS(TAB)>; + sensor-bindings = < + &inc_dec_kp PAGE_DOWN PAGE_UP + &inc_dec_kp C_VOL_DN C_VOL_UP + &inc_dec_kp DOWN UP + &inc_dec_kp LEFT RIGHT + >; }; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/waterfowl/waterfowl_left.overlay b/app/boards/shields/waterfowl/waterfowl_left.overlay index 3b9fd42d404..d58c2876374 100644 --- a/app/boards/shields/waterfowl/waterfowl_left.overlay +++ b/app/boards/shields/waterfowl/waterfowl_left.overlay @@ -16,6 +16,10 @@ ; }; -&left_encoder { +&roller_left_encoder { + status = "okay"; +}; + +&dial_left_encoder { status = "okay"; }; diff --git a/app/boards/shields/waterfowl/waterfowl_right.overlay b/app/boards/shields/waterfowl/waterfowl_right.overlay index bf8f3a446b1..cb23b29ac9f 100644 --- a/app/boards/shields/waterfowl/waterfowl_right.overlay +++ b/app/boards/shields/waterfowl/waterfowl_right.overlay @@ -20,7 +20,10 @@ ; }; +&roller_right_encoder { + status = "okay"; +}; -&right_encoder { +&dial_right_encoder { status = "okay"; }; From 4a339093cebd9e89e531f78dc218907a292cbb1b Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Fri, 6 Oct 2023 22:02:23 -0500 Subject: [PATCH 121/160] docs: Add highlighting for devicetree and kconfig Added syntax highlighting for devicetree and kconfig files. The PrismJS project is not accepting contributions right now as they work on a version 2 of the library, so the new language files are added directly here. Also enabled syntax highlighting for various languages that are used in the docs but aren't enabled in Docusaurus by default. --- docs/docusaurus.config.js | 15 ++++ docs/src/theme/prism-include-languages.js | 23 ++++++ .../prism/components/prism-devicetree.js | 41 +++++++++++ .../theme/prism/components/prism-kconfig.js | 44 +++++++++++ .../theme/prism/themes/github-dark-dimmed.js | 73 +++++++++++++++++++ docs/src/theme/prism/themes/github.js | 73 +++++++++++++++++++ 6 files changed, 269 insertions(+) create mode 100644 docs/src/theme/prism-include-languages.js create mode 100644 docs/src/theme/prism/components/prism-devicetree.js create mode 100644 docs/src/theme/prism/components/prism-kconfig.js create mode 100644 docs/src/theme/prism/themes/github-dark-dimmed.js create mode 100644 docs/src/theme/prism/themes/github.js diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index e039d3691f6..701b5b997bb 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -1,4 +1,6 @@ const path = require("path"); +const theme = require("./src/theme/prism/themes/github"); +const darkTheme = require("./src/theme/prism/themes/github-dark-dimmed"); module.exports = { title: "ZMK Firmware", @@ -20,6 +22,19 @@ module.exports = { colorMode: { respectPrefersColorScheme: true, }, + prism: { + additionalLanguages: [ + "bash", + "c", + "cmake", + "ini", + "linker-script", + "log", + "powershell", + ], + theme, + darkTheme, + }, // sidebarCollapsible: false, navbar: { title: "ZMK Firmware", diff --git a/docs/src/theme/prism-include-languages.js b/docs/src/theme/prism-include-languages.js new file mode 100644 index 00000000000..c073923b92a --- /dev/null +++ b/docs/src/theme/prism-include-languages.js @@ -0,0 +1,23 @@ +import siteConfig from "@generated/docusaurus.config"; +export default function prismIncludeLanguages(PrismObject) { + const { + themeConfig: { prism }, + } = siteConfig; + const { additionalLanguages } = prism; + // Prism components work on the Prism instance on the window, while prism- + // react-renderer uses its own Prism instance. We temporarily mount the + // instance onto window, import components to enhance it, then remove it to + // avoid polluting global namespace. + // You can mutate PrismObject: registering plugins, deleting languages... As + // long as you don't re-assign it + globalThis.Prism = PrismObject; + additionalLanguages.forEach((lang) => { + // eslint-disable-next-line global-require + require(`prismjs/components/prism-${lang}`); + }); + + require("./prism/components/prism-devicetree.js"); + require("./prism/components/prism-kconfig.js"); + + delete globalThis.Prism; +} diff --git a/docs/src/theme/prism/components/prism-devicetree.js b/docs/src/theme/prism/components/prism-devicetree.js new file mode 100644 index 00000000000..22e638c6ae4 --- /dev/null +++ b/docs/src/theme/prism/components/prism-devicetree.js @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/* eslint-disable no-undef */ + +Prism.languages.devicetree = { + comment: Prism.languages.c["comment"], + string: Prism.languages.c["string"], + keyword: + /\/(?:bits|delete-node|delete-property|dts-v1|incbin|include|memreserve|omit-if-no-ref|plugin)\//, + label: { + pattern: /\b(?:[a-z_]\w*):/i, + alias: "symbol", + }, + reference: { + pattern: /&(?:[a-z_]\w*|\{[\w,.+*#?@/-]*\})/i, + alias: "variable", + }, + node: { + pattern: /(?:\/|\b[\w,.+\-@]+)(?=\s*\{)/, + alias: "class-name", + inside: { + // Node address + number: { + pattern: /(@)[0-9a-f,]/i, + lookbehind: true, + }, + }, + }, + function: Prism.languages.c["function"], + "attr-name": /\\?[\w,.+*#?@-]+(?=\s*[=;])/, + number: [/\b[0-9a-f]{2}\b/i, /\b(?:0[xX][0-9a-fA-F]+|\d+)(?:ULL|UL|LL|U|L)?/], + macro: Prism.languages.c["macro"], + operator: /<<|>>|[<>]=?|[!=]=?|&&?|\|\|?|[+\-*/%~?^]/, + punctuation: /[{}[\];(),.]/, +}; + +Prism.languages.dts = Prism.languages.devicetree; diff --git a/docs/src/theme/prism/components/prism-kconfig.js b/docs/src/theme/prism/components/prism-kconfig.js new file mode 100644 index 00000000000..f911d6e32be --- /dev/null +++ b/docs/src/theme/prism/components/prism-kconfig.js @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/* eslint-disable no-undef */ + +Prism.languages.kconfig = { + comment: { + pattern: /(^|[^\\])#.*/, + lookbehind: true, + greedy: true, + }, + string: /"(?:\\.|[^\\\r\n"])*"/, + helptext: { + // help text ends at the first line at a lower level of indentation than the + // first line of text. + pattern: /(^\s*)(?:help|---help---)\s*^(\s+)(?:.+)(?:\s*^\2[^\n]*)*/m, + lookbehind: true, + alias: "string", + inside: { + keyword: /^(?:help|---help---)/, + }, + }, + keyword: + /\b(?:allnoconfig_y|bool|boolean|choice|comment|config|def_bool|def_hex|def_int|def_string|def_tristate|default|defconfig_list|depends|endchoice|endif|endmenu|env|hex|if|imply|int|mainmenu|menu|menuconfig|modules|on|option|optional|orsource|osource|prompt|range|rsource|select|source|string|tristate|visible)\b/, + expansion: { + pattern: /\$\([\s\S]+\)/, + alias: "variable", + inside: { + function: /\$\(|\)/, + punctuation: /,/, + }, + }, + number: /\b(?:0[xX][0-9a-fA-F]+|\d+)/, + boolean: { + pattern: /\b(?:y|n|m)\b/, + alias: "number", + }, + variable: /\b[A-Z_]+\b/, + operator: /[<>]=?|[!=]=?|&&|\|\|/, + punctuation: /[()]/, +}; diff --git a/docs/src/theme/prism/themes/github-dark-dimmed.js b/docs/src/theme/prism/themes/github-dark-dimmed.js new file mode 100644 index 00000000000..210742bba0b --- /dev/null +++ b/docs/src/theme/prism/themes/github-dark-dimmed.js @@ -0,0 +1,73 @@ +/* + Converted from https://github.com/highlightjs/highlight.js/blob/main/src/styles/github-dark-dimmed.css + + BSD 3-Clause License + + Copyright (c) 2006, Ivan Sagalaev. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** @type {import("prism-react-renderer").PrismTheme} */ +const theme = { + plain: { color: "#adbac7", backgroundColor: "#22272e" }, + styles: [ + { types: ["keyword", "atrule"], style: { color: "#f47067" } }, + { types: ["class-name", "function"], style: { color: "#dcbdfb" } }, + { + types: [ + "attr-name", + "boolean", + "important", + "doctype", + "prolog", + "cdata", + "number", + "operator", + "variable", + "selector", + ], + style: { color: "#6cb6ff" }, + }, + { types: ["regex", "string", "char", "url"], style: { color: "#96d0ff" } }, + { types: ["builtin", "symbol", "entity"], style: { color: "#f69d50" } }, + { types: ["comment"], style: { color: "#768390" } }, + { types: ["italic"], style: { color: "#adbac7", fontStyle: "italic" } }, + { types: ["bold"], style: { color: "#adbac7", fontWeight: "bold" } }, + { + types: ["inserted"], + style: { color: "#b4f1b4", backgroundColor: "#1b4721" }, + }, + { + types: ["deleted"], + style: { color: "#ffd8d3", backgroundColor: "#78191b" }, + }, + { types: ["property", "punctuation", "tag"], style: {} }, + ], +}; + +module.exports = theme; diff --git a/docs/src/theme/prism/themes/github.js b/docs/src/theme/prism/themes/github.js new file mode 100644 index 00000000000..b0be14c35ab --- /dev/null +++ b/docs/src/theme/prism/themes/github.js @@ -0,0 +1,73 @@ +/* + Converted from https://github.com/highlightjs/highlight.js/blob/main/src/styles/github.css + + BSD 3-Clause License + + Copyright (c) 2006, Ivan Sagalaev. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** @type {import("prism-react-renderer").PrismTheme} */ +const theme = { + plain: { color: "#24292e", backgroundColor: "#f9f9f9" }, + styles: [ + { types: ["keyword", "atrule"], style: { color: "#d73a49" } }, + { types: ["class-name", "function"], style: { color: "#6f42c1" } }, + { + types: [ + "attr-name", + "boolean", + "important", + "doctype", + "prolog", + "cdata", + "number", + "operator", + "variable", + "selector", + ], + style: { color: "#005cc5" }, + }, + { types: ["regex", "string", "char", "url"], style: { color: "#032f62" } }, + { types: ["builtin", "symbol", "entity"], style: { color: "#e36209" } }, + { types: ["comment"], style: { color: "#6a737d" } }, + { types: ["italic"], style: { color: "#24292e", fontStyle: "italic" } }, + { types: ["bold"], style: { color: "#24292e", fontWeight: "bold" } }, + { + types: ["inserted"], + style: { color: "#22863a", backgroundColor: "#f0fff4" }, + }, + { + types: ["deleted"], + style: { color: "#b31d28", backgroundColor: "#ffeef0" }, + }, + { types: ["property", "punctuation", "tag"], style: {} }, + ], +}; + +module.exports = theme; From 65667b863ad380955da60d38ac2ae81b4dab06f5 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Fri, 6 Oct 2023 22:05:49 -0500 Subject: [PATCH 122/160] docs: Add syntax highlighting to more code blocks Added language tags to more code blocks in the documentation to enable syntax highlighting. --- docs/README.md | 6 ++-- docs/blog/2020-10-03-bootloader-fix.md | 6 ++-- docs/blog/2020-11-09-zmk-sotf-3.md | 4 +-- docs/blog/2021-01-27-zmk-sotf-4.md | 8 ++--- docs/blog/2022-04-02-zephyr-3-0.md | 26 +++++++------- docs/blog/2022-04-10-zmk-sotf-5.md | 10 +++--- docs/blog/2023-04-06-zephyr-3-2.md | 30 ++++++++-------- docs/blog/2023-06-18-encoder-refactors.md | 10 +++--- docs/docs/behaviors/backlight.md | 6 ++-- docs/docs/behaviors/bluetooth.md | 10 +++--- docs/docs/behaviors/caps-word.md | 8 ++--- docs/docs/behaviors/hold-tap.md | 18 +++++----- docs/docs/behaviors/key-press.md | 4 +-- docs/docs/behaviors/key-repeat.md | 4 +-- docs/docs/behaviors/key-toggle.md | 2 +- docs/docs/behaviors/layers.md | 14 ++++---- docs/docs/behaviors/macros.md | 26 +++++++------- docs/docs/behaviors/misc.md | 4 +-- docs/docs/behaviors/mod-morph.md | 8 ++--- docs/docs/behaviors/mod-tap.md | 4 +-- docs/docs/behaviors/outputs.md | 8 ++--- docs/docs/behaviors/power.md | 8 ++--- docs/docs/behaviors/reset.md | 4 +-- docs/docs/behaviors/sensor-rotate.md | 4 +-- docs/docs/behaviors/sticky-key.md | 8 ++--- docs/docs/behaviors/sticky-layer.md | 4 +-- docs/docs/behaviors/tap-dance.md | 4 +-- docs/docs/behaviors/underglow.md | 6 ++-- docs/docs/config/index.md | 16 ++++----- docs/docs/config/kscan.md | 12 +++---- docs/docs/customization.md | 4 +-- docs/docs/development/build-flash.md | 10 +++--- docs/docs/development/ide-integration.md | 2 +- docs/docs/development/new-behavior.md | 4 +-- docs/docs/development/new-shield.md | 44 ++++++++++------------- docs/docs/development/posix-board.md | 4 +-- docs/docs/development/usb-logging.md | 6 ++-- docs/docs/features/backlight.md | 24 ++++++------- docs/docs/features/battery.md | 2 +- docs/docs/features/beta-testing.md | 6 ++-- docs/docs/features/bluetooth.md | 4 +-- docs/docs/features/combos.md | 2 +- docs/docs/features/conditional-layers.md | 2 +- docs/docs/features/debouncing.md | 4 +-- docs/docs/features/encoders.md | 4 +-- docs/docs/features/keymaps.md | 10 +++--- docs/docs/features/underglow.md | 12 +++---- docs/docs/keymap-example-file.md | 2 +- docs/docs/keymap-example.md | 2 +- docs/docs/user-setup.md | 6 ++-- 50 files changed, 215 insertions(+), 221 deletions(-) diff --git a/docs/README.md b/docs/README.md index fab8b874e03..1fd6775d534 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,13 +8,13 @@ The ZMK Documentation is licensed [CC-BY-NC-SA](http://creativecommons.org/licen ### Installation -``` +```sh $ npm ci ``` ### Local Development -``` +```sh $ npm start ``` @@ -22,7 +22,7 @@ This command starts a local development server and open up a browser window. Mos ### Build -``` +```sh $ npm build ``` diff --git a/docs/blog/2020-10-03-bootloader-fix.md b/docs/blog/2020-10-03-bootloader-fix.md index ec1d7b0ba72..435034cfbfb 100644 --- a/docs/blog/2020-10-03-bootloader-fix.md +++ b/docs/blog/2020-10-03-bootloader-fix.md @@ -77,7 +77,7 @@ So first I enabled logging of the NVS module by adding `CONFIG_NVS_LOG_LEVEL_DBG=y` to my `.conf` file. I repeated the same test of spamming RGB underglow effect cycle and the resulting logs I got were this: -``` +```log [00:00:00.000,671] fs_nvs: 8 Sectors of 4096 bytes [00:00:00.000,671] fs_nvs: alloc wra: 3, f70 [00:00:00.000,671] fs_nvs: data wra: 3, f40 @@ -130,7 +130,7 @@ and [Dan Halbert](https://github.com/dhalbert) pointed me towards the [linker map](https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/master/linker/nrf52840.ld) of the nRF52840. Let's take a look. -``` +```linker-script FLASH (rx) : ORIGIN = 0xF4000, LENGTH = 0xFE000-0xF4000-2048 /* 38 KB */ BOOTLOADER_CONFIG (r): ORIGIN = 0xFE000 - 2048, LENGTH = 2048 @@ -166,7 +166,7 @@ Now that we've found the issue, we can pretty easily fix this. We'll need to move the settings flash area back so that it doesn't overlap with the bootloader. First we calculate the size of the of flash area the bootloader is using. -``` +```linker-script 0x100000 (end of flash) - 0x0F4000 (start of bootloader) = 0xC000 (48KB) ``` diff --git a/docs/blog/2020-11-09-zmk-sotf-3.md b/docs/blog/2020-11-09-zmk-sotf-3.md index 9e250a99c86..11d67040346 100644 --- a/docs/blog/2020-11-09-zmk-sotf-3.md +++ b/docs/blog/2020-11-09-zmk-sotf-3.md @@ -30,7 +30,7 @@ This also laid the foundation for the other keymap related changes that are now [okke-formsma] added the ability to apply modifiers to a code, e.g.: -``` +```dts &kp LC(C) ``` @@ -63,7 +63,7 @@ and nice!nano that have specialized hardware for this purpose. With this change, you can add -``` +```dts &ext_power EP_TOG ``` diff --git a/docs/blog/2021-01-27-zmk-sotf-4.md b/docs/blog/2021-01-27-zmk-sotf-4.md index e7ff3232b51..fbb53e4031e 100644 --- a/docs/blog/2021-01-27-zmk-sotf-4.md +++ b/docs/blog/2021-01-27-zmk-sotf-4.md @@ -25,7 +25,7 @@ The initial [combos](/docs/features/combos) work has landed! The amazing [okke-f An example, that would send the `ESC` keycode when pressing both the first and second positions on your keyboard: -``` +```dts / { combos { compatible = "zmk,combos"; @@ -46,13 +46,13 @@ Combos currently are "global", and not scoped to a given active layer. There is [okke-formsma] also contributed the initial "sticky keys" behavior, which can be used for functionality sometimes called "one shot mods" or "one shot layers". In your keymap, this would like like: -``` +```dts &sk LEFT_CONTROL ``` for a sticky key/modifier, or: -``` +```dts &sl NAV ``` @@ -68,7 +68,7 @@ This is most frequently used when using multiple core base layers with different [okke-formsma] added an implementation of the "Grave Escape" behavior, developing a more generic "mod-morph" behavior to do so. Adding -``` +```dts &gresc ``` diff --git a/docs/blog/2022-04-02-zephyr-3-0.md b/docs/blog/2022-04-02-zephyr-3-0.md index 103573c663c..6ec4c904f87 100644 --- a/docs/blog/2022-04-02-zephyr-3-0.md +++ b/docs/blog/2022-04-02-zephyr-3-0.md @@ -29,12 +29,12 @@ Existing user config repositories using Github Actions to build will pull down Z - Change `zmkfirmware/zmk-build-arm:2.5` to `zmkfirmware/zmk-build-arm:stable` wherever it is found - Locate and delete the lines for the DTS output step, which is no longer needed: - ``` - - name: ${{ steps.variables.outputs.display-name }} DTS File - if: ${{ always() }} - run: | - if [ -f "build/zephyr/${{ matrix.board }}.pre.tmp" ]; then cat -n build/zephyr/${{ matrix.board }}.pre.tmp; fi - if [ -f "build/zephyr/zephyr.dts" ]; then cat -n build/zephyr/zephyr.dts; fi + ```yaml + - name: ${{ steps.variables.outputs.display-name }} DTS File + if: ${{ always() }} + run: | + if [ -f "build/zephyr/${{ matrix.board }}.pre.tmp" ]; then cat -n build/zephyr/${{ matrix.board }}.pre.tmp; fi + if [ -f "build/zephyr/zephyr.dts" ]; then cat -n build/zephyr/zephyr.dts; fi ``` :::note @@ -76,7 +76,7 @@ The following changes have [already been completed](https://github.com/zmkfirmwa Zephyr's WS2812 `led_strip` driver added a new required property. When adding [underglow](/docs/features/underglow#adding-rgb-underglow-to-a-board) to a board, you now must also add the additional include `#include ` at the top of your devicetree file, and add a `color-mapping` property like: -``` +```dts led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; label = "WS2812"; @@ -108,7 +108,7 @@ Zephyr moved to using a `chosen` node named `zephyr,display` to select the displ For example, for a shield with: -``` +```dts &pro_micro_i2c { status = "okay"; @@ -132,7 +132,7 @@ For example, for a shield with: You would add a `chosen` node like: -``` +```dts / { chosen { zephyr,display = &oled; @@ -148,7 +148,7 @@ two sections of the `.dts` file need updating. Underneath the USB device, add the CDC ACM node: -``` +```dts &usbd { status = "okay"; cdc_acm_uart: cdc_acm_uart { @@ -160,7 +160,7 @@ Underneath the USB device, add the CDC ACM node: Then, an additional `chosen` node (near the top of the file) will mark the CDC ACM device as the console: -``` +```dts / { chosen { ... @@ -175,7 +175,7 @@ Then, an additional `chosen` node (near the top of the file) will mark the CDC A Previously, to get ZMK to build a UF2 image to flash to a given board required adding a `CMakeLists.txt` file that added a custom post build command. Now, the only thing necessary to have Zephyr build a UF2 is to add the following to your `_defconfig` file: -``` +```ini CONFIG_BUILD_OUTPUT_UF2=y ``` @@ -187,7 +187,7 @@ For more details on the implementation, see [zephyr#31066](https://github.com/ze Clock configuration moved to devicetree as well, out of the Kconfig files. Here is a sample config for a board that uses the HSI for the PLL source: -``` +```dts &clk_hsi { status = "okay"; }; diff --git a/docs/blog/2022-04-10-zmk-sotf-5.md b/docs/blog/2022-04-10-zmk-sotf-5.md index b0dd6310354..4ea62a31b87 100644 --- a/docs/blog/2022-04-10-zmk-sotf-5.md +++ b/docs/blog/2022-04-10-zmk-sotf-5.md @@ -32,7 +32,7 @@ to the host capitalized until a non-alpha, non-"continue list" keycode is sent. [petejohanson], taking heavy inspiration on the initial work from [okke-formsma], added [macro support](/docs/behaviors/macros) in [#1168](https://github.com/zmkfirmware/zmk/pull/1166). Several [common patterns](/docs/behaviors/macros#common-patterns) are documented, but one example, changing the underglow color as you activate/deactivate a layer, looks like: -``` +```dts ZMK_MACRO(layer_color_macro, wait-ms = <0>; tap-ms = <0>; @@ -50,7 +50,7 @@ ZMK_MACRO(layer_color_macro, [kurtis-lew] worked diligently to add the [tap-dance behavior](/docs/behaviors/tap-dance) in [#1139](https://github.com/zmkfirmware/zmk/pull/1139), allowing different behaviors to be invoked based on the number of times a user taps a single key in their keymap, e.g. -``` +```dts / { behaviors { td0: tap_dance_0 { @@ -80,7 +80,7 @@ a user taps a single key in their keymap, e.g. Example: -``` +```dts / { conditional_layers { compatible = "zmk,conditional-layers"; @@ -164,7 +164,7 @@ using "high voltage mode" with that SoC. [petejohanson]'s work on the HID foundation also included adding support for full NKRO HID in [#726](https://github.com/zmkfirmware/zmk/pull/726) that can be enabled by adding the following to your `.conf` file for your config: -``` +```ini CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y ``` @@ -176,7 +176,7 @@ It's been live for a while, but [nicell] added an amazing [power profiler](/powe [malinges](https://github.com/malinges) added support for configuring min/max underglow brightness in [#944](https://github.com/zmkfirmware/zmk/pull/944) by setting the values in your `.conf` file as percentages of full: -``` +```ini CONFIG_ZMK_RGB_UNDERGLOW_BRT_MIN=20 CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX=80 ``` diff --git a/docs/blog/2023-04-06-zephyr-3-2.md b/docs/blog/2023-04-06-zephyr-3-2.md index 693d93dc828..69ecb6dd032 100644 --- a/docs/blog/2023-04-06-zephyr-3-2.md +++ b/docs/blog/2023-04-06-zephyr-3-2.md @@ -26,7 +26,7 @@ Existing user config repositories using Github Actions to build will pull down Z 1. Replace the contents of your `.github/workflows/build.yml` with: - ``` + ```yaml on: [push, pull_request, workflow_dispatch] jobs: @@ -36,7 +36,7 @@ Existing user config repositories using Github Actions to build will pull down Z 1. If it doesn't exist already, add a new file to your repository named `build.yaml`: - ``` + ```yaml # This file generates the GitHub Actions matrix # For simple board + shield combinations, add them # to the top level board and shield arrays, for more @@ -63,12 +63,12 @@ If you have a custom GitHub Actions workflow you need to maintain for some reaso - Change `zmkfirmware/zmk-build-arm:2.5` to `zmkfirmware/zmk-build-arm:stable` wherever it is found - Locate and delete the lines for the DTS output step, which is no longer needed: - ``` - - name: ${{ steps.variables.outputs.display-name }} DTS File - if: ${{ always() }} - run: | - if [ -f "build/zephyr/${{ matrix.board }}.pre.tmp" ]; then cat -n build/zephyr/${{ matrix.board }}.pre.tmp; fi - if [ -f "build/zephyr/zephyr.dts" ]; then cat -n build/zephyr/zephyr.dts; fi + ```yaml + - name: ${{ steps.variables.outputs.display-name }} DTS File + if: ${{ always() }} + run: | + if [ -f "build/zephyr/${{ matrix.board }}.pre.tmp" ]; then cat -n build/zephyr/${{ matrix.board }}.pre.tmp; fi + if [ -f "build/zephyr/zephyr.dts" ]; then cat -n build/zephyr/zephyr.dts; fi ``` ### VS Code & Docker (Dev Container) @@ -107,7 +107,7 @@ A few testers have reported inconsistent issues with bluetooth connections on Wi Zephyr 3.2 introduced [a new Kconfig setting](https://github.com/zephyrproject-rtos/zephyr/pull/48929) that can be used to work around a bug in Windows related to battery reporting. Check out our [bluetooth config](/docs/config/bluetooth) for the full details. The key new configuration that can be set if using Windows is: -``` +```ini CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n ``` @@ -133,7 +133,7 @@ The main area this affects existing shields is those with board specific overrid Previously in ZMK, we relied on per-driver devicetree source properties to set the alternate pin functions for things like SPI or I2C. For example, here is the I2C bus setup as it was previously on the `nice_nano` board: -``` +```dts &i2c0 { compatible = "nordic,nrf-twi"; sda-pin = <17>; @@ -143,7 +143,7 @@ Previously in ZMK, we relied on per-driver devicetree source properties to set t With the move to the `pinctrl` system, this setup now look like: -``` +```dts &i2c0 { compatible = "nordic,nrf-twi"; pinctrl-0 = <&i2c0_default>; @@ -154,7 +154,7 @@ With the move to the `pinctrl` system, this setup now look like: which references the `pinctrl` configuration: -``` +```dts &pinctrl { i2c0_default: i2c0_default { group1 { @@ -185,7 +185,7 @@ The approach is the following when updating a _board_: 1. Add a new file with the naming convention `-pinctrl.dtsi` to your board directory. 1. In the new file, add your `pinctrl` entries that set up different pin control configurations for whatever peripherals/buses are needed. Here's the nice!nano file as an example: - ``` + ```dts /* * Copyright (c) 2022 The ZMK Contributors * SPDX-License-Identifier: MIT @@ -230,7 +230,7 @@ The approach is the following when updating a _board_: 1. From the main `.dts` file, add an `#include "-pinctrl.dtsi"` to have the C-preprocessor combine the files. 1. Update the various peripheral nodes to use the new `pinctrl` configurations. For example, the following old configuration: - ``` + ```dts &i2c0 { compatible = "nordic,nrf-twi"; sda-pin = <15>; @@ -240,7 +240,7 @@ The approach is the following when updating a _board_: would be changed to: - ``` + ```dts &i2c0 { compatible = "nordic,nrf-twi"; pinctrl-0 = <&i2c0_default>; diff --git a/docs/blog/2023-06-18-encoder-refactors.md b/docs/blog/2023-06-18-encoder-refactors.md index 26f9cee8176..14be81c8700 100644 --- a/docs/blog/2023-06-18-encoder-refactors.md +++ b/docs/blog/2023-06-18-encoder-refactors.md @@ -35,7 +35,7 @@ Splitting these two parts of the encoder configuration allows greater flexibilit Previously, an encoder configuration looked like: -``` +```dts left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; @@ -47,7 +47,7 @@ Previously, an encoder configuration looked like: Here, the `resolution` property was used to indicate how many encoder pulses should trigger the sensor behavior one time. Next, the encoder is selected in the sensors node: -``` +```dts sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; @@ -58,7 +58,7 @@ That was the entirety of the configuration for encoders. ### New Configuration -``` +```dts left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; @@ -70,7 +70,7 @@ That was the entirety of the configuration for encoders. Here, the `steps` property is now used to indicate how many encoder pulses there are in a single complete rotation of the encoder. Next, the encoder is selected in the sensors node as before, but an additional configuration is used to indicate how many times the encoder should trigger the behavior in your keymap per rotation: -``` +```dts sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; @@ -84,7 +84,7 @@ For tactile encoders that have detents, the `triggers-per-rotation` would match The configuration changes bring ZMK's code in line with how upstream Zephyr sensor drivers handle rotations. This has the added advantage of allowing us to leverage other sensor drivers. On Nordic MCUs, like nRF52840, the NRFX QDEC driver can be used, for example: -``` +```dts &pinctrl { qdec_default: qdec_default { group1 { diff --git a/docs/docs/behaviors/backlight.md b/docs/docs/behaviors/backlight.md index 8c613fe6bd1..322530e3763 100644 --- a/docs/docs/behaviors/backlight.md +++ b/docs/docs/behaviors/backlight.md @@ -12,7 +12,7 @@ This page contains [backlight](../features/backlight.md) behaviors supported by Backlight actions defines are provided through the [`dt-bindings/zmk/backlight.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/backlight.h) header, which is added at the top of the keymap file: -``` +```dts #include ``` @@ -46,13 +46,13 @@ However the settings will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNC 1. Toggle backlight on/off - ``` + ```dts &bl BL_TOG ``` 1. Sets a specific brightness - ``` + ```dts &bl BL_SET 50 ``` diff --git a/docs/docs/behaviors/bluetooth.md b/docs/docs/behaviors/bluetooth.md index 89496948d50..1d461722f5c 100644 --- a/docs/docs/behaviors/bluetooth.md +++ b/docs/docs/behaviors/bluetooth.md @@ -20,7 +20,7 @@ A ZMK device may show as "connected" on multiple hosts at the same time. This is Bluetooth command defines are provided through the [`dt-bindings/zmk/bt.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/bt.h) header, which is added at the top of the keymap file: -``` +```dts #include ``` @@ -54,25 +54,25 @@ The bluetooth behavior completes an bluetooth action given on press. 1. Behavior binding to clear the paired host for the selected profile: - ``` + ```dts &bt BT_CLR ``` 1. Behavior binding to select the next profile: - ``` + ```dts &bt BT_NXT ``` 1. Behavior binding to select the previous profile: - ``` + ```dts &bt BT_PRV ``` 1. Behavior binding to select the 2nd profile (passed parameters are [zero based](https://en.wikipedia.org/wiki/Zero-based_numbering)): - ``` + ```dts &bt BT_SEL 1 ``` diff --git a/docs/docs/behaviors/caps-word.md b/docs/docs/behaviors/caps-word.md index e5d862d785b..0233de526b6 100644 --- a/docs/docs/behaviors/caps-word.md +++ b/docs/docs/behaviors/caps-word.md @@ -15,7 +15,7 @@ The modifiers are applied only to to the alphabetic (`A` to `Z`) keycodes, to av Example: -``` +```dts &caps_word ``` @@ -25,7 +25,7 @@ Example: By default, the caps word will remain active when any alphanumeric character or underscore (`UNDERSCORE`), backspace (`BACKSPACE`), or delete (`DELETE`) characters are pressed. Any other non-modifier keycode sent will turn off caps word. If you would like to override this, you can set a new array of keys in the `continue-list` property in your keymap: -``` +```dts &caps_word { continue-list = ; }; @@ -41,7 +41,7 @@ By default, the caps word will remain active when any alphanumeric character or In addition, if you would like _multiple_ modifiers, instead of just `MOD_LSFT`, you can override the `mods` property: -``` +```dts &caps_word { mods = <(MOD_LSFT | MOD_LALT)>; }; @@ -57,7 +57,7 @@ In addition, if you would like _multiple_ modifiers, instead of just `MOD_LSFT`, If you want to use multiple caps breaks with different codes to break the caps, you can add additional caps words instances to use in your keymap: -``` +```dts / { prog_caps: behavior_prog_caps_word { compatible = "zmk,behavior-caps-word"; diff --git a/docs/docs/behaviors/hold-tap.md b/docs/docs/behaviors/hold-tap.md index ec66b34f2af..96e03a0e397 100644 --- a/docs/docs/behaviors/hold-tap.md +++ b/docs/docs/behaviors/hold-tap.md @@ -55,7 +55,7 @@ If you press a tapped hold-tap again within `quick-tap-ms` milliseconds of the f For example, the following hold-tap configuration enables `require-prior-idle-ms` with a 125 millisecond term, alongside `quick-tap-ms` with a 200 millisecond term. -``` +```dts rpi: require_prior_idle { compatible = "zmk,behavior-hold-tap"; label = "REQUIRE_PRIOR_IDLE"; @@ -78,7 +78,7 @@ If `retro-tap` is enabled, the tap behavior is triggered when releasing the hold For example, if you press `&mt LEFT_SHIFT A` and then release it without pressing another key, it will output `a`. -``` +```dts &mt { retro-tap; }; @@ -96,7 +96,7 @@ Note that `hold-trigger-key-positions` is an array of key position indexes. Key See the following example, which uses a hold-tap behavior definition, configured with the `hold-preferred` flavor, and with positional hold-tap enabled: -``` +```dts #include #include @@ -141,7 +141,7 @@ The two parameters that are passed to the hold-tap in your keymap will be forwar If you use behaviors that accept no parameters such as [mod-morphs](mod-morph.md) or [macros](macros.md), you can pass a dummy parameter value such as `0` to the hold-tap when you use it in your keymap. For instance, a hold-tap with node label `caps` and `bindings = <&kp>, <&caps_word>;` can be used in the keymap as below to send the caps lock keycode on hold and invoke the [caps word behavior](caps-word.md) on tap: -``` +```dts &caps CAPS 0 ``` @@ -166,7 +166,7 @@ The following are suggested hold-tap configurations that work well with home row ##### Option 1: cross-hand only modifiers, using `tap-unless-interrupted` and positional hold-tap (`hold-trigger-key-positions`) -```dtsi title="Homerow Mods: Cross-hand Example" +```dts title="Homerow Mods: Cross-hand Example" #include #include @@ -198,7 +198,7 @@ The following are suggested hold-tap configurations that work well with home row ##### Option 2: `tap-preferred` -```dtsi title="Homerow Mods: Tap-Preferred Example" +```dts title="Homerow Mods: Tap-Preferred Example" #include #include @@ -228,7 +228,7 @@ The following are suggested hold-tap configurations that work well with home row ##### Option 3: `balanced` -```dtsi title="Homerow Mods: Balanced Example" +```dts title="Homerow Mods: Balanced Example" #include #include @@ -262,7 +262,7 @@ The following are suggested hold-tap configurations that work well with home row A popular method of implementing Autoshift in ZMK involves a C-preprocessor macro, commonly defined as `AS(keycode)`. This macro applies the `LSHIFT` modifier to the specified `keycode` when `AS(keycode)` is held, and simply performs a [keypress](key-press.md), `&kp keycode`, when the `AS(keycode)` binding is tapped. This simplifies the use of Autoshift in a keymap, as the complete hold-tap bindings for each desired Autoshift key, as in `&as LS() &as LS() ... &as LS() `, can be quite cumbersome to use when applied to a large portion of the keymap. -```dtsi title="Hold-Tap Example: Autoshift" +```dts title="Hold-Tap Example: Autoshift" #include #include @@ -298,7 +298,7 @@ A popular method of implementing Autoshift in ZMK involves a C-preprocessor macr This hold-tap example implements a [momentary-layer](layers.md/#momentary-layer) when the keybind is held and a [toggle-layer](layers.md/#toggle-layer) when it is tapped. Similar to the Autoshift and Sticky Hold use-cases, a `MO_TOG(layer)` macro is defined such that the `&mo` and `&tog` behaviors can target a single layer. -```dtsi title="Hold-Tap Example: Momentary layer on Hold, Toggle layer on Tap" +```dts title="Hold-Tap Example: Momentary layer on Hold, Toggle layer on Tap" #include #include diff --git a/docs/docs/behaviors/key-press.md b/docs/docs/behaviors/key-press.md index e8304d7733d..a298d040b45 100644 --- a/docs/docs/behaviors/key-press.md +++ b/docs/docs/behaviors/key-press.md @@ -27,7 +27,7 @@ To make it easier to encode the HID keycode numeric values, most keymaps include the [`dt-bindings/zmk/keys.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/keys.h) header provided by ZMK near the top: -``` +```dts #include ``` @@ -44,6 +44,6 @@ The "key press" behavior sends standard keycodes on press/release. Example: -``` +```dts &kp A ``` diff --git a/docs/docs/behaviors/key-repeat.md b/docs/docs/behaviors/key-repeat.md index 5217bce8b5b..9772fdb4e0a 100644 --- a/docs/docs/behaviors/key-repeat.md +++ b/docs/docs/behaviors/key-repeat.md @@ -13,7 +13,7 @@ The key repeat behavior when triggered will send whatever keycode was last sent/ Example: -``` +```dts &key_repeat ``` @@ -25,7 +25,7 @@ By default, the key repeat will only track the last pressed key from the HID "Ke If you'd rather have the repeat also capture and send Consumer page usages, you can update the existing behavior: -``` +```dts &key_repeat { usage-pages = ; }; diff --git a/docs/docs/behaviors/key-toggle.md b/docs/docs/behaviors/key-toggle.md index 85b328f849b..080b5b53aa6 100644 --- a/docs/docs/behaviors/key-toggle.md +++ b/docs/docs/behaviors/key-toggle.md @@ -18,7 +18,7 @@ Example uses for key toggle include shift lock, or `ALT-TAB` window switching wi Example: -``` +```dts &kt LALT ``` diff --git a/docs/docs/behaviors/layers.md b/docs/docs/behaviors/layers.md index 7d7901568f9..162b792fcd4 100644 --- a/docs/docs/behaviors/layers.md +++ b/docs/docs/behaviors/layers.md @@ -16,7 +16,7 @@ add a set of `#define`s at the top of your keymap file, and use those layer in y For example, if you have three layers, you can add the following to the top of your keymap: -``` +```dts #define DEFAULT 0 #define LOWER 1 #define RAISE 2 @@ -37,7 +37,7 @@ again. Example: -``` +```dts &mo LOWER ``` @@ -53,7 +53,7 @@ The "layer-tap" behavior enables a layer when a key is held, and outputs a [keyp Example: -``` +```dts < LOWER SPACE ``` @@ -61,7 +61,7 @@ Example: You can configure a different tapping term or tweak other properties noted in the [hold-tap](hold-tap.md#advanced-configuration) documentation page in your keymap: -``` +```dts < { tapping-term-ms = <200>; }; @@ -93,7 +93,7 @@ The "to layer" behavior enables a layer and disables _all_ other layers _except_ Example: -``` +```dts &to 3 ``` @@ -108,13 +108,13 @@ The "toggle layer" behavior enables a layer until the layer is manually disabled Example: -``` +```dts &tog LOWER ``` "Toggle layer" for a : -``` +```dts #define DEFAULT 0 #define NAVI 1 diff --git a/docs/docs/behaviors/macros.md b/docs/docs/behaviors/macros.md index 377ce7fecdb..7ce968e9b9a 100644 --- a/docs/docs/behaviors/macros.md +++ b/docs/docs/behaviors/macros.md @@ -14,7 +14,7 @@ Each macro you want to use in your keymap gets defined first, then bound in your A macro definition looks like: -``` +```dts / { macros { zed_em_kay: zed_em_kay { @@ -38,7 +38,7 @@ used to reference the macro in your keymap. The macro can then be bound in your keymap by referencing it by the label `&zed_em_kay`, e.g.: -``` +```dts raise_layer { bindings = <&zed_em_kay>; }; @@ -54,7 +54,7 @@ with [modifier functions](../codes/modifiers.mdx#modifier-functions) can be used Like [hold-taps](/docs/behaviors/hold-tap), macros are created by composing other behaviors, and any of those behaviors can be added to the `bindings` list, e.g.: -``` +```dts bindings = <&to 1> , <&bl BL_ON> @@ -86,7 +86,7 @@ To modify the activation mode, macro controls can be added at any point in the ` A concrete example, used to hold a modifier, tap multiple keys, then release the modifier, would look like: -``` +```dts bindings = <¯o_press &kp LSHFT> , <¯o_tap &kp Z &kp M &kp K> @@ -101,7 +101,7 @@ the macro itself is released. To pause the macro until release, use `¯o_pause_for_release`. For example, this macro will press a modifier and activate a layer when the macro is pressed. Once the macro is released, it will release the modifier and deactivate the layer by releasing the `&mo`: -``` +```dts bindings = <¯o_press &mo 1 &kp LSHFT> , <¯o_pause_for_release> @@ -116,7 +116,7 @@ which is equal to the value of [`CONFIG_ZMK_MACRO_DEFAULT_WAIT_MS`](../config/be be set by assigning a value to the `wait-ms` property of the macro, e.g. `wait-ms = <20>;`. If you want to update the wait time at any point in the macro bindings list, use `¯o_wait_time`, e.g. `¯o_wait_time 30`. A full example: -``` +```dts wait-ms = <10>; bindings = <&kp F &kp A &kp S &kp T> @@ -132,7 +132,7 @@ which is equal to the value of [`CONFIG_ZMK_MACRO_DEFAULT_TAP_MS`](../config/beh be set by assigning a value to the `tap-ms` property of the macro, e.g. `tap-ms = <20>;`. If you want to update the tap time at any point in a macro bindings list, use `¯o_tap_time`, e.g. `¯o_tap_time 30`. A full example: -``` +```dts bindings = <¯o_tap_time 10> , <&kp S &kp H &kp O &kp R &kp T> @@ -153,7 +153,7 @@ Another limit worth noting is that the maximum number of bindings you can pass t Macros can also be "parameterized", allowing them to be bound in your keymap with unique values passed into them, e.g.: -``` +```dts raise_layer { bindings = <&my_one_param_macro A> }; @@ -262,7 +262,7 @@ lm: lm { To trigger a different underglow when the macro is pressed, and when it is released, we use the macro "press" activation mode whenever triggering the `&rgb_ug` behavior: -``` +```dts wait-ms = <0>; tap-ms = <0>; bindings @@ -278,7 +278,7 @@ bindings The other common use case for macros is to sending sequences of keycodes to the connected host. Here, a wait and tap time of at least 30ms is recommended to avoid having HID notifications grouped at the BLE protocol level and then processed out of order: -``` +```dts wait-ms = <40>; tap-ms = <40>; bindings @@ -292,7 +292,7 @@ bindings Many operating systems allow a special sequence to input unicode characters, e.g. [Windows alt codes](https://support.microsoft.com/en-us/office/insert-ascii-or-unicode-latin-based-symbols-and-characters-d13f58d3-7bcb-44a7-a4d5-972ee12e50e0). You can use macros to automate inputting the sequences, e.g. below macro inserts `£` on Windows: -``` +```dts wait-ms = <40>; tap-ms = <40>; bindings @@ -306,7 +306,7 @@ bindings To avoid repetition or possible typos when declaring a **zero parameter macro**, a convenience _C_ macro, named `ZMK_MACRO(name, props)` can be used to simplify things: -``` +```dts ZMK_MACRO(my_zero_param_macro, wait-ms = <30>; tap-ms = <40>; @@ -320,7 +320,7 @@ To avoid repetition or possible typos when declaring a **zero parameter macro**, This can be used instead of a complete macro definition. During the firmware build process, the example above would produce the complete macro definition below: -``` +```dts my_zero_param_macro: my_zero_param_macro { compatible = "zmk,behavior-macro"; label = "ZM_my_macro"; diff --git a/docs/docs/behaviors/misc.md b/docs/docs/behaviors/misc.md index 446ba33c3e4..c71f87c061b 100644 --- a/docs/docs/behaviors/misc.md +++ b/docs/docs/behaviors/misc.md @@ -21,7 +21,7 @@ passed down to the next active layer in the stack. Example: -``` +```dts &trans ``` @@ -37,6 +37,6 @@ be passed down to the next active layer in the stack. Example: -``` +```dts &none ``` diff --git a/docs/docs/behaviors/mod-morph.md b/docs/docs/behaviors/mod-morph.md index 33d18e33a2e..6099b4281fd 100644 --- a/docs/docs/behaviors/mod-morph.md +++ b/docs/docs/behaviors/mod-morph.md @@ -18,7 +18,7 @@ The Mod-Morph behavior acts as one of two keycodes, depending on if the required An example of how to implement the mod-morph "Grave Escape": -``` +```dts / { behaviors { gresc: grave_escape { @@ -41,7 +41,7 @@ Note that this specific mod-morph exists in ZMK by default using code `&gresc`. Example: -``` +```dts &gresc ``` @@ -62,7 +62,7 @@ Available Modifiers: Example: -``` +```dts mods = <(MOD_LGUI|MOD_LSFT|MOD_RGUI|MOD_RSFT)>; ``` @@ -74,7 +74,7 @@ When a modifier specified in `mods` is being held, it won't be sent along with t For example, the following configuration morphs `LEFT_SHIFT` + `BACKSPACE` into `DELETE`, and morphs `RIGHT_SHIFT` + `BACKSPACE` into `RIGHT_SHIFT` + `DELETE`. -``` +```dts / { behaviors { bspc_del: backspace_delete { diff --git a/docs/docs/behaviors/mod-tap.md b/docs/docs/behaviors/mod-tap.md index 5f4fa50653a..d789a8b723c 100644 --- a/docs/docs/behaviors/mod-tap.md +++ b/docs/docs/behaviors/mod-tap.md @@ -24,7 +24,7 @@ The Mod-Tap behavior either acts as a held modifier, or as a tapped keycode. Example: -``` +```dts &mt LSHIFT A ``` @@ -32,7 +32,7 @@ Example: You can configure a different tapping term in your keymap: -``` +```dts &mt { tapping-term-ms = <400>; }; diff --git a/docs/docs/behaviors/outputs.md b/docs/docs/behaviors/outputs.md index dad52be2ccb..46b567cfdfc 100644 --- a/docs/docs/behaviors/outputs.md +++ b/docs/docs/behaviors/outputs.md @@ -23,7 +23,7 @@ to select the BLE output through below behavior to be able to send keystrokes to Output command defines are provided through the [`dt-bindings/zmk/outputs.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/outputs.h) header, which is added at the top of the keymap file: -``` +```dts #include ``` @@ -53,18 +53,18 @@ However it will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../con 1. Behavior binding to prefer sending keyboard output to USB - ``` + ```dts &out OUT_USB ``` 1. Behavior binding to prefer sending keyboard output to the current bluetooth profile - ``` + ```dts &out OUT_BLE ``` 1. Behavior binding to toggle between preferring USB and BLE - ``` + ```dts &out OUT_TOG ``` diff --git a/docs/docs/behaviors/power.md b/docs/docs/behaviors/power.md index 11f920845a3..5251d76cb13 100644 --- a/docs/docs/behaviors/power.md +++ b/docs/docs/behaviors/power.md @@ -24,7 +24,7 @@ The following boards currently support this feature: External power control command defines are provided through the [`dt-bindings/zmk/ext_power.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/ext_power.h) header, which is added at the top of the keymap file: -``` +```dts #include ``` @@ -52,19 +52,19 @@ However it will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../con 1. Behavior binding to enable the external power - ``` + ```dts &ext_power EP_ON ``` 1. Behavior binding to disable the external power - ``` + ```dts &ext_power EP_OFF ``` 1. Behavior binding to toggle the external power - ``` + ```dts &ext_power EP_TOG ``` diff --git a/docs/docs/behaviors/reset.md b/docs/docs/behaviors/reset.md index 0fc62b2f4e9..b7850eca77d 100644 --- a/docs/docs/behaviors/reset.md +++ b/docs/docs/behaviors/reset.md @@ -22,7 +22,7 @@ to the device Example: -``` +```dts &sys_reset ``` @@ -38,7 +38,7 @@ you to flash a new firmware. Example: -``` +```dts &bootloader ``` diff --git a/docs/docs/behaviors/sensor-rotate.md b/docs/docs/behaviors/sensor-rotate.md index 02e56924bad..3ff69dc6d02 100644 --- a/docs/docs/behaviors/sensor-rotate.md +++ b/docs/docs/behaviors/sensor-rotate.md @@ -19,7 +19,7 @@ The standard sensor rotation behavior allows fully binding behaviors to be invok Here is an example that binds the [RGB Underglow Behavior](/docs/behaviors/underglow.md) to change the RGB brightness: -``` +```dts / { behaviors { rgb_encoder: rgb_encoder { @@ -55,7 +55,7 @@ Here is an example, showing how send key presses on rotation: First, defining the sensor rotation itself, binding the [Key Press Behavior](/docs/behaviors/key-press.md) twice, then binding it in the `sensor-bindings` property of a keymap layer: -``` +```dts / { behaviors { rot_kp: behavior_sensor_rotate_kp { diff --git a/docs/docs/behaviors/sticky-key.md b/docs/docs/behaviors/sticky-key.md index d881e6b0b83..8b003f55e39 100644 --- a/docs/docs/behaviors/sticky-key.md +++ b/docs/docs/behaviors/sticky-key.md @@ -14,13 +14,13 @@ A sticky key stays pressed until another key is pressed. It is often used for 's Example: -``` +```dts &sk LSHIFT ``` You can use any keycode that works for `&kp` as parameter to `&sk`: -``` +```dts &sk LG(LS(LA(LCTRL))) ``` @@ -40,7 +40,7 @@ This setting is enabled by default. It ensures that if a sticky key modifier is #### Example -``` +```dts &sk { release-after-ms = <2000>; quick-release; @@ -56,7 +56,7 @@ This setting is enabled by default. It ensures that if a sticky key modifier is This configuration would apply to all sticky keys. This may not be appropriate if using `quick-release` as you'll lose the ability to chain sticky key modifiers. A better approach for this use case would be to create a new behavior: -``` +```dts / { behaviors { skq: sticky_key_quick_release { diff --git a/docs/docs/behaviors/sticky-layer.md b/docs/docs/behaviors/sticky-layer.md index ac341f7737d..41c2ccf55d7 100644 --- a/docs/docs/behaviors/sticky-layer.md +++ b/docs/docs/behaviors/sticky-layer.md @@ -16,7 +16,7 @@ By default, sticky layers stay pressed for a second if you don't press any other Example: -``` +```dts &sl 1 ``` @@ -24,7 +24,7 @@ Example: You can configure a different `release-after-ms` in your keymap: -``` +```dts &sl { release-after-ms = <2000>; }; diff --git a/docs/docs/behaviors/tap-dance.md b/docs/docs/behaviors/tap-dance.md index c68b51dcd44..ac85b3dab6f 100644 --- a/docs/docs/behaviors/tap-dance.md +++ b/docs/docs/behaviors/tap-dance.md @@ -37,7 +37,7 @@ values={[ This example configures a tap-dance named `td0` that outputs the number of times its binding is pressed from 1-3. -```title="Basic Tap-Dance Example: Counter" +```dts title="Basic Tap-Dance Example: Counter" #include #include @@ -78,7 +78,7 @@ Alphanumeric [`key press`](key-press.md) bindings, like those used for `td0`, wi This example configures a mod-tap inside a tap-dance named `td_mt` that outputs `CAPSLOCK` on a single tap, `LSHIFT` on a single press and hold, and `LCTRL` when the tap-dance is pressed twice. -```title="Advanced Tap-Dance Example: Nested Mod-Tap" +```dts title="Advanced Tap-Dance Example: Nested Mod-Tap" #include #include diff --git a/docs/docs/behaviors/underglow.md b/docs/docs/behaviors/underglow.md index 29f34c2ab0b..f94d9008c04 100644 --- a/docs/docs/behaviors/underglow.md +++ b/docs/docs/behaviors/underglow.md @@ -12,7 +12,7 @@ This page contains [RGB Underglow](../features/underglow.md) behaviors supported RGB actions defines are provided through the [`dt-bindings/zmk/rgb.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/rgb.h) header, which is added at the top of the keymap file: -``` +```dts #include ``` @@ -65,13 +65,13 @@ However the settings will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNC 1. Toggle underglow on/off - ``` + ```dts &rgb_ug RGB_TOG ``` 1. Set a specific HSB color (green) - ``` + ```dts &rgb_ug RGB_COLOR_HSB(128,100,100) ``` diff --git a/docs/docs/config/index.md b/docs/docs/config/index.md index 1ff1bfa094e..3d7aeb48bc2 100644 --- a/docs/docs/config/index.md +++ b/docs/docs/config/index.md @@ -71,7 +71,7 @@ Kconfig is used to configure global settings such as the keyboard name and enabl Kconfig files look like this: -``` +```ini CONFIG_ZMK_SLEEP=y CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y @@ -114,7 +114,7 @@ Devicetree files use various file extensions. These indicate the purpose of the Devicetree files look like this: -```devicetree +```dts / { chosen { zmk,kscan = &kscan0; @@ -138,7 +138,7 @@ search through the `.dts` file for your board, `.overlay` file for your shield, A Devicetree node looks like this: -```devicetree +```dts kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; // more properties and/or nodes... @@ -157,7 +157,7 @@ followed by the node's label, an opening curly brace (`{`), one or more new prop For example, to adjust the debouncing of the `zmk,kscan-gpio-matrix` node shown above, you could add this to your keymap: -```devicetree +```dts &kscan0 { debounce-press-ms = <0>; }; @@ -165,7 +165,7 @@ For example, to adjust the debouncing of the `zmk,kscan-gpio-matrix` node shown If the node you want to edit doesn't have a label, you can also write a new tree and it will be merged with the existing tree, overriding any properties. Adding this to your keymap would be equivalent to the previous example. -```devicetree +```dts / { kscan { debounce-press-ms = <0>; @@ -185,7 +185,7 @@ Example: `property;` If a property has already been set to true and you need to override it to false, use the following command to delete the existing property: -```devicetree +```dts /delete-property/ the-property-name; ``` @@ -240,7 +240,7 @@ Each item in the array should be a label for a GPIO node (the names of which dif Example: -```devicetree +```dts some-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>, <&gpio0 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> @@ -253,7 +253,7 @@ A path to a node, either as a node reference or as a string. Examples: -``` +```dts property = &label; property = "/path/to/some/node"; ``` diff --git a/docs/docs/config/kscan.md b/docs/docs/config/kscan.md index 296cb4a179c..67c3765298a 100644 --- a/docs/docs/config/kscan.md +++ b/docs/docs/config/kscan.md @@ -88,7 +88,7 @@ By default, a switch will drain current through the internal pull up/down resist Assuming the switches connect each GPIO pin to the ground, the [GPIO flags](https://docs.zephyrproject.org/3.2.0/hardware/peripherals/gpio.html#api-reference) for the elements in `input-gpios` should be `(GPIO_ACTIVE_LOW | GPIO_PULL_UP)`: -```devicetree +```dts kscan0: kscan { compatible = "zmk,kscan-gpio-direct"; input-gpios @@ -137,7 +137,7 @@ The `diode-direction` property must be one of: Given the `diode-direction`, the [GPIO flags](https://docs.zephyrproject.org/3.2.0/hardware/peripherals/gpio.html#api-reference) for the elements in `row-` and `col-gpios` should be set appropriately. The output pins (e.g. columns for `col2row`) should have the flag `GPIO_ACTIVE_HIGH`, and input pins (e.g. rows for `col2row`) should have the flags `(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)`: -```devicetree +```dts kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; diode-direction = "col2row"; @@ -229,7 +229,7 @@ One possible way to do this is a 3x4 matrix where the direct GPIO keys are shift ...which can be configured with the following Devicetree code: -```devicetree +```dts / { chosen { zmk,kscan = &kscan0; @@ -316,7 +316,7 @@ The `map` array should be defined using the `RC()` macro from [dt-bindings/zmk/m Any keyboard which is not a grid of 1 unit keys will likely have some unused positions in the matrix. A matrix transform can be used to skip the unused positions so users don't have to set them to `&none` in keymaps. -```devicetree +```dts // numpad.overlay / { chosen { @@ -355,7 +355,7 @@ Any keyboard which is not a grid of 1 unit keys will likely have some unused pos }; ``` -```devicetree +```dts // numpad.keymap / { keymap { @@ -377,7 +377,7 @@ Any keyboard which is not a grid of 1 unit keys will likely have some unused pos Consider a keyboard with a [duplex matrix](https://wiki.ai03.com/books/pcb-design/page/matrices-and-duplex-matrix), where the matrix has twice as many rows and half as many columns as the keyboard has keys. A matrix transform can be used to correct for this so that keymaps can match the layout of the keys, not the layout of the matrix. -```devicetree +```dts / { chosen { zmk,kscan = &kscan0; diff --git a/docs/docs/customization.md b/docs/docs/customization.md index 6fb39f85015..4f75e743a66 100644 --- a/docs/docs/customization.md +++ b/docs/docs/customization.md @@ -48,7 +48,7 @@ default keyboard settings. For instance, building kyria firmware from a user `myUser`'s `zmk-config` folder on Windows 10 may look something like this: -``` +```bash west build -b nice_nano -- -DSHIELD=kyria_left -DZMK_CONFIG="C:/Users/myUser/Documents/Github/zmk-config/config" ``` @@ -63,7 +63,7 @@ More troubleshooting information for split keyboards can be found [here](trouble You can build additional keyboards with GitHub actions by appending them to `build.yml` in your `zmk-config` folder. For instance assume that we have set up a Corne shield with nice!nano during [initial setup](user-setup.md) and we want to add a Lily58 shield with nice!nano v2. The following is an example `build.yaml` file that would accomplish that: -``` +```yaml include: - board: nice_nano shield: corne_left diff --git a/docs/docs/development/build-flash.md b/docs/docs/development/build-flash.md index f57c4b5caf9..94bbcdf93a8 100644 --- a/docs/docs/development/build-flash.md +++ b/docs/docs/development/build-flash.md @@ -76,13 +76,13 @@ For split keyboards, you will have to build and flash each side separately the f By default, the `build` command outputs a single .uf2 file named `zmk.uf2` so building left and then right immediately after will overwrite your left firmware. In addition, you will need to pristine build each side to ensure the correct files are used. To avoid having to pristine build every time and separate the left and right build files, we recommend setting up separate build directories for each half. You can do this by using the `-d` parameter and first building left into `build/left`: -``` +```sh west build -d build/left -b nice_nano -- -DSHIELD=kyria_left ``` and then building right into `build/right`: -``` +```sh west build -d build/right -b nice_nano -- -DSHIELD=kyria_right ``` @@ -99,7 +99,7 @@ Instead of building .uf2 files using the default keymap and config files, you ca For instance, building kyria firmware from a user `myUser`'s `zmk-config` folder on Windows 10 may look something like this: -``` +```sh west build -b nice_nano -- -DSHIELD=kyria_left -DZMK_CONFIG="C:/Users/myUser/Documents/Github/zmk-config/config" ``` @@ -117,7 +117,7 @@ volume automatically -- we need to delete the default volume before binding it t Then you can bind the `zmk-config` volume to the correct path pointing to your local [zmk-config](customization.md) folder: -``` +```sh docker volume create --driver local -o o=bind -o type=none -o \ device="/full/path/to/your/zmk-config/" zmk-config ``` @@ -137,7 +137,7 @@ Alternatively, if your board supports flashing and you're not developing from within a Dockerized environment, enable Device Firmware Upgrade (DFU) mode on your board and run the following command to flash: -``` +```sh west flash ``` diff --git a/docs/docs/development/ide-integration.md b/docs/docs/development/ide-integration.md index bfcd5def4da..f0403dbba36 100644 --- a/docs/docs/development/ide-integration.md +++ b/docs/docs/development/ide-integration.md @@ -71,7 +71,7 @@ If you are developing inside a Docker container, set the IntelliSense mode to `l Open VS Code's integrated terminal and run the following command: -``` +```sh cmake -P zephyr/cmake/verify-toolchain.cmake ``` diff --git a/docs/docs/development/new-behavior.md b/docs/docs/development/new-behavior.md index 0d70aa3b2a2..aab056c1a93 100644 --- a/docs/docs/development/new-behavior.md +++ b/docs/docs/development/new-behavior.md @@ -357,7 +357,7 @@ For behaviors that do not require central locality, the following options for up For the purpose of this section, we will discuss the structure of `app/dts/behaviors/gresc.dtsi` below. -```dtsi title="app/dts/behaviors/gresc.dtsi" +```dts title="app/dts/behaviors/gresc.dtsi" /* * Copyright (c) 2020 The ZMK Contributors * @@ -383,7 +383,7 @@ The format of a behavior's `.dtsi` file is identical to declaring an instance of After creating the `.dtsi` from above, update `app/dts/behaviors.dtsi` to include your newly predefined behavior instance, making it accessible by the devicetree. -```dtsi title="app/dts/behaviors.dtsi" +```dts title="app/dts/behaviors.dtsi" #include #include #include diff --git a/docs/docs/development/new-shield.md b/docs/docs/development/new-shield.md index 055afcf6ec7..fa30ca38abf 100644 --- a/docs/docs/development/new-shield.md +++ b/docs/docs/development/new-shield.md @@ -53,7 +53,7 @@ shield to get it picked up for ZMK, `Kconfig.shield` and `Kconfig.defconfig`. The `Kconfig.shield` file defines any additional Kconfig settings that may be relevant when using this keyboard. For most keyboards, there is just one additional configuration value for the shield itself. -``` +```kconfig config SHIELD_MY_BOARD def_bool $(shields_list_contains,my_board) ``` @@ -62,7 +62,7 @@ This will make sure that a new configuration value named `SHIELD_MY_BOARD` is se **For split boards**, you will need to add configurations for the left and right sides. For example, if your split halves are named `my_board_left` and `my_board_right`, it would look like this: -``` +```kconfig config SHIELD_MY_BOARD_LEFT def_bool $(shields_list_contains,my_board_left) @@ -83,7 +83,7 @@ The updated new default values should always be wrapped inside a conditional on The keyboard name must be less than or equal to 16 characters in length, otherwise the bluetooth advertising might fail and you will not be able to find your keyboard from your device. ::: -``` +```kconfig if SHIELD_MY_BOARD config ZMK_KEYBOARD_NAME @@ -97,7 +97,7 @@ You'll also want to set which half is the central side. Most boards set it to th Then on the peripheral half, you'll want to turn USB on so that it shows USB status on displays properly. Finally, you'll want to turn on the split option for both sides. This can all be seen below. -``` +```kconfig if SHIELD_MY_BOARD_LEFT config ZMK_KEYBOARD_NAME @@ -136,7 +136,7 @@ values={[ The `.overlay` is the devicetree description of the keyboard shield that is merged with the primary board devicetree description before the build. For ZMK, this file at a minimum should include the chosen node named `zmk,kscan` that references a KSCAN driver instance. For a simple 3x3 macropad matrix, this might look something like: -``` +```dts / { chosen { zmk,kscan = &kscan0; @@ -174,7 +174,7 @@ Unlike unibody keyboards, split keyboards have a core .dtsi file with shield ove It is preferred to define only the `col-gpios` or `row-gpios` in the common shield .dtsi, depending on the `diode-direction` value. For `col2row` directed boards like the iris, the shared .dtsi file may look like this: -``` +```dts #include / { @@ -228,9 +228,7 @@ Furthermore, the column offset for the [matrix transform](#optional-matrix-trans because the keyboard's switch matrix is read from left to right, top to bottom. This is exemplified with the iris .overlay files. -``` -// iris_left.overlay - +```dts title=iris_left.overlay #include "iris.dtsi" // Notice that the main dtsi files are included in the overlay. &kscan0 { @@ -245,9 +243,7 @@ This is exemplified with the iris .overlay files. }; ``` -``` -// iris_right.overlay - +```dts title=iris_right.overlay #include "iris.dtsi" &default_transform { // The matrix transform for this board is 6 columns over because the left half is 6 columns wide according to the matrix. @@ -281,9 +277,7 @@ For example, a split board called `my_awesome_split_board` would have the follow In most case you'll only need to use the .conf file that affects both halves of a split board. It's used for adding features like deep-sleep or rotary encoders. -``` -// my_awesome_split_board.conf - +```ini title=my_awesome_split_board.conf CONFIG_ZMK_SLEEP=y ``` @@ -306,7 +300,7 @@ the logical key location as perceived by the end user. All _keymap_ mappings act _Without_ a matrix transform, that intentionally map each key position to the row/column pair that position corresponds to, the default equation to determine that is: -``` +```c ($row * NUMBER_OF_COLUMNS) + $column ``` @@ -316,7 +310,7 @@ Whenever that default key position mapping is insufficient, the `.o Here is an example for the [nice60](https://github.com/Nicell/nice60), which uses an efficient 8x8 GPIO matrix, and uses a transform: -``` +```dts #include / { @@ -419,7 +413,7 @@ values={[ In your configuration file you will need to add the following lines so that the encoders can be enabled/disabled: -``` +```ini # Uncomment to enable encoder # CONFIG_EC11=y # CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y @@ -435,7 +429,7 @@ If building locally for split boards, you may need to add these lines to the spe In your device tree file you will need to add the following lines to define the encoder sensor: -``` +```dts left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; @@ -452,8 +446,8 @@ Add additional encoders as necessary by duplicating the above lines, replacing ` Once you have defined the encoder sensors, you will have to add them to the list of sensors: -``` -sensors { +```dts + sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; }; @@ -465,7 +459,7 @@ In this example, a left_encoder and right_encoder are both added. Additional enc Add the following lines to your overlay file(s) to enable the encoder: -``` +```dts &left_encoder { status = "okay"; }; @@ -479,7 +473,7 @@ For split keyboards, make sure to add left hand encoders to the left .overlay fi Add the following line to your keymap file to add default encoder behavior bindings: -``` +```dts sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; ``` @@ -493,7 +487,7 @@ Add additional bindings as necessary to match the default number of encoders on Once you've fully created the new keyboard shield definition, you should be able to test with a build command like: -``` +```sh west build --pristine -b proton_c -- -DSHIELD=my_board ``` @@ -506,7 +500,7 @@ Alternatively, if your board supports flashing and you're not developing from within a Dockerized environment, enable Device Firmware Upgrade (DFU) mode on your board and run the following command to test your build: -``` +```sh west flash ``` diff --git a/docs/docs/development/posix-board.md b/docs/docs/development/posix-board.md index d0ad571a0e2..5a809c02cca 100644 --- a/docs/docs/development/posix-board.md +++ b/docs/docs/development/posix-board.md @@ -14,7 +14,7 @@ with a compiler that can target 32-bit POSIX. On Debian, you can do this with: -``` +```sh apt install -y gcc-multilib ``` @@ -23,7 +23,7 @@ apt install -y gcc-multilib To do this, you can build ZMK targeting the `native_posix_64` board. -``` +```sh west build --pristine --board native_posix_64 -- -DZMK_CONFIG=tests/none/normal/ ``` diff --git a/docs/docs/development/usb-logging.md b/docs/docs/development/usb-logging.md index 87cd0e7d853..e50e78241a6 100644 --- a/docs/docs/development/usb-logging.md +++ b/docs/docs/development/usb-logging.md @@ -33,7 +33,7 @@ In Github Actions, you can check the ` Kconfig file` step output to ve for you successfully. ::: -``` +```ini # Turn on logging, and set ZMK logging to debug output CONFIG_ZMK_USB_LOGGING=y ``` @@ -53,7 +53,7 @@ values={[ On Linux, this should be a device like `/dev/ttyACM0` and you can connect with `minicom` or `tio` as usual, e.g.: -``` +```sh sudo tio /dev/ttyACM0 ``` @@ -74,7 +74,7 @@ If you already have the Ardunio IDE installed you can also use its built-in Seri On macOS, the device name is something like `/dev/tty.usbmodemXXXXX` where `XXXXX` is some numerical ID. You can connect to the device with [tio](https://tio.github.io/) (can be installed via [Homebrew](https://formulae.brew.sh/formula/tio)): -``` +```sh sudo tio /dev/tty.usbmodem14401 ``` diff --git a/docs/docs/features/backlight.md b/docs/docs/features/backlight.md index 717361a2085..c1b5db5dd9b 100644 --- a/docs/docs/features/backlight.md +++ b/docs/docs/features/backlight.md @@ -16,7 +16,7 @@ Unlike [RGB Underglow](underglow.md), backlight can only control single color LE To enable backlight on your board or shield, add the following line to your `.conf` file of your user config directory as such: -``` +```ini CONFIG_ZMK_BACKLIGHT=y ``` @@ -46,7 +46,7 @@ values={[ First, you must enable PWM by adding the following lines to your `Kconfig.defconfig` file: -``` +```kconfig if ZMK_BACKLIGHT config PWM @@ -60,7 +60,7 @@ endif # ZMK_BACKLIGHT Then you have to add the following lines to your `.dts` file: -``` +```dts &pwm0 { status = "okay"; ch0-pin = <45>; @@ -77,7 +77,7 @@ If your board uses a P-channel MOSFET to control backlight instead of a N-channe Then you have to add the following lines inside the root devicetree node on the same file as before: -``` +```dts / { backlight: pwmleds { compatible = "pwm-leds"; @@ -98,7 +98,7 @@ Note that every LED inside of the backlight node will be treated as a backlight Finally you need to add backlight to the `chosen` element of the root devicetree node: -``` +```dts / { chosen { zmk,backlight = &backlight; @@ -113,7 +113,7 @@ You must first add a `boards/` directory within your shield folder. For each boa Inside your `.defconfig` file, add the following lines: -``` +```kconfig if ZMK_BACKLIGHT config PWM @@ -127,7 +127,7 @@ endif # ZMK_BACKLIGHT Then add the following lines to your `.overlay` file: -``` +```dts &pwm0 { status = "okay"; ch0-pin = <45>; @@ -144,7 +144,7 @@ If your shield uses a P-channel MOSFET to control backlight instead of a N-chann Then you have to add the following lines inside the root devicetree node on the same file: -``` +```dts / { backlight: pwmleds { compatible = "pwm-leds"; @@ -165,7 +165,7 @@ Note that every LED inside of the backlight node will be treated as a backlight Finally you need to add backlight to the `chosen` element of the root devicetree node: -``` +```dts / { chosen { zmk,backlight = &backlight; @@ -175,7 +175,7 @@ Finally you need to add backlight to the `chosen` element of the root devicetree Optionally, on Pro Micro compatible shields you can add a LED GPIO node to your devicetree, this could be useful if you want your shield to be compatible with newer or untested boards. To do that you have to enable `CONFIG_LED_GPIO` in your `.conf` file and then add the following lines inside the root devicetree node of your `.dtsi` or `.dts` file: -``` +```dts / { backlight: gpioleds { compatible = "gpio-leds"; @@ -199,7 +199,7 @@ It is possible to control multiple backlight LEDs at the same time. This is usef In order to do that, first you need to enable PWM for each pin: -``` +```dts &pwm0 { status = "okay"; ch0-pin = <45>; /* LED 0 */ @@ -213,7 +213,7 @@ This part may vary based on your MCU as different MCUs may have a different numb Then you can simply add each of your LED to the backlight node: -``` +```dts backlight: pwmleds { compatible = "pwm-leds"; label = "Backlight LEDs"; diff --git a/docs/docs/features/battery.md b/docs/docs/features/battery.md index 42ba6d40f26..8bf7820799c 100644 --- a/docs/docs/features/battery.md +++ b/docs/docs/features/battery.md @@ -26,7 +26,7 @@ Zephyr also provides some drivers for fuel gauge ICs such as the TI bq274xx seri Once you have the sensor driver defined, add a `zmk,battery` property to the `chosen` node and set it to reference the sensor node. For example: -``` +```dts / { chosen { zmk,battery = &vbatt; diff --git a/docs/docs/features/beta-testing.md b/docs/docs/features/beta-testing.md index 4328ccbf68d..4a159362f13 100644 --- a/docs/docs/features/beta-testing.md +++ b/docs/docs/features/beta-testing.md @@ -44,7 +44,7 @@ values={[ ]}> -``` +```yaml manifest: remotes: - name: zmkfirmware @@ -61,7 +61,7 @@ manifest: -``` +```yaml manifest: remotes: - name: zmkfirmware @@ -80,7 +80,7 @@ manifest: -``` +```yaml manifest: remotes: - name: zmkfirmware diff --git a/docs/docs/features/bluetooth.md b/docs/docs/features/bluetooth.md index b75b89537d4..e58e16735ef 100644 --- a/docs/docs/features/bluetooth.md +++ b/docs/docs/features/bluetooth.md @@ -42,7 +42,7 @@ Management of the bluetooth in ZMK is accomplished using the [`&bt` behavior](.. Some users may experience a poor connection between the keyboard and the host. This might be due to poor quality BLE hardware, a metal enclosure on the keyboard or host, or the distance between them. Increasing the transmit power of the keyboard's BLE radio may reduce the severity of this problem. To do this, set the `CONFIG_BT_CTLR_TX_PWR_PLUS_8` configuration value in the `.conf` file of your user config directory as such: -``` +```ini CONFIG_BT_CTLR_TX_PWR_PLUS_8=y ``` @@ -64,7 +64,7 @@ There are a few known issues related to BLE and ZMK: There is a known issue with Windows failing to update the battery information after connecting to a ZMK keyboard. You can work around this Windows bug by overriding a [Bluetooth config variable](../config/bluetooth.md) to force battery notifications even if a host neglects to subscribe to them: -``` +```ini CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n ``` diff --git a/docs/docs/features/combos.md b/docs/docs/features/combos.md index bc1353b416e..f4664c546f1 100644 --- a/docs/docs/features/combos.md +++ b/docs/docs/features/combos.md @@ -10,7 +10,7 @@ Combo keys are a way to combine multiple keypresses to output a different key. F Combos configured in your `.keymap` file, but are separate from the `keymap` node found there, since they are processed before the normal keymap. They are specified like this: -``` +```dts / { combos { compatible = "zmk,combos"; diff --git a/docs/docs/features/conditional-layers.md b/docs/docs/features/conditional-layers.md index a685bcabd93..7ccfdf2338a 100644 --- a/docs/docs/features/conditional-layers.md +++ b/docs/docs/features/conditional-layers.md @@ -14,7 +14,7 @@ Another way to think of this feature is as a simple combo system for layers, jus Conditional layers are configured via a `conditional_layers` node in your `.keymap` file as follows: -``` +```dts / { conditional_layers { compatible = "zmk,conditional-layers"; diff --git a/docs/docs/features/debouncing.md b/docs/docs/features/debouncing.md index 40170739fcb..cbea7092884 100644 --- a/docs/docs/features/debouncing.md +++ b/docs/docs/features/debouncing.md @@ -56,7 +56,7 @@ per-driver option. For example, if your board/shield has a kscan driver labeled `kscan0` in its `.overlay`, `.dts`, or `.dtsi` files, -```devicetree +```dts kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; ... @@ -65,7 +65,7 @@ kscan0: kscan { then you could add this to your `.keymap`: -```devicetree +```dts &kscan0 { debounce-press-ms = <3>; debounce-release-ms = <3>; diff --git a/docs/docs/features/encoders.md b/docs/docs/features/encoders.md index 0c493330cc6..105757634b1 100644 --- a/docs/docs/features/encoders.md +++ b/docs/docs/features/encoders.md @@ -21,7 +21,7 @@ Keyboards and macropads with encoder support will typically take the two EC11 pi Rotation is handled separately as a type of sensor. The behavior for this is set in `sensor-bindings`. See [Sensor Rotation](../behaviors/sensor-rotate.md) for customizing this behavior. -``` +```dts sensor-bindings = ; ``` @@ -33,7 +33,7 @@ Additional encoders can be configured by adding more bindings immediately after As an example, a complete `sensor-bindings` for a Kyria with two encoders could look like: -``` +```dts sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; ``` diff --git a/docs/docs/features/keymaps.md b/docs/docs/features/keymaps.md index 93c2c8250fa..9778ecbab18 100644 --- a/docs/docs/features/keymaps.md +++ b/docs/docs/features/keymaps.md @@ -61,7 +61,7 @@ alter the behavior when that specific key position is activated/deactivated. For the "key press" (`kp`) behavior at a certain key position, you must specify _which_ keycode should be used for that key position. -``` +```dts &kp A ``` @@ -69,7 +69,7 @@ In this case, the `A` is actually a define for the raw HID keycode, to make keym For example of a binding that uses two parameters, you can see how "mod-tap" (`mt`) is bound: -``` +```dts &mt LSHIFT D ``` @@ -87,7 +87,7 @@ for what would otherwise be cryptic integer keycodes, etc. This also allows brin The top two lines of most keymaps should include: -``` +```dts #include #include ``` @@ -100,7 +100,7 @@ The second include brings in the defines for all the keycodes (e.g. `A`, `N1`, ` All the remaining keymap nodes will be nested inside of the root devicetree node, like so: -```devicetree +```dts / { // Everything else goes here! }; @@ -111,7 +111,7 @@ All the remaining keymap nodes will be nested inside of the root devicetree node Nested under the devicetree root, is the keymap node. The node _name_ itself is not critical, but the node **MUST** have a property `compatible = "zmk,keymap"` in order to be used by ZMK. -``` +```dts keymap { compatible = "zmk,keymap"; diff --git a/docs/docs/features/underglow.md b/docs/docs/features/underglow.md index 2b1400fc7e8..b5c4c70392e 100644 --- a/docs/docs/features/underglow.md +++ b/docs/docs/features/underglow.md @@ -28,7 +28,7 @@ Here you can see the RGB underglow feature in action using WS2812 LEDs. To enable RGB underglow on your board or shield, simply enable the `CONFIG_ZMK_RGB_UNDERGLOW` and `CONFIG_*_STRIP` configuration values in the `.conf` file for your board or shield. For example: -``` +```ini CONFIG_ZMK_RGB_UNDERGLOW=y # Use the STRIP config specific to the LEDs you're using CONFIG_WS2812_STRIP=y @@ -45,7 +45,7 @@ A common issue when enabling underglow is that some of the installed LEDs do not The number of underglow LEDs is controlled by the `chain-length` property in the `led_strip` node. You can [change the value of this property](../config/index.md#changing-devicetree-properties) in the `.keymap` file by adding a stanza like this one outside of any other node (i.e. above or below the `/` node): -``` +```dts &led_strip { chain-length = <21>; }; @@ -70,7 +70,7 @@ With nRF52 boards, you can just use `&spi3` and define the pins you want to use. Here's an example on a definition that uses P0.06: -``` +```dts #include &pinctrl { @@ -135,7 +135,7 @@ For other boards, you must select an SPI definition that has the `MOSI` pin as y Here's another example for a non-nRF52 board on `spi3`: -``` +```dts #include &spi3 { @@ -161,7 +161,7 @@ Here's another example for a non-nRF52 board on `spi3`: Once you have your `led_strip` properly defined you need to add it to the root devicetree node `chosen` element: -``` +```dts / { chosen { zmk,underglow = &led_strip; @@ -171,7 +171,7 @@ Once you have your `led_strip` properly defined you need to add it to the root d Finally you need to enable the `CONFIG_ZMK_RGB_UNDERGLOW` and `CONFIG_*_STRIP` configuration values in the `.conf` file of your board (or set a default in the `Kconfig.defconfig`): -``` +```ini CONFIG_ZMK_RGB_UNDERGLOW=y # Use the STRIP config specific to the LEDs you're using CONFIG_WS2812_STRIP=y diff --git a/docs/docs/keymap-example-file.md b/docs/docs/keymap-example-file.md index d8d201aff93..91213f1510b 100644 --- a/docs/docs/keymap-example-file.md +++ b/docs/docs/keymap-example-file.md @@ -1,4 +1,4 @@ -``` +```dts #include #include diff --git a/docs/docs/keymap-example.md b/docs/docs/keymap-example.md index 47d1c06bca6..e526d5427a9 100644 --- a/docs/docs/keymap-example.md +++ b/docs/docs/keymap-example.md @@ -1,4 +1,4 @@ -``` +```dts keymap { compatible = "zmk,keymap"; diff --git a/docs/docs/user-setup.md b/docs/docs/user-setup.md index 9d04c347d58..2532fe8b128 100644 --- a/docs/docs/user-setup.md +++ b/docs/docs/user-setup.md @@ -67,21 +67,21 @@ values={[ ]}> -``` +```bash bash -c "$(curl -fsSL https://zmk.dev/setup.sh)" ``` -``` +```bash bash -c "$(wget https://zmk.dev/setup.sh -O -)" '' --wget ``` -``` +```powershell powershell -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://zmk.dev/setup.ps1'))" ``` From 6c75d6986c3dfaf7562783476059349c0814792a Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:08:45 +0100 Subject: [PATCH 123/160] feat(docs): Document globe key specific quirks --- docs/docs/codes/_footnotes/globe.mdx | 1 + docs/src/data/footnotes.js | 2 ++ docs/src/data/hid.js | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 docs/docs/codes/_footnotes/globe.mdx diff --git a/docs/docs/codes/_footnotes/globe.mdx b/docs/docs/codes/_footnotes/globe.mdx new file mode 100644 index 00000000000..f267a0ee0d3 --- /dev/null +++ b/docs/docs/codes/_footnotes/globe.mdx @@ -0,0 +1 @@ +Does not exactly replicate original key behavior on macOS, works for Globe+key modifiers but not Fn+key ([#1938](https://github.com/zmkfirmware/zmk/pull/1938#issuecomment-1744579039)). diff --git a/docs/src/data/footnotes.js b/docs/src/data/footnotes.js index cf91ecdb431..ab7f27243e8 100644 --- a/docs/src/data/footnotes.js +++ b/docs/src/data/footnotes.js @@ -8,10 +8,12 @@ import example from "@site/docs/codes/_footnotes/example.mdx"; import iosApplication from "@site/docs/codes/_footnotes/ios-application.mdx"; import iosPower from "@site/docs/codes/_footnotes/ios-power.mdx"; import macosPower from "@site/docs/codes/_footnotes/macos-power.mdx"; +import globe from "@site/docs/codes/_footnotes/globe.mdx"; export default { example, iosApplication, iosPower, macosPower, + globe, }; diff --git a/docs/src/data/hid.js b/docs/src/data/hid.js index fc61555c8eb..96697beebb6 100644 --- a/docs/src/data/hid.js +++ b/docs/src/data/hid.js @@ -7884,6 +7884,8 @@ export default [ macos: true, ios: true, }, - footnotes: {}, + footnotes: { + macos: ["globe"], + }, }, ]; From 0c06023ca03fe2e7e7d5f7abe24b3f5d835b5b5f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 22:58:15 +0000 Subject: [PATCH 124/160] chore(deps): bump postcss from 8.4.18 to 8.4.31 in /docs Bumps [postcss](https://github.com/postcss/postcss) from 8.4.18 to 8.4.31. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.4.18...8.4.31) --- updated-dependencies: - dependency-name: postcss dependency-type: indirect ... Signed-off-by: dependabot[bot] --- docs/package-lock.json | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index f17adc4bde9..6e5973726bf 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -11189,9 +11189,15 @@ } }, "node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -11938,9 +11944,9 @@ } }, "node_modules/postcss": { - "version": "8.4.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz", - "integrity": "sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "funding": [ { "type": "opencollective", @@ -11949,10 +11955,14 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -24533,9 +24543,9 @@ } }, "nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==" }, "natural-compare": { "version": "1.4.0", @@ -25063,11 +25073,11 @@ } }, "postcss": { - "version": "8.4.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz", - "integrity": "sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "requires": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } From a9f677007bccc3d2c0d988d3b1f45bb7d79d6131 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Tue, 10 Oct 2023 20:09:15 -0700 Subject: [PATCH 125/160] fix(blog): Correct incorrect info re: global-quick-tap --- docs/blog/2023-10-05-zmk-sotf-6.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/blog/2023-10-05-zmk-sotf-6.md b/docs/blog/2023-10-05-zmk-sotf-6.md index 18a52a859fd..5aa1567a90a 100644 --- a/docs/blog/2023-10-05-zmk-sotf-6.md +++ b/docs/blog/2023-10-05-zmk-sotf-6.md @@ -21,7 +21,7 @@ Here's a summary of the various major changes since last time, broken down by th [andrewjrae] added the [`require-prior-idle-ms` property](/docs/behaviors/hold-tap#require-prior-idle-ms) to the hold-tap behavior in [#1187](https://github.com/zmkfirmware/zmk/pull/1187) and [#1387](https://github.com/zmkfirmware/zmk/pull/1387), which prevents the hold behavior from triggering if it hasn't been a certain duration since the last key press. This is a useful feature to prevent accidental hold activations during quick typing and made its way into many keymaps! The same property was added to [combos](/docs/features/combos#configuration) as well to help prevent false combo activations. -Note that an earlier iteration of this feature was supported with the `global-quick-tap` property, which did not allow customizing the timeout and used the value of `tapping-term-ms` for it. This property is now deprecated and users are encouraged to use `require-prior-idle-ms` instead. +Note that an earlier iteration of this feature was supported with the `global-quick-tap` property, which did not allow customizing the timeout and used the value of `quick-tap-ms` for it. This property is now deprecated and users are encouraged to use `require-prior-idle-ms` instead. [urob] added the [`hold-trigger-on-release` property](/docs/behaviors/hold-tap#positional-hold-tap-and-hold-trigger-key-positions) in [#1423](https://github.com/zmkfirmware/zmk/pull/1423). This significantly increases the usefulness of positional constraints on hold-taps, since it allows combining multiple holds such as different modifiers for home row mods usage. From 3ab922822c0b1bbf99e9ea50f17fe15dcef6c3f3 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 2 Oct 2023 22:05:24 -0700 Subject: [PATCH 126/160] feat(shields): Add ZMK Uno nice!view support. Export the `nice_view_spi` node properly from the ZMK Uno overlay to ensure the shield will work when built along with the `nice_view` shield. --- app/boards/shields/zmk_uno/zmk_uno.overlay | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/boards/shields/zmk_uno/zmk_uno.overlay b/app/boards/shields/zmk_uno/zmk_uno.overlay index 78f3b4a7146..02bb4ad8e81 100644 --- a/app/boards/shields/zmk_uno/zmk_uno.overlay +++ b/app/boards/shields/zmk_uno/zmk_uno.overlay @@ -11,9 +11,17 @@ status = "okay"; }; -&arduino_spi { +nice_view_spi: &arduino_spi { status = "okay"; + cs-gpios = <&arduino_header 16 GPIO_ACTIVE_HIGH>; + + // Needed so the nice_view shield will enhance the existing node which falls *first* + // on the bus, properly picking up the first `cs-gpios` specifier. + ls0xx@0 { + reg = <0>; + }; + led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; From a9a53e6da490e319bae5efa85c221010a2578b15 Mon Sep 17 00:00:00 2001 From: Alex Kang Date: Sat, 14 Oct 2023 19:39:42 -0700 Subject: [PATCH 127/160] feat(shields): Reviung34 shield definition * Initial implementation of REVIUNG34 shield. * Add copyright information to files * Added a README with instructions on how to enable the 1x2u layout. * Add a default chosen matrix transform in the default keymap, alongside a commented out version for the alternate layout. --------- Co-authored-by: Peter Johanson Co-authored-by: Cem Aksoylar --- .../shields/reviung34/Kconfig.defconfig | 9 +++ app/boards/shields/reviung34/Kconfig.shield | 5 ++ app/boards/shields/reviung34/README.md | 13 ++++ .../reviung34/boards/nice_nano_v2.overlay | 48 ++++++++++++ app/boards/shields/reviung34/reviung34.conf | 3 + app/boards/shields/reviung34/reviung34.keymap | 77 +++++++++++++++++++ .../shields/reviung34/reviung34.overlay | 63 +++++++++++++++ .../shields/reviung34/reviung34.zmk.yml | 9 +++ 8 files changed, 227 insertions(+) create mode 100644 app/boards/shields/reviung34/Kconfig.defconfig create mode 100644 app/boards/shields/reviung34/Kconfig.shield create mode 100644 app/boards/shields/reviung34/README.md create mode 100644 app/boards/shields/reviung34/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/reviung34/reviung34.conf create mode 100644 app/boards/shields/reviung34/reviung34.keymap create mode 100644 app/boards/shields/reviung34/reviung34.overlay create mode 100644 app/boards/shields/reviung34/reviung34.zmk.yml diff --git a/app/boards/shields/reviung34/Kconfig.defconfig b/app/boards/shields/reviung34/Kconfig.defconfig new file mode 100644 index 00000000000..5dc26b4f065 --- /dev/null +++ b/app/boards/shields/reviung34/Kconfig.defconfig @@ -0,0 +1,9 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_REVIUNG34 + +config ZMK_KEYBOARD_NAME + default "REVIUNG34" + +endif diff --git a/app/boards/shields/reviung34/Kconfig.shield b/app/boards/shields/reviung34/Kconfig.shield new file mode 100644 index 00000000000..f3c63a157c1 --- /dev/null +++ b/app/boards/shields/reviung34/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_REVIUNG34 + def_bool $(shields_list_contains,reviung34) diff --git a/app/boards/shields/reviung34/README.md b/app/boards/shields/reviung34/README.md new file mode 100644 index 00000000000..e62c52d65e3 --- /dev/null +++ b/app/boards/shields/reviung34/README.md @@ -0,0 +1,13 @@ +# REVIUNG34 + +REVIUNG34 is a 33-34 key unibody split keyboard by [gtips](https://github.com/gtips). An in-stock version can be found at [Little Keyboards](https://www.littlekeyboards.com/products/reviung34-analyst-keyboard-kit). + +By default, the 2x1u layout is used. To use to the 1x2u layout, add the following to your keymap: + +``` +/ { + chosen { + zmk,matrix_transform = &single_2u_transform; + }; +}; +``` diff --git a/app/boards/shields/reviung34/boards/nice_nano_v2.overlay b/app/boards/shields/reviung34/boards/nice_nano_v2.overlay new file mode 100644 index 00000000000..b8d21398448 --- /dev/null +++ b/app/boards/shields/reviung34/boards/nice_nano_v2.overlay @@ -0,0 +1,48 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <9>; /* number of LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/reviung34/reviung34.conf b/app/boards/shields/reviung34/reviung34.conf new file mode 100644 index 00000000000..289f070ba3f --- /dev/null +++ b/app/boards/shields/reviung34/reviung34.conf @@ -0,0 +1,3 @@ +# Uncomment the following lines to enable RGB underglow +# CONFIG_ZMK_RGB_UNDERGLOW=y +# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/reviung34/reviung34.keymap b/app/boards/shields/reviung34/reviung34.keymap new file mode 100644 index 00000000000..eefc510a1c4 --- /dev/null +++ b/app/boards/shields/reviung34/reviung34.keymap @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include + +/ { + chosen { + // 34 keys. + zmk,matrix_transform = &dual_1u_transform; + + // 33 keys. Center two thumb keys replaced by a single 2u key. Remember to adjust your + // keymap accordingly! + // zmk,matrix_transform = &single_2u_transform; + }; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + + base { + label = "Base"; + bindings = < +&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P +&kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI +&mt LSHFT Z &mt LCTRL X &mt LALT C &kp V &kp B &kp N &kp M &mt RALT COMMA &mt RCTRL DOT &mt RSHFT SLASH + &kp LGUI < 1 BSPC < 2 SPACE &mo 3 + >; + }; + + lower { + label = "Lower"; + bindings = < +&kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR +&trans &kp TILDE &kp DQT &kp PIPE &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &mo 4 &trans + >; + }; + + upper { + label = "Upper"; + bindings = < +&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 +&trans &kp GRAVE &kp SQT &kp BSLH &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &mo 4 &trans &trans + >; + }; + + function { + label = "Function"; + bindings = < +&kp TAB &trans &kp C_VOL_UP &trans &trans &trans &trans &trans &trans &kp ENTER +&kp ESC &kp C_BRI_DN &kp C_VOL_DN &kp C_BRI_UP &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &kp C_PWR &trans &trans + >; + }; + + meta { + label = "Meta"; + bindings = < +&rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &none &none &none &none &none +&rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 +&none &none &rgb_ug RGB_TOG &none &none &none &none &bt BT_CLR &none &none + &none &trans &trans &none + >; + }; + }; +}; diff --git a/app/boards/shields/reviung34/reviung34.overlay b/app/boards/shields/reviung34/reviung34.overlay new file mode 100644 index 00000000000..46d85996738 --- /dev/null +++ b/app/boards/shields/reviung34/reviung34.overlay @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &dual_1u_transform; + }; + + dual_1u_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <9>; + rows = <4>; + 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(3,5) +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(3,6) +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(3,7) + RC(3,2) RC(3,3) RC(3,4) RC(3,8) + >; + }; + + single_2u_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <9>; + rows = <4>; + 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(3,5) +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(3,6) +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(3,7) + RC(3,2) RC(3,4) RC(3,8) + >; + }; + + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; + + col-gpios + = <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 7 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; +}; diff --git a/app/boards/shields/reviung34/reviung34.zmk.yml b/app/boards/shields/reviung34/reviung34.zmk.yml new file mode 100644 index 00000000000..76ed745d979 --- /dev/null +++ b/app/boards/shields/reviung34/reviung34.zmk.yml @@ -0,0 +1,9 @@ +file_format: "1" +id: reviung34 +name: REVIUNG34 +type: shield +url: https://github.com/gtips/reviung/tree/master/reviung34 +requires: [pro_micro] +features: + - keys + - underglow From 3b1d04372b0a013ec2738019166c1c2e85bf0ba7 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Fri, 13 Oct 2023 14:58:27 -0500 Subject: [PATCH 128/160] feat: Print Kconfig and DTS for failed builds Added the combined devicetree file to the user config build action. Set it and the Kconfig output to run even on a failed build. --- .github/workflows/build-user-config.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 5891ddc1e26..c1a97b4d6e0 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -97,7 +97,27 @@ jobs: run: west build -s zmk/app -b "${{ matrix.board }}" -- -DZMK_CONFIG="${GITHUB_WORKSPACE}/${{ inputs.config_path }}" ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }} - name: ${{ env.display_name }} Kconfig file - run: grep -v -e "^#" -e "^$" build/zephyr/.config | sort + run: | + if [ -f build/zephyr/.config ] + then + grep -v -e "^#" -e "^$" build/zephyr/.config | sort + else + echo "No Kconfig output" + fi + if: ${{ !cancelled() }} + + - name: ${{ env.display_name }} Devicetree file + run: | + if [ -f build/zephyr/zephyr.dts ] + then + cat build/zephyr/zephyr.dts + elif [ -f build/zephyr/zephyr.dts.pre ] + then + cat -s build/zephyr/zephyr.dts.pre + else + echo "No Devicetree output" + fi + if: ${{ !cancelled() }} - name: Rename artifacts shell: sh -x {0} From 7fe9ecd87f086fe6fcf253559e751fab575faa5c Mon Sep 17 00:00:00 2001 From: Khalid Aj Date: Wed, 18 Oct 2023 05:43:50 +0700 Subject: [PATCH 129/160] feat(shields): Add Reviung53 shield. * Initial Reviung53 shield --------- Co-authored-by: Cem Aksoylar --- .../shields/reviung53/Kconfig.defconfig | 9 ++ app/boards/shields/reviung53/Kconfig.shield | 5 + .../reviung53/boards/nice_nano.overlay | 47 ++++++++ .../reviung53/boards/nice_nano_v2.overlay | 47 ++++++++ app/boards/shields/reviung53/reviung53.conf | 3 + app/boards/shields/reviung53/reviung53.keymap | 109 ++++++++++++++++++ .../shields/reviung53/reviung53.overlay | 56 +++++++++ .../shields/reviung53/reviung53.zmk.yml | 9 ++ 8 files changed, 285 insertions(+) create mode 100644 app/boards/shields/reviung53/Kconfig.defconfig create mode 100644 app/boards/shields/reviung53/Kconfig.shield create mode 100644 app/boards/shields/reviung53/boards/nice_nano.overlay create mode 100644 app/boards/shields/reviung53/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/reviung53/reviung53.conf create mode 100644 app/boards/shields/reviung53/reviung53.keymap create mode 100644 app/boards/shields/reviung53/reviung53.overlay create mode 100644 app/boards/shields/reviung53/reviung53.zmk.yml diff --git a/app/boards/shields/reviung53/Kconfig.defconfig b/app/boards/shields/reviung53/Kconfig.defconfig new file mode 100644 index 00000000000..efac69b7f40 --- /dev/null +++ b/app/boards/shields/reviung53/Kconfig.defconfig @@ -0,0 +1,9 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_REVIUNG53 + +config ZMK_KEYBOARD_NAME + default "Reviung53" + +endif diff --git a/app/boards/shields/reviung53/Kconfig.shield b/app/boards/shields/reviung53/Kconfig.shield new file mode 100644 index 00000000000..0b0613e2331 --- /dev/null +++ b/app/boards/shields/reviung53/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_REVIUNG53 + def_bool $(shields_list_contains,reviung53) diff --git a/app/boards/shields/reviung53/boards/nice_nano.overlay b/app/boards/shields/reviung53/boards/nice_nano.overlay new file mode 100644 index 00000000000..4df91903c68 --- /dev/null +++ b/app/boards/shields/reviung53/boards/nice_nano.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <10>; + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/reviung53/boards/nice_nano_v2.overlay b/app/boards/shields/reviung53/boards/nice_nano_v2.overlay new file mode 100644 index 00000000000..4df91903c68 --- /dev/null +++ b/app/boards/shields/reviung53/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <10>; + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/reviung53/reviung53.conf b/app/boards/shields/reviung53/reviung53.conf new file mode 100644 index 00000000000..289f070ba3f --- /dev/null +++ b/app/boards/shields/reviung53/reviung53.conf @@ -0,0 +1,3 @@ +# Uncomment the following lines to enable RGB underglow +# CONFIG_ZMK_RGB_UNDERGLOW=y +# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/reviung53/reviung53.keymap b/app/boards/shields/reviung53/reviung53.keymap new file mode 100644 index 00000000000..d00ca6b975b --- /dev/null +++ b/app/boards/shields/reviung53/reviung53.keymap @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include + +/ { + conditional_layers { + compatible = "zmk,conditional-layers"; + tri_layer { + if-layers = <1 2>; + then-layer = <3>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { +// ---------------------------------------------------------------------------------------- +// | | | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | DEL | +// | TAB | Q | W | E | R | T | Y | U | I | O | P | BKSP | +// | CAPS | A | S | D | F | G | H | J | K | L | ; | RET | +// | SHFT | Z | X | C | V | B | N | M | , | . | SHFT(/) | +// | CTRL | GUI | ALT | LOWER(SPACE) | RAISE(SPACE)| ALT | GUI | CTRL(\) | +// | + bindings = < + &kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp DEL + &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC + &kp CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp RET + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &mt RSHFT FSLH + &kp LCTRL &kp LCMD &kp LALT < 1 SPACE < 2 SPACE &kp RALT &kp RCMD &mt RCTRL BSLH + >; + }; + + lower_layer { +// -------------------------------------------------------------------------------------------- +// | | | | F9 | F10 | F11 | F12 | INS | PAU | SCR | PSCR | | +// | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | +// | NAV | | | | | | | _ | + | { | } | " | +// | | | | | | | | | | | ? | +// | | | | | | | | | | +// | + bindings = < + &trans &kp F9 &kp F10 &kp F11 &kp F12 &kp INS &kp PAUSE_BREAK &kp SLCK &kp PSCRN &trans + &kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &trans + &mo 4 &none &none &none &none &none &none &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp DQT + &trans &none &none &none &none &none &none &none &none &none &kp QMARK + &trans &trans &trans &trans &trans &trans &trans &kp PIPE + >; + }; + + raise_layer { +// -------------------------------------------------------------------------------------- +// | | | | F9 | F10 | F11 | F12 | MUTE | VOL+ | VOL- | PLAY | | +// | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | +// | NAV | | | | | | | - | = | [ | ] | ' | +// | | | | | | | | + | < | > | : | +// | | | | | | | | | | +// | + bindings = < + &trans &kp F9 &kp F10 &kp F11 &kp F12 &kp C_MUTE &kp C_VOL_UP &kp C_VOL_DN &kp C_PLAY &trans + &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans + &mo 4 &none &none &none &none &none &none &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp SQT + &trans &none &none &none &none &none &none &kp PLUS &kp LT &kp GT &kp COLON + &trans &trans &trans &trans &trans &trans &trans &kp PIPE + >; + }; + + adjust_layer { +// ------------------------------------------------------------------------------------------------------------------------ +// | | | BT CLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | BT CLR | +// | RGB BRI+ | RGB SAT+ | RGB HUE+ | RGB ANI+ | | RGB TOG | | | | | | | +// | RGB BRI- | RGB SAT- | RGB HUE- | RGB ANI- | | | | | | | | | +// | | | | | | | BOOT | | | | | +// | | | | | | | | | +// | + bindings = < + &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &none &none &bt BT_CLR + &rgb_ug RGB_BRI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_EFF &none &rgb_ug RGB_TOG &none &none &none &none &none &none + &rgb_ug RGB_BRD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_EFR &none &none &none &none &none &none &none &none + &trans &none &none &none &none &none &bootloader &none &none &none &none + &trans &trans &trans &trans &trans &none &none &none + >; + }; + + nav_layer { +// ------------------------------------------------------------------------------------------------------------------------ +// | | | ESC | | | | | | | | | DEL | +// | TAB | | UP | | | | | | | | | BSPC | +// | NAV | LEFT | DOWN | RIGHT | | | LEFT | DOWN | UP | RIGHT | | ENTER | +// | SHIFT | | | | | | HOME | END | PGUP | PGDN | SHIFT | +// | CTRL | GUI | ALT | SPACE | SPACE | ALT | GUI | CTRL | +// | + bindings = < + &kp ESC &none &none &none &none &none &none &none &none &kp DEL + &kp TAB &none &kp UP &none &none &none &none &none &none &none &none &kp BSPC + &trans &kp LEFT &kp DOWN &kp RIGHT &none &none &kp LEFT &kp DOWN &kp UP &kp RIGHT &none &kp RET + &kp LSHFT &none &none &none &none &none &kp HOME &kp END &kp PG_UP &kp PG_DN &kp RSHFT + &kp LCTRL &kp LCMD &kp LALT &kp SPACE &kp SPACE &kp LALT &kp RCMD &kp RCTRL + >; + }; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/reviung53/reviung53.overlay b/app/boards/shields/reviung53/reviung53.overlay new file mode 100644 index 00000000000..213b3b81c72 --- /dev/null +++ b/app/boards/shields/reviung53/reviung53.overlay @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <8>; + rows = <7>; + + map = < + RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(4,0) RC(4,1) RC(4,2) RC(4,3) +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(4,4) RC(4,5) RC(4,6) RC(4,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(5,0) RC(5,1) RC(5,2) RC(5,3) +RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(5,4) RC(5,5) RC(5,6) +RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5) RC(6,6) RC(6,7) + >; + }; + + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; + + 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> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&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)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + + }; +}; diff --git a/app/boards/shields/reviung53/reviung53.zmk.yml b/app/boards/shields/reviung53/reviung53.zmk.yml new file mode 100644 index 00000000000..e670755c774 --- /dev/null +++ b/app/boards/shields/reviung53/reviung53.zmk.yml @@ -0,0 +1,9 @@ +file_format: "1" +id: reviung53 +name: REVIUNG53 +type: shield +url: https://github.com/gtips/reviung/tree/master/reviung53 +requires: [pro_micro] +features: + - keys + - underglow From 82e85699edd7261500ea2feb0697f8a6a5bbd42c Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Thu, 19 Oct 2023 22:04:04 +0100 Subject: [PATCH 130/160] feat(docs): Document ZMK_BATTERY_REPORTING config (#1971) `CONFIG_ZMK_BATTERY_REPORTING` is currently undocumented, A new KConfig section for battery has been added in line with the other sections in the configuration section of the docs, `CONFIG_ZMK_BATTERY_REPORT_INTERVAL` has been moved from system to battery for consistency --- docs/docs/config/battery.md | 15 +++++++++++++++ docs/docs/config/system.md | 13 ++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/docs/docs/config/battery.md b/docs/docs/config/battery.md index 73b4ee92933..7b7e9436503 100644 --- a/docs/docs/config/battery.md +++ b/docs/docs/config/battery.md @@ -7,6 +7,21 @@ See the [battery level feature page](../features/battery.md) for more details on See [Configuration Overview](index.md) for instructions on how to change these settings. +### Kconfig + +Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/Kconfig) + +| Config | Type | Description | Default | +| ------------------------------------ | ---- | ------------------------------------------------------ | ------- | +| `CONFIG_ZMK_BATTERY_REPORTING` | bool | Enables/disables all battery level detection/reporting | n | +| `CONFIG_ZMK_BATTERY_REPORT_INTERVAL` | int | Battery level report interval in seconds | 60 | + +:::note Default setting + +While `CONFIG_ZMK_BATTERY_REPORTING` is disabled by default it is implied by `CONFIG_ZMK_BLE`, thus any board with BLE enabled will have this automatically enabled unless explicitly overriden. + +::: + ### Devicetree Applies to: [`/chosen` node](https://docs.zephyrproject.org/latest/guides/dts/intro.html#aliases-and-chosen-nodes) diff --git a/docs/docs/config/system.md b/docs/docs/config/system.md index 5a5ae5a55a0..25d51940afb 100644 --- a/docs/docs/config/system.md +++ b/docs/docs/config/system.md @@ -13,13 +13,12 @@ Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/ ### General -| Config | Type | Description | Default | -| ------------------------------------ | ------ | ----------------------------------------------------------------------------- | ------- | -| `CONFIG_ZMK_KEYBOARD_NAME` | string | The name of the keyboard (max 16 characters) | | -| `CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE` | int | Milliseconds to wait after a setting change before writing it to flash memory | 60000 | -| `CONFIG_ZMK_WPM` | bool | Enable calculating words per minute | n | -| `CONFIG_HEAP_MEM_POOL_SIZE` | int | Size of the heap memory pool | 8192 | -| `CONFIG_ZMK_BATTERY_REPORT_INTERVAL` | int | Battery level report interval in seconds | 60 | +| Config | Type | Description | Default | +| ----------------------------------- | ------ | ----------------------------------------------------------------------------- | ------- | +| `CONFIG_ZMK_KEYBOARD_NAME` | string | The name of the keyboard (max 16 characters) | | +| `CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE` | int | Milliseconds to wait after a setting change before writing it to flash memory | 60000 | +| `CONFIG_ZMK_WPM` | bool | Enable calculating words per minute | n | +| `CONFIG_HEAP_MEM_POOL_SIZE` | int | Size of the heap memory pool | 8192 | ### HID From 9e8ee8684252aecca36c1e6f2403b0a9fd3ebf4f Mon Sep 17 00:00:00 2001 From: Nick Coutsos Date: Sun, 22 Oct 2023 12:05:49 -0400 Subject: [PATCH 131/160] chore(docs): Fix links to relocated files (#1975) --- docs/docs/config/battery.md | 2 +- docs/docs/config/displays.md | 4 ++-- docs/docs/config/encoders.md | 4 ++-- docs/docs/config/kscan.md | 14 +++++++------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/docs/config/battery.md b/docs/docs/config/battery.md index 7b7e9436503..c56a30efd67 100644 --- a/docs/docs/config/battery.md +++ b/docs/docs/config/battery.md @@ -48,7 +48,7 @@ Driver for reading the voltage of a battery using a Nordic nRF52's VDDH pin. Thi Applies to: `compatible = "zmk,battery-nrf-vddh"` -Definition file: [zmk/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/sensor/zmk%2Cbattery-nrf-vddh.yaml) +Definition file: [zmk/app/module/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/sensor/zmk%2Cbattery-nrf-vddh.yaml) | Property | Type | Description | | -------- | ------ | ------------------------- | diff --git a/docs/docs/config/displays.md b/docs/docs/config/displays.md index a68bf26a9b9..e22f0da8fbb 100644 --- a/docs/docs/config/displays.md +++ b/docs/docs/config/displays.md @@ -49,7 +49,7 @@ Using a dedicated thread requires more memory but prevents displays with slow up You must also configure the driver for your display. ZMK provides the following display drivers: -- [IL0323](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/display/Kconfig.il0323) +- [IL0323](https://github.com/zmkfirmware/zmk/blob/main/app/module/drivers/display/Kconfig.il0323) Zephyr provides several display drivers as well. Search for the name of your display in [Zephyr's Kconfig options](https://docs.zephyrproject.org/latest/kconfig.html) documentation. @@ -57,7 +57,7 @@ Zephyr provides several display drivers as well. Search for the name of your dis See the Devicetree bindings for your display. Here are the bindings for common displays: -- [IL0323](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/display/gooddisplay%2Cil0323.yaml) +- [IL0323](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/display/gooddisplay%2Cil0323.yaml) - [SSD1306 (i2c)](https://docs.zephyrproject.org/latest/build/dts/api/bindings/display/solomon,ssd1306fb-i2c.html) - [SSD1306 (spi)](https://docs.zephyrproject.org/latest/build/dts/api/bindings/display/solomon,ssd1306fb-spi.html) diff --git a/docs/docs/config/encoders.md b/docs/docs/config/encoders.md index f6bd6de1495..97a0cc38e95 100644 --- a/docs/docs/config/encoders.md +++ b/docs/docs/config/encoders.md @@ -11,7 +11,7 @@ See [Configuration Overview](index.md) for instructions on how to change these s ### Kconfig -Definition file: [zmk/app/drivers/sensor/ec11/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/sensor/ec11/Kconfig) +Definition file: [zmk/app/module/drivers/sensor/ec11/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/module/drivers/sensor/ec11/Kconfig) | Config | Type | Description | Default | | ------------------------------- | ---- | -------------------------------- | ------- | @@ -31,7 +31,7 @@ If `CONFIG_EC11` is enabled, exactly one of the following options must be set to Applies to: `compatible = "alps,ec11"` -Definition file: [zmk/app/drivers/zephyr/dts/bindings/sensor/alps,ec11.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/sensor/alps%2Cec11.yaml) +Definition file: [zmk/app/module/dts/bindings/sensor/alps,ec11.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/sensor/alps%2Cec11.yaml) | Property | Type | Description | Default | | ------------ | ---------- | ------------------------------------- | ------- | diff --git a/docs/docs/config/kscan.md b/docs/docs/config/kscan.md index 67c3765298a..00360c46978 100644 --- a/docs/docs/config/kscan.md +++ b/docs/docs/config/kscan.md @@ -12,7 +12,7 @@ See [Configuration Overview](index.md) for instructions on how to change these s Definition files: - [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/Kconfig) -- [zmk/app/drivers/kscan/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/kscan/Kconfig) +- [zmk/app/module/drivers/kscan/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/module/drivers/kscan/Kconfig) | Config | Type | Description | Default | | -------------------------------------- | ---- | ---------------------------------------------------- | ------- | @@ -44,7 +44,7 @@ Currently this driver does not honor the `CONFIG_ZMK_KSCAN_DEBOUNCE_*` settings. Applies to: `compatible = "zmk,kscan-gpio-demux"` -Definition file: [zmk/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/kscan/zmk%2Ckscan-gpio-demux.yaml) +Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/kscan/zmk%2Ckscan-gpio-demux.yaml) | Property | Type | Description | Default | | ----------------------- | ---------- | -------------------------------- | ------- | @@ -60,7 +60,7 @@ Keyboard scan driver where each key has a dedicated GPIO. ### Kconfig -Definition file: [zmk/app/drivers/kscan/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/kscan/Kconfig) +Definition file: [zmk/app/module/drivers/kscan/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/module/drivers/kscan/Kconfig) | Config | Type | Description | Default | | --------------------------------- | ---- | ------------------------------------------------ | ------- | @@ -70,7 +70,7 @@ Definition file: [zmk/app/drivers/kscan/Kconfig](https://github.com/zmkfirmware/ Applies to: `compatible = "zmk,kscan-gpio-direct"` -Definition file: [zmk/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/kscan/zmk%2Ckscan-gpio-direct.yaml) +Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/kscan/zmk%2Ckscan-gpio-direct.yaml) | Property | Type | Description | Default | | ------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------- | ------- | @@ -102,7 +102,7 @@ Assuming the switches connect each GPIO pin to the ground, the [GPIO flags](http Keyboard scan driver where keys are arranged on a matrix with one GPIO per row and column. -Definition file: [zmk/app/drivers/kscan/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/kscan/Kconfig) +Definition file: [zmk/app/module/drivers/kscan/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/module/drivers/kscan/Kconfig) | Config | Type | Description | Default | | ---------------------------------------------- | ----------- | ------------------------------------------------------------------------- | ------- | @@ -114,7 +114,7 @@ Definition file: [zmk/app/drivers/kscan/Kconfig](https://github.com/zmkfirmware/ Applies to: `compatible = "zmk,kscan-gpio-matrix"` -Definition file: [zmk/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/kscan/zmk%2Ckscan-gpio-matrix.yaml) +Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/kscan/zmk%2Ckscan-gpio-matrix.yaml) | Property | Type | Description | Default | | ------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------- | ----------- | @@ -284,7 +284,7 @@ Definition file: [zmk/app/dts/bindings/zmk,kscan-mock.yaml](https://github.com/z | `cols` | int | The number of columns in the composite matrix | | | `exit-after` | bool | Exit the program after running all events | false | -The `events` array should be defined using the macros from [dt-bindings/zmk/kscan_mock.h](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/kscan_mock.h). +The `events` array should be defined using the macros from [app/module/include/dt-bindings/zmk/kscan_mock.h](https://github.com/zmkfirmware/zmk/blob/main/app/module/include/dt-bindings/zmk/kscan_mock.h). ## Matrix Transform From 8d09809ef0cfb29c4481e1b31327e0866c2fb902 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 18 Oct 2023 01:19:14 +0000 Subject: [PATCH 132/160] fix(docs): Updated encoder config docs. * Update new shield guide for new sensor/encoder settings. * Add DTS section to encoder config docs. Co-authored-by: Cem Aksoylar --- docs/docs/config/encoders.md | 54 +++++++++++++++++++++++++---- docs/docs/development/new-shield.md | 13 ++++--- 2 files changed, 57 insertions(+), 10 deletions(-) diff --git a/docs/docs/config/encoders.md b/docs/docs/config/encoders.md index 97a0cc38e95..3044b392943 100644 --- a/docs/docs/config/encoders.md +++ b/docs/docs/config/encoders.md @@ -29,13 +29,55 @@ If `CONFIG_EC11` is enabled, exactly one of the following options must be set to ### Devicetree +#### Keymap Sensor Config + +For shields/boards that export a `sensors` node configuration label, both global and per-sensor settings can be set by overriding the properties there. + +To override the general settings, update them on the exported `sensors` node, e.g.: + +``` +&sensors { + triggers-per-rotation = <18>; +}; +``` + +Per sensor overrides can be added with ordered nested nodes with the correct overrides, e.g.: + +``` +&sensors { + left_config { + triggers-per-rotation = <18>; + }; + + right_config { + triggers-per-rotation = <24>; + }; +}; +``` + +:::note + +The names of the child nodes are not important, and are applied in order to the sensors listed in the `sensors` property of the sensors node. + +::: + +Applies to the node and child nodes of: `compatible = "zmk,keymap-sensors"` + +Definition file: [zmk/app/drivers/zephyr/dts/bindings/zmk,keymap-sensors.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/zmk%2Ckeymap-sensors.yaml) + +| Property | Type | Description | Default | +| ----------------------- | ---- | --------------------------------------------------------------- | ------- | +| `triggers-per-rotation` | int | Number of times to trigger the bound behavior per full rotation | | + +#### EC11 Nodes + Applies to: `compatible = "alps,ec11"` Definition file: [zmk/app/module/dts/bindings/sensor/alps,ec11.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/sensor/alps%2Cec11.yaml) -| Property | Type | Description | Default | -| ------------ | ---------- | ------------------------------------- | ------- | -| `label` | string | Unique label for the node | | -| `a-gpios` | GPIO array | GPIO connected to the encoder's A pin | | -| `b-gpios` | GPIO array | GPIO connected to the encoder's B pin | | -| `resolution` | int | Number of encoder pulses per tick | 1 | +| Property | Type | Description | Default | +| --------- | ---------- | ---------------------------------------------- | ------- | +| `label` | string | Unique label for the node | | +| `a-gpios` | GPIO array | GPIO connected to the encoder's A pin | | +| `b-gpios` | GPIO array | GPIO connected to the encoder's B pin | | +| `steps` | int | Number of encoder pulses per complete rotation | | diff --git a/docs/docs/development/new-shield.md b/docs/docs/development/new-shield.md index fa30ca38abf..0771122985b 100644 --- a/docs/docs/development/new-shield.md +++ b/docs/docs/development/new-shield.md @@ -430,31 +430,36 @@ If building locally for split boards, you may need to add these lines to the spe In your device tree file you will need to add the following lines to define the encoder sensor: ```dts -left_encoder: encoder_left { + left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; a-gpios = ; b-gpios = ; - resolution = <4>; + steps = <80>; status = "disabled"; }; ``` -Here you will have to replace PIN_A and PIN_B with the appropriate pins that your PCB utilizes for the encoder(s). For keyboards that use the Pro Micro or any of the Pro Micro replacements, Sparkfun's [Pro Micro Hookup Guide](https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/hardware-overview-pro-micro) has a pinout diagram that can be useful to determine the right pins. Reference either the blue numbers labeled "Arduino" (digital pins) or the green numbers labeled "Analog" (analog pins). For pins that are labeled as both digital and analog, refer to your specific board's .dtsi file to determine how you should refer to that pin. +Here you need to replace `PIN_A` and `PIN_B` with the appropriate pins that your PCB utilizes for the encoder(s). See [shield overlays section above](#shield-overlays) on the appropriate node label and pin number to use for GPIOs. + +The `steps` property should corresponded to the documented pulses per rotation for the encoders used on the keyboard, typically found on the datasheet of the component. If users use different encoders when they build, the value can be overridden in their keymap. Add additional encoders as necessary by duplicating the above lines, replacing `left` with whatever you would like to call your encoder, and updating the pins. Note that support for peripheral (right) side sensors over BLE is still in progress. Once you have defined the encoder sensors, you will have to add them to the list of sensors: ```dts - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; ``` In this example, a left_encoder and right_encoder are both added. Additional encoders can be added with spaces separating each, and the order they are added here determines the order in which you define their behavior in your keymap. +In addition, a default value for the number of times the sensors trigger the bound behavior per full rotation is set via the `triggers-per-rotation` property. See [Encoders Config](../config/encoders.md#devicetree) for more details. + Add the following lines to your overlay file(s) to enable the encoder: From 34c8b3f1e30725d2711d5a75cd2da8e60da7b995 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 18 Oct 2023 02:33:03 +0000 Subject: [PATCH 133/160] refactor: Update boards/shields for encoders. * Update existing boards/shields for new `steps` and `triggers-per-rotation` set up. --- app/boards/arm/bdn9/bdn9_rev2.dts | 7 ++++--- app/boards/arm/bt60/bt60.dtsi | 5 +++-- app/boards/arm/ckp/ckp.dtsi | 9 +++++---- app/boards/shields/knob_goblin/knob_goblin.overlay | 7 ++++--- app/boards/shields/kyria/kyria_common.dtsi | 7 ++++--- app/boards/shields/lily58/lily58.dtsi | 5 +++-- app/boards/shields/lotus58/lotus58.dtsi | 7 ++++--- app/boards/shields/murphpad/murphpad.keymap | 1 + app/boards/shields/murphpad/murphpad.overlay | 4 ++-- app/boards/shields/nibble/nibble.keymap | 1 + app/boards/shields/nibble/nibble.overlay | 2 +- app/boards/shields/reviung5/reviung5.overlay | 5 +++-- app/boards/shields/romac_plus/romac_plus.dtsi | 5 +++-- app/boards/shields/snap/snap.dtsi | 4 ++-- app/boards/shields/snap/snap.keymap | 1 + app/boards/shields/sofle/sofle.dtsi | 7 ++++--- .../splitkb_aurora_corne/splitkb_aurora_corne.dtsi | 7 ++++--- .../splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi | 7 ++++--- .../splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi | 11 ++++++----- app/boards/shields/tidbit/tidbit.dtsi | 10 +++++----- app/boards/shields/tidbit/tidbit.keymap | 1 + app/boards/shields/zodiark/zodiark.dtsi | 7 ++++--- 22 files changed, 69 insertions(+), 51 deletions(-) diff --git a/app/boards/arm/bdn9/bdn9_rev2.dts b/app/boards/arm/bdn9/bdn9_rev2.dts index d2d1c65cb8f..1b85067ce13 100644 --- a/app/boards/arm/bdn9/bdn9_rev2.dts +++ b/app/boards/arm/bdn9/bdn9_rev2.dts @@ -43,7 +43,7 @@ label = "LEFT_ENCODER"; a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; mid_encoder: encoder_mid { @@ -51,7 +51,7 @@ label = "MID_ENCODER"; a-gpios = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; right_encoder: encoder_right { @@ -59,7 +59,7 @@ label = "RIGHT_ENCODER"; a-gpios = <&gpioa 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -67,6 +67,7 @@ compatible = "zmk,keymap-sensors"; status = "disabled"; sensors = <>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/arm/bt60/bt60.dtsi b/app/boards/arm/bt60/bt60.dtsi index 6e4900af53c..8a270250957 100644 --- a/app/boards/arm/bt60/bt60.dtsi +++ b/app/boards/arm/bt60/bt60.dtsi @@ -22,9 +22,10 @@ zmk,matrix_transform = &default_transform; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder>; + triggers-per-rotation = <20>; }; @@ -34,7 +35,7 @@ label = "LEFT_ENCODER"; a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; diff --git a/app/boards/arm/ckp/ckp.dtsi b/app/boards/arm/ckp/ckp.dtsi index 6c52d620367..ec2bd6a87b6 100644 --- a/app/boards/arm/ckp/ckp.dtsi +++ b/app/boards/arm/ckp/ckp.dtsi @@ -26,9 +26,10 @@ zmk,battery = &vbatt; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&encoder_1>; + triggers-per-rotation = <20>; }; kscan0: kscan_0 { @@ -76,7 +77,7 @@ label = "ENCODER_ONE"; a-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; @@ -85,7 +86,7 @@ label = "ENCODER_TWO"; a-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; @@ -94,7 +95,7 @@ label = "encoder_3"; a-gpios = <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; diff --git a/app/boards/shields/knob_goblin/knob_goblin.overlay b/app/boards/shields/knob_goblin/knob_goblin.overlay index d3ba8c5be79..03051ce5820 100644 --- a/app/boards/shields/knob_goblin/knob_goblin.overlay +++ b/app/boards/shields/knob_goblin/knob_goblin.overlay @@ -39,7 +39,7 @@ label = "TOP_ENCODER"; a-gpios = <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; @@ -48,13 +48,14 @@ label = "BOTTOM_ENCODER"; a-gpios = <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&top_encoder &bottom_encoder>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/shields/kyria/kyria_common.dtsi b/app/boards/shields/kyria/kyria_common.dtsi index 2e10cd37df4..1056794d584 100644 --- a/app/boards/shields/kyria/kyria_common.dtsi +++ b/app/boards/shields/kyria/kyria_common.dtsi @@ -23,20 +23,21 @@ left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; }; right_encoder: encoder_right { compatible = "alps,ec11"; label = "RIGHT_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; // TODO: RGB node(s) diff --git a/app/boards/shields/lily58/lily58.dtsi b/app/boards/shields/lily58/lily58.dtsi index ec520f6bb8a..eb427a581ba 100644 --- a/app/boards/shields/lily58/lily58.dtsi +++ b/app/boards/shields/lily58/lily58.dtsi @@ -51,12 +51,13 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) label = "LEFT_ENCODER"; a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/shields/lotus58/lotus58.dtsi b/app/boards/shields/lotus58/lotus58.dtsi index e24d75e70d4..8b1c66f98df 100644 --- a/app/boards/shields/lotus58/lotus58.dtsi +++ b/app/boards/shields/lotus58/lotus58.dtsi @@ -50,7 +50,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7 label = "LEFT_ENCODER"; a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -59,13 +59,14 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7 label = "RIGHT_ENCODER"; a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/shields/murphpad/murphpad.keymap b/app/boards/shields/murphpad/murphpad.keymap index ccdff9f7a71..74a852a8719 100644 --- a/app/boards/shields/murphpad/murphpad.keymap +++ b/app/boards/shields/murphpad/murphpad.keymap @@ -48,6 +48,7 @@ sensors { compatible = "zmk,keymap-sensors"; sensors = <&encoder_1 &encoder_2>; + triggers-per-rotation = <20>; }; diff --git a/app/boards/shields/murphpad/murphpad.overlay b/app/boards/shields/murphpad/murphpad.overlay index 13905092e64..f175c55e1c0 100644 --- a/app/boards/shields/murphpad/murphpad.overlay +++ b/app/boards/shields/murphpad/murphpad.overlay @@ -39,7 +39,7 @@ label = "Encoder 1"; a-gpios = <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -48,7 +48,7 @@ label = "Encoder 2"; a-gpios = <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; diff --git a/app/boards/shields/nibble/nibble.keymap b/app/boards/shields/nibble/nibble.keymap index 5b90f6c19ae..4cb6f5b021a 100644 --- a/app/boards/shields/nibble/nibble.keymap +++ b/app/boards/shields/nibble/nibble.keymap @@ -12,6 +12,7 @@ sensors { compatible = "zmk,keymap-sensors"; sensors = <&encoder_1>; + triggers-per-rotation = <20>; }; keymap { diff --git a/app/boards/shields/nibble/nibble.overlay b/app/boards/shields/nibble/nibble.overlay index cd1176401b7..43be6c766fc 100644 --- a/app/boards/shields/nibble/nibble.overlay +++ b/app/boards/shields/nibble/nibble.overlay @@ -18,7 +18,7 @@ label = "Encoder 1"; a-gpios = <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; diff --git a/app/boards/shields/reviung5/reviung5.overlay b/app/boards/shields/reviung5/reviung5.overlay index 24b0f582b0e..8b885245485 100644 --- a/app/boards/shields/reviung5/reviung5.overlay +++ b/app/boards/shields/reviung5/reviung5.overlay @@ -43,12 +43,13 @@ label = "encoder"; a-gpios = <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "okay"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&encoder>; + triggers-per-rotation = <20>; }; }; \ No newline at end of file diff --git a/app/boards/shields/romac_plus/romac_plus.dtsi b/app/boards/shields/romac_plus/romac_plus.dtsi index 71ec87b2b94..5324174b54f 100644 --- a/app/boards/shields/romac_plus/romac_plus.dtsi +++ b/app/boards/shields/romac_plus/romac_plus.dtsi @@ -43,13 +43,14 @@ RC(3,0) RC(3,1) RC(3,2) label = "LEFT_ENCODER"; a-gpios = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder>; + triggers-per-rotation = <20>; }; // TODO: per-key RGB node(s)? diff --git a/app/boards/shields/snap/snap.dtsi b/app/boards/shields/snap/snap.dtsi index a374ad1768b..7523f35b06c 100644 --- a/app/boards/shields/snap/snap.dtsi +++ b/app/boards/shields/snap/snap.dtsi @@ -16,14 +16,14 @@ left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; }; right_encoder: encoder_right { compatible = "alps,ec11"; label = "RIGHT_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; }; diff --git a/app/boards/shields/snap/snap.keymap b/app/boards/shields/snap/snap.keymap index 7c750f9f14c..febaff97bba 100644 --- a/app/boards/shields/snap/snap.keymap +++ b/app/boards/shields/snap/snap.keymap @@ -13,6 +13,7 @@ sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; keymap { diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index 71dc04d87a1..4917ca321ed 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -50,7 +50,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) label = "LEFT_ENCODER"; a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -59,13 +59,14 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) label = "RIGHT_ENCODER"; a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi index a1b7b64382c..3eefdc6aeed 100644 --- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi +++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi @@ -48,7 +48,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 left_encoder: left_encoder { compatible = "alps,ec11"; label = "L_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; a-gpios = <&pro_micro 4 GPIO_PULL_UP>; @@ -58,16 +58,17 @@ 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 right_encoder: right_encoder { compatible = "alps,ec11"; label = "R_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; a-gpios = <&pro_micro 19 GPIO_PULL_UP>; b-gpios = <&pro_micro 18 GPIO_PULL_UP>; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi index 908356c757b..06b3ef3955c 100644 --- a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi +++ b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi @@ -34,7 +34,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,1) RC(4,10) RC(3,6) RC(3,7) left_encoder: left_encoder { compatible = "alps,ec11"; label = "L_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; a-gpios = <&pro_micro 5 GPIO_PULL_UP>; @@ -44,16 +44,17 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,1) RC(4,10) RC(3,6) RC(3,7) right_encoder: right_encoder { compatible = "alps,ec11"; label = "R_ENCODER"; - resolution = <4>; + steps = <80>; status = "disabled"; a-gpios = <&pro_micro 18 GPIO_PULL_UP>; b-gpios = <&pro_micro 19 GPIO_PULL_UP>; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi index ab568a0986d..c5483af5476 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi @@ -28,34 +28,35 @@ left_encoder1: left_encoder1 { compatible = "alps,ec11"; label = "L_ENCODER1"; - resolution = <4>; + steps = <80>; status = "disabled"; }; left_encoder2: left_encoder2 { compatible = "alps,ec11"; label = "L_ENCODER2"; - resolution = <4>; + steps = <80>; status = "disabled"; }; right_encoder1: right_encoder1 { compatible = "alps,ec11"; label = "R_ENCODER1"; - resolution = <4>; + steps = <80>; status = "disabled"; }; right_encoder2: right_encoder2 { compatible = "alps,ec11"; label = "R_ENCODER2"; - resolution = <4>; + steps = <80>; status = "disabled"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder1 &right_encoder1>; + triggers-per-rotation = <20>; }; }; diff --git a/app/boards/shields/tidbit/tidbit.dtsi b/app/boards/shields/tidbit/tidbit.dtsi index fb84c89ed41..c7af200137d 100644 --- a/app/boards/shields/tidbit/tidbit.dtsi +++ b/app/boards/shields/tidbit/tidbit.dtsi @@ -49,7 +49,7 @@ label = "Top Row Encoder"; a-gpios = <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -58,7 +58,7 @@ label = "Encoder 1"; a-gpios = <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -67,7 +67,7 @@ label = "Encoder 2"; a-gpios = <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -76,7 +76,7 @@ label = "Encoder 3"; a-gpios = <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -85,7 +85,7 @@ label = "Encoder 4"; a-gpios = <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; b-gpios = <&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; diff --git a/app/boards/shields/tidbit/tidbit.keymap b/app/boards/shields/tidbit/tidbit.keymap index 2e415bf8f4d..a98a2eaa28e 100644 --- a/app/boards/shields/tidbit/tidbit.keymap +++ b/app/boards/shields/tidbit/tidbit.keymap @@ -17,6 +17,7 @@ sensors { compatible = "zmk,keymap-sensors"; sensors = <&encoder_1_top_row>; + triggers-per-rotation = <20>; }; keymap { diff --git a/app/boards/shields/zodiark/zodiark.dtsi b/app/boards/shields/zodiark/zodiark.dtsi index cda0b1a6dae..66ebb7b47f9 100644 --- a/app/boards/shields/zodiark/zodiark.dtsi +++ b/app/boards/shields/zodiark/zodiark.dtsi @@ -50,7 +50,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) R label = "LEFT_ENCODER"; a-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; @@ -59,13 +59,14 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) R label = "RIGHT_ENCODER"; a-gpios = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <4>; + steps = <80>; status = "disabled"; }; - sensors { + sensors: sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; }; From c2d220fbdf2c9ae6957d080a47545aa28e3ec275 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 8 Nov 2023 22:05:53 +0000 Subject: [PATCH 134/160] refactor(hid): Use proper defines for HID values. * Add report ID defines and use them consistently. * Add defines for main item value flags to avoid magic constants. --- app/include/zmk/hid.h | 51 ++++++++++++++++++++++++++++++++----------- app/src/hid.c | 5 +++-- app/src/hog.c | 4 ++-- 3 files changed, 43 insertions(+), 17 deletions(-) diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h index ab42adaa13e..da6bfa65a68 100644 --- a/app/include/zmk/hid.h +++ b/app/include/zmk/hid.h @@ -15,13 +15,43 @@ #define ZMK_HID_KEYBOARD_NKRO_MAX_USAGE HID_USAGE_KEY_KEYPAD_EQUAL -#define COLLECTION_REPORT 0x03 +// See https://www.usb.org/sites/default/files/hid1_11.pdf section 6.2.2.4 Main Items + +#define ZMK_HID_MAIN_VAL_DATA (0x00 << 0) +#define ZMK_HID_MAIN_VAL_CONST (0x01 << 0) + +#define ZMK_HID_MAIN_VAL_ARRAY (0x00 << 1) +#define ZMK_HID_MAIN_VAL_VAR (0x01 << 1) + +#define ZMK_HID_MAIN_VAL_ABS (0x00 << 2) +#define ZMK_HID_MAIN_VAL_REL (0x01 << 2) + +#define ZMK_HID_MAIN_VAL_NO_WRAP (0x00 << 3) +#define ZMK_HID_MAIN_VAL_WRAP (0x01 << 3) + +#define ZMK_HID_MAIN_VAL_LIN (0x00 << 4) +#define ZMK_HID_MAIN_VAL_NON_LIN (0x01 << 4) + +#define ZMK_HID_MAIN_VAL_PREFERRED (0x00 << 5) +#define ZMK_HID_MAIN_VAL_NO_PREFERRED (0x01 << 5) + +#define ZMK_HID_MAIN_VAL_NO_NULL (0x00 << 6) +#define ZMK_HID_MAIN_VAL_NULL (0x01 << 6) + +#define ZMK_HID_MAIN_VAL_NON_VOL (0x00 << 7) +#define ZMK_HID_MAIN_VAL_VOL (0x01 << 7) + +#define ZMK_HID_MAIN_VAL_BIT_FIELD (0x00 << 8) +#define ZMK_HID_MAIN_VAL_BUFFERED_BYTES (0x01 << 8) + +#define ZMK_HID_REPORT_ID_KEYBOARD 0x01 +#define ZMK_HID_REPORT_ID_CONSUMER 0x02 static const uint8_t zmk_hid_report_desc[] = { HID_USAGE_PAGE(HID_USAGE_GEN_DESKTOP), HID_USAGE(HID_USAGE_GD_KEYBOARD), HID_COLLECTION(HID_COLLECTION_APPLICATION), - HID_REPORT_ID(0x01), + HID_REPORT_ID(ZMK_HID_REPORT_ID_KEYBOARD), HID_USAGE_PAGE(HID_USAGE_KEY), HID_USAGE_MIN8(HID_USAGE_KEY_KEYBOARD_LEFTCONTROL), HID_USAGE_MAX8(HID_USAGE_KEY_KEYBOARD_RIGHT_GUI), @@ -30,14 +60,12 @@ static const uint8_t zmk_hid_report_desc[] = { HID_REPORT_SIZE(0x01), HID_REPORT_COUNT(0x08), - /* INPUT (Data,Var,Abs) */ - HID_INPUT(0x02), + HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), HID_USAGE_PAGE(HID_USAGE_KEY), HID_REPORT_SIZE(0x08), HID_REPORT_COUNT(0x01), - /* INPUT (Cnst,Var,Abs) */ - HID_INPUT(0x03), + HID_INPUT(ZMK_HID_MAIN_VAL_CONST | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), HID_USAGE_PAGE(HID_USAGE_KEY), @@ -48,8 +76,7 @@ static const uint8_t zmk_hid_report_desc[] = { HID_USAGE_MAX8(ZMK_HID_KEYBOARD_NKRO_MAX_USAGE), HID_REPORT_SIZE(0x01), HID_REPORT_COUNT(ZMK_HID_KEYBOARD_NKRO_MAX_USAGE + 1), - /* INPUT (Data,Ary,Abs) */ - HID_INPUT(0x02), + HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), #elif IS_ENABLED(CONFIG_ZMK_HID_REPORT_TYPE_HKRO) HID_LOGICAL_MIN8(0x00), HID_LOGICAL_MAX16(0xFF, 0x00), @@ -57,8 +84,7 @@ static const uint8_t zmk_hid_report_desc[] = { HID_USAGE_MAX8(0xFF), HID_REPORT_SIZE(0x08), HID_REPORT_COUNT(CONFIG_ZMK_HID_KEYBOARD_REPORT_SIZE), - /* INPUT (Data,Ary,Abs) */ - HID_INPUT(0x00), + HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_ARRAY | ZMK_HID_MAIN_VAL_ABS), #else #error "A proper HID report type must be selected" #endif @@ -67,7 +93,7 @@ static const uint8_t zmk_hid_report_desc[] = { HID_USAGE_PAGE(HID_USAGE_CONSUMER), HID_USAGE(HID_USAGE_CONSUMER_CONSUMER_CONTROL), HID_COLLECTION(HID_COLLECTION_APPLICATION), - HID_REPORT_ID(0x02), + HID_REPORT_ID(ZMK_HID_REPORT_ID_CONSUMER), HID_USAGE_PAGE(HID_USAGE_CONSUMER), #if IS_ENABLED(CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC) @@ -86,8 +112,7 @@ static const uint8_t zmk_hid_report_desc[] = { #error "A proper consumer HID report usage range must be selected" #endif HID_REPORT_COUNT(CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE), - /* INPUT (Data,Ary,Abs) */ - HID_INPUT(0x00), + HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_ARRAY | ZMK_HID_MAIN_VAL_ABS), HID_END_COLLECTION, }; diff --git a/app/src/hid.c b/app/src/hid.c index 2a6b5d39da2..58e5824d2e4 100644 --- a/app/src/hid.c +++ b/app/src/hid.c @@ -12,9 +12,10 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include static struct zmk_hid_keyboard_report keyboard_report = { - .report_id = 1, .body = {.modifiers = 0, ._reserved = 0, .keys = {0}}}; + .report_id = ZMK_HID_REPORT_ID_KEYBOARD, .body = {.modifiers = 0, ._reserved = 0, .keys = {0}}}; -static struct zmk_hid_consumer_report consumer_report = {.report_id = 2, .body = {.keys = {0}}}; +static struct zmk_hid_consumer_report consumer_report = {.report_id = ZMK_HID_REPORT_ID_CONSUMER, + .body = {.keys = {0}}}; // Keep track of how often a modifier was pressed. // Only release the modifier if the count is 0. diff --git a/app/src/hog.c b/app/src/hog.c index 930714b092a..9ccfd9d2c0e 100644 --- a/app/src/hog.c +++ b/app/src/hog.c @@ -47,12 +47,12 @@ enum { }; static struct hids_report input = { - .id = 0x01, + .id = ZMK_HID_REPORT_ID_KEYBOARD, .type = HIDS_INPUT, }; static struct hids_report consumer_input = { - .id = 0x02, + .id = ZMK_HID_REPORT_ID_CONSUMER, .type = HIDS_INPUT, }; From 5b49bc10cd7251bb9a90c018410abfc557fa0e9c Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 3 Nov 2023 23:20:42 -0700 Subject: [PATCH 135/160] feat(blog): Show all posts on sidebar --- docs/docusaurus.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 701b5b997bb..20e6a75c90f 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -146,6 +146,7 @@ module.exports = { showReadingTime: true, // Please change this to your repo. editUrl: "https://github.com/zmkfirmware/zmk/edit/main/docs/", + blogSidebarCount: "ALL", }, theme: { customCss: [ From b80c0be0cedf42b58be2fc431b2a673ab9760c64 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 3 Nov 2023 23:20:23 -0700 Subject: [PATCH 136/160] feat(blog): Add keymap editor post for spotlight series Co-authored-by: Nick Coutsos --- docs/blog/2023-11-09-keymap-editor.md | 109 ++++++++++++++++++ .../editor-screenshot-dark.png | Bin 0 -> 74997 bytes .../editor-screenshot-light.png | Bin 0 -> 75097 bytes 3 files changed, 109 insertions(+) create mode 100644 docs/blog/2023-11-09-keymap-editor.md create mode 100644 docs/blog/assets/2023-11-09-keymap-editor/editor-screenshot-dark.png create mode 100644 docs/blog/assets/2023-11-09-keymap-editor/editor-screenshot-light.png diff --git a/docs/blog/2023-11-09-keymap-editor.md b/docs/blog/2023-11-09-keymap-editor.md new file mode 100644 index 00000000000..1fe3b86772d --- /dev/null +++ b/docs/blog/2023-11-09-keymap-editor.md @@ -0,0 +1,109 @@ +--- +title: "Community Spotlight Series #1: Keymap Editor" +author: Cem Aksoylar +author_title: Documentation maintainer +author_url: https://github.com/caksoylar +author_image_url: https://avatars.githubusercontent.com/u/7876996 +tags: [keyboards, firmware, community] +--- + +import ThemedImage from '@theme/ThemedImage'; + + + +This blog post is the first in a series of posts where we highlight projects within the ZMK ecosystem that we think are cool and that the users might benefit from knowing about them. We are starting the series with a big one, [Keymap Editor] by [Nick Coutsos](https://github.com/nickcoutsos)! + +In the rest of the post we leave it to Nick himself to introduce the project, detail his goals and motivation in developing such a tool, and talk about the future of the project. Stay tuned for future installments in the series! + +## What is Keymap Editor? + +_[Keymap Editor]_ is a web based graphical editor for ZMK keymaps. It provides a visual way to manage the contents of your keymap and if nothing else offers two critical features: + +1. Automatic formatting of the keymap file, so that bindings arrays remain readable +2. Searchable behaviors, keycodes, commands, etc, so you won't have to remember if it's `LCTL` or `LCTRL` (I just had to double check myself and I guessed wrong, apparently) + +## What can Keymap Editor do? + +- Render [devicetree keymaps](/docs/features/keymaps) using pre-defined, auto-generated, or side-loadable keyboard layouts +- Integrate with a GitHub repo to streamline firmware builds, or FileSystem/Clipboard if you'd still rather build locally +- Edit [combos](/docs/features/combos), [behaviors](/docs/behaviors/key-press), [macros](/docs/behaviors/macros), [conditional layers](/docs/features/conditional-layers) and [rotary encoder bindings](/docs/behaviors/sensor-rotate) +- Manage references: moving a layer or renaming a behavior will look for references throughout your keymap and update them. + +But check back regularly, because I update pretty often. A recent significant achievement was enabling [parameterized macros](/docs/behaviors/macros#parameterized-macros) and tying it in with my existing parameter type resolution so, yeah, you can finally create that reusable macro combining bluetooth profile selection with RGB backlight colour. Or use it for an actual useful thing, even. _(See also: [Using Parameterized Macros in Keymap Editor](https://github.com/nickcoutsos/keymap-editor/wiki/Using-Parameterized-Macros-in-Keymap-Editor))_ + +My goals are, broadly: + +- **Treat code as a first-class entity:** as long as ZMK keymaps are described in devicetree code then an editor needs to produce readable devicetree code. +- **Flexibly support ZMK features:** use of any ZMK keymap feature should theoretically be achievable within the app. In some cases this can mean more initial setup _(See also: [my thoughts on implementing "autoshift"](https://github.com/nickcoutsos/keymap-editor/wiki/Autoshift-using-ZMK-behaviors))_ but having that foundation makes its easier to add shortcuts and niceties — something I do quite often now. +- **Don't get in the way of not-yet-supported features:** If a new ZMK feature is released and the app isn't able to add it natively, you can always edit your keymap file directly. While the app may not _recognize_ the new features, further changes through the app should not break your keymap. + +## History of Keymap Editor + +When I started writing Keymap Editor I had a handwired Dactyl variant running QMK. Manually editing keymap code was fine, but keeping things readable was important to me, and automating that was the best way to ensure consistency. Programmatically modifying source code was beyond me at the time so the first version persisted keymap data in JSON and spat out formatted versions of both the JSON and C keymaps. + +After switching to ZMK I added a few more features, I guess as a pandemic project, and then gradually migrated from generating a templated keymap file to manipulating devicetree syntax directly, and that has made a big difference in adding new ZMK features. + +## Why am I doing this? + +It started out as a useful tool for me. I shared it with the ZMK community and gained a little traction, and then apparently quite a bit of traction — turns out it's useful for a lot of people. + +I'm a software developer because I enjoy building things. Much of my day-to-day work isn't user facing, so seeing how helpful the keymap editor has been for people in the ZMK community is a big motivator to keep improving it. + +## Future plans + +### Runtime updates + +Streamlining the keymap update process is probably top of mind for most users, but that involves a really big _firmware_ feature, and I'm the wrong person to tackle it. + +That said, once there's a protocol I would _absolutely_ be down to integrate it as an additional keymap source. Being able to pull data directly from the keyboard should unlock a lot of possibilities and ease some of the constraints imposed by using devicetree code as a medium. + +### Simplifying behavior use + +I think a lot of people would like to see the concept of behaviors abstracted away for new users and to prompt them with + +- _"When the key is tapped..."_, +- _"When the key is held..."_, +- _"When the key is double-tapped..."_ and so on. + +Users who are less familiar with ZMK's behaviors and how they are composed may find these prompts to be more intuitive, and their answers could be mapped to an appropriate combination of behaviors managed internally by an editor. + +### Uh, what else? + +This has been long enough already, if you're looking for a feature I haven't mentioned don't assume I won't add it. Feel free to make feature requests on the GitHub repo, and I'd be happy to discuss it! + +## About Me And My Keebs + +I like computers and write software. Many in this field enjoy using mechanical +keyboards for their feel or aesthetics, but what piqued my interest was the +Dactyl keyboard. I think, ergonomics aside, I'm more interested in the DIY/maker +aspect than the collecting of keyboards and switches. + +So [I made a Dactyl](https://github.com/nickcoutsos/dactyl-flatpacked/), and +then [I made another Dactyl](https://github.com/nickcoutsos/dactyl-deskmount/) +and I made a third Dactyl that isn't interesting enough to photograph, but now +I'm using ZMK so I left room for 18650 cells. + +That last Dactyl (with MX browns and a cheap blank XDA keycap set) serves me +well the eight or so hours a day I'll spend at my desk, but I also spend a good +deal of time computing on my couch where I'll use... my Macbook's built-in +keyboard. + +In case that's not surprising enough I'll leave you with this: despite all of +the work and testing I've put into the keymap editor project, I've only updated +an actual keymap once in the last year. + +Thank you and good night. + +## More information + +- [Keymap Editor Wiki](https://github.com/nickcoutsos/keymap-editor/wiki) +- [Keymap Editor Discussions](https://github.com/nickcoutsos/keymap-editor/discussions) +- (YouTube video) [Ben Frain's overview of the Keymap Editor](https://www.youtube.com/watch?v=Vy7IoQAe3oU) + +[Keymap Editor]: http://nickcoutsos.github.io/keymap-editor diff --git a/docs/blog/assets/2023-11-09-keymap-editor/editor-screenshot-dark.png b/docs/blog/assets/2023-11-09-keymap-editor/editor-screenshot-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..166edf8ae806520abd95ab0eb7889e3b64fcc1c1 GIT binary patch literal 74997 zcmbTd1yEaE_b(iv6t_Z)yB2pRI23pH;!-G0@nFSDad(0hXz^mjp|}QjD+PjEus}<1 zc%Jv2|9s!fow@g(nM`ul-e>QnzqPaWKGE8m%6Qlm*Z=?kPvw<@E&zZ71OU*#Vxl1_ z_2(ts008QZwz|F|DLp5jtR@K+GrO3gtn<&mfB)|8?keaTNY;Du$6Il*3-t64^2=-A z-#>_$bn{577nD{ADr!b2XLk1ua7n7rycGIUT`#3>T=KP=l%A{eNB{TsE+GXST27Ie z#B>T~-fs=fntsSonZKzrKx3_l~dBijGOGK3Q5)$%q3QPGEbzi^n`ThI1kfQG7 z^xWt;bZBH;)!3FrKt{vV-U$Q_ii&sf^o5js@e7Ob@cYo--Rl$b@jW)ZJB+?lxr z9ZP2=18Wbj07fq1(2t3E#pQWREc!OCR`zd_GV=NdM=md~5>m54ejyr$7Q(MISeBNO zvmk~R_5u=$oD#}>8YY}VKr2@-2~9Oo8I_m(5^L)lGFoPQs)j{nmE)7sm357!6}2il zX62Q2W{#dRD!QVo>MN^j^NUM5rZz^l?yt0rz>#rjIR$J&at>}FK3$8N`sR(FzhY9d zO>La{l=Ur~K@~L()!&+0JA0&bRe=f`{=pHw1H*FK=AJ%5M<=HT2S+CM9$_Ejc|>LT zGz*!<-=4!SPR}mDA3nnN4uy@HzxBc?Un(yyuaPnc(efGr?U!DP$dfZmNm}&>N5m+o z8wluDa;s+Ay1bRJ8k2Td<5Y@w^zb^p_!E|QM9rm5FJSEu36pv~6A&KDDB{E_<;!dM zTE=OUT|Pp^W9!%cy^i-bb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git a/docs/blog/assets/2023-11-09-keymap-editor/editor-screenshot-light.png b/docs/blog/assets/2023-11-09-keymap-editor/editor-screenshot-light.png new file mode 100644 index 0000000000000000000000000000000000000000..cdaae5c799da8f63a5a4d1af865e63441c949049 GIT binary patch literal 75097 zcmbTdby!qg)HggJ3Q8*>jdTeJNHa)xNh1j~OUu{S zx4gXk1bO)O?c3wyXMI-@7uR;i;IghGczAQemp$c78MmGB_-WBIZmh z#>K_i+uL(0rZNPmqK8L?LCVFljkd&mvd{&hQ1rSN7w1qM+%MJr{}luovX3AiFE|r zGht_9amG1n`&;7);_MJMe{R_w)dM@3I9#b+@AnpccDLK+#=KlB@Rh9)O}iyL6-hQpPh(4aCtm;RK+t$v5@?#3V6 z1+%l!V`KgOW8&r`iH(|-{l58K_T#G!-BXz@V=)_urJyh$8yA=Uxx%=F#GYTjhUUtr zBjX1ESWJ{E@-liK7xue@FzOEo%)Ke4EXBUN{NH^n&JGI;Bl%-CF8Cyg@7>E0&yh3a zOHV;I<2@wJ6XO4Yub3O`X-fNr<=Hbz*6|o(}r}# zVu)BX^1D){m(?J)BzuOLaq6?JG8{}%uh#NsPJxv&X3vbbqj$W%D;BZChS4w49h?xS ztZw63b^l?;!j!v#0*3Z!QiRYeM+i3kiI?ZK-*?T77GeE4Q!v6p9QmKiIVbzI?deX2 z+0N zUhX+&UK#1g_Rd-t0O&Fle47IsWazW*(<>X+6Xs@oWW2Yz{A9>axV)z^i^K6}W6q8p z2JM>EeSqav{b`F_r`?|gvc*7ap@ArbukcZh(TZ;sk&yVfk@owSq=MxbX-vRW(G}0E ziuB8XQHT@?)wAzHL0Z^MHBO65y6>TjkMt?C-jgLfx{euLL3N&fz{p7>bqmy7?Dn?M z8OQ1^vaoohD#8Sdbi2mqoDA70mzVS;ISG3>Vs8DG5CACPE_w&_K5F+UAEDgXQ>O<; z=X9_!KFZN(D~@Z-k#*42n;|n&?;ZOF0K95+2hLhYp^F4=`p)(IGNP(wUa?eoYW*|` z70xPg^OU1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puzn(d6r zHjGtcU;OS@TPoS7KhzbCG~;YIqG$iH&Er$wFnf(J3+8ZTu#q+CZ38oEZev;RBUwDh zWTx|QU(z#Y*1bxu_au_G=O=K3p8wX&bh$aN(XpUImg8N?wIRqr*WQM2V4v z)p}lAd5O&6b00N@t~L#ZOB1tR6pD~|6UzrB3Q^>#)8=Dj!;0;kF`>61cAp6l%>u!j zv@~H?kDm&0e6*haWy`Rrd^lA4@#mHS6+Ua6eP@Hvirke#8K1`QT357be(b7SE<31? z+@jLnKBBGWJ3WSIF?$<3ehm3_M0Jy^Ht4kFhbwGn_n;B(i5YVnc8maXTj|}TABU)Z zmbxMKtI8VQAZpXWe8)CBEzJ0z0~oGJC+NF1ML^HB0!D2mNueV7n7?s2j5C3tsQzw)MWSbn2XNv& zJHUD0jyLAoW}6HZeMy?#l*S}5fa+Gm`zPY0boOd z!f@?uCm30cPZhWRxZ8h9_gow;^~(?dp!eH}blLLH-T#+GY2%vVCAmY#TYsJzflLkR I^qph>14ln7O8@`> literal 0 HcmV?d00001 From 91aa3378f32f5688329a663fdaba4772e069d548 Mon Sep 17 00:00:00 2001 From: Chris Andreae Date: Tue, 14 Nov 2023 03:04:04 +0900 Subject: [PATCH 137/160] feat(usb): Add boot protocol support * USB boot protocol support * Use a single definition of a boot report, used for regular reports in non-6KRO, and for rollover in all branches. * Handle gaps in the zmk report when producing a boot report in HKRO mode. For .example, if it was 8KRO, it would be possible to have the state 0 0 0 0 0 0 0 17 (by pressing 8 keys, and letting go of the first 7). Copying the first 6 bytes would not show up the single pressed key. * Disable usb status change and callback on SOF events: SOF events were introduced by the boot protocol changes, and required internally by Zephyr's idle support, but are unused within ZMK itself. Ignore them in the usb status callback. --------- Co-authored-by: Andrew Childs --- app/Kconfig | 6 ++- app/include/zmk/hid.h | 28 +++++++++--- app/include/zmk/usb_hid.h | 6 ++- app/src/endpoints.c | 10 ++--- app/src/hid.c | 92 +++++++++++++++++++++++++++++++++++++++ app/src/usb.c | 14 ++++++ app/src/usb_hid.c | 88 ++++++++++++++++++++++++++++++++++++- 7 files changed, 229 insertions(+), 15 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 0dd9316a2a7..798cb7855d5 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -103,6 +103,11 @@ config USB_NUMOF_EP_WRITE_RETRIES config USB_HID_POLL_INTERVAL_MS default 1 +config ZMK_USB_BOOT + bool "USB Boot Protocol Support" + default y + select USB_HID_BOOT_PROTOCOL + select USB_DEVICE_SOF #ZMK_USB endif @@ -575,4 +580,3 @@ osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.shield" source "Kconfig.zephyr" - diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h index da6bfa65a68..afe9210199f 100644 --- a/app/include/zmk/hid.h +++ b/app/include/zmk/hid.h @@ -116,12 +116,24 @@ static const uint8_t zmk_hid_report_desc[] = { HID_END_COLLECTION, }; -// struct zmk_hid_boot_report -// { -// uint8_t modifiers; -// uint8_t _unused; -// uint8_t keys[6]; -// } __packed; +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + +#define HID_ERROR_ROLLOVER 0x1 +#define HID_BOOT_KEY_LEN 6 + +#if IS_ENABLED(CONFIG_ZMK_HID_REPORT_TYPE_HKRO) && \ + CONFIG_ZMK_HID_KEYBOARD_REPORT_SIZE == HID_BOOT_KEY_LEN +typedef struct zmk_hid_keyboard_report_body zmk_hid_boot_report_t; +#else +struct zmk_hid_boot_report { + zmk_mod_flags_t modifiers; + uint8_t _reserved; + uint8_t keys[HID_BOOT_KEY_LEN]; +} __packed; + +typedef struct zmk_hid_boot_report zmk_hid_boot_report_t; +#endif +#endif struct zmk_hid_keyboard_report_body { zmk_mod_flags_t modifiers; @@ -179,3 +191,7 @@ bool zmk_hid_is_pressed(uint32_t usage); struct zmk_hid_keyboard_report *zmk_hid_get_keyboard_report(); struct zmk_hid_consumer_report *zmk_hid_get_consumer_report(); + +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) +zmk_hid_boot_report_t *zmk_hid_get_boot_report(); +#endif diff --git a/app/include/zmk/usb_hid.h b/app/include/zmk/usb_hid.h index 1748835eef2..777f2b48a03 100644 --- a/app/include/zmk/usb_hid.h +++ b/app/include/zmk/usb_hid.h @@ -6,4 +6,8 @@ #pragma once -int zmk_usb_hid_send_report(const uint8_t *report, size_t len); \ No newline at end of file +#include + +int zmk_usb_hid_send_keyboard_report(); +int zmk_usb_hid_send_consumer_report(); +void zmk_usb_hid_set_protocol(uint8_t protocol); diff --git a/app/src/endpoints.c b/app/src/endpoints.c index 138e790fe72..10357d4e02d 100644 --- a/app/src/endpoints.c +++ b/app/src/endpoints.c @@ -121,12 +121,10 @@ struct zmk_endpoint_instance zmk_endpoints_selected(void) { } static int send_keyboard_report(void) { - struct zmk_hid_keyboard_report *keyboard_report = zmk_hid_get_keyboard_report(); - switch (current_instance.transport) { #if IS_ENABLED(CONFIG_ZMK_USB) case ZMK_TRANSPORT_USB: { - int err = zmk_usb_hid_send_report((uint8_t *)keyboard_report, sizeof(*keyboard_report)); + int err = zmk_usb_hid_send_keyboard_report(); if (err) { LOG_ERR("FAILED TO SEND OVER USB: %d", err); } @@ -136,6 +134,7 @@ static int send_keyboard_report(void) { #if IS_ENABLED(CONFIG_ZMK_BLE) case ZMK_TRANSPORT_BLE: { + struct zmk_hid_keyboard_report *keyboard_report = zmk_hid_get_keyboard_report(); int err = zmk_hog_send_keyboard_report(&keyboard_report->body); if (err) { LOG_ERR("FAILED TO SEND OVER HOG: %d", err); @@ -150,12 +149,10 @@ static int send_keyboard_report(void) { } static int send_consumer_report(void) { - struct zmk_hid_consumer_report *consumer_report = zmk_hid_get_consumer_report(); - switch (current_instance.transport) { #if IS_ENABLED(CONFIG_ZMK_USB) case ZMK_TRANSPORT_USB: { - int err = zmk_usb_hid_send_report((uint8_t *)consumer_report, sizeof(*consumer_report)); + int err = zmk_usb_hid_send_consumer_report(); if (err) { LOG_ERR("FAILED TO SEND OVER USB: %d", err); } @@ -165,6 +162,7 @@ static int send_consumer_report(void) { #if IS_ENABLED(CONFIG_ZMK_BLE) case ZMK_TRANSPORT_BLE: { + struct zmk_hid_consumer_report *consumer_report = zmk_hid_get_consumer_report(); int err = zmk_hog_send_consumer_report(&consumer_report->body); if (err) { LOG_ERR("FAILED TO SEND OVER HOG: %d", err); diff --git a/app/src/hid.c b/app/src/hid.c index 58e5824d2e4..689a2361e13 100644 --- a/app/src/hid.c +++ b/app/src/hid.c @@ -17,6 +17,13 @@ static struct zmk_hid_keyboard_report keyboard_report = { static struct zmk_hid_consumer_report consumer_report = {.report_id = ZMK_HID_REPORT_ID_CONSUMER, .body = {.keys = {0}}}; +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + +static zmk_hid_boot_report_t boot_report = {.modifiers = 0, ._reserved = 0, .keys = {0}}; +static uint8_t keys_held = 0; + +#endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ + // Keep track of how often a modifier was pressed. // Only release the modifier if the count is 0. static int explicit_modifier_counts[8] = {0, 0, 0, 0, 0, 0, 0, 0}; @@ -85,15 +92,58 @@ int zmk_hid_unregister_mods(zmk_mod_flags_t modifiers) { return ret; } +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + +static zmk_hid_boot_report_t *boot_report_rollover(uint8_t modifiers) { + boot_report.modifiers = modifiers; + for (int i = 0; i < HID_BOOT_KEY_LEN; i++) { + boot_report.keys[i] = HID_ERROR_ROLLOVER; + } + return &boot_report; +} + +#endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ + #if IS_ENABLED(CONFIG_ZMK_HID_REPORT_TYPE_NKRO) #define TOGGLE_KEYBOARD(code, val) WRITE_BIT(keyboard_report.body.keys[code / 8], code % 8, val) +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) +zmk_hid_boot_report_t *zmk_hid_get_boot_report() { + if (keys_held > HID_BOOT_KEY_LEN) { + return boot_report_rollover(keyboard_report.body.modifiers); + } + + boot_report.modifiers = keyboard_report.body.modifiers; + memset(&boot_report.keys, 0, HID_BOOT_KEY_LEN); + int ix = 0; + uint8_t base_code = 0; + for (int i = 0; i < (ZMK_HID_KEYBOARD_NKRO_MAX_USAGE + 1) / 8; ++i) { + if (ix == keys_held) { + break; + } + if (!keyboard_report.body.keys[i]) { + continue; + } + base_code = i * 8; + for (int j = 0; j < 8; ++j) { + if (keyboard_report.body.keys[i] & BIT(j)) { + boot_report.keys[ix++] = base_code + j; + } + } + } + return &boot_report; +} +#endif + static inline int select_keyboard_usage(zmk_key_t usage) { if (usage > ZMK_HID_KEYBOARD_NKRO_MAX_USAGE) { return -EINVAL; } TOGGLE_KEYBOARD(usage, 1); +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + ++keys_held; +#endif return 0; } @@ -102,6 +152,9 @@ static inline int deselect_keyboard_usage(zmk_key_t usage) { return -EINVAL; } TOGGLE_KEYBOARD(usage, 0); +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + --keys_held; +#endif return 0; } @@ -125,13 +178,52 @@ static inline bool check_keyboard_usage(zmk_key_t usage) { } \ } +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) +zmk_hid_boot_report_t *zmk_hid_get_boot_report() { + if (keys_held > HID_BOOT_KEY_LEN) { + return boot_report_rollover(keyboard_report.body.modifiers); + } + +#if CONFIG_ZMK_HID_KEYBOARD_REPORT_SIZE != HID_BOOT_KEY_LEN + // Form a boot report from a report of different size. + + boot_report.modifiers = keyboard_report.body.modifiers; + + int out = 0; + for (int i = 0; i < CONFIG_ZMK_HID_KEYBOARD_REPORT_SIZE; i++) { + uint8_t key = keyboard_report.body.keys[i]; + if (key) { + boot_report.keys[out++] = key; + if (out == keys_held) { + break; + } + } + } + + while (out < HID_BOOT_KEY_LEN) { + boot_report.keys[out++] = 0; + } + + return &boot_report; +#else + return &keyboard_report.body; +#endif /* CONFIG_ZMK_HID_KEYBOARD_REPORT_SIZE != HID_BOOT_KEY_LEN */ +} +#endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ + static inline int select_keyboard_usage(zmk_key_t usage) { TOGGLE_KEYBOARD(0U, usage); +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + ++keys_held; +#endif return 0; } static inline int deselect_keyboard_usage(zmk_key_t usage) { TOGGLE_KEYBOARD(usage, 0U); +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + --keys_held; +#endif return 0; } diff --git a/app/src/usb.c b/app/src/usb.c index cf04ef46c8f..9d27900c3c6 100644 --- a/app/src/usb.c +++ b/app/src/usb.c @@ -15,6 +15,8 @@ #include #include +#include + LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); static enum usb_dc_status_code usb_status = USB_DC_UNKNOWN; @@ -35,6 +37,7 @@ enum zmk_usb_conn_state zmk_usb_get_conn_state() { case USB_DC_CONFIGURED: case USB_DC_RESUME: case USB_DC_CLEAR_HALT: + case USB_DC_SOF: return ZMK_USB_CONN_HID; case USB_DC_DISCONNECTED: @@ -47,6 +50,17 @@ enum zmk_usb_conn_state zmk_usb_get_conn_state() { } void usb_status_cb(enum usb_dc_status_code status, const uint8_t *params) { + // Start-of-frame events are too frequent and noisy to notify, and they're + // not used within ZMK + if (status == USB_DC_SOF) { + return; + } + +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + if (status == USB_DC_RESET) { + zmk_usb_hid_set_protocol(HID_PROTOCOL_REPORT); + } +#endif usb_status = status; k_work_submit(&usb_status_notifier_work); }; diff --git a/app/src/usb_hid.c b/app/src/usb_hid.c index f46c70a0a92..c72bb36c9ef 100644 --- a/app/src/usb_hid.c +++ b/app/src/usb_hid.c @@ -23,11 +23,75 @@ static K_SEM_DEFINE(hid_sem, 1, 1); static void in_ready_cb(const struct device *dev) { k_sem_give(&hid_sem); } +#define HID_GET_REPORT_TYPE_MASK 0xff00 +#define HID_GET_REPORT_ID_MASK 0x00ff + +#define HID_REPORT_TYPE_INPUT 0x100 +#define HID_REPORT_TYPE_OUTPUT 0x200 +#define HID_REPORT_TYPE_FEATURE 0x300 + +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) +static uint8_t hid_protocol = HID_PROTOCOL_REPORT; + +static void set_proto_cb(const struct device *dev, uint8_t protocol) { hid_protocol = protocol; } + +void zmk_usb_hid_set_protocol(uint8_t protocol) { hid_protocol = protocol; } +#endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ + +static uint8_t *get_keyboard_report(size_t *len) { + if (hid_protocol == HID_PROTOCOL_REPORT) { + struct zmk_hid_keyboard_report *report = zmk_hid_get_keyboard_report(); + *len = sizeof(*report); + return (uint8_t *)report; + } +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + zmk_hid_boot_report_t *boot_report = zmk_hid_get_boot_report(); + *len = sizeof(*boot_report); + return (uint8_t *)boot_report; +#endif +} + +static int get_report_cb(const struct device *dev, struct usb_setup_packet *setup, int32_t *len, + uint8_t **data) { + + /* + * 7.2.1 of the HID v1.11 spec is unclear about handling requests for reports that do not exist + * For requested reports that aren't input reports, return -ENOTSUP like the Zephyr subsys does + */ + if ((setup->wValue & HID_GET_REPORT_TYPE_MASK) != HID_REPORT_TYPE_INPUT) { + LOG_ERR("Unsupported report type %d requested", (setup->wValue & HID_GET_REPORT_TYPE_MASK) + << 8); + return -ENOTSUP; + } + + switch (setup->wValue & HID_GET_REPORT_ID_MASK) { + case ZMK_HID_REPORT_ID_KEYBOARD: { + *data = get_keyboard_report(len); + break; + } + case ZMK_HID_REPORT_ID_CONSUMER: { + struct zmk_hid_consumer_report *report = zmk_hid_get_consumer_report(); + *data = (uint8_t *)report; + *len = sizeof(*report); + break; + } + default: + LOG_ERR("Invalid report ID %d requested", setup->wValue & HID_GET_REPORT_ID_MASK); + return -EINVAL; + } + + return 0; +} + static const struct hid_ops ops = { +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + .protocol_change = set_proto_cb, +#endif .int_in_ready = in_ready_cb, + .get_report = get_report_cb, }; -int zmk_usb_hid_send_report(const uint8_t *report, size_t len) { +static int zmk_usb_hid_send_report(const uint8_t *report, size_t len) { switch (zmk_usb_get_status()) { case USB_DC_SUSPEND: return usb_wakeup_request(); @@ -48,6 +112,23 @@ int zmk_usb_hid_send_report(const uint8_t *report, size_t len) { } } +int zmk_usb_hid_send_keyboard_report() { + size_t len; + uint8_t *report = get_keyboard_report(&len); + return zmk_usb_hid_send_report(report, len); +} + +int zmk_usb_hid_send_consumer_report() { +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + if (hid_protocol == HID_PROTOCOL_BOOT) { + return -ENOTSUP; + } +#endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ + + struct zmk_hid_consumer_report *report = zmk_hid_get_consumer_report(); + return zmk_usb_hid_send_report((uint8_t *)report, sizeof(*report)); +} + static int zmk_usb_hid_init(const struct device *_arg) { hid_dev = device_get_binding("HID_0"); if (hid_dev == NULL) { @@ -56,6 +137,11 @@ static int zmk_usb_hid_init(const struct device *_arg) { } usb_hid_register_device(hid_dev, zmk_hid_report_desc, sizeof(zmk_hid_report_desc), &ops); + +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + usb_hid_set_proto_code(hid_dev, HID_BOOT_IFACE_CODE_KEYBOARD); +#endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ + usb_hid_init(hid_dev); return 0; From c1bf35ce1de4b7d99c034300c9a813a0a3d11669 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 10 Nov 2023 22:40:55 -0800 Subject: [PATCH 138/160] feat(build): Add support for artifact-name in build.yaml --- .github/workflows/build-user-config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index c1a97b4d6e0..5aacadca90c 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -55,12 +55,14 @@ jobs: - name: Prepare variables shell: sh -x {0} env: + board: ${{ matrix.board }} shield: ${{ matrix.shield }} + artifact_name: ${{ matrix.artifact-name }} run: | echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}" >> $GITHUB_ENV - echo "display_name=${shield:+$shield - }${{ matrix.board }}" >> $GITHUB_ENV - echo "artifact_name=${shield:+$shield-}${{ matrix.board }}-zmk" >> $GITHUB_ENV + echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV + echo "artifact_name=${artifact_name:-\"${shield:+$shield-}${board}-zmk\"}" >> $GITHUB_ENV - name: Checkout uses: actions/checkout@v3 From 2554b5c88f4d304f311d9f29017ac6fbe948ca7a Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 10 Nov 2023 22:08:37 -0800 Subject: [PATCH 139/160] fix(docs): Update boards in build examples to common+uf2 ones --- docs/docs/development/build-flash.md | 6 +++--- docs/docs/development/new-shield.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs/development/build-flash.md b/docs/docs/development/build-flash.md index 94bbcdf93a8..0243983c9d8 100644 --- a/docs/docs/development/build-flash.md +++ b/docs/docs/development/build-flash.md @@ -65,7 +65,7 @@ west build -b planck_rev6 When building for a new board and/or shield after having built one previously, you may need to enable the pristine build option. This option removes all existing files in the build directory before regenerating them, and can be enabled by adding either --pristine or -p to the command: ```sh -west build -p -b proton_c -- -DSHIELD=kyria_left +west build -p -b nice_nano_v2 -- -DSHIELD=kyria_left ``` ### Building For Split Keyboards @@ -77,13 +77,13 @@ For split keyboards, you will have to build and flash each side separately the f By default, the `build` command outputs a single .uf2 file named `zmk.uf2` so building left and then right immediately after will overwrite your left firmware. In addition, you will need to pristine build each side to ensure the correct files are used. To avoid having to pristine build every time and separate the left and right build files, we recommend setting up separate build directories for each half. You can do this by using the `-d` parameter and first building left into `build/left`: ```sh -west build -d build/left -b nice_nano -- -DSHIELD=kyria_left +west build -d build/left -b nice_nano_v2 -- -DSHIELD=kyria_left ``` and then building right into `build/right`: ```sh -west build -d build/right -b nice_nano -- -DSHIELD=kyria_right +west build -d build/right -b nice_nano_v2 -- -DSHIELD=kyria_right ``` This produces `left` and `right` subfolders under the `build` directory and two separate .uf2 files. For future work on a specific half, use the `-d` parameter again to ensure you are building into the correct location. diff --git a/docs/docs/development/new-shield.md b/docs/docs/development/new-shield.md index 0771122985b..7f6a8644e11 100644 --- a/docs/docs/development/new-shield.md +++ b/docs/docs/development/new-shield.md @@ -493,7 +493,7 @@ Once you've fully created the new keyboard shield definition, you should be able to test with a build command like: ```sh -west build --pristine -b proton_c -- -DSHIELD=my_board +west build --pristine -b nice_nano_v2 -- -DSHIELD=my_board ``` The above build command generates `build/zephyr/zmk.uf2`. If your board From a5c3edd51b46f45a7fdf9ff157f69296d7a9fddb Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 10 Nov 2023 22:22:05 -0800 Subject: [PATCH 140/160] refactor(docs): Remove local build section in customization --- docs/docs/customization.md | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/docs/docs/customization.md b/docs/docs/customization.md index 4f75e743a66..a68e8595fa9 100644 --- a/docs/docs/customization.md +++ b/docs/docs/customization.md @@ -11,15 +11,15 @@ This makes flashing ZMK to your keyboard much easier, especially because you don By default, the `zmk-config` folder should contain two files: -- `.conf` -- `.keymap` +- `.conf` +- `.keymap` However, your config folder can also be modified to include a `boards/` directory for keymaps and configurations for multiple boards/shields outside of the default keyboard setting definitions. ## Configuration Changes -The setup script creates a `config/.conf` file that allows you to add additional configuration options to +The setup script creates a `config/.conf` file that allows you to add additional configuration options to control what features and options are built into your firmware. Opening that file with your text editor will allow you to see the various config settings that can be commented/uncommented to modify how your firmware is built. @@ -27,7 +27,7 @@ Refer to the [Configuration](/docs/config) documentation for more details on thi ## Keymap -Once you have the basic user config completed, you can find the keymap file in `config/.keymap` and customize from there. +Once you have the basic user config completed, you can find the keymap file in `config/.keymap` and customize from there. Refer to the [Keymap](features/keymaps.md) documentation to learn more. ## Publishing @@ -39,18 +39,11 @@ GitHub Actions job to build your firmware which you can download once it complet If you need to, a review of [Learn The Basics Of Git In Under 10 Minutes](https://www.freecodecamp.org/news/learn-the-basics-of-git-in-under-10-minutes-da548267cc91/) will help you get these steps right. ::: -## Building from a local `zmk` fork using `zmk-config` - -[As outlined here](development/build-flash.md), firmware comes in the form of .uf2 files, which can be built locally using the command `west build`. Normally, -`west build` will default to using the in-tree .keymap and .conf files found in your local copy of the `zmk` repository. However, you can append the command, `-DZMK_CONFIG="C:/the/absolute/path/config"` to `west build` in order to use the contents of your `zmk-config` folder instead of the -default keyboard settings. -**Notice that this path should point to the folder labelled `config` within your `zmk-config` folder.** - -For instance, building kyria firmware from a user `myUser`'s `zmk-config` folder on Windows 10 may look something like this: - -```bash -west build -b nice_nano -- -DSHIELD=kyria_left -DZMK_CONFIG="C:/Users/myUser/Documents/Github/zmk-config/config" -``` +:::note +It is also possible to build firmware locally on your computer by following the [toolchain setup](development/setup.md) and +[building instructions](development/build-flash.md), which includes pointers to +[building using your `zmk-config` folder](development/build-flash.md#building-from-zmk-config-folder). +::: ## Flashing Your Changes From 7b4b5d4ff20957c3cba0d3e3eb679dd45c3181f5 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 10 Nov 2023 22:01:31 -0800 Subject: [PATCH 141/160] fix(docs): Fix debouncing driver support note --- docs/docs/features/debouncing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/features/debouncing.md b/docs/docs/features/debouncing.md index cbea7092884..38ded2d7952 100644 --- a/docs/docs/features/debouncing.md +++ b/docs/docs/features/debouncing.md @@ -20,7 +20,7 @@ socket or using some sharp tweezers to bend the contacts back together. ## Debounce Configuration :::note -Currently only the `zmk,kscan-gpio-matrix` driver supports these options. The other drivers have not yet been updated to use the new debouncing code. +Currently the `zmk,kscan-gpio-matrix` and `zmk,kscan-gpio-direct` [drivers](../config/kscan.md) supports these options, while `zmk,kscan-gpio-demux` driver does not. ::: ### Global Options From 964c54139dcc5fca466eb2a6dc72b4092c7152a0 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 13 Nov 2023 11:00:28 -0800 Subject: [PATCH 142/160] fix(usb): Tweak how ZMK_USB gets enabled. * Previous version of multiple overrides of the default value of ZMK_USB were problematic. Move to using board _defconfig files for the defaults for those, along with proper `depends on` for ZMK_USB that accounts for split and split roles. --- app/Kconfig | 13 ++++++++----- app/boards/arm/bdn9/Kconfig.defconfig | 3 --- app/boards/arm/bdn9/bdn9_rev2_defconfig | 1 + app/boards/arm/bluemicro840/Kconfig.defconfig | 6 ------ .../arm/bluemicro840/bluemicro840_v1_defconfig | 3 +++ app/boards/arm/bt60/Kconfig.defconfig | 6 ------ app/boards/arm/bt60/bt60_v1_defconfig | 3 +++ app/boards/arm/bt60/bt60_v1_hs_defconfig | 3 +++ app/boards/arm/ckp/Kconfig.defconfig | 6 ------ app/boards/arm/ckp/bt60_v2_defconfig | 3 +++ app/boards/arm/ckp/bt65_v1_defconfig | 3 +++ app/boards/arm/ckp/bt75_v1_defconfig | 3 +++ app/boards/arm/corneish_zen/Kconfig.defconfig | 6 ------ .../arm/corneish_zen/corneish_zen_v1_left_defconfig | 3 +++ .../corneish_zen/corneish_zen_v1_right_defconfig | 3 +++ .../arm/corneish_zen/corneish_zen_v2_left_defconfig | 3 +++ .../corneish_zen/corneish_zen_v2_right_defconfig | 3 +++ app/boards/arm/dz60rgb/Kconfig.defconfig | 3 --- app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig | 2 ++ app/boards/arm/ferris/Kconfig.defconfig | 3 --- app/boards/arm/kbdfans_tofu65/Kconfig.defconfig | 3 --- .../arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig | 2 ++ app/boards/arm/mikoto/Kconfig.defconfig | 6 ------ app/boards/arm/mikoto/mikoto_520_defconfig | 3 +++ app/boards/arm/nice60/Kconfig.defconfig | 6 ------ app/boards/arm/nice60/nice60_defconfig | 4 ++++ app/boards/arm/nice_nano/Kconfig.defconfig | 6 ------ app/boards/arm/nice_nano/nice_nano_defconfig | 3 +++ app/boards/arm/nice_nano/nice_nano_v2_defconfig | 3 +++ app/boards/arm/nrf52840_m2/Kconfig.defconfig | 6 ------ app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig | 3 +++ app/boards/arm/nrfmicro/Kconfig.defconfig | 6 ------ app/boards/arm/nrfmicro/nrfmicro_11_defconfig | 3 +++ .../arm/nrfmicro/nrfmicro_11_flipped_defconfig | 3 +++ app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig | 3 +++ app/boards/arm/nrfmicro/nrfmicro_13_defconfig | 3 +++ app/boards/arm/pillbug/Kconfig.defconfig | 6 ------ app/boards/arm/pillbug/pillbug_defconfig | 3 +++ app/boards/arm/planck/Kconfig.defconfig | 3 --- app/boards/arm/planck/planck_rev6_defconfig | 2 ++ app/boards/arm/preonic/Kconfig.defconfig | 3 --- app/boards/arm/preonic/preonic_rev3_defconfig | 2 ++ app/boards/arm/proton_c/Kconfig.defconfig | 3 --- app/boards/arm/proton_c/proton_c_defconfig | 1 + app/boards/arm/puchi_ble/Kconfig.defconfig | 6 ------ app/boards/arm/puchi_ble/puchi_ble_v1_defconfig | 3 +++ app/boards/arm/s40nc/Kconfig.defconfig | 6 ------ app/boards/arm/s40nc/s40nc_defconfig | 3 +++ app/boards/shields/nibble/Kconfig.defconfig | 4 ---- app/src/split/bluetooth/Kconfig | 3 --- 50 files changed, 85 insertions(+), 105 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 798cb7855d5..282339e3e40 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -91,10 +91,18 @@ menu "Output Types" config ZMK_USB bool "USB" + depends on (!ZMK_SPLIT || (ZMK_SPLIT && ZMK_SPLIT_ROLE_CENTRAL)) select USB select USB_DEVICE_STACK select USB_DEVICE_HID +config ZMK_USB_BOOT + bool "USB Boot Protocol Support" + default y + depends on ZMK_USB + select USB_HID_BOOT_PROTOCOL + select USB_DEVICE_SOF + if ZMK_USB config USB_NUMOF_EP_WRITE_RETRIES @@ -103,11 +111,6 @@ config USB_NUMOF_EP_WRITE_RETRIES config USB_HID_POLL_INTERVAL_MS default 1 -config ZMK_USB_BOOT - bool "USB Boot Protocol Support" - default y - select USB_HID_BOOT_PROTOCOL - select USB_DEVICE_SOF #ZMK_USB endif diff --git a/app/boards/arm/bdn9/Kconfig.defconfig b/app/boards/arm/bdn9/Kconfig.defconfig index d1c82811d28..96b7fe55329 100644 --- a/app/boards/arm/bdn9/Kconfig.defconfig +++ b/app/boards/arm/bdn9/Kconfig.defconfig @@ -11,9 +11,6 @@ config BOARD config ZMK_KEYBOARD_NAME default "BDN9 Rev2" -config ZMK_USB - default y - config ZMK_RGB_UNDERGLOW select SPI select WS2812_STRIP diff --git a/app/boards/arm/bdn9/bdn9_rev2_defconfig b/app/boards/arm/bdn9/bdn9_rev2_defconfig index 24dddb932d5..05087eeb4c6 100644 --- a/app/boards/arm/bdn9/bdn9_rev2_defconfig +++ b/app/boards/arm/bdn9/bdn9_rev2_defconfig @@ -23,3 +23,4 @@ CONFIG_HEAP_MEM_POOL_SIZE=1024 # clock configuration CONFIG_CLOCK_CONTROL=y +CONFIG_ZMK_USB=y \ No newline at end of file diff --git a/app/boards/arm/bluemicro840/Kconfig.defconfig b/app/boards/arm/bluemicro840/Kconfig.defconfig index 732805ae199..ff61ec92f81 100644 --- a/app/boards/arm/bluemicro840/Kconfig.defconfig +++ b/app/boards/arm/bluemicro840/Kconfig.defconfig @@ -18,10 +18,4 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - endif # BOARD_BLUEMICRO840_V1 diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig b/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig index 99d51a94334..3e13e77d0b5 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig +++ b/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig @@ -21,3 +21,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/bt60/Kconfig.defconfig b/app/boards/arm/bt60/Kconfig.defconfig index e7cf1a48cff..c44901bd8d4 100644 --- a/app/boards/arm/bt60/Kconfig.defconfig +++ b/app/boards/arm/bt60/Kconfig.defconfig @@ -19,12 +19,6 @@ endif # USB config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - config ZMK_KEYBOARD_NAME default "BT60" diff --git a/app/boards/arm/bt60/bt60_v1_defconfig b/app/boards/arm/bt60/bt60_v1_defconfig index 813dcecea5a..04adb8a3cd8 100644 --- a/app/boards/arm/bt60/bt60_v1_defconfig +++ b/app/boards/arm/bt60/bt60_v1_defconfig @@ -23,3 +23,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/bt60/bt60_v1_hs_defconfig b/app/boards/arm/bt60/bt60_v1_hs_defconfig index f2327fd3f42..f16d82ac41d 100644 --- a/app/boards/arm/bt60/bt60_v1_hs_defconfig +++ b/app/boards/arm/bt60/bt60_v1_hs_defconfig @@ -23,3 +23,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/ckp/Kconfig.defconfig b/app/boards/arm/ckp/Kconfig.defconfig index d5bf4ded1eb..376d4619fde 100644 --- a/app/boards/arm/ckp/Kconfig.defconfig +++ b/app/boards/arm/ckp/Kconfig.defconfig @@ -25,10 +25,4 @@ endif # USB config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - endif # BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1 diff --git a/app/boards/arm/ckp/bt60_v2_defconfig b/app/boards/arm/ckp/bt60_v2_defconfig index f6dc7e09a68..fd1ae985995 100644 --- a/app/boards/arm/ckp/bt60_v2_defconfig +++ b/app/boards/arm/ckp/bt60_v2_defconfig @@ -36,3 +36,6 @@ CONFIG_WS2812_STRIP=y CONFIG_SPI=y CONFIG_BT_CTLR_TX_PWR_PLUS_8=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/ckp/bt65_v1_defconfig b/app/boards/arm/ckp/bt65_v1_defconfig index e40ae2dbb54..be5f17eb54f 100644 --- a/app/boards/arm/ckp/bt65_v1_defconfig +++ b/app/boards/arm/ckp/bt65_v1_defconfig @@ -36,3 +36,6 @@ CONFIG_WS2812_STRIP=y CONFIG_SPI=y CONFIG_BT_CTLR_TX_PWR_PLUS_8=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/ckp/bt75_v1_defconfig b/app/boards/arm/ckp/bt75_v1_defconfig index 510d6994dc1..b4d85338aec 100644 --- a/app/boards/arm/ckp/bt75_v1_defconfig +++ b/app/boards/arm/ckp/bt75_v1_defconfig @@ -36,3 +36,6 @@ CONFIG_WS2812_STRIP=y CONFIG_SPI=y CONFIG_BT_CTLR_TX_PWR_PLUS_8=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/corneish_zen/Kconfig.defconfig b/app/boards/arm/corneish_zen/Kconfig.defconfig index feab3eca773..f3cc959edd0 100644 --- a/app/boards/arm/corneish_zen/Kconfig.defconfig +++ b/app/boards/arm/corneish_zen/Kconfig.defconfig @@ -25,12 +25,6 @@ config ZMK_SPLIT config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - if USB config USB_NRFX diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig b/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig index a71ac680bb6..d738255601b 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig @@ -39,6 +39,9 @@ CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + # enable display drivers CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig b/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig index f099392ff6a..5284159d83f 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig @@ -39,6 +39,9 @@ CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + # enable display drivers CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig b/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig index 3b7b4d9e276..29a5f878ac2 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig @@ -35,6 +35,9 @@ CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + # enable display drivers CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig b/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig index b361b08d9a0..506aa67e1b1 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig @@ -35,6 +35,9 @@ CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + # enable display drivers CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 diff --git a/app/boards/arm/dz60rgb/Kconfig.defconfig b/app/boards/arm/dz60rgb/Kconfig.defconfig index 2e30e3d048d..6e0592569de 100644 --- a/app/boards/arm/dz60rgb/Kconfig.defconfig +++ b/app/boards/arm/dz60rgb/Kconfig.defconfig @@ -8,7 +8,4 @@ if BOARD_DZ60RGB_REV1 config ZMK_KEYBOARD_NAME default "DZ60RGB Rev 1" -config ZMK_USB - default y - endif # BOARD_DZ60RGB_REV1 diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig b/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig index 33840f966ef..53bc0e11034 100644 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig +++ b/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig @@ -25,3 +25,5 @@ CONFIG_CLOCK_STM32_PLL_MULTIPLIER=9 CONFIG_CLOCK_STM32_AHB_PRESCALER=1 CONFIG_CLOCK_STM32_APB1_PRESCALER=2 CONFIG_CLOCK_STM32_APB2_PRESCALER=1 + +CONFIG_ZMK_USB=y \ No newline at end of file diff --git a/app/boards/arm/ferris/Kconfig.defconfig b/app/boards/arm/ferris/Kconfig.defconfig index 7cf43bcb9e6..420ea01fab9 100644 --- a/app/boards/arm/ferris/Kconfig.defconfig +++ b/app/boards/arm/ferris/Kconfig.defconfig @@ -11,9 +11,6 @@ config BOARD config ZMK_KEYBOARD_NAME default "Ferris rev 0.2" -config ZMK_USB - default y - config ZMK_KSCAN_MATRIX_POLLING default y diff --git a/app/boards/arm/kbdfans_tofu65/Kconfig.defconfig b/app/boards/arm/kbdfans_tofu65/Kconfig.defconfig index 993d51423b5..0444f510105 100644 --- a/app/boards/arm/kbdfans_tofu65/Kconfig.defconfig +++ b/app/boards/arm/kbdfans_tofu65/Kconfig.defconfig @@ -9,7 +9,4 @@ config ZMK_KEYBOARD_NAME config RP2_FLASH_W25Q080 default y -config ZMK_USB - default y - endif # BOARD_KBDFANS_TOFU65_V2 diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig index cf546683452..57014acf37a 100644 --- a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig +++ b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig @@ -18,3 +18,5 @@ CONFIG_USE_DT_CODE_PARTITION=y # Output UF2 by default, native bootloader supports it. CONFIG_BUILD_OUTPUT_UF2=y + +CONFIG_ZMK_USB=y \ No newline at end of file diff --git a/app/boards/arm/mikoto/Kconfig.defconfig b/app/boards/arm/mikoto/Kconfig.defconfig index 8c7746dbb8e..8117cc87329 100644 --- a/app/boards/arm/mikoto/Kconfig.defconfig +++ b/app/boards/arm/mikoto/Kconfig.defconfig @@ -21,12 +21,6 @@ endif # USB config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - config PINMUX default y diff --git a/app/boards/arm/mikoto/mikoto_520_defconfig b/app/boards/arm/mikoto/mikoto_520_defconfig index c755633e4cf..354fa56aa34 100644 --- a/app/boards/arm/mikoto/mikoto_520_defconfig +++ b/app/boards/arm/mikoto/mikoto_520_defconfig @@ -21,3 +21,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nice60/Kconfig.defconfig b/app/boards/arm/nice60/Kconfig.defconfig index f3347df9c6e..76818e87b0f 100644 --- a/app/boards/arm/nice60/Kconfig.defconfig +++ b/app/boards/arm/nice60/Kconfig.defconfig @@ -16,10 +16,4 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - endif # BOARD_NICE60 diff --git a/app/boards/arm/nice60/nice60_defconfig b/app/boards/arm/nice60/nice60_defconfig index 48936a04704..fabcb7eddf4 100644 --- a/app/boards/arm/nice60/nice60_defconfig +++ b/app/boards/arm/nice60/nice60_defconfig @@ -28,3 +28,7 @@ CONFIG_WS2812_STRIP=y CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=160 CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3 + + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nice_nano/Kconfig.defconfig b/app/boards/arm/nice_nano/Kconfig.defconfig index ada59dd9f2e..63102a571f9 100644 --- a/app/boards/arm/nice_nano/Kconfig.defconfig +++ b/app/boards/arm/nice_nano/Kconfig.defconfig @@ -16,10 +16,4 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - endif # BOARD_NICE_NANO || BOARD_NICE_NANO_V2 diff --git a/app/boards/arm/nice_nano/nice_nano_defconfig b/app/boards/arm/nice_nano/nice_nano_defconfig index a837b7d2875..6b7fcab252d 100644 --- a/app/boards/arm/nice_nano/nice_nano_defconfig +++ b/app/boards/arm/nice_nano/nice_nano_defconfig @@ -22,3 +22,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nice_nano/nice_nano_v2_defconfig b/app/boards/arm/nice_nano/nice_nano_v2_defconfig index 667cf71aca2..6b5044e5ef0 100644 --- a/app/boards/arm/nice_nano/nice_nano_v2_defconfig +++ b/app/boards/arm/nice_nano/nice_nano_v2_defconfig @@ -22,3 +22,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_BLE=y +CONFIG_ZMK_USB=y \ No newline at end of file diff --git a/app/boards/arm/nrf52840_m2/Kconfig.defconfig b/app/boards/arm/nrf52840_m2/Kconfig.defconfig index 50a049bb926..a5227fc0a10 100644 --- a/app/boards/arm/nrf52840_m2/Kconfig.defconfig +++ b/app/boards/arm/nrf52840_m2/Kconfig.defconfig @@ -16,10 +16,4 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - endif # BOARD_NRF52840_M2 diff --git a/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig b/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig index b7671ba9f12..93eef9e6ef8 100644 --- a/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig +++ b/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig @@ -20,3 +20,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nrfmicro/Kconfig.defconfig b/app/boards/arm/nrfmicro/Kconfig.defconfig index 7d752ac6ee6..659e9c5c173 100644 --- a/app/boards/arm/nrfmicro/Kconfig.defconfig +++ b/app/boards/arm/nrfmicro/Kconfig.defconfig @@ -18,12 +18,6 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - config PINMUX default y diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_defconfig b/app/boards/arm/nrfmicro/nrfmicro_11_defconfig index b51929b0c8f..5ba4d6e1478 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_11_defconfig @@ -23,3 +23,6 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig b/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig index 335a2d75b12..31cbfc9ae75 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig @@ -23,3 +23,6 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig b/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig index 4af1ff86a7c..f459f35636a 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig @@ -23,3 +23,6 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_defconfig b/app/boards/arm/nrfmicro/nrfmicro_13_defconfig index 43ba40e2dc3..9ffb2766a66 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_13_defconfig @@ -23,3 +23,6 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/pillbug/Kconfig.defconfig b/app/boards/arm/pillbug/Kconfig.defconfig index 8657f8aea30..48427ed3ec2 100644 --- a/app/boards/arm/pillbug/Kconfig.defconfig +++ b/app/boards/arm/pillbug/Kconfig.defconfig @@ -16,10 +16,4 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - endif # BOARD_PILLBUG diff --git a/app/boards/arm/pillbug/pillbug_defconfig b/app/boards/arm/pillbug/pillbug_defconfig index 9781cf995cc..9ec72c417ef 100644 --- a/app/boards/arm/pillbug/pillbug_defconfig +++ b/app/boards/arm/pillbug/pillbug_defconfig @@ -23,3 +23,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/planck/Kconfig.defconfig b/app/boards/arm/planck/Kconfig.defconfig index d1304da0588..69dea84ce54 100644 --- a/app/boards/arm/planck/Kconfig.defconfig +++ b/app/boards/arm/planck/Kconfig.defconfig @@ -8,9 +8,6 @@ if BOARD_PLANCK_REV6 config ZMK_KEYBOARD_NAME default "Planck V6" -config ZMK_USB - default y - config ZMK_KSCAN_MATRIX_POLLING default y diff --git a/app/boards/arm/planck/planck_rev6_defconfig b/app/boards/arm/planck/planck_rev6_defconfig index a78ea45de88..74050f3d9c1 100644 --- a/app/boards/arm/planck/planck_rev6_defconfig +++ b/app/boards/arm/planck/planck_rev6_defconfig @@ -15,3 +15,5 @@ CONFIG_GPIO=y # clock configuration CONFIG_CLOCK_CONTROL=y + +CONFIG_ZMK_USB=y diff --git a/app/boards/arm/preonic/Kconfig.defconfig b/app/boards/arm/preonic/Kconfig.defconfig index 186c88bc5e3..86b2e3d0ef4 100644 --- a/app/boards/arm/preonic/Kconfig.defconfig +++ b/app/boards/arm/preonic/Kconfig.defconfig @@ -8,9 +8,6 @@ if BOARD_PREONIC_REV3 config ZMK_KEYBOARD_NAME default "Preonic V3" -config ZMK_USB - default y - config ZMK_KSCAN_MATRIX_POLLING default y diff --git a/app/boards/arm/preonic/preonic_rev3_defconfig b/app/boards/arm/preonic/preonic_rev3_defconfig index ab19d10f6f8..e063827a4e2 100644 --- a/app/boards/arm/preonic/preonic_rev3_defconfig +++ b/app/boards/arm/preonic/preonic_rev3_defconfig @@ -13,3 +13,5 @@ CONFIG_GPIO=y # clock configuration CONFIG_CLOCK_CONTROL=y + +CONFIG_ZMK_USB=y \ No newline at end of file diff --git a/app/boards/arm/proton_c/Kconfig.defconfig b/app/boards/arm/proton_c/Kconfig.defconfig index f5089119c13..eed4b830442 100644 --- a/app/boards/arm/proton_c/Kconfig.defconfig +++ b/app/boards/arm/proton_c/Kconfig.defconfig @@ -8,7 +8,4 @@ if BOARD_QMK_PROTON_C config BOARD default "proton_c" -config ZMK_USB - default y - endif # BOARD_QMK_PROTON_C diff --git a/app/boards/arm/proton_c/proton_c_defconfig b/app/boards/arm/proton_c/proton_c_defconfig index 32e1ade9604..c552bf15df9 100644 --- a/app/boards/arm/proton_c/proton_c_defconfig +++ b/app/boards/arm/proton_c/proton_c_defconfig @@ -17,3 +17,4 @@ CONFIG_GPIO=y # clock configuration CONFIG_CLOCK_CONTROL=y +CONFIG_ZMK_USB=y \ No newline at end of file diff --git a/app/boards/arm/puchi_ble/Kconfig.defconfig b/app/boards/arm/puchi_ble/Kconfig.defconfig index c4fca8e1f31..3533104b2a5 100644 --- a/app/boards/arm/puchi_ble/Kconfig.defconfig +++ b/app/boards/arm/puchi_ble/Kconfig.defconfig @@ -16,12 +16,6 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - config PINMUX default y diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig b/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig index 1adb9217c8a..ab197df0a80 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig +++ b/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig @@ -25,3 +25,6 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/s40nc/Kconfig.defconfig b/app/boards/arm/s40nc/Kconfig.defconfig index 11e62cf54c5..f892f392d5c 100644 --- a/app/boards/arm/s40nc/Kconfig.defconfig +++ b/app/boards/arm/s40nc/Kconfig.defconfig @@ -19,10 +19,4 @@ endif # USB config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - endif # BOARD_S40NC diff --git a/app/boards/arm/s40nc/s40nc_defconfig b/app/boards/arm/s40nc/s40nc_defconfig index 31972781db1..b523ceb80b7 100644 --- a/app/boards/arm/s40nc/s40nc_defconfig +++ b/app/boards/arm/s40nc/s40nc_defconfig @@ -20,3 +20,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/shields/nibble/Kconfig.defconfig b/app/boards/shields/nibble/Kconfig.defconfig index 31ac7cfe7dd..19bddec77b8 100644 --- a/app/boards/shields/nibble/Kconfig.defconfig +++ b/app/boards/shields/nibble/Kconfig.defconfig @@ -6,10 +6,6 @@ if SHIELD_NIBBLE config ZMK_KEYBOARD_NAME default "NIBBLE" -config ZMK_USB - default y - - if ZMK_DISPLAY config I2C diff --git a/app/src/split/bluetooth/Kconfig b/app/src/split/bluetooth/Kconfig index 5919010ba31..858e7308fef 100644 --- a/app/src/split/bluetooth/Kconfig +++ b/app/src/split/bluetooth/Kconfig @@ -62,9 +62,6 @@ config ZMK_SPLIT_BLE_PERIPHERAL_POSITION_QUEUE_SIZE int "Max number of key position state events to queue to send to the central" default 10 -config ZMK_USB - default n - config BT_MAX_PAIRED default 1 From afe65ead9c0f1418fa34bfa93325d0cce33c6c2c Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Mon, 13 Nov 2023 16:50:00 -0500 Subject: [PATCH 143/160] Revert "feat(build): Add support for artifact-name in build.yaml" This reverts commit c1bf35ce1de4b7d99c034300c9a813a0a3d11669. --- .github/workflows/build-user-config.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 5aacadca90c..c1a97b4d6e0 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -55,14 +55,12 @@ jobs: - name: Prepare variables shell: sh -x {0} env: - board: ${{ matrix.board }} shield: ${{ matrix.shield }} - artifact_name: ${{ matrix.artifact-name }} run: | echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}" >> $GITHUB_ENV - echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV - echo "artifact_name=${artifact_name:-\"${shield:+$shield-}${board}-zmk\"}" >> $GITHUB_ENV + echo "display_name=${shield:+$shield - }${{ matrix.board }}" >> $GITHUB_ENV + echo "artifact_name=${shield:+$shield-}${{ matrix.board }}-zmk" >> $GITHUB_ENV - name: Checkout uses: actions/checkout@v3 From 2a1904e184c5802a50c13f2d0ceca63df7c1b7df Mon Sep 17 00:00:00 2001 From: Chris Andreae Date: Tue, 14 Nov 2023 16:08:58 +0900 Subject: [PATCH 144/160] feat(boards): Add Glove80 to boards * Add board definition for MoErgo Glove80 --- app/boards/arm/glove80/CMakeLists.txt | 3 + app/boards/arm/glove80/Kconfig | 8 ++ app/boards/arm/glove80/Kconfig.board | 10 ++ app/boards/arm/glove80/Kconfig.defconfig | 65 ++++++++++ app/boards/arm/glove80/board.cmake | 6 + app/boards/arm/glove80/glove80.dtsi | 107 ++++++++++++++++ app/boards/arm/glove80/glove80.keymap | 114 ++++++++++++++++++ app/boards/arm/glove80/glove80.yaml | 19 +++ app/boards/arm/glove80/glove80.zmk.yml | 16 +++ .../arm/glove80/glove80_lh-pinctrl.dtsi | 47 ++++++++ app/boards/arm/glove80/glove80_lh.dts | 101 ++++++++++++++++ app/boards/arm/glove80/glove80_lh.keymap | 7 ++ app/boards/arm/glove80/glove80_lh_defconfig | 92 ++++++++++++++ .../arm/glove80/glove80_rh-pinctrl.dtsi | 48 ++++++++ app/boards/arm/glove80/glove80_rh.dts | 108 +++++++++++++++++ app/boards/arm/glove80/glove80_rh.keymap | 7 ++ app/boards/arm/glove80/glove80_rh_defconfig | 89 ++++++++++++++ app/boards/arm/glove80/readme.md | 13 ++ app/boards/arm/glove80/usb_serial_number.c | 67 ++++++++++ 19 files changed, 927 insertions(+) create mode 100644 app/boards/arm/glove80/CMakeLists.txt create mode 100644 app/boards/arm/glove80/Kconfig create mode 100644 app/boards/arm/glove80/Kconfig.board create mode 100644 app/boards/arm/glove80/Kconfig.defconfig create mode 100644 app/boards/arm/glove80/board.cmake create mode 100644 app/boards/arm/glove80/glove80.dtsi create mode 100644 app/boards/arm/glove80/glove80.keymap create mode 100644 app/boards/arm/glove80/glove80.yaml create mode 100644 app/boards/arm/glove80/glove80.zmk.yml create mode 100644 app/boards/arm/glove80/glove80_lh-pinctrl.dtsi create mode 100644 app/boards/arm/glove80/glove80_lh.dts create mode 100644 app/boards/arm/glove80/glove80_lh.keymap create mode 100644 app/boards/arm/glove80/glove80_lh_defconfig create mode 100644 app/boards/arm/glove80/glove80_rh-pinctrl.dtsi create mode 100644 app/boards/arm/glove80/glove80_rh.dts create mode 100644 app/boards/arm/glove80/glove80_rh.keymap create mode 100644 app/boards/arm/glove80/glove80_rh_defconfig create mode 100644 app/boards/arm/glove80/readme.md create mode 100644 app/boards/arm/glove80/usb_serial_number.c diff --git a/app/boards/arm/glove80/CMakeLists.txt b/app/boards/arm/glove80/CMakeLists.txt new file mode 100644 index 00000000000..3eb2cd276ea --- /dev/null +++ b/app/boards/arm/glove80/CMakeLists.txt @@ -0,0 +1,3 @@ +zephyr_library() +zephyr_library_sources(usb_serial_number.c) +zephyr_library_include_directories(${ZEPHYR_BASE}/drivers) diff --git a/app/boards/arm/glove80/Kconfig b/app/boards/arm/glove80/Kconfig new file mode 100644 index 00000000000..f1c12e7e314 --- /dev/null +++ b/app/boards/arm/glove80/Kconfig @@ -0,0 +1,8 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_ENABLE_DCDC + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on (BOARD_GLOVE80_LH || BOARD_GLOVE80_RH) diff --git a/app/boards/arm/glove80/Kconfig.board b/app/boards/arm/glove80/Kconfig.board new file mode 100644 index 00000000000..f689103710f --- /dev/null +++ b/app/boards/arm/glove80/Kconfig.board @@ -0,0 +1,10 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_GLOVE80_LH + bool "Glove80 LH" + depends on SOC_NRF52840_QIAA + +config BOARD_GLOVE80_RH + bool "Glove80 RH" + depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/glove80/Kconfig.defconfig b/app/boards/arm/glove80/Kconfig.defconfig new file mode 100644 index 00000000000..e1c452a5444 --- /dev/null +++ b/app/boards/arm/glove80/Kconfig.defconfig @@ -0,0 +1,65 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if BOARD_GLOVE80_LH + +config BOARD + default "glove80 lh" + +config ZMK_SPLIT_BLE_ROLE_CENTRAL + default y + +endif # BOARD_GLOVE80_LH + +if BOARD_GLOVE80_RH + +config BOARD + default "glove80 rh" + +endif # BOARD_GLOVE80_RH + +if BOARD_GLOVE80_LH || BOARD_GLOVE80_RH + +config ZMK_SPLIT + default y + +config BT_CTLR + default BT + +config ZMK_KSCAN_MATRIX_WAIT_BETWEEN_OUTPUTS + default 5 + +config PINCTRL + default y + +if USB + +config USB_NRFX + default y + +config USB_DEVICE_STACK + default y + +endif # USB + +if ZMK_BACKLIGHT + +config PWM + default y + +config LED_PWM + default y + +endif # ZMK_BACKLIGHT + +if ZMK_RGB_UNDERGLOW + +config SPI + default y + +config WS2812_STRIP + default y + +endif # ZMK_RGB_UNDERGLOW + +endif # BOARD_GLOVE80_LH || BOARD_GLOVE80_RH diff --git a/app/boards/arm/glove80/board.cmake b/app/boards/arm/glove80/board.cmake new file mode 100644 index 00000000000..36030db7b10 --- /dev/null +++ b/app/boards/arm/glove80/board.cmake @@ -0,0 +1,6 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") +include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake) +include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) diff --git a/app/boards/arm/glove80/glove80.dtsi b/app/boards/arm/glove80/glove80.dtsi new file mode 100644 index 00000000000..f3f58cf7b42 --- /dev/null +++ b/app/boards/arm/glove80/glove80.dtsi @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; +#include + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <6>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) + RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(0,6) RC(1,6) RC(2,6) RC(2,7) RC(1,7) RC(0,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) + RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(3,6) RC(4,6) RC(5,6) RC(5,7) RC(4,7) RC(3,7) RC(5,9) RC(5,10) RC(5,11) RC(5,12) RC(5,13) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; + debounce-press-ms = <4>; + debounce-release-ms = <20>; + }; + +}; + +&adc { + status = "okay"; +}; + +&gpiote { + status = "okay"; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&usbd { + status = "okay"; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; +}; + +&flash0 { + /* + * For more information, see: + * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + sd_partition: partition@0 { + label = "softdevice"; + reg = <0x00000000 0x00026000>; + }; + code_partition: partition@26000 { + label = "code_partition"; + reg = <0x00026000 0x000c6000>; + }; + + /* + * The flash starting at 0x000ec000 and ending at + * 0x000f3fff is reserved for use by the application. + */ + + /* + * Storage partition will be used by FCB/LittleFS/NVS + * if enabled. + */ + storage_partition: partition@ec000 { + label = "storage"; + reg = <0x000ec000 0x00008000>; + }; + + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; +}; diff --git a/app/boards/arm/glove80/glove80.keymap b/app/boards/arm/glove80/glove80.keymap new file mode 100644 index 00000000000..6c920ca1dcd --- /dev/null +++ b/app/boards/arm/glove80/glove80.keymap @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include +#include + +// layers +#define DEFAULT 0 +#define LOWER 1 +#define MAGIC 2 + +/ { + behaviors { + // For the "layer" key, it'd nice to be able to use it as either a shift or a toggle. + // Configure it as a tap dance, so the first tap (or hold) is a &mo and the second tap is a &to + layer_td: tap_dance_0 { + compatible = "zmk,behavior-tap-dance"; + label = "LAYER_TAP_DANCE"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&mo LOWER>, <&to LOWER>; + }; + }; + + macros { + bt_0: bt_profile_macro_0 { + label = "BT_0"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 0>; + }; + + bt_1: bt_profile_macro_1 { + label = "BT_1"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 1>; + }; + + bt_2: bt_profile_macro_2 { + label = "BT_2"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 2>; + }; + + bt_3: bt_profile_macro_3 { + label = "BT_3"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 3>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + // | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + // | TAB | Q | W | E | R | T | | Y | U | I | O | P | \ | + // | ESC | A | S | D | F | G | | H | J | K | L | ; | ' | + // | ` | Z | X | C | V | B | LSHFT | LCTRL | LOWER | | LGUI | RCTRL | RSHFT | N | M | , | . | / | PGUP | + // | MAGIC | HOME| END | LEFT | RIGHT| | BSPC | DEL | LALT | | RALT | RET | SPACE | | UP | DOWN | [ | ] | PGDN | + + bindings = < + &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 + &kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS + &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH + &kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT + &kp GRAVE &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LCTRL &layer_td &kp LGUI &kp RCTRL &kp RSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp PG_UP + &mo MAGIC &kp HOME &kp END &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp LALT &kp RALT &kp RET &kp SPACE &kp UP &kp DOWN &kp LBKT &kp RBKT &kp PG_DN + >; + }; + + lower_layer { + bindings = < + &kp C_BRI_DN &kp C_BRI_UP &kp C_PREV &kp C_NEXT &kp C_PP &kp C_MUTE &kp C_VOL_DN &kp C_VOL_UP &none &kp PAUSE_BREAK + &trans &none &none &none &none &kp HOME &kp LPAR &kp KP_NUM &kp KP_EQUAL &kp KP_DIVIDE &kp KP_MULTIPLY &kp PSCRN + &trans &none &none &kp UP &none &kp END &kp RPAR &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp SLCK + &trans &none &kp LEFT &kp DOWN &kp RIGHT &kp PG_UP &kp PRCNT &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &none + &trans &kp K_CMENU &none &kp F11 &kp F12 &kp PG_DN &trans &trans &to DEFAULT &trans &trans &trans &kp COMMA &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER &trans + &trans &kp CAPS &kp INS &kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &kp KP_N0 &kp KP_N0 &kp KP_DOT &kp KP_ENTER &trans + >; + }; + + magic_layer { + bindings = < + &bt BT_CLR &none &none &none &none &none &none &none &none &none + &none &none &none &none &none &none &none &none &none &none &none &none + &none &rgb_ug RGB_SPI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_BRI &rgb_ug RGB_TOG &none &none &none &none &none &none + &bootloader &rgb_ug RGB_SPD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_BRD &rgb_ug RGB_EFF &none &none &none &none &none &bootloader + &sys_reset &none &none &none &none &none &bt_2 &bt_3 &none &none &none &none &none &none &none &none &none &sys_reset + &none &none &none &none &none &bt_0 &bt_1 &out OUT_USB &none &none &none &none &none &none &none &none + >; + }; + }; +}; diff --git a/app/boards/arm/glove80/glove80.yaml b/app/boards/arm/glove80/glove80.yaml new file mode 100644 index 00000000000..90a5e13307f --- /dev/null +++ b/app/boards/arm/glove80/glove80.yaml @@ -0,0 +1,19 @@ +identifier: glove80 +name: Glove80 +url: https://www.moergo.com/ +type: mcu +arch: arm +toolchain: + - zephyr + - gnuarmemb + - xtools +supported: + - adc + - usb_device + - ble + - ieee802154 + - pwm + - watchdog + - gpio + - i2c + - spi diff --git a/app/boards/arm/glove80/glove80.zmk.yml b/app/boards/arm/glove80/glove80.zmk.yml new file mode 100644 index 00000000000..ca70b7d6acf --- /dev/null +++ b/app/boards/arm/glove80/glove80.zmk.yml @@ -0,0 +1,16 @@ +file_format: "1" +id: glove80 +name: Glove80 +type: board +arch: arm +url: https://www.moergo.com/ +features: + - keys + - underglow + - backlight +outputs: + - usb + - ble +siblings: + - glove80_lh + - glove80_rh diff --git a/app/boards/arm/glove80/glove80_lh-pinctrl.dtsi b/app/boards/arm/glove80/glove80_lh-pinctrl.dtsi new file mode 100644 index 00000000000..3dbf3d7e1a1 --- /dev/null +++ b/app/boards/arm/glove80/glove80_lh-pinctrl.dtsi @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; // WS2812_VEXT_DATA + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; + + pwm0_default: pwm0_default { + group1 { + psels = ; // rear LED + }; + }; + + pwm0_sleep: pwm0_sleep { + group1 { + psels = ; + bias-pull-down; + }; + }; + + uart0_default: uart0_default { + group1 { + psels = , // EXT1 + ; // EXT2 + }; + }; + + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; diff --git a/app/boards/arm/glove80/glove80_lh.dts b/app/boards/arm/glove80/glove80_lh.dts new file mode 100644 index 00000000000..ed40e0d2d1e --- /dev/null +++ b/app/boards/arm/glove80/glove80_lh.dts @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "glove80.dtsi" +#include "glove80_lh-pinctrl.dtsi" + +#include + +/ { + model = "glove80_lh"; + compatible = "glove80_lh"; + + chosen { + zmk,underglow = &led_strip; + zmk,backlight = &back_led_backlight; + zmk,battery = &vbatt; + }; + + back_led_backlight: pwmleds { + compatible = "pwm-leds"; + label = "BACK LED"; + pwm_led_0 { + pwms = <&pwm0 0 PWM_USEC(20) PWM_POLARITY_NORMAL>; + label = "Back LED configured as backlight"; + }; + }; + + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + control-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; /* WS2812_CE */ + init-delay-ms = <100>; + }; + + vbatt: vbatt { + compatible = "zmk,battery-nrf-vddh"; + label = "BATTERY"; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812C-2020"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <40>; /* 40 keys have underglow at the moment */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; + +&pwm0 { + status = "okay"; + pinctrl-0 = <&pwm0_default>; + pinctrl-1 = <&pwm0_sleep>; + pinctrl-names = "default", "sleep"; +}; + +&uart0 { + compatible = "nordic,nrf-uarte"; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; +}; + +&kscan0 { + row-gpios + = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW1 + , <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW2 + , <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW3 + , <&gpio0 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW4 + , <&gpio0 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW5 + , <&gpio1 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW6 + ; + col-gpios + = <&gpio1 8 GPIO_ACTIVE_HIGH> // LH COL6 + , <&gpio1 4 GPIO_ACTIVE_HIGH> // LH COL5 + , <&gpio1 6 GPIO_ACTIVE_HIGH> // LH COL4 + , <&gpio1 7 GPIO_ACTIVE_HIGH> // LH COL3 + , <&gpio1 5 GPIO_ACTIVE_HIGH> // LH COL2 + , <&gpio1 3 GPIO_ACTIVE_HIGH> // LH COL1 + , <&gpio1 1 GPIO_ACTIVE_HIGH> // LH Thumb + ; +}; diff --git a/app/boards/arm/glove80/glove80_lh.keymap b/app/boards/arm/glove80/glove80_lh.keymap new file mode 100644 index 00000000000..dd4c2d6a01f --- /dev/null +++ b/app/boards/arm/glove80/glove80_lh.keymap @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "glove80.keymap" diff --git a/app/boards/arm/glove80/glove80_lh_defconfig b/app/boards/arm/glove80/glove80_lh_defconfig new file mode 100644 index 00000000000..a93f27cd8f2 --- /dev/null +++ b/app/boards/arm/glove80/glove80_lh_defconfig @@ -0,0 +1,92 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_GLOVE80_LH=y + +# Enable both USB and BLE +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + +# Keyboard IDs +CONFIG_ZMK_KEYBOARD_NAME="Glove80 Left" +CONFIG_USB_DEVICE_PID=0x27db +CONFIG_USB_DEVICE_VID=0x16c0 +CONFIG_USB_DEVICE_MANUFACTURER="MoErgo" +CONFIG_USB_DEVICE_SN="moergo.com:GLV80-0123456789ABCDEF" + +CONFIG_BT_DIS_PNP_PID=0x27db +CONFIG_BT_DIS_PNP_VID=0x16c0 +CONFIG_BT_DIS_MANUF="MoErgo" +CONFIG_BT_DIS_MODEL="Glove80" + +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y + +# Work-around for Windows bug with battery notifications +CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n + +# Enable MPU +CONFIG_ARM_MPU=y + +# Enable GPIO +CONFIG_GPIO=y + +# Build configurations +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_BUILD_OUTPUT_UF2_FAMILY_ID="0x9807B007" +CONFIG_USE_DT_CODE_PARTITION=y + +# Flash configuration +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +# Enable 32kHz crystal +CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y + +# Enable RGB underglow +CONFIG_ZMK_RGB_UNDERGLOW=y + +CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y +CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n +CONFIG_ZMK_RGB_UNDERGLOW_BRT_STEP=4 +CONFIG_ZMK_RGB_UNDERGLOW_BRT_MIN=4 + +# DO NOT CHANGE CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX TO ABOVE 80. Configuring +# BRT_MAX above 80% will draw additional current and can potentially damage your +# computer. WARRANTY IS VOID IF BRT_MAX SET ABOVE 80. +CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX=80 + +CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3 +CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=285 +CONFIG_ZMK_RGB_UNDERGLOW_SAT_START=75 +CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=16 + +# The power LED is implemented as a backlight +# For now, the power LED is acting as a "USB connected" indicator +CONFIG_ZMK_BACKLIGHT=y +CONFIG_ZMK_BACKLIGHT_ON_START=y +CONFIG_ZMK_BACKLIGHT_BRT_START=5 +CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y +CONFIG_ZMK_BACKLIGHT_AUTO_OFF_USB=y + +# The full two-byte consumer report space has compatibility issues with some +# operating systems, most notably macOS. Use the more basic single-byte usage +# space. +CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y + +# Turn on debugging to disable optimization. Debug messages can result in larger +# stacks, so enable stack protection and particularly a larger BLE peripheral stack. +# CONFIG_DEBUG=y +# CONFIG_DEBUG_THREAD_INFO=y +# CONFIG_EXCEPTION_STACK_TRACE=y +# CONFIG_HW_STACK_PROTECTION=y +# CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE=1300 + +# Log via USB or Segger RTT +CONFIG_ZMK_USB_LOGGING=n +CONFIG_ZMK_RTT_LOGGING=n diff --git a/app/boards/arm/glove80/glove80_rh-pinctrl.dtsi b/app/boards/arm/glove80/glove80_rh-pinctrl.dtsi new file mode 100644 index 00000000000..454a2621051 --- /dev/null +++ b/app/boards/arm/glove80/glove80_rh-pinctrl.dtsi @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; // WS2812_VEXT_DATA + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; + + pwm0_default: pwm0_default { + group1 { + psels = ; // Rear LED + }; + }; + + pwm0_sleep: pwm0_sleep { + group1 { + psels = ; + bias-pull-down; + }; + }; + + uart0_default: uart0_default { + group1 { + psels = , // EXT1 + ; // EXT2 + }; + }; + + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + +}; diff --git a/app/boards/arm/glove80/glove80_rh.dts b/app/boards/arm/glove80/glove80_rh.dts new file mode 100644 index 00000000000..288f63688ca --- /dev/null +++ b/app/boards/arm/glove80/glove80_rh.dts @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + + +#include "glove80.dtsi" +#include "glove80_rh-pinctrl.dtsi" + +#include + +/ { + model = "glove80_rh"; + compatible = "glove80_rh"; + + chosen { + zmk,underglow = &led_strip; + zmk,backlight = &back_led_backlight; + zmk,battery = &vbatt; + }; + + back_led_backlight: pwmleds { + compatible = "pwm-leds"; + label = "BACK LED"; + pwm_led_0 { + pwms = <&pwm0 0 PWM_USEC(20) PWM_POLARITY_NORMAL>; + label = "Back LED configured as backlight"; + }; + }; + + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + control-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; /* WS2812_CE */ + init-delay-ms = <100>; + }; + + vbatt: vbatt { + compatible = "zmk,battery-nrf-vddh"; + label = "BATTERY"; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812C-2020"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <40>; /* 40 keys have underglow at the moment */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; + +&pwm0 { + status = "okay"; + pinctrl-0 = <&pwm0_default>; + pinctrl-1 = <&pwm0_sleep>; + pinctrl-names = "default", "sleep"; +}; + + +&uart0 { + compatible = "nordic,nrf-uarte"; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; +}; + +/* For right hand, the columns are offset by 7 */ +&default_transform { + col-offset = <7>; +}; + +&kscan0 { + row-gpios + = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW1 + , <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW2 + , <&gpio0 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW3 + , <&gpio1 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW4 + , <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW5 + , <&gpio0 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW6 + ; + col-gpios + = <&gpio1 6 GPIO_ACTIVE_HIGH> // RH Thumb + , <&gpio1 4 GPIO_ACTIVE_HIGH> // RH COL1 + , <&gpio0 2 GPIO_ACTIVE_HIGH> // RH COL2 + , <&gpio1 7 GPIO_ACTIVE_HIGH> // RH COL3 + , <&gpio1 5 GPIO_ACTIVE_HIGH> // RH COL4 + , <&gpio1 3 GPIO_ACTIVE_HIGH> // RH COL5 + , <&gpio1 1 GPIO_ACTIVE_HIGH> // RH COL6 + ; +}; diff --git a/app/boards/arm/glove80/glove80_rh.keymap b/app/boards/arm/glove80/glove80_rh.keymap new file mode 100644 index 00000000000..dd4c2d6a01f --- /dev/null +++ b/app/boards/arm/glove80/glove80_rh.keymap @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "glove80.keymap" diff --git a/app/boards/arm/glove80/glove80_rh_defconfig b/app/boards/arm/glove80/glove80_rh_defconfig new file mode 100644 index 00000000000..ef29d682a54 --- /dev/null +++ b/app/boards/arm/glove80/glove80_rh_defconfig @@ -0,0 +1,89 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_GLOVE80_RH=y + +# Enable both USB and BLE +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + +# Keyboard IDs +CONFIG_ZMK_KEYBOARD_NAME="Glove80 Right" +CONFIG_USB_DEVICE_PID=0x27d9 +CONFIG_USB_DEVICE_VID=0x16c0 +CONFIG_USB_DEVICE_MANUFACTURER="MoErgo" +CONFIG_USB_DEVICE_SN="moergo.com:GLV80-0123456789ABCDEF" + +CONFIG_BT_DIS_PNP_PID=0x27d9 +CONFIG_BT_DIS_PNP_VID=0x16c0 +CONFIG_BT_DIS_MANUF="MoErgo" +CONFIG_BT_DIS_MODEL="Glove80 Right" + +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y + +# Enable MPU +CONFIG_ARM_MPU=y + +# Enable GPIO +CONFIG_GPIO=y + +# Build configurations +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_BUILD_OUTPUT_UF2_FAMILY_ID="0x9808B007" +CONFIG_USE_DT_CODE_PARTITION=y + +# Flash configuration +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +# Enable 32kHz crystal +CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y + +# Enable RGB underglow +CONFIG_ZMK_RGB_UNDERGLOW=y + +CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y +CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n +CONFIG_ZMK_RGB_UNDERGLOW_BRT_STEP=4 +CONFIG_ZMK_RGB_UNDERGLOW_BRT_MIN=4 + +# DO NOT CHANGE CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX TO ABOVE 80. Configuring +# BRT_MAX above 80% will draw additional current and can potentially damage your +# computer. WARRANTY IS VOID IF BRT_MAX SET ABOVE 80. +CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX=80 + +CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3 +CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=285 +CONFIG_ZMK_RGB_UNDERGLOW_SAT_START=75 +CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=16 + +# The power LED is implemented as a backlight +# For now, the power LED is acting as a "USB connected" indicator +CONFIG_ZMK_BACKLIGHT=y +CONFIG_ZMK_BACKLIGHT_ON_START=y +CONFIG_ZMK_BACKLIGHT_BRT_START=5 +CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y +CONFIG_ZMK_BACKLIGHT_AUTO_OFF_USB=y + +# The full two-byte consumer report space has compatibility issues with some +# operating systems, most notably macOS. Use the more basic single-byte usage +# space. +CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y + +# Turn on debugging to disable optimization. Debug messages can result in larger +# stacks, so enable stack protection and particularly a larger BLE peripheral stack. +# CONFIG_DEBUG=y +# CONFIG_DEBUG_THREAD_INFO=y +# CONFIG_EXCEPTION_STACK_TRACE=y +# CONFIG_HW_STACK_PROTECTION=y +# CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE=1300 + +# Log via USB or Segger RTT +CONFIG_ZMK_USB_LOGGING=n +CONFIG_ZMK_RTT_LOGGING=n diff --git a/app/boards/arm/glove80/readme.md b/app/boards/arm/glove80/readme.md new file mode 100644 index 00000000000..2c770376116 --- /dev/null +++ b/app/boards/arm/glove80/readme.md @@ -0,0 +1,13 @@ +## MoErgo Glove80 + +This board definition provides ZMK support for the [MoErgo Glove80](https://www.moergo.com) +keyboard. + +MoErgo additionally offers a customized version of ZMK which adds additional functionality such as +RGB status indicators, available on GitHub at [moergo-sc/zmk](https://github.com/moergo-sc/zmk). The +MoErgo customized ZMK fork is regularly updated to include the latest changes from mainline ZMK, but +will not always be completely up-to-date. MoErgo also offers an online layout configurator and +firmware builder application using the customized fork at [my.glove80.com](https://my.glove80.com). + +While mainline ZMK is expected to work well with Glove80, MoErgo only provides support for use of +their customized fork. Likewise, the ZMK community cannot directly provide support for MoErgo's fork. diff --git a/app/boards/arm/glove80/usb_serial_number.c b/app/boards/arm/glove80/usb_serial_number.c new file mode 100644 index 00000000000..44d7ee20363 --- /dev/null +++ b/app/boards/arm/glove80/usb_serial_number.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include "usb_descriptor.h" + +#define LOG_LEVEL CONFIG_USB_DEVICE_LOG_LEVEL +#include +LOG_MODULE_DECLARE(usb_descriptor); + +int base16_encode(const uint8_t *data, int length, uint8_t *result, int bufSize); + +uint8_t *usb_update_sn_string_descriptor(void) { + /* + * nrf52840 hwinfo returns a 64-bit hardware id. Glove80 uses this as a + * serial number, encoded as base16 into the last 16 characters of the + * CONFIG_USB_DEVICE_SN template. If insufficient template space is + * available, instead return the static serial number string. + */ + const uint8_t template_len = sizeof(CONFIG_USB_DEVICE_SN); + const uint8_t sn_len = 16; + + if (template_len < sn_len + 1) { + LOG_DBG("Serial number template too short"); + return CONFIG_USB_DEVICE_SN; + } + + static uint8_t serial[sizeof(CONFIG_USB_DEVICE_SN)]; + strncpy(serial, CONFIG_USB_DEVICE_SN, template_len); + + uint8_t hwid[8]; + memset(hwid, 0, sizeof(hwid)); + uint8_t hwlen = hwinfo_get_device_id(hwid, sizeof(hwid)); + + if (hwlen > 0) { + const uint8_t offset = template_len - sn_len - 1; + LOG_HEXDUMP_DBG(&hwid, sn_len, "Serial Number"); + base16_encode(hwid, hwlen, serial + offset, sn_len + 1); + } + + return serial; +} + +int base16_encode(const uint8_t *data, int length, uint8_t *result, int bufSize) { + const char hex[] = "0123456789ABCDEF"; + + int i = 0; + while (i < bufSize && i < length * 2) { + uint8_t nibble; + if (i % 2 == 0) { + nibble = data[i / 2] >> 4; + } else { + nibble = data[i / 2] & 0xF; + } + result[i] = hex[nibble]; + ++i; + } + if (i < bufSize) { + result[i] = '\0'; + } + return i; +} From f6716f869a0fd20ac9520e2808dc4183742436a5 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 14 Nov 2023 07:03:25 +0000 Subject: [PATCH 145/160] fix(usb): Build with ZMK_USB_BOOT disabled. * Invert the logic so `get_keyboard_report` is sane when `ZMK_USB_BOOT` is disabled. --- app/src/usb_hid.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/usb_hid.c b/app/src/usb_hid.c index c72bb36c9ef..d2a52cf24ab 100644 --- a/app/src/usb_hid.c +++ b/app/src/usb_hid.c @@ -39,16 +39,16 @@ void zmk_usb_hid_set_protocol(uint8_t protocol) { hid_protocol = protocol; } #endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ static uint8_t *get_keyboard_report(size_t *len) { - if (hid_protocol == HID_PROTOCOL_REPORT) { - struct zmk_hid_keyboard_report *report = zmk_hid_get_keyboard_report(); - *len = sizeof(*report); - return (uint8_t *)report; - } #if IS_ENABLED(CONFIG_ZMK_USB_BOOT) - zmk_hid_boot_report_t *boot_report = zmk_hid_get_boot_report(); - *len = sizeof(*boot_report); - return (uint8_t *)boot_report; + if (hid_protocol != HID_PROTOCOL_REPORT) { + zmk_hid_boot_report_t *boot_report = zmk_hid_get_boot_report(); + *len = sizeof(*boot_report); + return (uint8_t *)boot_report; + } #endif + struct zmk_hid_keyboard_report *report = zmk_hid_get_keyboard_report(); + *len = sizeof(*report); + return (uint8_t *)report; } static int get_report_cb(const struct device *dev, struct usb_setup_packet *setup, int32_t *len, From 3027b2a6e8f2896f7e08d5a502be50ad21f32d7f Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 14 Nov 2023 07:50:48 +0000 Subject: [PATCH 146/160] chore(usb): Don't enable ZMK_USB_ROOT by default. * Some initial reports of crashes with this code enabled, so disabling by default for now pending further investigation. --- app/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/app/Kconfig b/app/Kconfig index 282339e3e40..072795e317b 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -98,7 +98,6 @@ config ZMK_USB config ZMK_USB_BOOT bool "USB Boot Protocol Support" - default y depends on ZMK_USB select USB_HID_BOOT_PROTOCOL select USB_DEVICE_SOF From 8776911da5005d42cd0bdf108b23deca16d7ec82 Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Wed, 15 Nov 2023 18:03:30 +0000 Subject: [PATCH 147/160] feat(ble): Allow disabling BLE BAS reporting The battery reporting has been known to cause macOS computers to wakeup repeatedly. In some cases (e.g. display or custom lighting implementation) one might want to collect battery SOC without broadcasting over BLE * Update docs/docs/config/battery.md Co-authored-by: Cem Aksoylar --- app/Kconfig | 2 +- app/src/battery.c | 4 ++-- docs/docs/config/battery.md | 6 ++++++ docs/docs/config/system.md | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 072795e317b..1b3eb6def6b 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -321,7 +321,7 @@ config ZMK_BATTERY_REPORTING bool "Battery level detection/reporting" default n select SENSOR - select BT_BAS if ZMK_BLE + imply BT_BAS if ZMK_BLE config ZMK_IDLE_TIMEOUT int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)" diff --git a/app/src/battery.c b/app/src/battery.c index 87a25e08a2d..c6466272082 100644 --- a/app/src/battery.c +++ b/app/src/battery.c @@ -51,7 +51,7 @@ static int zmk_battery_update(const struct device *battery) { if (last_state_of_charge != state_of_charge.val1) { last_state_of_charge = state_of_charge.val1; - +#if IS_ENABLED(CONFIG_BT_BAS) LOG_DBG("Setting BAS GATT battery level to %d.", last_state_of_charge); rc = bt_bas_set_battery_level(last_state_of_charge); @@ -60,7 +60,7 @@ static int zmk_battery_update(const struct device *battery) { LOG_WRN("Failed to set BAS GATT battery level (err %d)", rc); return rc; } - +#endif rc = ZMK_EVENT_RAISE(new_zmk_battery_state_changed( (struct zmk_battery_state_changed){.state_of_charge = last_state_of_charge})); } diff --git a/docs/docs/config/battery.md b/docs/docs/config/battery.md index c56a30efd67..8d65a00a039 100644 --- a/docs/docs/config/battery.md +++ b/docs/docs/config/battery.md @@ -22,6 +22,12 @@ While `CONFIG_ZMK_BATTERY_REPORTING` is disabled by default it is implied by `CO ::: +:::note BLE reporting on MacOS + +On macOS the BLE battery reporting packets can cause the computer to wakeup from sleep. To prevent this, the battery _reporting_ service can be disabled by setting `CONFIG_BT_BAS=n`. This setting is independent of battery _monitoring_, for instance the battery level can still be indicated on a display. + +::: + ### Devicetree Applies to: [`/chosen` node](https://docs.zephyrproject.org/latest/guides/dts/intro.html#aliases-and-chosen-nodes) diff --git a/docs/docs/config/system.md b/docs/docs/config/system.md index 25d51940afb..b9dd580de0c 100644 --- a/docs/docs/config/system.md +++ b/docs/docs/config/system.md @@ -66,6 +66,7 @@ for more information on configuring Bluetooth. | Config | Type | Description | Default | | ------------------------------------------- | ---- | --------------------------------------------------------------------- | ------- | | `CONFIG_BT` | bool | Enable Bluetooth support | | +| `CONFIG_BT_BAS` | bool | Enable the Bluetooth BAS (battery reporting service) | y | | `CONFIG_BT_MAX_CONN` | int | Maximum number of simultaneous Bluetooth connections | 5 | | `CONFIG_BT_MAX_PAIRED` | int | Maximum number of paired Bluetooth devices | 5 | | `CONFIG_ZMK_BLE` | bool | Enable ZMK as a Bluetooth keyboard | | From d7d9eed317b3f788370a8728afa449c5e525f2ca Mon Sep 17 00:00:00 2001 From: Alexander Krikun Date: Tue, 27 Apr 2021 18:24:11 +0300 Subject: [PATCH 148/160] feat(mouse): Initial mouse keys support. * Add HID report/descriptor for a new report with mouse buttons, and x/y/wheel deltas. * New mouse key press behavior for press/release of mouse keys. * Add constants for HID main item values (e.g. data/array/absolute) * Define and use constants for our HID report IDs. --- app/CMakeLists.txt | 3 + app/Kconfig | 13 +++ app/Kconfig.behaviors | 5 ++ app/dts/behaviors.dtsi | 3 +- app/dts/behaviors/mouse_key_press.dtsi | 9 +++ .../zmk,behavior-mouse-key-press.yaml | 5 ++ app/include/dt-bindings/zmk/hid_usage_pages.h | 1 + app/include/dt-bindings/zmk/mouse.h | 24 ++++++ app/include/zmk/endpoints.h | 4 + .../zmk/events/mouse_button_state_changed.h | 26 ++++++ app/include/zmk/hid.h | 66 +++++++++++++++ app/include/zmk/hog.h | 4 + app/include/zmk/mouse.h | 12 +++ app/include/zmk/usb_hid.h | 3 + app/src/behaviors/behavior_mouse_key_press.c | 48 +++++++++++ app/src/endpoints.c | 33 ++++++++ app/src/events/mouse_button_state_changed.c | 9 +++ app/src/hid.c | 81 +++++++++++++++++++ app/src/hog.c | 80 ++++++++++++++++++ app/src/mouse.c | 43 ++++++++++ app/src/usb_hid.c | 13 +++ app/tests/mouse-keys/mkp/events.patterns | 1 + .../mouse-keys/mkp/keycode_events.snapshot | 10 +++ app/tests/mouse-keys/mkp/native_posix.keymap | 28 +++++++ .../mouse-keys/mkp/native_posix_64.keymap | 28 +++++++ docs/docs/behaviors/mouse-emulation.md | 66 +++++++++++++++ docs/sidebars.js | 1 + 27 files changed, 618 insertions(+), 1 deletion(-) create mode 100644 app/dts/behaviors/mouse_key_press.dtsi create mode 100644 app/dts/bindings/behaviors/zmk,behavior-mouse-key-press.yaml create mode 100644 app/include/dt-bindings/zmk/mouse.h create mode 100644 app/include/zmk/events/mouse_button_state_changed.h create mode 100644 app/include/zmk/mouse.h create mode 100644 app/src/behaviors/behavior_mouse_key_press.c create mode 100644 app/src/events/mouse_button_state_changed.c create mode 100644 app/src/mouse.c create mode 100644 app/tests/mouse-keys/mkp/events.patterns create mode 100644 app/tests/mouse-keys/mkp/keycode_events.snapshot create mode 100644 app/tests/mouse-keys/mkp/native_posix.keymap create mode 100644 app/tests/mouse-keys/mkp/native_posix_64.keymap create mode 100644 docs/docs/behaviors/mouse-emulation.md diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 793f386dbe3..0891364b437 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -31,12 +31,14 @@ target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/ext_power_generic.c) target_sources(app PRIVATE src/events/activity_state_changed.c) target_sources(app PRIVATE src/events/position_state_changed.c) target_sources(app PRIVATE src/events/sensor_event.c) +target_sources(app PRIVATE src/events/mouse_button_state_changed.c) target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c) target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/events/usb_conn_state_changed.c) target_sources(app PRIVATE src/behaviors/behavior_reset.c) target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c) if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) target_sources(app PRIVATE src/hid.c) + target_sources_ifdef(CONFIG_ZMK_MOUSE app PRIVATE src/mouse.c) target_sources(app PRIVATE src/behaviors/behavior_key_press.c) target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_KEY_TOGGLE app PRIVATE src/behaviors/behavior_key_toggle.c) target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c) @@ -54,6 +56,7 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE app PRIVATE src/behaviors/behavior_sensor_rotate.c) target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_VAR app PRIVATE src/behaviors/behavior_sensor_rotate_var.c) target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON app PRIVATE src/behaviors/behavior_sensor_rotate_common.c) + target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_MOUSE_KEY_PRESS app PRIVATE src/behaviors/behavior_mouse_key_press.c) target_sources(app PRIVATE src/combo.c) target_sources(app PRIVATE src/behaviors/behavior_tap_dance.c) target_sources(app PRIVATE src/behavior_queue.c) diff --git a/app/Kconfig b/app/Kconfig index 1b3eb6def6b..f92f0ae3b86 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -156,6 +156,10 @@ config ZMK_BLE_CONSUMER_REPORT_QUEUE_SIZE int "Max number of consumer HID reports to queue for sending over BLE" default 5 +config ZMK_BLE_MOUSE_REPORT_QUEUE_SIZE + int "Max number of mouse HID reports to queue for sending over BLE" + default 20 + config ZMK_BLE_CLEAR_BONDS_ON_START bool "Configuration that clears all bond information from the keyboard on startup." default n @@ -315,6 +319,15 @@ endif #Display/LED Options endmenu +menu "Mouse Options" + +config ZMK_MOUSE + bool "Enable ZMK mouse emulation" + default n + +#Mouse Options +endmenu + menu "Power Management" config ZMK_BATTERY_REPORTING diff --git a/app/Kconfig.behaviors b/app/Kconfig.behaviors index 9e4a82b06e7..11bc8c5900f 100644 --- a/app/Kconfig.behaviors +++ b/app/Kconfig.behaviors @@ -6,6 +6,11 @@ config ZMK_BEHAVIOR_KEY_TOGGLE default y depends on DT_HAS_ZMK_BEHAVIOR_KEY_TOGGLE_ENABLED +config ZMK_BEHAVIOR_MOUSE_KEY_PRESS + bool + default y + depends on DT_HAS_ZMK_BEHAVIOR_MOUSE_KEY_PRESS_ENABLED + imply ZMK_MOUSE config ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON bool diff --git a/app/dts/behaviors.dtsi b/app/dts/behaviors.dtsi index b3502cbbc13..23f2fee2806 100644 --- a/app/dts/behaviors.dtsi +++ b/app/dts/behaviors.dtsi @@ -18,4 +18,5 @@ #include #include #include -#include \ No newline at end of file +#include +#include diff --git a/app/dts/behaviors/mouse_key_press.dtsi b/app/dts/behaviors/mouse_key_press.dtsi new file mode 100644 index 00000000000..9cc16e81e75 --- /dev/null +++ b/app/dts/behaviors/mouse_key_press.dtsi @@ -0,0 +1,9 @@ +/ { + behaviors { + /omit-if-no-ref/ mkp: behavior_mouse_key_press { + compatible = "zmk,behavior-mouse-key-press"; + label = "MOUSE_KEY_PRESS"; + #binding-cells = <1>; + }; + }; +}; diff --git a/app/dts/bindings/behaviors/zmk,behavior-mouse-key-press.yaml b/app/dts/bindings/behaviors/zmk,behavior-mouse-key-press.yaml new file mode 100644 index 00000000000..8540916b72a --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-mouse-key-press.yaml @@ -0,0 +1,5 @@ +description: Mouse key press/release behavior + +compatible: "zmk,behavior-mouse-key-press" + +include: one_param.yaml diff --git a/app/include/dt-bindings/zmk/hid_usage_pages.h b/app/include/dt-bindings/zmk/hid_usage_pages.h index 2ccdba5540f..7fa54fd88b9 100644 --- a/app/include/dt-bindings/zmk/hid_usage_pages.h +++ b/app/include/dt-bindings/zmk/hid_usage_pages.h @@ -26,6 +26,7 @@ #define HID_USAGE_GDV (0x06) // Generic Device Controls #define HID_USAGE_KEY (0x07) // Keyboard/Keypad #define HID_USAGE_LED (0x08) // LED +#define HID_USAGE_BUTTON (0x09) // Button #define HID_USAGE_TELEPHONY (0x0B) // Telephony Device #define HID_USAGE_CONSUMER (0x0C) // Consumer #define HID_USAGE_DIGITIZERS (0x0D) // Digitizers diff --git a/app/include/dt-bindings/zmk/mouse.h b/app/include/dt-bindings/zmk/mouse.h new file mode 100644 index 00000000000..582518aff7e --- /dev/null +++ b/app/include/dt-bindings/zmk/mouse.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ +#pragma once + +#include + +/* Mouse press behavior */ +/* Left click */ +#define MB1 BIT(0) +#define LCLK (MB1) + +/* Right click */ +#define MB2 BIT(1) +#define RCLK (MB2) + +/* Middle click */ +#define MB3 BIT(2) +#define MCLK (MB3) + +#define MB4 BIT(3) +#define MB5 BIT(4) diff --git a/app/include/zmk/endpoints.h b/app/include/zmk/endpoints.h index c5964ff8535..70240183e36 100644 --- a/app/include/zmk/endpoints.h +++ b/app/include/zmk/endpoints.h @@ -69,3 +69,7 @@ int zmk_endpoints_toggle_transport(void); struct zmk_endpoint_instance zmk_endpoints_selected(void); int zmk_endpoints_send_report(uint16_t usage_page); + +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +int zmk_endpoints_send_mouse_report(); +#endif // IS_ENABLE(CONFIG_ZMK_MOUSE) diff --git a/app/include/zmk/events/mouse_button_state_changed.h b/app/include/zmk/events/mouse_button_state_changed.h new file mode 100644 index 00000000000..9382789e56f --- /dev/null +++ b/app/include/zmk/events/mouse_button_state_changed.h @@ -0,0 +1,26 @@ + +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include +#include + +struct zmk_mouse_button_state_changed { + zmk_mouse_button_t buttons; + bool state; + int64_t timestamp; +}; + +ZMK_EVENT_DECLARE(zmk_mouse_button_state_changed); + +static inline struct zmk_mouse_button_state_changed_event * +zmk_mouse_button_state_changed_from_encoded(uint32_t encoded, bool pressed, int64_t timestamp) { + return new_zmk_mouse_button_state_changed((struct zmk_mouse_button_state_changed){ + .buttons = ZMK_HID_USAGE_ID(encoded), .state = pressed, .timestamp = timestamp}); +} diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h index afe9210199f..aeaa69d8d08 100644 --- a/app/include/zmk/hid.h +++ b/app/include/zmk/hid.h @@ -10,10 +10,15 @@ #include #include +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#include +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + #include #include #define ZMK_HID_KEYBOARD_NKRO_MAX_USAGE HID_USAGE_KEY_KEYPAD_EQUAL +#define ZMK_HID_MOUSE_NUM_BUTTONS 0x05 // See https://www.usb.org/sites/default/files/hid1_11.pdf section 6.2.2.4 Main Items @@ -46,6 +51,7 @@ #define ZMK_HID_REPORT_ID_KEYBOARD 0x01 #define ZMK_HID_REPORT_ID_CONSUMER 0x02 +#define ZMK_HID_REPORT_ID_MOUSE 0x03 static const uint8_t zmk_hid_report_desc[] = { HID_USAGE_PAGE(HID_USAGE_GEN_DESKTOP), @@ -114,6 +120,39 @@ static const uint8_t zmk_hid_report_desc[] = { HID_REPORT_COUNT(CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE), HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_ARRAY | ZMK_HID_MAIN_VAL_ABS), HID_END_COLLECTION, + +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + HID_USAGE_PAGE(HID_USAGE_GD), + HID_USAGE(HID_USAGE_GD_MOUSE), + HID_COLLECTION(HID_COLLECTION_APPLICATION), + HID_REPORT_ID(ZMK_HID_REPORT_ID_MOUSE), + HID_USAGE(HID_USAGE_GD_POINTER), + HID_COLLECTION(HID_COLLECTION_PHYSICAL), + HID_USAGE_PAGE(HID_USAGE_BUTTON), + HID_USAGE_MIN8(0x1), + HID_USAGE_MAX8(ZMK_HID_MOUSE_NUM_BUTTONS), + HID_LOGICAL_MIN8(0x00), + HID_LOGICAL_MAX8(0x01), + HID_REPORT_SIZE(0x01), + HID_REPORT_COUNT(0x5), + HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), + // Constant padding for the last 3 bits. + HID_REPORT_SIZE(0x03), + HID_REPORT_COUNT(0x01), + HID_INPUT(ZMK_HID_MAIN_VAL_CONST | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), + // Some OSes ignore pointer devices without X/Y data. + HID_USAGE_PAGE(HID_USAGE_GEN_DESKTOP), + HID_USAGE(HID_USAGE_GD_X), + HID_USAGE(HID_USAGE_GD_Y), + HID_USAGE(HID_USAGE_GD_WHEEL), + HID_LOGICAL_MIN8(-0x7F), + HID_LOGICAL_MAX8(0x7F), + HID_REPORT_SIZE(0x08), + HID_REPORT_COUNT(0x03), + HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_REL), + HID_END_COLLECTION, + HID_END_COLLECTION, +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) }; #if IS_ENABLED(CONFIG_ZMK_USB_BOOT) @@ -163,6 +202,21 @@ struct zmk_hid_consumer_report { struct zmk_hid_consumer_report_body body; } __packed; +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +struct zmk_hid_mouse_report_body { + zmk_mouse_button_flags_t buttons; + int8_t d_x; + int8_t d_y; + int8_t d_wheel; +} __packed; + +struct zmk_hid_mouse_report { + uint8_t report_id; + struct zmk_hid_mouse_report_body body; +} __packed; + +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + zmk_mod_flags_t zmk_hid_get_explicit_mods(); int zmk_hid_register_mod(zmk_mod_t modifier); int zmk_hid_unregister_mod(zmk_mod_t modifier); @@ -189,9 +243,21 @@ int zmk_hid_press(uint32_t usage); int zmk_hid_release(uint32_t usage); bool zmk_hid_is_pressed(uint32_t usage); +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +int zmk_hid_mouse_button_press(zmk_mouse_button_t button); +int zmk_hid_mouse_button_release(zmk_mouse_button_t button); +int zmk_hid_mouse_buttons_press(zmk_mouse_button_flags_t buttons); +int zmk_hid_mouse_buttons_release(zmk_mouse_button_flags_t buttons); +void zmk_hid_mouse_clear(); +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + struct zmk_hid_keyboard_report *zmk_hid_get_keyboard_report(); struct zmk_hid_consumer_report *zmk_hid_get_consumer_report(); #if IS_ENABLED(CONFIG_ZMK_USB_BOOT) zmk_hid_boot_report_t *zmk_hid_get_boot_report(); #endif + +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +struct zmk_hid_mouse_report *zmk_hid_get_mouse_report(); +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) diff --git a/app/include/zmk/hog.h b/app/include/zmk/hog.h index 7523fb661ad..b4e45d9186d 100644 --- a/app/include/zmk/hog.h +++ b/app/include/zmk/hog.h @@ -13,3 +13,7 @@ int zmk_hog_init(); int zmk_hog_send_keyboard_report(struct zmk_hid_keyboard_report_body *body); int zmk_hog_send_consumer_report(struct zmk_hid_consumer_report_body *body); + +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +int zmk_hog_send_mouse_report(struct zmk_hid_mouse_report_body *body); +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) diff --git a/app/include/zmk/mouse.h b/app/include/zmk/mouse.h new file mode 100644 index 00000000000..d873f15689a --- /dev/null +++ b/app/include/zmk/mouse.h @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include + +typedef uint8_t zmk_mouse_button_flags_t; +typedef uint16_t zmk_mouse_button_t; diff --git a/app/include/zmk/usb_hid.h b/app/include/zmk/usb_hid.h index 777f2b48a03..f9091778501 100644 --- a/app/include/zmk/usb_hid.h +++ b/app/include/zmk/usb_hid.h @@ -10,4 +10,7 @@ int zmk_usb_hid_send_keyboard_report(); int zmk_usb_hid_send_consumer_report(); +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +int zmk_usb_hid_send_mouse_report(); +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) void zmk_usb_hid_set_protocol(uint8_t protocol); diff --git a/app/src/behaviors/behavior_mouse_key_press.c b/app/src/behaviors/behavior_mouse_key_press.c new file mode 100644 index 00000000000..6718155768c --- /dev/null +++ b/app/src/behaviors/behavior_mouse_key_press.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_behavior_mouse_key_press + +#include +#include +#include + +#include +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) + +static int behavior_mouse_key_press_init(const struct device *dev) { return 0; }; + +static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + LOG_DBG("position %d keycode 0x%02X", event.position, binding->param1); + + return ZMK_EVENT_RAISE( + zmk_mouse_button_state_changed_from_encoded(binding->param1, true, event.timestamp)); +} + +static int on_keymap_binding_released(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + LOG_DBG("position %d keycode 0x%02X", event.position, binding->param1); + return ZMK_EVENT_RAISE( + zmk_mouse_button_state_changed_from_encoded(binding->param1, false, event.timestamp)); +} + +static const struct behavior_driver_api behavior_mouse_key_press_driver_api = { + .binding_pressed = on_keymap_binding_pressed, .binding_released = on_keymap_binding_released}; + +#define MKP_INST(n) \ + DEVICE_DT_INST_DEFINE(n, behavior_mouse_key_press_init, NULL, NULL, NULL, APPLICATION, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ + &behavior_mouse_key_press_driver_api); + +DT_INST_FOREACH_STATUS_OKAY(MKP_INST) + +#endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/endpoints.c b/app/src/endpoints.c index 10357d4e02d..098e04e2776 100644 --- a/app/src/endpoints.c +++ b/app/src/endpoints.c @@ -191,6 +191,36 @@ int zmk_endpoints_send_report(uint16_t usage_page) { return -ENOTSUP; } +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +int zmk_endpoints_send_mouse_report() { + switch (current_instance.transport) { +#if IS_ENABLED(CONFIG_ZMK_USB) + case ZMK_TRANSPORT_USB: { + int err = zmk_usb_hid_send_mouse_report(); + if (err) { + LOG_ERR("FAILED TO SEND OVER USB: %d", err); + } + return err; + } +#endif /* IS_ENABLED(CONFIG_ZMK_USB) */ + +#if IS_ENABLED(CONFIG_ZMK_BLE) + case ZMK_TRANSPORT_BLE: { + struct zmk_hid_mouse_report *mouse_report = zmk_hid_get_mouse_report(); + int err = zmk_hog_send_mouse_report(&mouse_report->body); + if (err) { + LOG_ERR("FAILED TO SEND OVER HOG: %d", err); + } + return err; + } +#endif /* IS_ENABLED(CONFIG_ZMK_BLE) */ + } + + LOG_ERR("Unsupported endpoint transport %d", current_instance.transport); + return -ENOTSUP; +} +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + #if IS_ENABLED(CONFIG_SETTINGS) static int endpoints_handle_set(const char *name, size_t len, settings_read_cb read_cb, @@ -295,6 +325,9 @@ static int zmk_endpoints_init(const struct device *_arg) { static void disconnect_current_endpoint() { zmk_hid_keyboard_clear(); zmk_hid_consumer_clear(); +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + zmk_hid_mouse_clear(); +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) zmk_endpoints_send_report(HID_USAGE_KEY); zmk_endpoints_send_report(HID_USAGE_CONSUMER); diff --git a/app/src/events/mouse_button_state_changed.c b/app/src/events/mouse_button_state_changed.c new file mode 100644 index 00000000000..419a7ce956d --- /dev/null +++ b/app/src/events/mouse_button_state_changed.c @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +ZMK_EVENT_IMPL(zmk_mouse_button_state_changed); diff --git a/app/src/hid.c b/app/src/hid.c index 689a2361e13..1ea2afb1621 100644 --- a/app/src/hid.c +++ b/app/src/hid.c @@ -12,6 +12,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include static struct zmk_hid_keyboard_report keyboard_report = { + .report_id = ZMK_HID_REPORT_ID_KEYBOARD, .body = {.modifiers = 0, ._reserved = 0, .keys = {0}}}; static struct zmk_hid_consumer_report consumer_report = {.report_id = ZMK_HID_REPORT_ID_CONSUMER, @@ -24,6 +25,13 @@ static uint8_t keys_held = 0; #endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + +static struct zmk_hid_mouse_report mouse_report = {.report_id = ZMK_HID_REPORT_ID_MOUSE, + .body = {.buttons = 0}}; + +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + // Keep track of how often a modifier was pressed. // Only release the modifier if the count is 0. static int explicit_modifier_counts[8] = {0, 0, 0, 0, 0, 0, 0, 0}; @@ -357,6 +365,71 @@ bool zmk_hid_is_pressed(uint32_t usage) { return false; } +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + +// Keep track of how often a button was pressed. +// Only release the button if the count is 0. +static int explicit_button_counts[5] = {0, 0, 0, 0, 0}; +static zmk_mod_flags_t explicit_buttons = 0; + +#define SET_MOUSE_BUTTONS(btns) \ + { \ + mouse_report.body.buttons = btns; \ + LOG_DBG("Mouse buttons set to 0x%02X", mouse_report.body.buttons); \ + } + +int zmk_hid_mouse_button_press(zmk_mouse_button_t button) { + if (button >= ZMK_HID_MOUSE_NUM_BUTTONS) { + return -EINVAL; + } + + explicit_button_counts[button]++; + LOG_DBG("Button %d count %d", button, explicit_button_counts[button]); + WRITE_BIT(explicit_buttons, button, true); + SET_MOUSE_BUTTONS(explicit_buttons); + return 0; +} + +int zmk_hid_mouse_button_release(zmk_mouse_button_t button) { + if (button >= ZMK_HID_MOUSE_NUM_BUTTONS) { + return -EINVAL; + } + + if (explicit_button_counts[button] <= 0) { + LOG_ERR("Tried to release button %d too often", button); + return -EINVAL; + } + explicit_button_counts[button]--; + LOG_DBG("Button %d count: %d", button, explicit_button_counts[button]); + if (explicit_button_counts[button] == 0) { + LOG_DBG("Button %d released", button); + WRITE_BIT(explicit_buttons, button, false); + } + SET_MOUSE_BUTTONS(explicit_buttons); + return 0; +} + +int zmk_hid_mouse_buttons_press(zmk_mouse_button_flags_t buttons) { + for (zmk_mouse_button_t i = 0; i < ZMK_HID_MOUSE_NUM_BUTTONS; i++) { + if (buttons & BIT(i)) { + zmk_hid_mouse_button_press(i); + } + } + return 0; +} + +int zmk_hid_mouse_buttons_release(zmk_mouse_button_flags_t buttons) { + for (zmk_mouse_button_t i = 0; i < ZMK_HID_MOUSE_NUM_BUTTONS; i++) { + if (buttons & BIT(i)) { + zmk_hid_mouse_button_release(i); + } + } + return 0; +} +void zmk_hid_mouse_clear() { memset(&mouse_report.body, 0, sizeof(mouse_report.body)); } + +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + struct zmk_hid_keyboard_report *zmk_hid_get_keyboard_report() { return &keyboard_report; } @@ -364,3 +437,11 @@ struct zmk_hid_keyboard_report *zmk_hid_get_keyboard_report() { struct zmk_hid_consumer_report *zmk_hid_get_consumer_report() { return &consumer_report; } + +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + +struct zmk_hid_mouse_report *zmk_hid_get_mouse_report() { + return &mouse_report; +} + +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) diff --git a/app/src/hog.c b/app/src/hog.c index 9ccfd9d2c0e..89a903cb967 100644 --- a/app/src/hog.c +++ b/app/src/hog.c @@ -56,6 +56,15 @@ static struct hids_report consumer_input = { .type = HIDS_INPUT, }; +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + +static struct hids_report mouse_input = { + .id = ZMK_HID_REPORT_ID_MOUSE, + .type = HIDS_INPUT, +}; + +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + static bool host_requests_notification = false; static uint8_t ctrl_point; // static uint8_t proto_mode; @@ -93,6 +102,15 @@ static ssize_t read_hids_consumer_input_report(struct bt_conn *conn, sizeof(struct zmk_hid_consumer_report_body)); } +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +static ssize_t read_hids_mouse_input_report(struct bt_conn *conn, const struct bt_gatt_attr *attr, + void *buf, uint16_t len, uint16_t offset) { + struct zmk_hid_mouse_report_body *report_body = &zmk_hid_get_mouse_report()->body; + return bt_gatt_attr_read(conn, attr, buf, len, offset, report_body, + sizeof(struct zmk_hid_mouse_report_body)); +} +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + // static ssize_t write_proto_mode(struct bt_conn *conn, // const struct bt_gatt_attr *attr, // const void *buf, uint16_t len, uint16_t offset, @@ -139,6 +157,15 @@ BT_GATT_SERVICE_DEFINE( BT_GATT_CCC(input_ccc_changed, BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), BT_GATT_DESCRIPTOR(BT_UUID_HIDS_REPORT_REF, BT_GATT_PERM_READ_ENCRYPT, read_hids_report_ref, NULL, &consumer_input), + +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_REPORT, BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY, + BT_GATT_PERM_READ_ENCRYPT, read_hids_mouse_input_report, NULL, NULL), + BT_GATT_CCC(input_ccc_changed, BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), + BT_GATT_DESCRIPTOR(BT_UUID_HIDS_REPORT_REF, BT_GATT_PERM_READ_ENCRYPT, read_hids_report_ref, + NULL, &mouse_input), +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_CTRL_POINT, BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_WRITE, NULL, write_ctrl_point, &ctrl_point)); @@ -261,6 +288,59 @@ int zmk_hog_send_consumer_report(struct zmk_hid_consumer_report_body *report) { return 0; }; +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + +K_MSGQ_DEFINE(zmk_hog_mouse_msgq, sizeof(struct zmk_hid_mouse_report_body), + CONFIG_ZMK_BLE_MOUSE_REPORT_QUEUE_SIZE, 4); + +void send_mouse_report_callback(struct k_work *work) { + struct zmk_hid_mouse_report_body report; + while (k_msgq_get(&zmk_hog_mouse_msgq, &report, K_NO_WAIT) == 0) { + struct bt_conn *conn = destination_connection(); + if (conn == NULL) { + return; + } + + struct bt_gatt_notify_params notify_params = { + .attr = &hog_svc.attrs[13], + .data = &report, + .len = sizeof(report), + }; + + int err = bt_gatt_notify_cb(conn, ¬ify_params); + if (err) { + LOG_DBG("Error notifying %d", err); + } + + bt_conn_unref(conn); + } +}; + +int zmk_hog_send_mouse_report(struct zmk_hid_mouse_report_body *report) { + struct bt_conn *conn = destination_connection(); + if (conn == NULL) { + return 1; + } + + struct bt_gatt_notify_params notify_params = { + .attr = &hog_svc.attrs[13], + .data = report, + .len = sizeof(*report), + }; + + int err = bt_gatt_notify_cb(conn, ¬ify_params); + if (err) { + LOG_DBG("Error notifying %d", err); + return err; + } + + bt_conn_unref(conn); + + return 0; +}; + +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + int zmk_hog_init(const struct device *_arg) { static const struct k_work_queue_config queue_config = {.name = "HID Over GATT Send Work"}; k_work_queue_start(&hog_work_q, hog_q_stack, K_THREAD_STACK_SIZEOF(hog_q_stack), diff --git a/app/src/mouse.c b/app/src/mouse.c new file mode 100644 index 00000000000..c1b9ac0261e --- /dev/null +++ b/app/src/mouse.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#include +#include +#include +#include + +static void listener_mouse_button_pressed(const struct zmk_mouse_button_state_changed *ev) { + LOG_DBG("buttons: 0x%02X", ev->buttons); + zmk_hid_mouse_buttons_press(ev->buttons); + zmk_endpoints_send_mouse_report(); +} + +static void listener_mouse_button_released(const struct zmk_mouse_button_state_changed *ev) { + LOG_DBG("buttons: 0x%02X", ev->buttons); + zmk_hid_mouse_buttons_release(ev->buttons); + zmk_endpoints_send_mouse_report(); +} + +int mouse_listener(const zmk_event_t *eh) { + const struct zmk_mouse_button_state_changed *mbt_ev = as_zmk_mouse_button_state_changed(eh); + if (mbt_ev) { + if (mbt_ev->state) { + listener_mouse_button_pressed(mbt_ev); + } else { + listener_mouse_button_released(mbt_ev); + } + return 0; + } + return 0; +} + +ZMK_LISTENER(mouse_listener, mouse_listener); +ZMK_SUBSCRIPTION(mouse_listener, zmk_mouse_button_state_changed); diff --git a/app/src/usb_hid.c b/app/src/usb_hid.c index d2a52cf24ab..fd58c14bf4a 100644 --- a/app/src/usb_hid.c +++ b/app/src/usb_hid.c @@ -129,6 +129,19 @@ int zmk_usb_hid_send_consumer_report() { return zmk_usb_hid_send_report((uint8_t *)report, sizeof(*report)); } +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +int zmk_usb_hid_send_mouse_report() { +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + if (hid_protocol == HID_PROTOCOL_BOOT) { + return -ENOTSUP; + } +#endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ + + struct zmk_hid_mouse_report *report = zmk_hid_get_mouse_report(); + return zmk_usb_hid_send_report((uint8_t *)report, sizeof(*report)); +} +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + static int zmk_usb_hid_init(const struct device *_arg) { hid_dev = device_get_binding("HID_0"); if (hid_dev == NULL) { diff --git a/app/tests/mouse-keys/mkp/events.patterns b/app/tests/mouse-keys/mkp/events.patterns new file mode 100644 index 00000000000..2599345c2d7 --- /dev/null +++ b/app/tests/mouse-keys/mkp/events.patterns @@ -0,0 +1 @@ +s/.*zmk_hid_mouse_button_//p diff --git a/app/tests/mouse-keys/mkp/keycode_events.snapshot b/app/tests/mouse-keys/mkp/keycode_events.snapshot new file mode 100644 index 00000000000..ab58cc9575e --- /dev/null +++ b/app/tests/mouse-keys/mkp/keycode_events.snapshot @@ -0,0 +1,10 @@ +press: Button 0 count 1 +press: Mouse buttons set to 0x01 +press: Button 1 count 1 +press: Mouse buttons set to 0x03 +release: Button 1 count: 0 +release: Button 1 released +release: Mouse buttons set to 0x01 +release: Button 0 count: 0 +release: Button 0 released +release: Mouse buttons set to 0x00 diff --git a/app/tests/mouse-keys/mkp/native_posix.keymap b/app/tests/mouse-keys/mkp/native_posix.keymap new file mode 100644 index 00000000000..04316eb34bb --- /dev/null +++ b/app/tests/mouse-keys/mkp/native_posix.keymap @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; + + default_layer { + bindings = < + &mkp LCLK &none + &none &mkp RCLK + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS (0,0,100) + ZMK_MOCK_PRESS (1,1,100) + ZMK_MOCK_RELEASE(1,1, 10) + ZMK_MOCK_RELEASE(0,0, 10) + >; +}; diff --git a/app/tests/mouse-keys/mkp/native_posix_64.keymap b/app/tests/mouse-keys/mkp/native_posix_64.keymap new file mode 100644 index 00000000000..04316eb34bb --- /dev/null +++ b/app/tests/mouse-keys/mkp/native_posix_64.keymap @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; + + default_layer { + bindings = < + &mkp LCLK &none + &none &mkp RCLK + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS (0,0,100) + ZMK_MOCK_PRESS (1,1,100) + ZMK_MOCK_RELEASE(1,1, 10) + ZMK_MOCK_RELEASE(0,0, 10) + >; +}; diff --git a/docs/docs/behaviors/mouse-emulation.md b/docs/docs/behaviors/mouse-emulation.md new file mode 100644 index 00000000000..9ed0dd8e07b --- /dev/null +++ b/docs/docs/behaviors/mouse-emulation.md @@ -0,0 +1,66 @@ +--- +title: Mouse Emulation Behaviors +sidebar_label: Mouse Emulation +--- + +## Summary + +Mouse emulation behaviors send mouse events. Currently, only mouse button presses are supported, but movement +and scroll action support is planned for the future. + +Whenever the Mouse Emulation feature is turned on or off, the HID protocol used to communicate events to hosts changes. Unfortunately, those changes are not always detected automatically, and might require re-pairing your keyboard to your devices to work over bluetooth. If mouse behaviors are still not recognized by your device after doing that, you can try [these troubleshooting steps](../features/bluetooth.md#windows-connected-but-not-working). + +## Configuration Option + +This feature can be enabled or disabled explicitly via a config option: + +``` +CONFIG_ZMK_MOUSE=y +``` + +If you use the mouse key press behavior in your keymap, the feature will automatically be enabled for you. + +## Mouse Button Defines + +To make it easier to encode the HID mouse button numeric values, include +the [`dt-bindings/zmk/mouse.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/mouse.h) header +provided by ZMK near the top: + +``` +#include +``` + +## Mouse Button Press + +This behavior can press/release up to 5 mouse buttons. + +### Behavior Binding + +- Reference: `&mkp` +- Parameter: A `uint8` with bits 0 through 4 each referring to a button. + +The following defines can be passed for the parameter: + +| Define | Action | +| :------------ | :------------- | +| `MB1`, `LCLK` | Left click | +| `MB2`, `RCLK` | Right click | +| `MB3`, `MCLK` | Middle click | +| `MB4` | Mouse button 4 | +| `MB5` | Mouse button 5 | + +Mouse buttons 4 and 5 typically map to "back" and "forward" actions in most applications. + +### Examples + +The following will send a left click press when the binding is triggered: + +``` +&mkp LCLK +``` + +This example will send press of the fourth mouse button when the binding is triggered: + +``` +&mkp MB4 +``` diff --git a/docs/sidebars.js b/docs/sidebars.js index 43f17b4193f..19b0ad7e68c 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -36,6 +36,7 @@ module.exports = { "behaviors/caps-word", "behaviors/key-repeat", "behaviors/sensor-rotate", + "behaviors/mouse-emulation", "behaviors/reset", "behaviors/bluetooth", "behaviors/outputs", From 0a4b1a6533f434e6bdb7f7f5c336aa3096a90ad7 Mon Sep 17 00:00:00 2001 From: Chris Andreae Date: Tue, 21 Nov 2023 05:00:10 +0900 Subject: [PATCH 149/160] feat(ble): add behavior to disconnect from BLE profile Adds new functionality and a behavior to disconnect an active BLE connection. The motivation for this is that for some devices like phones, the presence of an active BLE connection results in the onscreen keyboard being selected. --- app/include/dt-bindings/zmk/bt.h | 2 ++ app/include/zmk/ble.h | 1 + app/src/behaviors/behavior_bt.c | 2 ++ app/src/ble.c | 21 +++++++++++++++++++++ docs/docs/behaviors/bluetooth.md | 21 +++++++++++++++------ 5 files changed, 41 insertions(+), 6 deletions(-) diff --git a/app/include/dt-bindings/zmk/bt.h b/app/include/dt-bindings/zmk/bt.h index 8ca10606942..7af89ddb011 100644 --- a/app/include/dt-bindings/zmk/bt.h +++ b/app/include/dt-bindings/zmk/bt.h @@ -9,6 +9,7 @@ #define BT_PRV_CMD 2 #define BT_SEL_CMD 3 // #define BT_FULL_RESET_CMD 4 +#define BT_DISC_CMD 5 /* Note: Some future commands will include additional parameters, so we @@ -19,3 +20,4 @@ defines these aliases up front. #define BT_NXT BT_NXT_CMD 0 #define BT_PRV BT_PRV_CMD 0 #define BT_SEL BT_SEL_CMD +#define BT_DISC BT_DISC_CMD diff --git a/app/include/zmk/ble.h b/app/include/zmk/ble.h index 435fde49654..92fd595fbcb 100644 --- a/app/include/zmk/ble.h +++ b/app/include/zmk/ble.h @@ -24,6 +24,7 @@ int zmk_ble_clear_bonds(); int zmk_ble_prof_next(); int zmk_ble_prof_prev(); int zmk_ble_prof_select(uint8_t index); +int zmk_ble_prof_disconnect(uint8_t index); int zmk_ble_active_profile_index(); bt_addr_le_t *zmk_ble_active_profile_addr(); diff --git a/app/src/behaviors/behavior_bt.c b/app/src/behaviors/behavior_bt.c index 6d44b5f5e9f..bf98532ce93 100644 --- a/app/src/behaviors/behavior_bt.c +++ b/app/src/behaviors/behavior_bt.c @@ -31,6 +31,8 @@ static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, return zmk_ble_prof_prev(); case BT_SEL_CMD: return zmk_ble_prof_select(binding->param2); + case BT_DISC_CMD: + return zmk_ble_prof_disconnect(binding->param2); default: LOG_ERR("Unknown BT command: %d", binding->param1); } diff --git a/app/src/ble.c b/app/src/ble.c index 483bc9d79c1..8c991c54b80 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -271,6 +271,27 @@ int zmk_ble_prof_prev() { ZMK_BLE_PROFILE_COUNT); }; +int zmk_ble_prof_disconnect(uint8_t index) { + if (index >= ZMK_BLE_PROFILE_COUNT) + return -ERANGE; + + bt_addr_le_t *addr = &profiles[index].peer; + struct bt_conn *conn; + int result; + + if (!bt_addr_le_cmp(addr, BT_ADDR_LE_ANY)) { + return -ENODEV; + } else if ((conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, addr)) == NULL) { + return -ENODEV; + } + + result = bt_conn_disconnect(conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); + LOG_DBG("Disconnected from profile %d: %d", index, result); + + bt_conn_unref(conn); + return result; +} + bt_addr_le_t *zmk_ble_active_profile_addr() { return &profiles[active_profile].peer; } char *zmk_ble_active_profile_name() { return profiles[active_profile].name; } diff --git a/docs/docs/behaviors/bluetooth.md b/docs/docs/behaviors/bluetooth.md index 1d461722f5c..ef1cc4666f1 100644 --- a/docs/docs/behaviors/bluetooth.md +++ b/docs/docs/behaviors/bluetooth.md @@ -13,6 +13,13 @@ computer/laptop/keyboard should receive the keyboard input; many of the commands When pairing to a host device ZMK saves bond information to the selected profile. It will not replace this when you initiate pairing with another device. To pair with a new device select an unused profile with `BT_SEL`, `BT_NXT` or `BT_PRV` bindings, or by clearing an existing profile using `BT_CLR`. A ZMK device may show as "connected" on multiple hosts at the same time. This is working as intended, and only the host associated with the active profile will receive keystrokes. + +An _inactive_ connected profile can be explicitly disconnected using the `BT_DISC` behavior. This can be helpful in +cases when host devices behave differently when a bluetooth keyboard is connected, for example by hiding their on-screen +keyboard. Note that at present the active bluetooth profile will immediately reconnect if disconnected. This is true +even if OUT_USB is selected. To remain disconnected, another bluetooth profile must be first selected using (e.g.) +`BT_SEL`. + ::: ## Bluetooth Command Defines @@ -28,12 +35,14 @@ This will allow you to reference the actions defined in this header such as `BT_ Here is a table describing the command for each define: -| Define | Action | -| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `BT_CLR` | Clear bond information between the keyboard and host for the selected profile. | -| `BT_NXT` | Switch to the next profile, cycling through to the first one when the end is reached. | -| `BT_PRV` | Switch to the previous profile, cycling through to the last one when the beginning is reached. | -| `BT_SEL` | Select the 0-indexed profile by number. Please note: this definition must include a number as an argument in the keymap to work correctly. eg. `BT_SEL 0` | +| Define | Action | +| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `BT_CLR` | Clear bond information between the keyboard and host for the selected profile. | +| `BT_NXT` | Switch to the next profile, cycling through to the first one when the end is reached. | +| `BT_PRV` | Switch to the previous profile, cycling through to the last one when the beginning is reached. | +| `BT_SEL` | Select the 0-indexed profile by number. Please note: this definition must include a number as an argument in the keymap to work correctly. eg. `BT_SEL 0` | +| `BT_DISC` | Disconnect from the 0-indexed profile by number, if it's currently connected and inactive. Please note: this definition must include a number as an | +| | argument in the keymap to work correctly. eg. `BT_DISC 0` | :::note Selected profile persistence The profile that is selected by the `BT_SEL`/`BT_PRV`/`BT_NXT` actions will be saved to flash storage and hence persist across restarts and firmware flashes. From f77e38f2b980a2d8491523b1c89b11edc740021e Mon Sep 17 00:00:00 2001 From: Idan Gazit Date: Thu, 23 Nov 2023 21:02:22 -0800 Subject: [PATCH 150/160] chore: Update devcontainer.json The format has changed slightly. --- .devcontainer/devcontainer.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 04a42c4d5ef..efa8c229d9a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -13,9 +13,13 @@ "type=volume,source=zmk-zephyr-modules,target=${containerWorkspaceFolder}/modules", "type=volume,source=zmk-zephyr-tools,target=${containerWorkspaceFolder}/tools" ], - "extensions": ["ms-vscode.cpptools"], - "settings": { - "terminal.integrated.shell.linux": "/bin/bash" + "customizations": { + "vscode": { + "extensions": ["ms-vscode.cpptools"], + "settings": { + "terminal.integrated.shell.linux": "/bin/bash" + } + } }, "forwardPorts": [3000] } From a3f30ee799598a95fc91befc4cb42385644b7e0a Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 10 Nov 2023 22:40:55 -0800 Subject: [PATCH 151/160] feat(build): Add support for artifact-name in build.yaml, correctly --- .github/workflows/build-user-config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index c1a97b4d6e0..7373c9ff4c5 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -55,12 +55,14 @@ jobs: - name: Prepare variables shell: sh -x {0} env: + board: ${{ matrix.board }} shield: ${{ matrix.shield }} + artifact_name: ${{ matrix.artifact-name }} run: | echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}" >> $GITHUB_ENV - echo "display_name=${shield:+$shield - }${{ matrix.board }}" >> $GITHUB_ENV - echo "artifact_name=${shield:+$shield-}${{ matrix.board }}-zmk" >> $GITHUB_ENV + echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV + echo "artifact_name=${artifact_name:-${shield:+$shield-}${board}-zmk}" >> $GITHUB_ENV - name: Checkout uses: actions/checkout@v3 From 84b93350b8be30d2b5a5b8f4e07fa86ce2bb1fe7 Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Mon, 27 Nov 2023 17:12:33 +0000 Subject: [PATCH 152/160] feat(docs): Document adding USB logging to a standalone board (#2039) Currently this is only documented in the zephyr 3.0 upgrade blog. This explicitly documents it as well as when it doesn't need to be applied (i.e. when a mcu board is already in use). --- docs/docs/development/usb-logging.md | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/docs/development/usb-logging.md b/docs/docs/development/usb-logging.md index e50e78241a6..6a8f8564b04 100644 --- a/docs/docs/development/usb-logging.md +++ b/docs/docs/development/usb-logging.md @@ -83,3 +83,32 @@ You should see tio printing `Disconnected` or `Connected` when you disconnect or From there, you should see the various log messages from ZMK and Zephyr, depending on which systems you have set to what log levels. + +## Adding USB Logging to a Board + +Standard boards such as the nice!nano and Seeeduino XIAO family have the necessary configuration for logging already added, however if you are developing your own standalone board you may wish to add the ability to use USB logging in the future. + +To add USB logging to a board you need to define the USB CDC ACM device that the serial output gets piped to, as well as adding the console in the `chosen` node inside `.dts`. + +Inside the USB device (`&usbd`), add the CDC ACM node: + +```dts +&usbd { + status = "okay"; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + }; +}; +``` + +Then you can add the `zephyr,console` binding in the `chosen` node: + +```dts +/ { + chosen { + ... + zephyr,console = &cdc_acm_uart; + }; + ... +}; +``` From 6276e973d52863878933ac90d2b6a4a922e51fb3 Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Wed, 15 Nov 2023 20:24:22 +0000 Subject: [PATCH 153/160] feat(ble): Only update BAS when active Subscribes to the activity changing event, will stop the battery work timer when in idle or deep sleep, restart when board goes active --- app/src/battery.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/app/src/battery.c b/app/src/battery.c index c6466272082..e76797ef997 100644 --- a/app/src/battery.c +++ b/app/src/battery.c @@ -18,6 +18,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include +#include +#include #include static uint8_t last_state_of_charge = 0; @@ -84,6 +86,10 @@ static void zmk_battery_timer(struct k_timer *timer) { K_TIMER_DEFINE(battery_timer, zmk_battery_timer, NULL); +static void zmk_battery_start_reporting() { + k_timer_start(&battery_timer, K_NO_WAIT, K_SECONDS(CONFIG_ZMK_BATTERY_REPORT_INTERVAL)); +} + static int zmk_battery_init(const struct device *_arg) { #if !DT_HAS_CHOSEN(zmk_battery) battery = device_get_binding("BATTERY"); @@ -100,9 +106,30 @@ static int zmk_battery_init(const struct device *_arg) { return -ENODEV; } - k_timer_start(&battery_timer, K_NO_WAIT, K_SECONDS(CONFIG_ZMK_BATTERY_REPORT_INTERVAL)); - + zmk_battery_start_reporting(); return 0; } +static int battery_event_listener(const zmk_event_t *eh) { + + if (as_zmk_activity_state_changed(eh)) { + switch (zmk_activity_get_state()) { + case ZMK_ACTIVITY_ACTIVE: + zmk_battery_start_reporting(); + return 0; + case ZMK_ACTIVITY_IDLE: + case ZMK_ACTIVITY_SLEEP: + k_timer_stop(&battery_timer); + return 0; + default: + break; + } + } + return -ENOTSUP; +} + +ZMK_LISTENER(battery, battery_event_listener); + +ZMK_SUBSCRIPTION(battery, zmk_activity_state_changed); + SYS_INIT(zmk_battery_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY); From 4e55c5f6e912ca02eebaf402137beb37fa1d3d8e Mon Sep 17 00:00:00 2001 From: Alessandro Bortolin Date: Tue, 6 Sep 2022 12:29:07 +0000 Subject: [PATCH 154/160] feat: handle LED indicators report --- app/CMakeLists.txt | 3 + app/Kconfig | 6 ++ app/include/zmk/ble.h | 1 + .../zmk/events/hid_indicators_changed.h | 16 +++++ app/include/zmk/hid.h | 30 +++++++++ app/include/zmk/hid_indicators.h | 19 ++++++ app/include/zmk/hid_indicators_types.h | 9 +++ app/src/ble.c | 9 +++ app/src/events/hid_indicators_changed.c | 10 +++ app/src/hid_indicators.c | 63 +++++++++++++++++++ app/src/hog.c | 53 +++++++++++++++- app/src/usb_hid.c | 35 +++++++++++ docs/docs/config/system.md | 30 ++++----- 13 files changed, 269 insertions(+), 15 deletions(-) create mode 100644 app/include/zmk/events/hid_indicators_changed.h create mode 100644 app/include/zmk/hid_indicators.h create mode 100644 app/include/zmk/hid_indicators_types.h create mode 100644 app/src/events/hid_indicators_changed.c create mode 100644 app/src/hid_indicators.c diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 0891364b437..41892915f13 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -68,6 +68,7 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) target_sources(app PRIVATE src/events/layer_state_changed.c) target_sources(app PRIVATE src/events/modifiers_state_changed.c) target_sources(app PRIVATE src/events/keycode_state_changed.c) + target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE src/hid_indicators.c) if (CONFIG_ZMK_BLE) target_sources(app PRIVATE src/events/ble_active_profile_changed.c) @@ -83,6 +84,8 @@ target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/behaviors/behavior_bac target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/events/battery_state_changed.c) target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/battery.c) +target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE src/events/hid_indicators_changed.c) + target_sources_ifdef(CONFIG_ZMK_SPLIT app PRIVATE src/events/split_peripheral_status_changed.c) add_subdirectory(src/split) diff --git a/app/Kconfig b/app/Kconfig index f92f0ae3b86..58825fa53cd 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -87,6 +87,12 @@ config ZMK_HID_CONSUMER_REPORT_USAGES_BASIC endchoice +config ZMK_HID_INDICATORS + bool "HID Indicators" + help + Enable HID indicators, used for detecting state of Caps/Scroll/Num Lock, + Kata, and Compose. + menu "Output Types" config ZMK_USB diff --git a/app/include/zmk/ble.h b/app/include/zmk/ble.h index 92fd595fbcb..4323d0980e4 100644 --- a/app/include/zmk/ble.h +++ b/app/include/zmk/ble.h @@ -27,6 +27,7 @@ int zmk_ble_prof_select(uint8_t index); int zmk_ble_prof_disconnect(uint8_t index); int zmk_ble_active_profile_index(); +int zmk_ble_profile_index(const bt_addr_le_t *addr); bt_addr_le_t *zmk_ble_active_profile_addr(); bool zmk_ble_active_profile_is_open(); bool zmk_ble_active_profile_is_connected(); diff --git a/app/include/zmk/events/hid_indicators_changed.h b/app/include/zmk/events/hid_indicators_changed.h new file mode 100644 index 00000000000..2c3ba088269 --- /dev/null +++ b/app/include/zmk/events/hid_indicators_changed.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include + +struct zmk_hid_indicators_changed { + zmk_hid_indicators indicators; +}; + +ZMK_EVENT_DECLARE(zmk_hid_indicators_changed); diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h index aeaa69d8d08..3f7e61bcd45 100644 --- a/app/include/zmk/hid.h +++ b/app/include/zmk/hid.h @@ -50,6 +50,7 @@ #define ZMK_HID_MAIN_VAL_BUFFERED_BYTES (0x01 << 8) #define ZMK_HID_REPORT_ID_KEYBOARD 0x01 +#define ZMK_HID_REPORT_ID_LEDS 0x01 #define ZMK_HID_REPORT_ID_CONSUMER 0x02 #define ZMK_HID_REPORT_ID_MOUSE 0x03 @@ -73,6 +74,22 @@ static const uint8_t zmk_hid_report_desc[] = { HID_REPORT_COUNT(0x01), HID_INPUT(ZMK_HID_MAIN_VAL_CONST | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + + HID_USAGE_PAGE(HID_USAGE_LED), + HID_USAGE_MIN8(HID_USAGE_LED_NUM_LOCK), + HID_USAGE_MAX8(HID_USAGE_LED_KANA), + HID_REPORT_SIZE(0x01), + HID_REPORT_COUNT(0x05), + HID_OUTPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), + + HID_USAGE_PAGE(HID_USAGE_LED), + HID_REPORT_SIZE(0x03), + HID_REPORT_COUNT(0x01), + HID_OUTPUT(ZMK_HID_MAIN_VAL_CONST | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), + +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + HID_USAGE_PAGE(HID_USAGE_KEY), #if IS_ENABLED(CONFIG_ZMK_HID_REPORT_TYPE_NKRO) @@ -189,6 +206,19 @@ struct zmk_hid_keyboard_report { struct zmk_hid_keyboard_report_body body; } __packed; +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + +struct zmk_hid_led_report_body { + uint8_t leds; +} __packed; + +struct zmk_hid_led_report { + uint8_t report_id; + struct zmk_hid_led_report_body body; +} __packed; + +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + struct zmk_hid_consumer_report_body { #if IS_ENABLED(CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC) uint8_t keys[CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE]; diff --git a/app/include/zmk/hid_indicators.h b/app/include/zmk/hid_indicators.h new file mode 100644 index 00000000000..69cee13dba2 --- /dev/null +++ b/app/include/zmk/hid_indicators.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include +#include + +zmk_hid_indicators zmk_hid_indicators_get_current_profile(void); +zmk_hid_indicators zmk_hid_indicators_get_profile(struct zmk_endpoint_instance endpoint); +void zmk_hid_indicators_set_profile(zmk_hid_indicators indicators, + struct zmk_endpoint_instance endpoint); + +void zmk_hid_indicators_process_report(struct zmk_hid_led_report_body *report, + struct zmk_endpoint_instance endpoint); diff --git a/app/include/zmk/hid_indicators_types.h b/app/include/zmk/hid_indicators_types.h new file mode 100644 index 00000000000..aa1504f6bdb --- /dev/null +++ b/app/include/zmk/hid_indicators_types.h @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +typedef uint8_t zmk_hid_indicators; diff --git a/app/src/ble.c b/app/src/ble.c index 8c991c54b80..fdbde81dabd 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -224,6 +224,15 @@ int zmk_ble_clear_bonds() { int zmk_ble_active_profile_index() { return active_profile; } +int zmk_ble_profile_index(const bt_addr_le_t *addr) { + for (int i = 0; i < ZMK_BLE_PROFILE_COUNT; i++) { + if (bt_addr_le_cmp(addr, &profiles[i].peer) == 0) { + return i; + } + } + return -ENODEV; +} + #if IS_ENABLED(CONFIG_SETTINGS) static void ble_save_profile_work(struct k_work *work) { settings_save_one("ble/active_profile", &active_profile, sizeof(active_profile)); diff --git a/app/src/events/hid_indicators_changed.c b/app/src/events/hid_indicators_changed.c new file mode 100644 index 00000000000..ded368354d0 --- /dev/null +++ b/app/src/events/hid_indicators_changed.c @@ -0,0 +1,10 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +ZMK_EVENT_IMPL(zmk_hid_indicators_changed); diff --git a/app/src/hid_indicators.c b/app/src/hid_indicators.c new file mode 100644 index 00000000000..db769146a2e --- /dev/null +++ b/app/src/hid_indicators.c @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +#include +#include +#include +#include +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +static zmk_hid_indicators hid_indicators[ZMK_ENDPOINT_COUNT]; + +zmk_hid_indicators zmk_hid_indicators_get_current_profile(void) { + return zmk_hid_indicators_get_profile(zmk_endpoints_selected()); +} + +zmk_hid_indicators zmk_hid_indicators_get_profile(struct zmk_endpoint_instance endpoint) { + int profile = zmk_endpoint_instance_to_index(endpoint); + return hid_indicators[profile]; +} + +static void raise_led_changed_event(struct k_work *_work) { + ZMK_EVENT_RAISE(new_zmk_hid_indicators_changed((struct zmk_hid_indicators_changed){ + .indicators = zmk_hid_indicators_get_current_profile()})); +} + +static K_WORK_DEFINE(led_changed_work, raise_led_changed_event); + +void zmk_hid_indicators_set_profile(zmk_hid_indicators indicators, + struct zmk_endpoint_instance endpoint) { + int profile = zmk_endpoint_instance_to_index(endpoint); + + // This write is not happening on the main thread. To prevent potential data races, every + // operation involving hid_indicators must be atomic. Currently, each function either reads + // or writes only one entry at a time, so it is safe to do these operations without a lock. + hid_indicators[profile] = indicators; + + k_work_submit(&led_changed_work); +} + +void zmk_hid_indicators_process_report(struct zmk_hid_led_report_body *report, + struct zmk_endpoint_instance endpoint) { + uint8_t indicators = report->leds; + zmk_hid_indicators_set_profile(indicators, endpoint); + + LOG_DBG("Update HID indicators: endpoint=%d, indicators=%x", endpoint.transport, indicators); +} + +static int profile_listener(const zmk_event_t *eh) { + raise_led_changed_event(NULL); + return 0; +} + +static ZMK_LISTENER(profile_listener, profile_listener); +static ZMK_SUBSCRIPTION(profile_listener, zmk_endpoint_changed); diff --git a/app/src/hog.c b/app/src/hog.c index 89a903cb967..1baf00b53b5 100644 --- a/app/src/hog.c +++ b/app/src/hog.c @@ -15,8 +15,12 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include +#include #include #include +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) +#include +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) enum { HIDS_REMOTE_WAKE = BIT(0), @@ -51,6 +55,15 @@ static struct hids_report input = { .type = HIDS_INPUT, }; +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + +static struct hids_report led_indicators = { + .id = ZMK_HID_REPORT_ID_LEDS, + .type = HIDS_OUTPUT, +}; + +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + static struct hids_report consumer_input = { .id = ZMK_HID_REPORT_ID_CONSUMER, .type = HIDS_INPUT, @@ -94,6 +107,34 @@ static ssize_t read_hids_input_report(struct bt_conn *conn, const struct bt_gatt sizeof(struct zmk_hid_keyboard_report_body)); } +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) +static ssize_t write_hids_leds_report(struct bt_conn *conn, const struct bt_gatt_attr *attr, + const void *buf, uint16_t len, uint16_t offset, + uint8_t flags) { + if (offset != 0) { + return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET); + } + if (len != sizeof(struct zmk_hid_led_report_body)) { + return BT_GATT_ERR(BT_ATT_ERR_INVALID_ATTRIBUTE_LEN); + } + + struct zmk_hid_led_report_body *report = (struct zmk_hid_led_report_body *)buf; + int profile = zmk_ble_profile_index(bt_conn_get_dst(conn)); + if (profile < 0) { + return BT_GATT_ERR(BT_ATT_ERR_UNLIKELY); + } + + struct zmk_endpoint_instance endpoint = {.transport = ZMK_TRANSPORT_BLE, + .ble = { + .profile_index = profile, + }}; + zmk_hid_indicators_process_report(report, endpoint); + + return len; +} + +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + static ssize_t read_hids_consumer_input_report(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset) { @@ -152,6 +193,7 @@ BT_GATT_SERVICE_DEFINE( BT_GATT_CCC(input_ccc_changed, BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), BT_GATT_DESCRIPTOR(BT_UUID_HIDS_REPORT_REF, BT_GATT_PERM_READ_ENCRYPT, read_hids_report_ref, NULL, &input), + BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_REPORT, BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY, BT_GATT_PERM_READ_ENCRYPT, read_hids_consumer_input_report, NULL, NULL), BT_GATT_CCC(input_ccc_changed, BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), @@ -166,6 +208,15 @@ BT_GATT_SERVICE_DEFINE( NULL, &mouse_input), #endif // IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_REPORT, + BT_GATT_CHRC_READ | BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP, + BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT, NULL, + write_hids_leds_report, NULL), + BT_GATT_DESCRIPTOR(BT_UUID_HIDS_REPORT_REF, BT_GATT_PERM_READ_ENCRYPT, read_hids_report_ref, + NULL, &led_indicators), +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_CTRL_POINT, BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_WRITE, NULL, write_ctrl_point, &ctrl_point)); @@ -251,7 +302,7 @@ void send_consumer_report_callback(struct k_work *work) { } struct bt_gatt_notify_params notify_params = { - .attr = &hog_svc.attrs[10], + .attr = &hog_svc.attrs[9], .data = &report, .len = sizeof(report), }; diff --git a/app/src/usb_hid.c b/app/src/usb_hid.c index fd58c14bf4a..3412314086f 100644 --- a/app/src/usb_hid.c +++ b/app/src/usb_hid.c @@ -13,6 +13,9 @@ #include #include #include +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) +#include +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) #include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); @@ -83,12 +86,44 @@ static int get_report_cb(const struct device *dev, struct usb_setup_packet *setu return 0; } +static int set_report_cb(const struct device *dev, struct usb_setup_packet *setup, int32_t *len, + uint8_t **data) { + if ((setup->wValue & HID_GET_REPORT_TYPE_MASK) != HID_REPORT_TYPE_OUTPUT) { + LOG_ERR("Unsupported report type %d requested", + (setup->wValue & HID_GET_REPORT_TYPE_MASK) >> 8); + return -ENOTSUP; + } + + switch (setup->wValue & HID_GET_REPORT_ID_MASK) { +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + case ZMK_HID_REPORT_ID_LEDS: + if (*len != sizeof(struct zmk_hid_led_report)) { + LOG_ERR("LED set report is malformed: length=%d", *len); + return -EINVAL; + } else { + struct zmk_hid_led_report *report = (struct zmk_hid_led_report *)*data; + struct zmk_endpoint_instance endpoint = { + .transport = ZMK_TRANSPORT_USB, + }; + zmk_hid_indicators_process_report(&report->body, endpoint); + } + break; +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + default: + LOG_ERR("Invalid report ID %d requested", setup->wValue & HID_GET_REPORT_ID_MASK); + return -EINVAL; + } + + return 0; +} + static const struct hid_ops ops = { #if IS_ENABLED(CONFIG_ZMK_USB_BOOT) .protocol_change = set_proto_cb, #endif .int_in_ready = in_ready_cb, .get_report = get_report_cb, + .set_report = set_report_cb, }; static int zmk_usb_hid_send_report(const uint8_t *report, size_t len) { diff --git a/docs/docs/config/system.md b/docs/docs/config/system.md index b9dd580de0c..6e834c678b9 100644 --- a/docs/docs/config/system.md +++ b/docs/docs/config/system.md @@ -22,9 +22,10 @@ Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/ ### HID -| Config | Type | Description | Default | -| ------------------------------------- | ---- | ------------------------------------------------- | ------- | -| `CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE` | int | Number of consumer keys simultaneously reportable | 6 | +| Config | Type | Description | Default | +| ------------------------------------- | ---- | -------------------------------------------------------------- | ------- | +| `CONFIG_ZMK_HID_INDICATORS` | bool | Enable reciept of HID/LED indicator state from connected hosts | n | +| `CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE` | int | Number of consumer keys simultaneously reportable | 6 | Exactly zero or one of the following options may be set to `y`. The first is used if none are set. @@ -91,14 +92,15 @@ Note that `CONFIG_BT_MAX_CONN` and `CONFIG_BT_MAX_PAIRED` should be set to the s Following split keyboard settings are defined in [zmk/app/src/split/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/src/split/Kconfig) (generic) and [zmk/app/src/split/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/src/split/bluetooth/Kconfig) (bluetooth). -| Config | Type | Description | Default | -| ----------------------------------------------------- | ---- | ----------------------------------------------------------------------- | ------- | -| `CONFIG_ZMK_SPLIT` | bool | Enable split keyboard support | n | -| `CONFIG_ZMK_SPLIT_BLE` | bool | Use BLE to communicate between split keyboard halves | y | -| `CONFIG_ZMK_SPLIT_ROLE_CENTRAL` | bool | `y` for central device, `n` for peripheral | | -| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE` | int | Max number of key state events to queue when received from peripherals | 5 | -| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_STACK_SIZE` | int | Stack size of the BLE split central write thread | 512 | -| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_QUEUE_SIZE` | int | Max number of behavior run events to queue to send to the peripheral(s) | 5 | -| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE` | int | Stack size of the BLE split peripheral notify thread | 650 | -| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_PRIORITY` | int | Priority of the BLE split peripheral notify thread | 5 | -| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_POSITION_QUEUE_SIZE` | int | Max number of key state events to queue to send to the central | 10 | +| Config | Type | Description | Default | +| ----------------------------------------------------- | ---- | ------------------------------------------------------------------------ | ------- | +| `CONFIG_ZMK_SPLIT` | bool | Enable split keyboard support | n | +| `CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS` | bool | Enable split keyboard support for passing indicator state to peripherals | n | +| `CONFIG_ZMK_SPLIT_BLE` | bool | Use BLE to communicate between split keyboard halves | y | +| `CONFIG_ZMK_SPLIT_ROLE_CENTRAL` | bool | `y` for central device, `n` for peripheral | | +| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE` | int | Max number of key state events to queue when received from peripherals | 5 | +| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_STACK_SIZE` | int | Stack size of the BLE split central write thread | 512 | +| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_QUEUE_SIZE` | int | Max number of behavior run events to queue to send to the peripheral(s) | 5 | +| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE` | int | Stack size of the BLE split peripheral notify thread | 650 | +| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_PRIORITY` | int | Priority of the BLE split peripheral notify thread | 5 | +| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_POSITION_QUEUE_SIZE` | int | Max number of key state events to queue to send to the central | 10 | From d9bb0d7d0e05c547d1138c48746a72660d2bf326 Mon Sep 17 00:00:00 2001 From: Alessandro Bortolin Date: Sun, 27 Nov 2022 18:11:43 +0100 Subject: [PATCH 155/160] feat: LED indicators on peripheral side --- app/include/zmk/split/bluetooth/central.h | 12 ++++- app/include/zmk/split/bluetooth/uuid.h | 1 + app/src/hid_indicators.c | 10 +++- app/src/split/Kconfig | 6 +++ app/src/split/bluetooth/central.c | 56 ++++++++++++++++++++++- app/src/split/bluetooth/service.c | 38 +++++++++++++++ 6 files changed, 119 insertions(+), 4 deletions(-) diff --git a/app/include/zmk/split/bluetooth/central.h b/app/include/zmk/split/bluetooth/central.h index 443d9b1b489..d38b51e88cd 100644 --- a/app/include/zmk/split/bluetooth/central.h +++ b/app/include/zmk/split/bluetooth/central.h @@ -4,5 +4,15 @@ #include #include +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) +#include +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + int zmk_split_bt_invoke_behavior(uint8_t source, struct zmk_behavior_binding *binding, - struct zmk_behavior_binding_event event, bool state); \ No newline at end of file + struct zmk_behavior_binding_event event, bool state); + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + +int zmk_split_bt_update_hid_indicator(zmk_hid_indicators indicators); + +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) diff --git a/app/include/zmk/split/bluetooth/uuid.h b/app/include/zmk/split/bluetooth/uuid.h index c38131dd83e..dccdfc804c5 100644 --- a/app/include/zmk/split/bluetooth/uuid.h +++ b/app/include/zmk/split/bluetooth/uuid.h @@ -17,3 +17,4 @@ #define ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID ZMK_BT_SPLIT_UUID(0x00000001) #define ZMK_SPLIT_BT_CHAR_RUN_BEHAVIOR_UUID ZMK_BT_SPLIT_UUID(0x00000002) #define ZMK_SPLIT_BT_CHAR_SENSOR_STATE_UUID ZMK_BT_SPLIT_UUID(0x00000003) +#define ZMK_SPLIT_BT_UPDATE_HID_INDICATORS_UUID ZMK_BT_SPLIT_UUID(0x00000004) diff --git a/app/src/hid_indicators.c b/app/src/hid_indicators.c index db769146a2e..45cac96a04c 100644 --- a/app/src/hid_indicators.c +++ b/app/src/hid_indicators.c @@ -28,8 +28,14 @@ zmk_hid_indicators zmk_hid_indicators_get_profile(struct zmk_endpoint_instance e } static void raise_led_changed_event(struct k_work *_work) { - ZMK_EVENT_RAISE(new_zmk_hid_indicators_changed((struct zmk_hid_indicators_changed){ - .indicators = zmk_hid_indicators_get_current_profile()})); + zmk_hid_indicators indicators = zmk_hid_indicators_get_current_profile(); + + ZMK_EVENT_RAISE(new_zmk_hid_indicators_changed( + (struct zmk_hid_indicators_changed){.indicators = indicators})); + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) && IS_ENABLED(CONFIG_ZMK_SPLIT_BLE) + zmk_split_bt_update_hid_indicator(indicators); +#endif } static K_WORK_DEFINE(led_changed_work, raise_led_changed_event); diff --git a/app/src/split/Kconfig b/app/src/split/Kconfig index dbe5f092644..1134937056f 100644 --- a/app/src/split/Kconfig +++ b/app/src/split/Kconfig @@ -20,6 +20,12 @@ config ZMK_SPLIT_BLE endchoice +config ZMK_SPLIT_PERIPHERAL_HID_INDICATORS + bool "Peripheral HID Indicators" + depends on ZMK_HID_INDICATORS + help + Enable propogating the HID (LED) Indicator state to the split peripheral(s). + #ZMK_SPLIT endif diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index 860e89a5f3e..d39309d2f76 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -27,6 +27,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include +#include static int start_scanning(void); @@ -46,6 +47,9 @@ struct peripheral_slot { struct bt_gatt_subscribe_params sensor_subscribe_params; struct bt_gatt_discover_params sub_discover_params; uint16_t run_behavior_handle; +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + uint16_t update_hid_indicators; +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) uint8_t position_state[POSITION_STATE_DATA_LEN]; uint8_t changed_positions[POSITION_STATE_DATA_LEN]; }; @@ -131,6 +135,9 @@ int release_peripheral_slot(int index) { // Clean up previously discovered handles; slot->subscribe_params.value_handle = 0; slot->run_behavior_handle = 0; +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + slot->update_hid_indicators = 0; +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) return 0; } @@ -329,13 +336,23 @@ static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn, slot->discover_params.uuid = NULL; slot->discover_params.start_handle = attr->handle + 2; slot->run_behavior_handle = bt_gatt_attr_value_handle(attr); +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + } else if (!bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid, + BT_UUID_DECLARE_128(ZMK_SPLIT_BT_UPDATE_HID_INDICATORS_UUID))) { + LOG_DBG("Found update HID indicators handle"); + slot->update_hid_indicators = bt_gatt_attr_value_handle(attr); +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) } - bool subscribed = slot->run_behavior_handle && slot->subscribe_params.value_handle; + bool subscribed = (slot->run_behavior_handle && slot->subscribe_params.value_handle); #if ZMK_KEYMAP_HAS_SENSORS subscribed = subscribed && slot->sensor_subscribe_params.value_handle; #endif /* ZMK_KEYMAP_HAS_SENSORS */ +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + subscribed = subscribed && slot->update_hid_indicators; +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + return subscribed ? BT_GATT_ITER_STOP : BT_GATT_ITER_CONTINUE; } @@ -685,6 +702,43 @@ int zmk_split_bt_invoke_behavior(uint8_t source, struct zmk_behavior_binding *bi return split_bt_invoke_behavior_payload(wrapper); } +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + +static zmk_hid_indicators hid_indicators = 0; + +static void split_central_update_indicators_callback(struct k_work *work) { + zmk_hid_indicators indicators = hid_indicators; + for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { + if (peripherals[i].state != PERIPHERAL_SLOT_STATE_CONNECTED) { + continue; + } + + if (peripherals[i].update_hid_indicators == 0) { + // It appears that sometimes the peripheral is considered connected + // before the GATT characteristics have been discovered. If this is + // the case, the update_hid_indicators handle will not yet be set. + continue; + } + + int err = bt_gatt_write_without_response(peripherals[i].conn, + peripherals[i].update_hid_indicators, &indicators, + sizeof(indicators), true); + + if (err) { + LOG_ERR("Failed to write HID indicator characteristic (err %d)", err); + } + } +} + +static K_WORK_DEFINE(split_central_update_indicators, split_central_update_indicators_callback); + +int zmk_split_bt_update_hid_indicator(zmk_hid_indicators indicators) { + hid_indicators = indicators; + return k_work_submit_to_queue(&split_central_split_run_q, &split_central_update_indicators); +} + +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + int zmk_split_bt_central_init(const struct device *_arg) { k_work_queue_start(&split_central_split_run_q, split_central_split_run_q_stack, K_THREAD_STACK_SIZEOF(split_central_split_run_q_stack), diff --git a/app/src/split/bluetooth/service.c b/app/src/split/bluetooth/service.c index 620df53e11c..f9d8bab0de4 100644 --- a/app/src/split/bluetooth/service.c +++ b/app/src/split/bluetooth/service.c @@ -21,6 +21,11 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) +#include +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + #include #include @@ -105,6 +110,34 @@ static void split_svc_pos_state_ccc(const struct bt_gatt_attr *attr, uint16_t va LOG_DBG("value %d", value); } +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + +static zmk_hid_indicators hid_indicators = 0; + +static void split_svc_update_indicators_callback(struct k_work *work) { + LOG_DBG("Raising HID indicators changed event: %x", hid_indicators); + ZMK_EVENT_RAISE(new_zmk_hid_indicators_changed( + (struct zmk_hid_indicators_changed){.indicators = hid_indicators})); +} + +static K_WORK_DEFINE(split_svc_update_indicators_work, split_svc_update_indicators_callback); + +static ssize_t split_svc_update_indicators(struct bt_conn *conn, const struct bt_gatt_attr *attr, + const void *buf, uint16_t len, uint16_t offset, + uint8_t flags) { + if (offset + len > sizeof(zmk_hid_indicators)) { + return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET); + } + + memcpy((uint8_t *)&hid_indicators + offset, buf, len); + + k_work_submit(&split_svc_update_indicators_work); + + return len; +} + +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + BT_GATT_SERVICE_DEFINE( split_svc, BT_GATT_PRIMARY_SERVICE(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SERVICE_UUID)), BT_GATT_CHARACTERISTIC(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID), @@ -122,6 +155,11 @@ BT_GATT_SERVICE_DEFINE( split_svc_sensor_state, NULL, &last_sensor_event), BT_GATT_CCC(split_svc_sensor_state_ccc, BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), #endif /* ZMK_KEYMAP_HAS_SENSORS */ +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + BT_GATT_CHARACTERISTIC(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_UPDATE_HID_INDICATORS_UUID), + BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_WRITE_ENCRYPT, NULL, + split_svc_update_indicators, NULL), +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) ); K_THREAD_STACK_DEFINE(service_q_stack, CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE); From 817ce8764fcb9ad89d3cb8464d18c07b7169ed25 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 27 Nov 2023 23:48:13 +0000 Subject: [PATCH 156/160] refactor: Move to `zmk_hid_indicators_t` type. --- app/include/zmk/events/hid_indicators_changed.h | 2 +- app/include/zmk/hid_indicators.h | 6 +++--- app/include/zmk/hid_indicators_types.h | 2 +- app/include/zmk/split/bluetooth/central.h | 2 +- app/src/hid_indicators.c | 14 +++++++------- app/src/split/bluetooth/central.c | 6 +++--- app/src/split/bluetooth/service.c | 4 ++-- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/include/zmk/events/hid_indicators_changed.h b/app/include/zmk/events/hid_indicators_changed.h index 2c3ba088269..b1fba797559 100644 --- a/app/include/zmk/events/hid_indicators_changed.h +++ b/app/include/zmk/events/hid_indicators_changed.h @@ -10,7 +10,7 @@ #include struct zmk_hid_indicators_changed { - zmk_hid_indicators indicators; + zmk_hid_indicators_t indicators; }; ZMK_EVENT_DECLARE(zmk_hid_indicators_changed); diff --git a/app/include/zmk/hid_indicators.h b/app/include/zmk/hid_indicators.h index 69cee13dba2..7c7b89f53ce 100644 --- a/app/include/zmk/hid_indicators.h +++ b/app/include/zmk/hid_indicators.h @@ -10,9 +10,9 @@ #include #include -zmk_hid_indicators zmk_hid_indicators_get_current_profile(void); -zmk_hid_indicators zmk_hid_indicators_get_profile(struct zmk_endpoint_instance endpoint); -void zmk_hid_indicators_set_profile(zmk_hid_indicators indicators, +zmk_hid_indicators_t zmk_hid_indicators_get_current_profile(void); +zmk_hid_indicators_t zmk_hid_indicators_get_profile(struct zmk_endpoint_instance endpoint); +void zmk_hid_indicators_set_profile(zmk_hid_indicators_t indicators, struct zmk_endpoint_instance endpoint); void zmk_hid_indicators_process_report(struct zmk_hid_led_report_body *report, diff --git a/app/include/zmk/hid_indicators_types.h b/app/include/zmk/hid_indicators_types.h index aa1504f6bdb..43bcf3c5bb2 100644 --- a/app/include/zmk/hid_indicators_types.h +++ b/app/include/zmk/hid_indicators_types.h @@ -6,4 +6,4 @@ #pragma once -typedef uint8_t zmk_hid_indicators; +typedef uint8_t zmk_hid_indicators_t; diff --git a/app/include/zmk/split/bluetooth/central.h b/app/include/zmk/split/bluetooth/central.h index d38b51e88cd..4706b3aa831 100644 --- a/app/include/zmk/split/bluetooth/central.h +++ b/app/include/zmk/split/bluetooth/central.h @@ -13,6 +13,6 @@ int zmk_split_bt_invoke_behavior(uint8_t source, struct zmk_behavior_binding *bi #if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) -int zmk_split_bt_update_hid_indicator(zmk_hid_indicators indicators); +int zmk_split_bt_update_hid_indicator(zmk_hid_indicators_t indicators); #endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) diff --git a/app/src/hid_indicators.c b/app/src/hid_indicators.c index 45cac96a04c..50b2fbcc9ba 100644 --- a/app/src/hid_indicators.c +++ b/app/src/hid_indicators.c @@ -16,19 +16,19 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); -static zmk_hid_indicators hid_indicators[ZMK_ENDPOINT_COUNT]; +static zmk_hid_indicators_t hid_indicators[ZMK_ENDPOINT_COUNT]; -zmk_hid_indicators zmk_hid_indicators_get_current_profile(void) { +zmk_hid_indicators_t zmk_hid_indicators_get_current_profile(void) { return zmk_hid_indicators_get_profile(zmk_endpoints_selected()); } -zmk_hid_indicators zmk_hid_indicators_get_profile(struct zmk_endpoint_instance endpoint) { - int profile = zmk_endpoint_instance_to_index(endpoint); +zmk_hid_indicators_t zmk_hid_indicators_get_profile(struct zmk_endpoint_instance endpoint) { + const int profile = zmk_endpoint_instance_to_index(endpoint); return hid_indicators[profile]; } static void raise_led_changed_event(struct k_work *_work) { - zmk_hid_indicators indicators = zmk_hid_indicators_get_current_profile(); + const zmk_hid_indicators_t indicators = zmk_hid_indicators_get_current_profile(); ZMK_EVENT_RAISE(new_zmk_hid_indicators_changed( (struct zmk_hid_indicators_changed){.indicators = indicators})); @@ -40,7 +40,7 @@ static void raise_led_changed_event(struct k_work *_work) { static K_WORK_DEFINE(led_changed_work, raise_led_changed_event); -void zmk_hid_indicators_set_profile(zmk_hid_indicators indicators, +void zmk_hid_indicators_set_profile(zmk_hid_indicators_t indicators, struct zmk_endpoint_instance endpoint) { int profile = zmk_endpoint_instance_to_index(endpoint); @@ -54,7 +54,7 @@ void zmk_hid_indicators_set_profile(zmk_hid_indicators indicators, void zmk_hid_indicators_process_report(struct zmk_hid_led_report_body *report, struct zmk_endpoint_instance endpoint) { - uint8_t indicators = report->leds; + const zmk_hid_indicators_t indicators = (zmk_hid_indicators_t)report->leds; zmk_hid_indicators_set_profile(indicators, endpoint); LOG_DBG("Update HID indicators: endpoint=%d, indicators=%x", endpoint.transport, indicators); diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index d39309d2f76..6f3b78ab883 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -704,10 +704,10 @@ int zmk_split_bt_invoke_behavior(uint8_t source, struct zmk_behavior_binding *bi #if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) -static zmk_hid_indicators hid_indicators = 0; +static zmk_hid_indicators_t hid_indicators = 0; static void split_central_update_indicators_callback(struct k_work *work) { - zmk_hid_indicators indicators = hid_indicators; + zmk_hid_indicators_t indicators = hid_indicators; for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { if (peripherals[i].state != PERIPHERAL_SLOT_STATE_CONNECTED) { continue; @@ -732,7 +732,7 @@ static void split_central_update_indicators_callback(struct k_work *work) { static K_WORK_DEFINE(split_central_update_indicators, split_central_update_indicators_callback); -int zmk_split_bt_update_hid_indicator(zmk_hid_indicators indicators) { +int zmk_split_bt_update_hid_indicator(zmk_hid_indicators_t indicators) { hid_indicators = indicators; return k_work_submit_to_queue(&split_central_split_run_q, &split_central_update_indicators); } diff --git a/app/src/split/bluetooth/service.c b/app/src/split/bluetooth/service.c index f9d8bab0de4..0072cf8c835 100644 --- a/app/src/split/bluetooth/service.c +++ b/app/src/split/bluetooth/service.c @@ -112,7 +112,7 @@ static void split_svc_pos_state_ccc(const struct bt_gatt_attr *attr, uint16_t va #if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) -static zmk_hid_indicators hid_indicators = 0; +static zmk_hid_indicators_t hid_indicators = 0; static void split_svc_update_indicators_callback(struct k_work *work) { LOG_DBG("Raising HID indicators changed event: %x", hid_indicators); @@ -125,7 +125,7 @@ static K_WORK_DEFINE(split_svc_update_indicators_work, split_svc_update_indicato static ssize_t split_svc_update_indicators(struct bt_conn *conn, const struct bt_gatt_attr *attr, const void *buf, uint16_t len, uint16_t offset, uint8_t flags) { - if (offset + len > sizeof(zmk_hid_indicators)) { + if (offset + len > sizeof(zmk_hid_indicators_t)) { return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET); } From 69f7bfb40911d4bbf9af0910d956a092d5fb9159 Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Tue, 28 Nov 2023 00:09:58 +0000 Subject: [PATCH 157/160] feat(boards): Kinesis Advantage 360 pro Add the Kinesis Advantage 360 Pro board definition. --- app/boards/arm/adv360pro/Kconfig | 7 + app/boards/arm/adv360pro/Kconfig.board | 12 ++ app/boards/arm/adv360pro/Kconfig.defconfig | 55 ++++++ app/boards/arm/adv360pro/README.md | 7 + .../arm/adv360pro/adv360pro-pinctrl.dtsi | 30 ++++ app/boards/arm/adv360pro/adv360pro.dtsi | 163 ++++++++++++++++++ app/boards/arm/adv360pro/adv360pro.keymap | 48 ++++++ app/boards/arm/adv360pro/adv360pro.yaml | 19 ++ app/boards/arm/adv360pro/adv360pro.zmk.yml | 16 ++ app/boards/arm/adv360pro/adv360pro_left.dts | 36 ++++ .../arm/adv360pro/adv360pro_left_defconfig | 55 ++++++ app/boards/arm/adv360pro/adv360pro_right.dts | 40 +++++ .../arm/adv360pro/adv360pro_right_defconfig | 54 ++++++ app/boards/arm/adv360pro/board.cmake | 8 + 14 files changed, 550 insertions(+) create mode 100644 app/boards/arm/adv360pro/Kconfig create mode 100644 app/boards/arm/adv360pro/Kconfig.board create mode 100644 app/boards/arm/adv360pro/Kconfig.defconfig create mode 100755 app/boards/arm/adv360pro/README.md create mode 100644 app/boards/arm/adv360pro/adv360pro-pinctrl.dtsi create mode 100644 app/boards/arm/adv360pro/adv360pro.dtsi create mode 100644 app/boards/arm/adv360pro/adv360pro.keymap create mode 100644 app/boards/arm/adv360pro/adv360pro.yaml create mode 100644 app/boards/arm/adv360pro/adv360pro.zmk.yml create mode 100644 app/boards/arm/adv360pro/adv360pro_left.dts create mode 100644 app/boards/arm/adv360pro/adv360pro_left_defconfig create mode 100644 app/boards/arm/adv360pro/adv360pro_right.dts create mode 100644 app/boards/arm/adv360pro/adv360pro_right_defconfig create mode 100644 app/boards/arm/adv360pro/board.cmake diff --git a/app/boards/arm/adv360pro/Kconfig b/app/boards/arm/adv360pro/Kconfig new file mode 100644 index 00000000000..1840851c2bb --- /dev/null +++ b/app/boards/arm/adv360pro/Kconfig @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: MIT + +config BOARD_ENABLE_DCDC + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT diff --git a/app/boards/arm/adv360pro/Kconfig.board b/app/boards/arm/adv360pro/Kconfig.board new file mode 100644 index 00000000000..51ebaec0791 --- /dev/null +++ b/app/boards/arm/adv360pro/Kconfig.board @@ -0,0 +1,12 @@ +# +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +config BOARD_ADV360PRO_LEFT + bool "adv360pro_left" + depends on SOC_NRF52840_QIAA + +config BOARD_ADV360PRO_RIGHT + bool "adv360pro_right" + depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/adv360pro/Kconfig.defconfig b/app/boards/arm/adv360pro/Kconfig.defconfig new file mode 100644 index 00000000000..0c4abacfbfa --- /dev/null +++ b/app/boards/arm/adv360pro/Kconfig.defconfig @@ -0,0 +1,55 @@ +# +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +if BOARD_ADV360PRO_LEFT + +config ZMK_KEYBOARD_NAME + default "Adv360 Pro" + +config ZMK_SPLIT_ROLE_CENTRAL + default y + +endif # BOARD_ADV360PRO_LEFT + +if BOARD_ADV360PRO_RIGHT + +config ZMK_KEYBOARD_NAME + default "Adv360 Pro rt" + +endif # BOARD_ADV360PRO_RIGHT + + +if BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT + +config BOARD + default "adv360pro" + +config ZMK_SPLIT + default y + +config SPI + bool + default y + +config BT_CTLR + default BT + +if USB + +config USB_NRFX + default y + +config USB_DEVICE_STACK + default y + +endif # USB + +config ZMK_BATTERY_VOLTAGE_DIVIDER + default y + +config SPI + default y + +endif # BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT diff --git a/app/boards/arm/adv360pro/README.md b/app/boards/arm/adv360pro/README.md new file mode 100755 index 00000000000..89fa1da5152 --- /dev/null +++ b/app/boards/arm/adv360pro/README.md @@ -0,0 +1,7 @@ +# Kinesis Advantage 360 Professional + +This board definition provides upstream support for the [Kinesis Advantage 360 Professional](https://kinesis-ergo.com/keyboards/advantage360/) + +Kinesis offer a specific [custom configuration](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/) for the 360 Pro that references [a customised version of ZMK](https://github.com/ReFil/zmk/tree/adv360-z3.2-2) with Advantage 360 Pro specific functionality and changes over base ZMK. The Kinesis fork is regularly updated to bring the latest updates and changes from base ZMK however will not always be completely up to date, some features such as new keycodes will not be immediately available on the 360 Pro after they are implemented in base ZMK. + +When using this board definition some of the more advanced features (the indicator RGB leds) will not work, and Kinesis cannot provide customer service for usage of base ZMK. Likewise the ZMK community cannot provide support for either the Kinesis keymap editor, nor any usage of the Kinesis custom fork. diff --git a/app/boards/arm/adv360pro/adv360pro-pinctrl.dtsi b/app/boards/arm/adv360pro/adv360pro-pinctrl.dtsi new file mode 100644 index 00000000000..7dafcdcecf4 --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro-pinctrl.dtsi @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; + pwm0_default: pwm0_default { + group1 { + psels = ; + }; + }; + pwm0_sleep: pwm0_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; \ No newline at end of file diff --git a/app/boards/arm/adv360pro/adv360pro.dtsi b/app/boards/arm/adv360pro/adv360pro.dtsi new file mode 100644 index 00000000000..85ff5d1cfd1 --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro.dtsi @@ -0,0 +1,163 @@ +/* +* +* Copyright (c) 2023 The ZMK Contributors +* SPDX-License-Identifier: MIT +* +*/ + +/dts-v1/; +#include + +#include +#include + +#include "adv360pro-pinctrl.dtsi" + +/ { + model = "Adv360 Pro"; + compatible = "kinesis,adv360pro"; + + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zmk,kscan = &kscan0; + zmk,backlight = &backlight; + zmk,battery = &vbatt; + zmk,matrix_transform = &default_transform; + zmk,underglow = &led_strip; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <20>; + rows = <5>; + + + map = < + RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,13) RC(4,14) RC(4,15) RC(4,16) RC(4,17) RC(4,18) RC(4,19) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,13) RC(3,14) RC(3,15) RC(3,16) RC(3,17) RC(3,18) RC(3,19) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) RC(2,14) RC(2,15) RC(2,16) RC(2,17) RC(2,18) RC(2,19) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,9) RC(1,10) RC(1,14) RC(1,15) RC(1,16) RC(1,17) RC(1,18) RC(1,19) + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,15) RC(0,16) RC(0,17) RC(0,18) RC(0,19) + + >; + }; + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + }; + + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + io-channels = <&adc 2>; + output-ohms = <100000>; + full-ohms = <(100000 + 100000)>; + }; + + backlight: pwmleds { + compatible = "pwm-leds"; + pwm_led_0 { + pwms = <&pwm0 0 10000 PWM_POLARITY_NORMAL>; + }; + }; + +}; + +&pwm0 { + status = "okay"; + pinctrl-0 = <&pwm0_default>; + pinctrl-1 = <&pwm0_sleep>; + pinctrl-names = "default", "sleep"; +}; + +&adc { + status = "okay"; +}; + +&gpiote { + status = "okay"; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&usbd { + status = "okay"; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + }; +}; + +&flash0 { + /* + * For more information, see: + * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + sd_partition: partition@0 { + label = "softdevice"; + reg = <0x00000000 0x00026000>; + }; + code_partition: partition@26000 { + label = "code_partition"; + reg = <0x00026000 0x000c6000>; + }; + + /* + * The flash starting at 0x000ec000 and ending at + * 0x000f3fff is reserved for use by the application. + */ + + /* + * Storage partition will be used by FCB/LittleFS/NVS + * if enabled. + */ + storage_partition: partition@ec000 { + label = "storage"; + reg = <0x000ec000 0x00008000>; + }; + + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <3>; /* number of LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; diff --git a/app/boards/arm/adv360pro/adv360pro.keymap b/app/boards/arm/adv360pro/adv360pro.keymap new file mode 100644 index 00000000000..999781e437f --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro.keymap @@ -0,0 +1,48 @@ +#include +#include +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &tog 1 &mo 3 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS + &kp TAB &kp Q &kp W &kp E &kp R &kp T &none &none &kp Y &kp U &kp I &kp O &kp P &kp BSLH + &kp ESC &kp A &kp S &kp D &kp F &kp G &none &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &none &kp H &kp J &kp K &kp L &kp SEMI &kp SQT + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp HOME &kp PG_UP &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT + &mo 2 &kp GRAVE &kp CAPS &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp END &kp PG_DN &kp ENTER &kp SPACE &kp UP &kp DOWN &kp LBKT &kp RBKT &mo 2 + >; + }; + keypad { + bindings = < + &kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &mo 3 &kp N6 &kp KP_NUM &kp KP_EQUAL &kp KP_DIVIDE &kp KP_MULTIPLY &kp MINUS + &kp TAB &kp Q &kp W &kp E &kp R &kp T &none &none &kp Y &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp BSLH + &kp ESC &kp A &kp S &kp D &kp F &kp G &none &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &none &kp H &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp SQT + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp HOME &kp PG_UP &kp N &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER &kp RSHFT + &mo 2 &kp GRAVE &kp CAPS &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp END &kp PG_DN &kp ENTER &kp KP_N0 &kp UP &kp DOWN &kp KP_DOT &kp RBKT &mo 2 + >; + }; + fn { + bindings = < + &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &tog 1 &mo 3 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 + &trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &none &trans &trans &trans &trans &none &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; + mod { + bindings = < + &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &trans &none &none &none &none &none &none + &none &none &none &none &none &none &bootloader &bootloader &none &none &none &none &none &none + &none &none &none &none &none &none &none &none &none &bt BT_CLR &none &none &none &none &none &none &none &none + &none &none &none &none &none &none &none &none &none &none &none &none &none &none + &none &none &none &none &none &none &none &none &none &bl BL_TOG &rgb_ug RGB_TOG &bl BL_INC &bl BL_DEC &none &none &none + >; + }; + }; +}; diff --git a/app/boards/arm/adv360pro/adv360pro.yaml b/app/boards/arm/adv360pro/adv360pro.yaml new file mode 100644 index 00000000000..2d555d4e20c --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro.yaml @@ -0,0 +1,19 @@ +identifier: adv360pro +name: Advantage 360 Pro +type: keyboard +arch: arm +toolchain: + - zephyr + - gnuarmemb + - xtools +supported: + - gpio + - i2c + - counter + - spi + - usb_device + - nvs + - can + - kscan + - ble + - pwm diff --git a/app/boards/arm/adv360pro/adv360pro.zmk.yml b/app/boards/arm/adv360pro/adv360pro.zmk.yml new file mode 100644 index 00000000000..7d4a4b44495 --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro.zmk.yml @@ -0,0 +1,16 @@ +file_format: "1" +id: adv360pro +name: Advantage 360 Pro +type: board +url: https://kinesis-ergo.com/keyboards/advantage360 +arch: arm +features: + - keys + - underglow + - backlight +outputs: + - usb + - ble +siblings: + - adv360pro_left + - adv360pro_right diff --git a/app/boards/arm/adv360pro/adv360pro_left.dts b/app/boards/arm/adv360pro/adv360pro_left.dts new file mode 100644 index 00000000000..6ef5f59071b --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro_left.dts @@ -0,0 +1,36 @@ +/* +* +* Copyright (c) 2023 The ZMK Contributors +* SPDX-License-Identifier: MIT +* +*/ + +#include "adv360pro.dtsi" + +/{ + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + + diode-direction = "col2row"; + row-gpios + = <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + + col-gpios + = <&gpio0 25 GPIO_ACTIVE_HIGH> + , <&gpio0 11 GPIO_ACTIVE_HIGH> + , <&gpio0 2 GPIO_ACTIVE_HIGH> + , <&gpio0 28 GPIO_ACTIVE_HIGH> + , <&gpio0 29 GPIO_ACTIVE_HIGH> + , <&gpio0 30 GPIO_ACTIVE_HIGH> + , <&gpio0 31 GPIO_ACTIVE_HIGH> + , <&gpio1 9 GPIO_ACTIVE_HIGH> + , <&gpio0 12 GPIO_ACTIVE_HIGH> + , <&gpio0 7 GPIO_ACTIVE_HIGH> + ; + }; +}; diff --git a/app/boards/arm/adv360pro/adv360pro_left_defconfig b/app/boards/arm/adv360pro/adv360pro_left_defconfig new file mode 100644 index 00000000000..6eb5a8d042a --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro_left_defconfig @@ -0,0 +1,55 @@ +# +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_ADV360PRO_LEFT=y + +# Enable MPU +CONFIG_ARM_MPU=y + +# enable GPIO +CONFIG_GPIO=y + +# Enable SPI for LEDS +CONFIG_PINCTRL=y +CONFIG_SPI=y +CONFIG_SPI_NRFX=y + +# Enable writing to flash +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +# Enable 32kHz crystal +CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y +CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y + +#RGB leds config +CONFIG_WS2812_STRIP=y +CONFIG_ZMK_RGB_UNDERGLOW=y +CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y +CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n +CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=0 +CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y + +#Backlighting configuration +CONFIG_PWM=y +CONFIG_LED_PWM=y +CONFIG_ZMK_BACKLIGHT=y +CONFIG_ZMK_BACKLIGHT_BRT_START=20 +CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y + +#Misc configuration +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y +CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y +CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/adv360pro/adv360pro_right.dts b/app/boards/arm/adv360pro/adv360pro_right.dts new file mode 100644 index 00000000000..97d846f855c --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro_right.dts @@ -0,0 +1,40 @@ +/* +* +* Copyright (c) 2023 The ZMK Contributors +* SPDX-License-Identifier: MIT +* +*/ + +#include "adv360pro.dtsi" + +/{ + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + + diode-direction = "col2row"; + row-gpios + = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + + col-gpios + = <&gpio0 12 GPIO_ACTIVE_HIGH> + , <&gpio1 9 GPIO_ACTIVE_HIGH> + , <&gpio0 7 GPIO_ACTIVE_HIGH> + , <&gpio1 11 GPIO_ACTIVE_HIGH> + , <&gpio1 10 GPIO_ACTIVE_HIGH> + , <&gpio1 13 GPIO_ACTIVE_HIGH> + , <&gpio1 15 GPIO_ACTIVE_HIGH> + , <&gpio0 3 GPIO_ACTIVE_HIGH> + , <&gpio0 2 GPIO_ACTIVE_HIGH> + , <&gpio0 28 GPIO_ACTIVE_HIGH> + ; + }; +}; + +&default_transform { + col-offset = <10>; +}; diff --git a/app/boards/arm/adv360pro/adv360pro_right_defconfig b/app/boards/arm/adv360pro/adv360pro_right_defconfig new file mode 100644 index 00000000000..b5174549ea4 --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro_right_defconfig @@ -0,0 +1,54 @@ +# +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_ADV360PRO_RIGHT=y + +# Enable MPU +CONFIG_ARM_MPU=y + +# enable GPIO +CONFIG_GPIO=y + +# Enable SPI for LEDS +CONFIG_PINCTRL=y +CONFIG_SPI=y +CONFIG_SPI_NRFX=y + +# Enable writing to flash +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +# Enable 32kHz crystal +CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y +CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y + +#RGB leds config +CONFIG_WS2812_STRIP=y +CONFIG_ZMK_RGB_UNDERGLOW=y +CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y +CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n +CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=0 +CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y + +#Backlighting configuration +CONFIG_PWM=y +CONFIG_LED_PWM=y +CONFIG_ZMK_BACKLIGHT=y +CONFIG_ZMK_BACKLIGHT_BRT_START=20 +CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y + +#Misc configuration +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y +CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y +CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/adv360pro/board.cmake b/app/boards/arm/adv360pro/board.cmake new file mode 100644 index 00000000000..6d62a8a16bf --- /dev/null +++ b/app/boards/arm/adv360pro/board.cmake @@ -0,0 +1,8 @@ +# +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") + +include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) From 744f70c80c84cc0e471db41c3834a4030b4743dc Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 1 Dec 2023 23:39:31 +0000 Subject: [PATCH 158/160] feat(bt): Add support for unauth overwrite * Properly handle the user enabling the `CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE` Zephyr flag and handle re-pairing to an existing taken profile from the same address. --- app/src/ble.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/ble.c b/app/src/ble.c index fdbde81dabd..501d4752ba4 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -551,13 +551,19 @@ static void auth_cancel(struct bt_conn *conn) { LOG_DBG("Pairing cancelled: %s", addr); } +static bool pairing_allowed_for_current_profile(struct bt_conn *conn) { + return zmk_ble_active_profile_is_open() || + (IS_ENABLED(CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE) && + bt_addr_le_cmp(zmk_ble_active_profile_addr(), bt_conn_get_dst(conn)) == 0); +} + static enum bt_security_err auth_pairing_accept(struct bt_conn *conn, const struct bt_conn_pairing_feat *const feat) { struct bt_conn_info info; bt_conn_get_info(conn, &info); LOG_DBG("role %d, open? %s", info.role, zmk_ble_active_profile_is_open() ? "yes" : "no"); - if (info.role == BT_CONN_ROLE_PERIPHERAL && !zmk_ble_active_profile_is_open()) { + if (info.role == BT_CONN_ROLE_PERIPHERAL && !pairing_allowed_for_current_profile(conn)) { LOG_WRN("Rejecting pairing request to taken profile %d", active_profile); return BT_SECURITY_ERR_PAIR_NOT_ALLOWED; } @@ -578,7 +584,7 @@ static void auth_pairing_complete(struct bt_conn *conn, bool bonded) { return; } - if (!zmk_ble_active_profile_is_open()) { + if (!pairing_allowed_for_current_profile(conn)) { LOG_ERR("Pairing completed but current profile is not open: %s", addr); bt_unpair(BT_ID_DEFAULT, dst); return; From 329d6474ee4eed9791d53f9dcfc6dd0ec6401701 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 30 Nov 2023 06:48:35 +0000 Subject: [PATCH 159/160] feat(ble): Make it possible to use BT_GATT_AUTO_SEC_REQ * Only upgrade security of new connections if BT_GATT_AUTO_SEC_REQ is not enabled. --- app/src/ble.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/ble.c b/app/src/ble.c index 501d4752ba4..b29a098b0b9 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -445,9 +445,11 @@ static void connected(struct bt_conn *conn, uint8_t err) { LOG_DBG("Connected %s", addr); +#if !IS_ENABLED(CONFIG_BT_GATT_AUTO_SEC_REQ) if (bt_conn_set_security(conn, BT_SECURITY_L2)) { LOG_ERR("Failed to set security"); } +#endif // !IS_ENABLED(CONFIG_BT_GATT_AUTO_SEC_REQ) update_advertising(); From 3fad4dba07c22cfbe6e54512cd2052da3aca4f10 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 1 Dec 2023 23:33:29 +0000 Subject: [PATCH 160/160] fix(bt): Passkey entry pairing fixes. * Don't propogate any key press events while in the middle of passkey entry, avoid funky state on hosts. * Handle passkey on release, not press, to ensure key *releases* are not accidentally sent, especially the Enter release at the very end of passkey entry, which can trigger cancel in the dialog if the keyboard is connected via USB to the same host. --- app/src/ble.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/ble.c b/app/src/ble.c index b29a098b0b9..a6e63cb51ee 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -704,9 +704,9 @@ static int zmk_ble_handle_key_user(struct zmk_keycode_state_changed *event) { return ZMK_EV_EVENT_BUBBLE; } - if (!event->state) { - LOG_DBG("Key released, ignoring"); - return ZMK_EV_EVENT_BUBBLE; + if (event->state) { + LOG_DBG("Key press, ignoring"); + return ZMK_EV_EVENT_HANDLED; } if (key == HID_USAGE_KEY_KEYBOARD_ESCAPE) { @@ -736,7 +736,7 @@ static int zmk_ble_handle_key_user(struct zmk_keycode_state_changed *event) { zmk_ble_numeric_usage_to_value(key, HID_USAGE_KEY_KEYPAD_1_AND_END, HID_USAGE_KEY_KEYPAD_0_AND_INSERT, &val))) { LOG_DBG("Key not a number, ignoring"); - return ZMK_EV_EVENT_BUBBLE; + return ZMK_EV_EVENT_HANDLED; } if (ring_buf_space_get(&passkey_entries) <= 0) {