From 9d1070a140942f2e48dfbb811b07d3ad8a71d594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=20Bol=C3=ADvar?= Date: Wed, 1 Feb 2023 08:17:23 -0800 Subject: [PATCH 01/64] chore(build): update west.yml syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit West has supported a 'name-blocklist' replacement for 'name-blacklist' since v0.9. Signed-off-by: Martí Bolívar --- app/west.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/west.yml b/app/west.yml index a0c56501..b0f05aed 100644 --- a/app/west.yml +++ b/app/west.yml @@ -10,8 +10,7 @@ manifest: revision: v3.0.0+zmk-fixes clone-depth: 1 import: - # TODO: Rename once upstream offers option like `exclude` or `denylist` - name-blacklist: + name-blocklist: - ci-tools - hal_altera - hal_cypress From b7d5865e40eeaf7999a73fdaff1d7043babbc73e Mon Sep 17 00:00:00 2001 From: Albert Y <76888457+filterpaper@users.noreply.github.com> Date: Thu, 2 Feb 2023 17:07:33 +0800 Subject: [PATCH 02/64] feat(docs): additional note on bug fixed in macOS v13.1 --- docs/docs/troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index a535a4ef..96f729b9 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -23,7 +23,7 @@ Variations of the warnings shown below occur when flashing the `.uf2` ### macOS Ventura error -macOS 13.0 (Ventura) Finder may report an error code 100093 when copying `.uf2` files into microcontrollers. This bug is limited to the operating system's Finder. You can work around it by copying on Terminal command line or use a third party file manager. +macOS 13.0 (Ventura) Finder may report an error code 100093 when copying `.uf2` files into microcontrollers. This bug is limited to the operating system's Finder. You can work around it by copying on Terminal command line or use a third party file manager. Issue is fixed in macOS version 13.1. ### CMake Error From c065d451cb82e2dceda4efdb2991aeeeef1cdbbf Mon Sep 17 00:00:00 2001 From: Omri Kaplan Date: Wed, 8 Feb 2023 03:29:38 +0200 Subject: [PATCH 03/64] fix(shields): Fix keycodes that differ from the default keymap (#1590) - Asterisk in layer 1 was mapped to 8 - Underscore in layer 1 was mapped to minus - Right GUI in layer 0 was mapped to right Alt - Space in layer 1 was mapped to Return - Plus was mapped with KP_PLUS --- app/boards/shields/reviung41/reviung41.keymap | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/boards/shields/reviung41/reviung41.keymap b/app/boards/shields/reviung41/reviung41.keymap index f0450b19..d291ca8b 100644 --- a/app/boards/shields/reviung41/reviung41.keymap +++ b/app/boards/shields/reviung41/reviung41.keymap @@ -23,26 +23,26 @@ &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 N &kp M &kp COMMA &kp DOT &kp FSLH &mt RSHFT RET - &kp LALT &mo 1 &kp SPACE &mo 2 &kp RALT + &kp LALT &mo 1 &kp SPACE &mo 2 &kp RGUI >; }; lower_layer { -// ---------------------------------------------------------------------------------- -// | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | DEL | -// | | _ | + | { | } | "|" | | LFT | DWN | UP | RGT | ` | ~ | -// | | ESC | GUI | ALT | CAPS| " | | HOME| END | PGUP| PGDN| PRSC| SHFT(RET) | +// ------------------------------------------------------------------------------------ +// | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | DEL | +// | | _ | + | { | } | "|" | | LFT | DWN | UP | RGT | ` | ~ | +// | | ESC | GUI | ALT | CAPS| " | | HOME| END | PGUP| PGDN| PRSC| SHFT(SPACE) | // | | | RET | ADJ | | bindings = < - &trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp N8 &kp LPAR &kp RPAR &kp DEL - &trans &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &kp PIPE &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp GRAVE &kp TILDE - &trans &kp ESC &kp LGUI &kp LALT &kp CLCK &kp DQT &kp HOME &kp END &kp PG_UP &kp PG_DN &kp PSCRN &mt RSHFT RET + &trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &kp DEL + &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp GRAVE &kp TILDE + &trans &kp ESC &kp LGUI &kp LALT &kp CLCK &kp DQT &kp HOME &kp END &kp PG_UP &kp PG_DN &kp PSCRN &mt RSHFT SPACE &trans &trans &kp RET &mo 3 &trans >; }; raise_layer { -// ----------------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- // | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL | // | | - | = | [ | ] | \ | | F1 | F2 | F3 | F4 | F5 | F6 | // | | ESC | GUI | ALT | CAPS| " | | F7 | F8 | F9 | F10 | F11 | F12 | From 72624a41fa627b143124f68ac38af72d18722015 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 18 Feb 2023 22:29:03 -0800 Subject: [PATCH 04/64] fix(shields): Add missing col-offsets for extra transforms --- app/boards/shields/corne/corne_right.overlay | 4 ++++ app/boards/shields/jian/jian_right.overlay | 8 ++++++++ app/boards/shields/jiran/jiran_right.overlay | 8 ++++++++ app/boards/shields/jorne/jorne_right.overlay | 8 ++++++++ app/boards/shields/kyria/kyria_rev2_right.overlay | 4 ++++ app/boards/shields/kyria/kyria_right.overlay | 4 ++++ 6 files changed, 36 insertions(+) diff --git a/app/boards/shields/corne/corne_right.overlay b/app/boards/shields/corne/corne_right.overlay index 6e79a858..1d7ed9ec 100644 --- a/app/boards/shields/corne/corne_right.overlay +++ b/app/boards/shields/corne/corne_right.overlay @@ -10,6 +10,10 @@ col-offset = <6>; }; +&five_column_transform { + col-offset = <6>; +}; + &kscan0 { col-gpios = <&pro_micro 14 GPIO_ACTIVE_HIGH> diff --git a/app/boards/shields/jian/jian_right.overlay b/app/boards/shields/jian/jian_right.overlay index f3b0da3d..cac83fd3 100644 --- a/app/boards/shields/jian/jian_right.overlay +++ b/app/boards/shields/jian/jian_right.overlay @@ -10,6 +10,14 @@ col-offset = <6>; }; +&crkbd_transform { + col-offset = <6>; +}; + +&five_column_transform { + col-offset = <6>; +}; + &kscan0 { col-gpios = <&pro_micro 16 GPIO_ACTIVE_HIGH> diff --git a/app/boards/shields/jiran/jiran_right.overlay b/app/boards/shields/jiran/jiran_right.overlay index 75b9fb5a..c3648797 100644 --- a/app/boards/shields/jiran/jiran_right.overlay +++ b/app/boards/shields/jiran/jiran_right.overlay @@ -10,6 +10,14 @@ col-offset = <6>; }; +&jian_transform { + col-offset = <6>; +}; + +&crkbd_transform { + col-offset = <6>; +}; + &kscan0 { col-gpios = <&pro_micro 7 GPIO_ACTIVE_HIGH> diff --git a/app/boards/shields/jorne/jorne_right.overlay b/app/boards/shields/jorne/jorne_right.overlay index 4f138b0b..698bf9dd 100644 --- a/app/boards/shields/jorne/jorne_right.overlay +++ b/app/boards/shields/jorne/jorne_right.overlay @@ -10,6 +10,14 @@ col-offset = <6>; }; +&crkbd_transform { + col-offset = <6>; +}; + +&five_column_transform { + col-offset = <6>; +}; + &kscan0 { col-gpios = <&pro_micro 14 GPIO_ACTIVE_HIGH> diff --git a/app/boards/shields/kyria/kyria_rev2_right.overlay b/app/boards/shields/kyria/kyria_rev2_right.overlay index 7476bcba..08dc59d1 100644 --- a/app/boards/shields/kyria/kyria_rev2_right.overlay +++ b/app/boards/shields/kyria/kyria_rev2_right.overlay @@ -10,6 +10,10 @@ col-offset = <8>; }; +&five_column_transform { + col-offset = <7>; +}; + &kscan0 { row-gpios = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> diff --git a/app/boards/shields/kyria/kyria_right.overlay b/app/boards/shields/kyria/kyria_right.overlay index eefd76bf..b3b3420e 100644 --- a/app/boards/shields/kyria/kyria_right.overlay +++ b/app/boards/shields/kyria/kyria_right.overlay @@ -10,6 +10,10 @@ col-offset = <8>; }; +&five_column_transform { + col-offset = <7>; +}; + &kscan0 { col-gpios = <&pro_micro 10 GPIO_ACTIVE_HIGH> From 5d22d76d726afbe67ba0e8dc908c342641ab8f58 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 18 Feb 2023 22:31:23 -0800 Subject: [PATCH 05/64] fix(shields): Fix Kyria five column transforms --- app/boards/shields/kyria/kyria.dtsi | 8 ++++---- app/boards/shields/kyria/kyria_rev2.dtsi | 10 +++++----- app/boards/shields/kyria/kyria_rev2_right.overlay | 2 +- app/boards/shields/kyria/kyria_right.overlay | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/boards/shields/kyria/kyria.dtsi b/app/boards/shields/kyria/kyria.dtsi index 1b0ca940..cffe23b0 100644 --- a/app/boards/shields/kyria/kyria.dtsi +++ b/app/boards/shields/kyria/kyria.dtsi @@ -36,10 +36,10 @@ 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) columns = <14>; rows = <4>; 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,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,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) - 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(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) +RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14) +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,13) RC(2,14) + 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) >; }; }; diff --git a/app/boards/shields/kyria/kyria_rev2.dtsi b/app/boards/shields/kyria/kyria_rev2.dtsi index 7c7d9efe..b40af365 100644 --- a/app/boards/shields/kyria/kyria_rev2.dtsi +++ b/app/boards/shields/kyria/kyria_rev2.dtsi @@ -36,10 +36,10 @@ 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) columns = <14>; rows = <4>; 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,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,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) - 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(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) +RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14) +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,13) RC(2,14) + RC(3,2) 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) >; }; }; @@ -52,4 +52,4 @@ 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) &right_encoder { a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/kyria/kyria_rev2_right.overlay b/app/boards/shields/kyria/kyria_rev2_right.overlay index 08dc59d1..9e29c6f7 100644 --- a/app/boards/shields/kyria/kyria_rev2_right.overlay +++ b/app/boards/shields/kyria/kyria_rev2_right.overlay @@ -11,7 +11,7 @@ }; &five_column_transform { - col-offset = <7>; + col-offset = <8>; }; &kscan0 { diff --git a/app/boards/shields/kyria/kyria_right.overlay b/app/boards/shields/kyria/kyria_right.overlay index b3b3420e..00ba5b2f 100644 --- a/app/boards/shields/kyria/kyria_right.overlay +++ b/app/boards/shields/kyria/kyria_right.overlay @@ -11,7 +11,7 @@ }; &five_column_transform { - col-offset = <7>; + col-offset = <8>; }; &kscan0 { From 0c0ebda65b6f384b8bd827365cd5d23702bc04b3 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Mon, 20 Feb 2023 22:17:12 -0800 Subject: [PATCH 06/64] fix(keymap): Fix default Ergodash keymap --- app/boards/shields/ergodash/ergodash.keymap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/boards/shields/ergodash/ergodash.keymap b/app/boards/shields/ergodash/ergodash.keymap index 65cc1178..a85c58a6 100644 --- a/app/boards/shields/ergodash/ergodash.keymap +++ b/app/boards/shields/ergodash/ergodash.keymap @@ -53,7 +53,7 @@ * .----------------------------------------------------------------------------------------------------------------------. */ /* FIXME boot and reset are not yet locale aware */ bindings = < -&kp F11 &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp &none &kp &none &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F12 +&kp F11 &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &none &none &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F12 &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 &trans &bootloader &reset &none &none &none &none &none &none &none &none &none &none &trans From 3eee53676f793fb352d6cabe9e471106b7878fbb Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Mon, 20 Feb 2023 22:06:56 -0800 Subject: [PATCH 07/64] fix(shields): Fix missing binding in eek keymap --- app/boards/shields/eek/eek.keymap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/boards/shields/eek/eek.keymap b/app/boards/shields/eek/eek.keymap index f54dc013..439c90aa 100644 --- a/app/boards/shields/eek/eek.keymap +++ b/app/boards/shields/eek/eek.keymap @@ -48,9 +48,9 @@ bindings = < &kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &out OUT_USB &out OUT_BLE &none &kp EQUAL &kp MINUS &kp CAPS &kp F5 &kp F6 &kp F7 &kp F8 &kp LBKT &kp RBKT &none &kp GRAVE &kp BSLH - &kp LSHFT &kp F9 &kp F10 &kp F11 &kp F12 &none &none &none &kp RSHFT + &kp LSHFT &kp F9 &kp F10 &kp F11 &kp F12 &none &none &none &none &kp RSHFT &kp LCTRL &kp LGUI &kp LALT &reset &none &trans >; }; }; -}; \ No newline at end of file +}; From 1d65661efa3e19db59d453df6eb1139fb97df836 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Mon, 20 Feb 2023 23:24:11 -0800 Subject: [PATCH 08/64] fix(keymap): Fix tidbit keymap --- app/boards/shields/tidbit/tidbit.keymap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/boards/shields/tidbit/tidbit.keymap b/app/boards/shields/tidbit/tidbit.keymap index 646a5db7..7fa98af2 100644 --- a/app/boards/shields/tidbit/tidbit.keymap +++ b/app/boards/shields/tidbit/tidbit.keymap @@ -26,7 +26,7 @@ bindings = < &kp KP_NUMLOCK &kp KP_ASTERISK &kp KP_MINUS &kp KP_NUMBER_7 &kp KP_NUMBER_8 &kp KP_NUMBER_9 &kp KP_PLUS - &kp KP_NUMBER_4 &kp KP_NUMBER_5 &kp KP_NUMBER_6 &kp &none + &kp KP_NUMBER_4 &kp KP_NUMBER_5 &kp KP_NUMBER_6 &none &kp KP_NUMBER_1 &kp KP_NUMBER_2 &kp KP_NUMBER_3 < 1 KP_ENTER &none &kp KP_NUMBER_0 &kp KP_DOT &none >; From 719de801e7b39bf9a7e89e468cc9f46f824146f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Feb 2023 01:29:24 +0000 Subject: [PATCH 09/64] chore(deps): bump @sideway/formula from 3.0.0 to 3.0.1 in /docs Bumps [@sideway/formula](https://github.com/sideway/formula) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/sideway/formula/releases) - [Commits](https://github.com/sideway/formula/compare/v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: "@sideway/formula" 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 c4cad7c0..93a980c2 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -3045,9 +3045,9 @@ } }, "node_modules/@sideway/formula": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz", - "integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", + "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==" }, "node_modules/@sideway/pinpoint": { "version": "2.0.0", @@ -18139,9 +18139,9 @@ } }, "@sideway/formula": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz", - "integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", + "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==" }, "@sideway/pinpoint": { "version": "2.0.0", From 5ef6f2f2b7fc059f4992b70752be5f79b1bca129 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 4 Feb 2023 05:50:58 +0000 Subject: [PATCH 10/64] chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 in /docs Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/kornelski/http-cache-semantics/releases) - [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1) --- updated-dependencies: - dependency-name: http-cache-semantics 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 93a980c2..fbc859e5 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -8281,9 +8281,9 @@ } }, "node_modules/http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, "node_modules/http-deceiver": { "version": "1.2.7", @@ -22047,9 +22047,9 @@ } }, "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, "http-deceiver": { "version": "1.2.7", From 89044079839b156eeb4a3da497d1dab904290f31 Mon Sep 17 00:00:00 2001 From: Xudong Zheng <7pkvm5aw@slicealias.com> Date: Sat, 28 Jan 2023 17:15:49 -0500 Subject: [PATCH 11/64] feat(underglow): use float for HSB to RGB calculation --- app/src/rgb_underglow.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/rgb_underglow.c b/app/src/rgb_underglow.c index 25d4466e..18614a4e 100644 --- a/app/src/rgb_underglow.c +++ b/app/src/rgb_underglow.c @@ -75,15 +75,15 @@ static struct zmk_led_hsb hsb_scale_zero_max(struct zmk_led_hsb hsb) { } static struct led_rgb hsb_to_rgb(struct zmk_led_hsb hsb) { - double r, g, b; + float r, g, b; uint8_t i = hsb.h / 60; - double v = hsb.b / ((float)BRT_MAX); - double s = hsb.s / ((float)SAT_MAX); - double f = hsb.h / ((float)HUE_MAX) * 6 - i; - double p = v * (1 - s); - double q = v * (1 - f * s); - double t = v * (1 - (1 - f) * s); + float v = hsb.b / ((float)BRT_MAX); + float s = hsb.s / ((float)SAT_MAX); + float f = hsb.h / ((float)HUE_MAX) * 6 - i; + float p = v * (1 - s); + float q = v * (1 - f * s); + float t = v * (1 - (1 - f) * s); switch (i % 6) { case 0: From 6cb42a80607c8bf8a493ac2c781568462aa8ce13 Mon Sep 17 00:00:00 2001 From: Robert U <978080+urob@users.noreply.github.com> Date: Sun, 12 Mar 2023 12:24:00 -0400 Subject: [PATCH 12/64] feat(behaviors): On-release option for positional-hold-taps --- .../behaviors/zmk,behavior-hold-tap.yaml | 2 ++ app/src/behaviors/behavior_hold_tap.c | 8 ++++++-- .../on-release-no-trigger/events.patterns | 4 ++++ .../keycode_events.snapshot | 12 ++++++++++++ .../native_posix_64.keymap | 17 +++++++++++++++++ .../on-release-trigger/events.patterns | 4 ++++ .../on-release-trigger/keycode_events.snapshot | 12 ++++++++++++ .../on-release-trigger/native_posix_64.keymap | 17 +++++++++++++++++ .../on-release-no-trigger/events.patterns | 4 ++++ .../keycode_events.snapshot | 12 ++++++++++++ .../native_posix_64.keymap | 17 +++++++++++++++++ .../on-release-trigger/events.patterns | 4 ++++ .../on-release-trigger/keycode_events.snapshot | 12 ++++++++++++ .../on-release-trigger/native_posix_64.keymap | 17 +++++++++++++++++ .../on-release-no-trigger/events.patterns | 4 ++++ .../keycode_events.snapshot | 12 ++++++++++++ .../native_posix_64.keymap | 17 +++++++++++++++++ .../on-release-trigger/events.patterns | 4 ++++ .../on-release-trigger/keycode_events.snapshot | 12 ++++++++++++ .../on-release-trigger/native_posix_64.keymap | 17 +++++++++++++++++ docs/docs/behaviors/hold-tap.md | 3 +++ 21 files changed, 209 insertions(+), 2 deletions(-) create mode 100644 app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/events.patterns create mode 100644 app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/keycode_events.snapshot create mode 100644 app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_posix_64.keymap create mode 100644 app/tests/hold-tap/balanced/7-positional/on-release-trigger/events.patterns create mode 100644 app/tests/hold-tap/balanced/7-positional/on-release-trigger/keycode_events.snapshot create mode 100644 app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_posix_64.keymap create mode 100644 app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/events.patterns create mode 100644 app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/keycode_events.snapshot create mode 100644 app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap create mode 100644 app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/events.patterns create mode 100644 app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/keycode_events.snapshot create mode 100644 app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_posix_64.keymap create mode 100644 app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/events.patterns create mode 100644 app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/keycode_events.snapshot create mode 100644 app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap create mode 100644 app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/events.patterns create mode 100644 app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/keycode_events.snapshot create mode 100644 app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_posix_64.keymap diff --git a/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml b/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml index e4cfaeab..a2affbf2 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml @@ -37,3 +37,5 @@ properties: type: array required: false default: [] + hold-trigger-on-release: + type: boolean diff --git a/app/src/behaviors/behavior_hold_tap.c b/app/src/behaviors/behavior_hold_tap.c index f09006ed..a9e4d642 100644 --- a/app/src/behaviors/behavior_hold_tap.c +++ b/app/src/behaviors/behavior_hold_tap.c @@ -60,6 +60,7 @@ struct behavior_hold_tap_config { bool global_quick_tap; enum flavor flavor; bool retro_tap; + bool hold_trigger_on_release; int32_t hold_trigger_key_positions_len; int32_t hold_trigger_key_positions[]; }; @@ -587,9 +588,11 @@ static int position_state_changed_listener(const zmk_event_t *eh) { } // Store the position of pressed key for positional hold-tap purposes. - if ((ev->state) // i.e. key pressed (not released) + if ((undecided_hold_tap->config->hold_trigger_on_release != + ev->state) // key has been pressed and hold_trigger_on_release is not set, or key + // has been released and hold_trigger_on_release is set && (undecided_hold_tap->position_of_first_other_key_pressed == - -1) // i.e. no other key has been pressed yet + -1) // no other key has been pressed yet ) { undecided_hold_tap->position_of_first_other_key_pressed = ev->position; } @@ -703,6 +706,7 @@ static int behavior_hold_tap_init(const struct device *dev) { .global_quick_tap = DT_INST_PROP(n, global_quick_tap), \ .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), \ .hold_trigger_key_positions = DT_INST_PROP(n, hold_trigger_key_positions), \ .hold_trigger_key_positions_len = DT_INST_PROP_LEN(n, hold_trigger_key_positions), \ }; \ diff --git a/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/events.patterns b/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/events.patterns new file mode 100644 index 00000000..fdf2b15c --- /dev/null +++ b/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/events.patterns @@ -0,0 +1,4 @@ +s/.*hid_listener_keycode/kp/p +s/.*mo_keymap_binding/mo/p +s/.*on_hold_tap_binding/ht_binding/p +s/.*decide_hold_tap/ht_decide/p \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/keycode_events.snapshot b/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/keycode_events.snapshot new file mode 100644 index 00000000..24a8b033 --- /dev/null +++ b/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/keycode_events.snapshot @@ -0,0 +1,12 @@ +ht_binding_pressed: 0 new undecided hold_tap +kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +ht_decide: 0 decided hold-interrupt (balanced decision moment other-key-up) +kp_pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_pressed: 1 new undecided hold_tap +ht_decide: 1 decided tap (balanced decision moment key-up) +kp_pressed: usage_page 0x07 keycode 0x0D 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 0x0D implicit_mods 0x00 explicit_mods 0x00 +ht_binding_released: 1 cleaning up hold-tap +kp_released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_released: 0 cleaning up hold-tap diff --git a/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_posix_64.keymap new file mode 100644 index 00000000..942d5ae4 --- /dev/null +++ b/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_posix_64.keymap @@ -0,0 +1,17 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +&ht_bal { hold-trigger-on-release; }; + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) // mod 1 + ZMK_MOCK_PRESS(0,1,10) // mod 2 + ZMK_MOCK_PRESS(1,1,10) // not trigger position + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; diff --git a/app/tests/hold-tap/balanced/7-positional/on-release-trigger/events.patterns b/app/tests/hold-tap/balanced/7-positional/on-release-trigger/events.patterns new file mode 100644 index 00000000..fdf2b15c --- /dev/null +++ b/app/tests/hold-tap/balanced/7-positional/on-release-trigger/events.patterns @@ -0,0 +1,4 @@ +s/.*hid_listener_keycode/kp/p +s/.*mo_keymap_binding/mo/p +s/.*on_hold_tap_binding/ht_binding/p +s/.*decide_hold_tap/ht_decide/p \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/7-positional/on-release-trigger/keycode_events.snapshot b/app/tests/hold-tap/balanced/7-positional/on-release-trigger/keycode_events.snapshot new file mode 100644 index 00000000..fb5587b1 --- /dev/null +++ b/app/tests/hold-tap/balanced/7-positional/on-release-trigger/keycode_events.snapshot @@ -0,0 +1,12 @@ +ht_binding_pressed: 0 new undecided hold_tap +ht_decide: 0 decided hold-interrupt (balanced decision moment other-key-up) +kp_pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_pressed: 1 new undecided hold_tap +ht_decide: 1 decided hold-interrupt (balanced decision moment other-key-up) +kp_pressed: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +kp_pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_released: 1 cleaning up hold-tap +kp_released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_released: 0 cleaning up hold-tap diff --git a/app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_posix_64.keymap new file mode 100644 index 00000000..677a2534 --- /dev/null +++ b/app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_posix_64.keymap @@ -0,0 +1,17 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +&ht_bal { hold-trigger-on-release; }; + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) // mod 1 + ZMK_MOCK_PRESS(0,1,10) // mod 2 + ZMK_MOCK_PRESS(1,0,10) // trigger position + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; diff --git a/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/events.patterns b/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/events.patterns new file mode 100644 index 00000000..fdf2b15c --- /dev/null +++ b/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/events.patterns @@ -0,0 +1,4 @@ +s/.*hid_listener_keycode/kp/p +s/.*mo_keymap_binding/mo/p +s/.*on_hold_tap_binding/ht_binding/p +s/.*decide_hold_tap/ht_decide/p \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/keycode_events.snapshot b/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/keycode_events.snapshot new file mode 100644 index 00000000..1df24b0c --- /dev/null +++ b/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/keycode_events.snapshot @@ -0,0 +1,12 @@ +ht_binding_pressed: 0 new undecided hold_tap +ht_decide: 0 decided hold-interrupt (hold-preferred decision moment other-key-down) +kp_pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_pressed: 1 new undecided hold_tap +ht_decide: 1 decided hold-interrupt (hold-preferred decision moment other-key-down) +kp_pressed: usage_page 0x07 keycode 0xE0 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 0x07 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_released: 1 cleaning up hold-tap +kp_released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_released: 0 cleaning up hold-tap diff --git a/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap new file mode 100644 index 00000000..b48332ff --- /dev/null +++ b/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap @@ -0,0 +1,17 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +&ht_hold { hold-trigger-on-release; }; + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) // mod 1 + ZMK_MOCK_PRESS(0,1,10) // mod 2 + ZMK_MOCK_PRESS(1,1,10) // not trigger position + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; diff --git a/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/events.patterns b/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/events.patterns new file mode 100644 index 00000000..fdf2b15c --- /dev/null +++ b/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/events.patterns @@ -0,0 +1,4 @@ +s/.*hid_listener_keycode/kp/p +s/.*mo_keymap_binding/mo/p +s/.*on_hold_tap_binding/ht_binding/p +s/.*decide_hold_tap/ht_decide/p \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/keycode_events.snapshot b/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/keycode_events.snapshot new file mode 100644 index 00000000..e35848cd --- /dev/null +++ b/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/keycode_events.snapshot @@ -0,0 +1,12 @@ +ht_binding_pressed: 0 new undecided hold_tap +ht_decide: 0 decided hold-interrupt (hold-preferred decision moment other-key-down) +kp_pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_pressed: 1 new undecided hold_tap +ht_decide: 1 decided hold-interrupt (hold-preferred decision moment other-key-down) +kp_pressed: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +kp_pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_released: 1 cleaning up hold-tap +kp_released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_released: 0 cleaning up hold-tap diff --git a/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_posix_64.keymap new file mode 100644 index 00000000..77398582 --- /dev/null +++ b/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_posix_64.keymap @@ -0,0 +1,17 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +&ht_hold { hold-trigger-on-release; }; + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) // mod 1 + ZMK_MOCK_PRESS(0,1,10) // mod 2 + ZMK_MOCK_PRESS(1,0,10) // trigger position + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; diff --git a/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/events.patterns b/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/events.patterns new file mode 100644 index 00000000..fdf2b15c --- /dev/null +++ b/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/events.patterns @@ -0,0 +1,4 @@ +s/.*hid_listener_keycode/kp/p +s/.*mo_keymap_binding/mo/p +s/.*on_hold_tap_binding/ht_binding/p +s/.*decide_hold_tap/ht_decide/p \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/keycode_events.snapshot b/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/keycode_events.snapshot new file mode 100644 index 00000000..d72f20d6 --- /dev/null +++ b/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/keycode_events.snapshot @@ -0,0 +1,12 @@ +ht_binding_pressed: 0 new undecided hold_tap +kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +ht_decide: 0 decided tap (tap-preferred decision moment key-up) +kp_pressed: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_pressed: 1 new undecided hold_tap +ht_decide: 1 decided tap (tap-preferred decision moment key-up) +kp_pressed: usage_page 0x07 keycode 0x0D 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 0x0D implicit_mods 0x00 explicit_mods 0x00 +ht_binding_released: 1 cleaning up hold-tap +kp_released: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_released: 0 cleaning up hold-tap diff --git a/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap new file mode 100644 index 00000000..504318f7 --- /dev/null +++ b/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap @@ -0,0 +1,17 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +&tp { hold-trigger-on-release; }; + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) // mod 1 + ZMK_MOCK_PRESS(0,1,10) // mod 2 + ZMK_MOCK_PRESS(1,1,10) // not trigger position + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; diff --git a/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/events.patterns b/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/events.patterns new file mode 100644 index 00000000..fdf2b15c --- /dev/null +++ b/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/events.patterns @@ -0,0 +1,4 @@ +s/.*hid_listener_keycode/kp/p +s/.*mo_keymap_binding/mo/p +s/.*on_hold_tap_binding/ht_binding/p +s/.*decide_hold_tap/ht_decide/p \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/keycode_events.snapshot b/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/keycode_events.snapshot new file mode 100644 index 00000000..a330a93c --- /dev/null +++ b/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/keycode_events.snapshot @@ -0,0 +1,12 @@ +ht_binding_pressed: 0 new undecided hold_tap +ht_decide: 0 decided tap (tap-preferred decision moment key-up) +kp_pressed: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_pressed: 1 new undecided hold_tap +ht_decide: 1 decided tap (tap-preferred decision moment key-up) +kp_pressed: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00 +kp_pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00 +kp_released: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00 +ht_binding_released: 1 cleaning up hold-tap +kp_released: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00 +ht_binding_released: 0 cleaning up hold-tap diff --git a/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_posix_64.keymap new file mode 100644 index 00000000..7061eee7 --- /dev/null +++ b/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_posix_64.keymap @@ -0,0 +1,17 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +&tp { hold-trigger-on-release; }; + +&kscan { + events = < + ZMK_MOCK_PRESS(0,0,10) // mod 1 + ZMK_MOCK_PRESS(0,1,10) // mod 2 + ZMK_MOCK_PRESS(1,0,10) // trigger position + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; +}; diff --git a/docs/docs/behaviors/hold-tap.md b/docs/docs/behaviors/hold-tap.md index 793e350d..1dfb8e5d 100644 --- a/docs/docs/behaviors/hold-tap.md +++ b/docs/docs/behaviors/hold-tap.md @@ -132,6 +132,9 @@ See the following example, which uses a hold-tap behavior definition, configured - The sequence `(pht_down, W_down, W_up, pht_up)` produces `W`. The normal hold behavior (LEFT_SHIFT) **is NOT** modified into a tap behavior (Q) by positional hold-tap because the first key pressed after the hold-tap key is the `W key`, which is in position 1, which **IS** included in `hold-trigger-key-positions`. - If the `LEFT_SHIFT / Q key` is held by itself for longer than `tapping-term-ms`, a hold behavior is produced. This is because positional hold-tap only modifies the behavior of a hold-tap if another key is pressed before the `tapping-term-ms` period expires. +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_. + ### Example Use-Cases Date: Wed, 22 Mar 2023 01:42:11 +0100 Subject: [PATCH 13/64] fix(boards): Disable CDC by default for CiZ The default configuration for corneish-zen enables a USB CDC endpoint by default. This is most probably a debugging left-over. Disable that endpoint. CONFIG_ZMK_USB_LOGGING depends on it anyway, so it will be enabled again with that config option set. --- .../corneish_zen/corneish_zen_v2_left_defconfig | 16 ---------------- .../corneish_zen/corneish_zen_v2_right_defconfig | 9 --------- 2 files changed, 25 deletions(-) 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 eb1e552a..4e676147 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig @@ -73,19 +73,3 @@ CONFIG_ZMK_WIDGET_LAYER_STATUS=n #CONFIG_LVGL_LOG_LEVEL_DBG=y #CONFIG_LVGL_USE_DEBUG=y #CONFIG_SENSOR_LOG_LEVEL_DBG=y - -# Turn on USB CDC ACM device -CONFIG_USB_DEVICE_STACK=y -CONFIG_USB_CDC_ACM=y -CONFIG_USB_CDC_ACM_RINGBUF_SIZE=1024 - -# Enable serial console -CONFIG_SERIAL=y -CONFIG_CONSOLE=y -CONFIG_UART_INTERRUPT_DRIVEN=y -CONFIG_UART_LINE_CTRL=y - -# Enable USB UART -CONFIG_UART_CONSOLE=y - - 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 46b40dee..02039b8d 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig @@ -72,12 +72,3 @@ CONFIG_ZMK_WIDGET_PERIPHERAL_STATUS=n #CONFIG_LVGL_LOG_LEVEL_DBG=y #CONFIG_LVGL_USE_DEBUG=y #CONFIG_SENSOR_LOG_LEVEL_DBG=y - -# Enable serial console -CONFIG_SERIAL=y -CONFIG_CONSOLE=y -CONFIG_UART_INTERRUPT_DRIVEN=y -CONFIG_UART_LINE_CTRL=y - -# Enable USB UART -CONFIG_UART_CONSOLE=y From cd64c59b39754477533e6dd7ad1055f07de92bb0 Mon Sep 17 00:00:00 2001 From: prdktntwcklr <61001903+prdktntwcklr@users.noreply.github.com> Date: Wed, 8 Mar 2023 01:12:11 +0000 Subject: [PATCH 14/64] fix(tests): ignore line endings --- app/run-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/run-test.sh b/app/run-test.sh index 068fdbb4..94438f34 100755 --- a/app/run-test.sh +++ b/app/run-test.sh @@ -33,7 +33,7 @@ if [ $? -gt 0 ]; then fi ./build/$testcase/zephyr/zmk.exe | sed -e "s/.*> //" | tee build/$testcase/keycode_events_full.log | sed -n -f $testcase/events.patterns > build/$testcase/keycode_events.log -diff -au $testcase/keycode_events.snapshot build/$testcase/keycode_events.log +diff -auZ $testcase/keycode_events.snapshot build/$testcase/keycode_events.log if [ $? -gt 0 ]; then if [ -f $testcase/pending ]; then echo "PENDING: $testcase" | tee -a ./build/tests/pass-fail.log From ae8299edb3d638f1332475b1da0fdf40afa43fe4 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 25 Mar 2023 13:17:16 -0400 Subject: [PATCH 15/64] fix(boards): Move the CDC ACM node under the USBD. * Ferris board's CDC ACM node was accidentally nested under the wrong node, causing USB logging builds to fail with cryptic error. --- app/boards/arm/ferris/ferris_rev02.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/boards/arm/ferris/ferris_rev02.dts b/app/boards/arm/ferris/ferris_rev02.dts index dbf3f6e2..50de9526 100644 --- a/app/boards/arm/ferris/ferris_rev02.dts +++ b/app/boards/arm/ferris/ferris_rev02.dts @@ -116,6 +116,10 @@ &usb { status = "okay"; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; }; &clk_hsi { @@ -139,10 +143,6 @@ &rtc { status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; }; &flash0 { From 168b32b8288ba36831f262f82bfa166240506676 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 16 Jan 2023 00:40:53 -0500 Subject: [PATCH 16/64] refactor: Move to Zephyr 3.2 branch. --- app/west.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/west.yml b/app/west.yml index b0f05aed..ffa36ca3 100644 --- a/app/west.yml +++ b/app/west.yml @@ -7,7 +7,7 @@ manifest: projects: - name: zephyr remote: zmkfirmware - revision: v3.0.0+zmk-fixes + revision: v3.2.0+zmk-fixes clone-depth: 1 import: name-blocklist: From 69a4c3200d8c9c92e3e3c68bbd4969f19df70133 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 17 Jan 2023 23:33:42 -0500 Subject: [PATCH 17/64] refactor(display): Updates for LVGL v8.x changes. * LV_ prefix from new LVGL official Kconfig now used. * API changes for themes, container object removal, etc. * Add our own Kconfig and code for theme default small font. * Remove some hardcoded sizes. --- app/boards/arm/corneish_zen/Kconfig.defconfig | 12 +- .../corneish_zen_v2_left_defconfig | 20 ++- .../corneish_zen_v2_right_defconfig | 20 ++- .../arm/corneish_zen/custom_status_screen.c | 38 +++--- .../arm/corneish_zen/widgets/battery_status.c | 9 +- .../arm/corneish_zen/widgets/battery_status.h | 4 +- .../arm/corneish_zen/widgets/layer_status.c | 8 +- .../arm/corneish_zen/widgets/layer_status.h | 4 +- .../arm/corneish_zen/widgets/output_status.c | 10 +- .../arm/corneish_zen/widgets/output_status.h | 4 +- .../corneish_zen/widgets/peripheral_status.c | 8 +- .../corneish_zen/widgets/peripheral_status.h | 4 +- app/boards/shields/corne/Kconfig.defconfig | 10 +- .../shields/elephant42/Kconfig.defconfig | 10 +- app/boards/shields/jorne/Kconfig.defconfig | 10 +- .../shields/knob_goblin/Kconfig.defconfig | 10 +- app/boards/shields/kyria/Kconfig.defconfig | 10 +- app/boards/shields/leeloo/Kconfig.defconfig | 10 +- app/boards/shields/lily58/Kconfig.defconfig | 10 +- app/boards/shields/lotus58/Kconfig.defconfig | 10 +- app/boards/shields/microdox/Kconfig.defconfig | 10 +- app/boards/shields/murphpad/Kconfig.defconfig | 10 +- app/boards/shields/nibble/Kconfig.defconfig | 10 +- .../shields/nice_view/Kconfig.defconfig | 8 +- app/boards/shields/nice_view/nice_view.conf | 4 +- app/boards/shields/snap/Kconfig.defconfig | 10 +- app/boards/shields/sofle/Kconfig.defconfig | 10 +- .../splitkb_aurora_corne/Kconfig.defconfig | 10 +- .../splitkb_aurora_lily58/Kconfig.defconfig | 10 +- .../splitkb_aurora_sweep/Kconfig.defconfig | 10 +- app/boards/shields/tidbit/Kconfig.defconfig | 10 +- .../shields/waterfowl/Kconfig.defconfig | 10 +- app/boards/shields/zodiark/Kconfig.defconfig | 10 +- app/src/display/Kconfig | 119 +++++++++++++++--- app/src/display/main.c | 45 ++++--- app/src/display/status_screen.c | 29 ++--- app/src/display/theme.c | 73 +++++++++++ app/src/display/theme.h | 65 ++++++++++ app/src/display/widgets/Kconfig | 10 +- app/src/display/widgets/battery_status.c | 5 +- app/src/display/widgets/layer_status.c | 4 +- app/src/display/widgets/output_status.c | 4 +- app/src/display/widgets/peripheral_status.c | 4 +- app/src/display/widgets/wpm_status.c | 8 +- 44 files changed, 463 insertions(+), 246 deletions(-) create mode 100644 app/src/display/theme.c create mode 100644 app/src/display/theme.h diff --git a/app/boards/arm/corneish_zen/Kconfig.defconfig b/app/boards/arm/corneish_zen/Kconfig.defconfig index a88cc5ca..33ce1256 100644 --- a/app/boards/arm/corneish_zen/Kconfig.defconfig +++ b/app/boards/arm/corneish_zen/Kconfig.defconfig @@ -42,12 +42,12 @@ config USB_DEVICE_STACK endif # USB config ZMK_DISPLAY - select LVGL_USE_CONT - select LVGL_FONT_MONTSERRAT_26 - select LVGL_FONT_MONTSERRAT_20 - select LVGL_FONT_MONTSERRAT_16 - select LVGL_USE_LABEL - select LVGL_USE_IMG + select LV_USE_CONT + select LV_FONT_MONTSERRAT_26 + select LV_FONT_MONTSERRAT_20 + select LV_FONT_MONTSERRAT_16 + select LV_USE_LABEL + select LV_USE_IMG choice ZMK_DISPLAY_STATUS_SCREEN default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM 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 4e676147..42e27037 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig @@ -39,17 +39,15 @@ CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 CONFIG_SSD1306=n CONFIG_IL0323=y -CONFIG_LVGL_BITS_PER_PIXEL=1 -CONFIG_LVGL_COLOR_DEPTH_1=y -CONFIG_LVGL_DPI=145 -CONFIG_LVGL_VDB_SIZE=100 -CONFIG_LVGL_USE_THEME_MONO=y -CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_RED=n -CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_RED=n -CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_BLACK=y -CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_WHITE=y -CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_16=y -CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_26=y +CONFIG_LV_Z_BITS_PER_PIXEL=1 +CONFIG_LV_COLOR_DEPTH_1=y +CONFIG_LV_DPI_DEF=145 +CONFIG_LV_Z_VDB_SIZE=100 +CONFIG_LV_USE_THEME_MONO=y +CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 +CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y +CONFIG_LV_FONT_MONTSERRAT_26=y +CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y # custom status screens CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y 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 02039b8d..e9b36f2e 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig @@ -39,17 +39,15 @@ CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 CONFIG_SSD1306=n CONFIG_IL0323=y -CONFIG_LVGL_BITS_PER_PIXEL=1 -CONFIG_LVGL_COLOR_DEPTH_1=y -CONFIG_LVGL_DPI=145 -CONFIG_LVGL_VDB_SIZE=100 -CONFIG_LVGL_USE_THEME_MONO=y -CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_RED=n -CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_RED=n -CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_BLACK=y -CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_WHITE=y -CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_16=y -CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_26=y +CONFIG_LV_Z_BITS_PER_PIXEL=1 +CONFIG_LV_COLOR_DEPTH_1=y +CONFIG_LV_DPI_DEF=145 +CONFIG_LV_Z_VDB_SIZE=100 +CONFIG_LV_USE_THEME_MONO=y +CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 +CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y +CONFIG_LV_FONT_MONTSERRAT_26=y +CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y # custom status screens CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y diff --git a/app/boards/arm/corneish_zen/custom_status_screen.c b/app/boards/arm/corneish_zen/custom_status_screen.c index 7842925e..c45a6243 100644 --- a/app/boards/arm/corneish_zen/custom_status_screen.c +++ b/app/boards/arm/corneish_zen/custom_status_screen.c @@ -11,7 +11,7 @@ #include "widgets/layer_status.h" #include "custom_status_screen.h" -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); LV_IMG_DECLARE(zenlogo); @@ -36,50 +36,42 @@ static struct zmk_widget_layer_status layer_status_widget; lv_obj_t *zmk_display_status_screen() { lv_obj_t *screen; - screen = lv_obj_create(NULL, NULL); + screen = lv_obj_create(NULL); #if IS_ENABLED(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS) zmk_widget_battery_status_init(&battery_status_widget, screen); - lv_obj_align(zmk_widget_battery_status_obj(&battery_status_widget), NULL, LV_ALIGN_IN_TOP_MID, - 0, 2); + lv_obj_align(zmk_widget_battery_status_obj(&battery_status_widget), LV_ALIGN_TOP_MID, 0, 2); #endif #if IS_ENABLED(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS) zmk_widget_output_status_init(&output_status_widget, screen); - lv_obj_align(zmk_widget_output_status_obj(&output_status_widget), NULL, LV_ALIGN_IN_TOP_MID, 0, - 41); + lv_obj_align(zmk_widget_output_status_obj(&output_status_widget), LV_ALIGN_TOP_MID, 0, 41); #endif #if IS_ENABLED(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS) zmk_widget_peripheral_status_init(&peripheral_status_widget, screen); - lv_obj_align(zmk_widget_peripheral_status_obj(&peripheral_status_widget), NULL, - LV_ALIGN_IN_TOP_MID, 0, 41); + lv_obj_align(zmk_widget_peripheral_status_obj(&peripheral_status_widget), LV_ALIGN_TOP_MID, 0, + 41); #endif #if IS_ENABLED(CONFIG_CUSTOM_WIDGET_LAYER_STATUS) - zmk_widget_layer_status_init(&layer_status_widget, screen); - lv_obj_set_style_local_text_font(zmk_widget_layer_status_obj(&layer_status_widget), - LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, - lv_theme_get_font_small()); - lv_obj_align(zmk_widget_layer_status_obj(&layer_status_widget), NULL, LV_ALIGN_IN_BOTTOM_MID, 0, - -5); - lv_obj_t *LayersHeading; - LayersHeading = lv_img_create(screen, NULL); - lv_obj_align(LayersHeading, NULL, LV_ALIGN_IN_BOTTOM_MID, 8, 5); + LayersHeading = lv_img_create(screen); + lv_obj_align(LayersHeading, LV_ALIGN_BOTTOM_MID, 0, -30); lv_img_set_src(LayersHeading, &layers2); + + zmk_widget_layer_status_init(&layer_status_widget, screen); + lv_obj_set_style_text_font(zmk_widget_layer_status_obj(&layer_status_widget), + &lv_font_montserrat_16, LV_PART_MAIN); + lv_obj_align(zmk_widget_layer_status_obj(&layer_status_widget), LV_ALIGN_BOTTOM_MID, 0, -5); #endif #if !IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) lv_obj_t *zenlogo_icon; - zenlogo_icon = lv_img_create(screen, NULL); + zenlogo_icon = lv_img_create(screen); lv_img_set_src(zenlogo_icon, &zenlogo); - lv_obj_align(zenlogo_icon, NULL, LV_ALIGN_IN_BOTTOM_MID, 2, -5); + lv_obj_align(zenlogo_icon, LV_ALIGN_BOTTOM_MID, 2, -5); #endif - // lv_task_handler(); - lv_refr_now(NULL); - // display_blanking_off(display_dev); - return screen; } diff --git a/app/boards/arm/corneish_zen/widgets/battery_status.c b/app/boards/arm/corneish_zen/widgets/battery_status.c index 7dfd51e8..9a2189d1 100644 --- a/app/boards/arm/corneish_zen/widgets/battery_status.c +++ b/app/boards/arm/corneish_zen/widgets/battery_status.c @@ -5,15 +5,14 @@ * */ -#include -#include +#include +#include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include "battery_status.h" -#include #include #include #include @@ -84,7 +83,7 @@ ZMK_SUBSCRIPTION(widget_battery_status, zmk_usb_conn_state_changed); #endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */ int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent) { - widget->obj = lv_img_create(parent, NULL); + widget->obj = lv_img_create(parent); sys_slist_append(&widgets, &widget->node); widget_battery_status_init(); diff --git a/app/boards/arm/corneish_zen/widgets/battery_status.h b/app/boards/arm/corneish_zen/widgets/battery_status.h index 21a4efb8..d493c582 100644 --- a/app/boards/arm/corneish_zen/widgets/battery_status.h +++ b/app/boards/arm/corneish_zen/widgets/battery_status.h @@ -9,7 +9,7 @@ #include -#include +#include struct zmk_widget_battery_status { sys_snode_t node; @@ -17,4 +17,4 @@ struct zmk_widget_battery_status { }; int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent); -lv_obj_t *zmk_widget_battery_status_obj(struct zmk_widget_battery_status *widget); \ No newline at end of file +lv_obj_t *zmk_widget_battery_status_obj(struct zmk_widget_battery_status *widget); diff --git a/app/boards/arm/corneish_zen/widgets/layer_status.c b/app/boards/arm/corneish_zen/widgets/layer_status.c index a309a787..3dc33613 100644 --- a/app/boards/arm/corneish_zen/widgets/layer_status.c +++ b/app/boards/arm/corneish_zen/widgets/layer_status.c @@ -5,8 +5,8 @@ * */ -#include -#include +#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include @@ -54,7 +54,7 @@ ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, laye ZMK_SUBSCRIPTION(widget_layer_status, zmk_layer_state_changed); int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent) { - widget->obj = lv_label_create(parent, NULL); + widget->obj = lv_label_create(parent); sys_slist_append(&widgets, &widget->node); @@ -64,4 +64,4 @@ int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_ lv_obj_t *zmk_widget_layer_status_obj(struct zmk_widget_layer_status *widget) { return widget->obj; -} \ No newline at end of file +} diff --git a/app/boards/arm/corneish_zen/widgets/layer_status.h b/app/boards/arm/corneish_zen/widgets/layer_status.h index 04f32faa..c03433c5 100644 --- a/app/boards/arm/corneish_zen/widgets/layer_status.h +++ b/app/boards/arm/corneish_zen/widgets/layer_status.h @@ -8,7 +8,7 @@ #pragma once #include -#include +#include struct zmk_widget_layer_status { sys_snode_t node; @@ -16,4 +16,4 @@ struct zmk_widget_layer_status { }; int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent); -lv_obj_t *zmk_widget_layer_status_obj(struct zmk_widget_layer_status *widget); \ No newline at end of file +lv_obj_t *zmk_widget_layer_status_obj(struct zmk_widget_layer_status *widget); diff --git a/app/boards/arm/corneish_zen/widgets/output_status.c b/app/boards/arm/corneish_zen/widgets/output_status.c index bd69bbb1..ad0c2b1a 100644 --- a/app/boards/arm/corneish_zen/widgets/output_status.c +++ b/app/boards/arm/corneish_zen/widgets/output_status.c @@ -5,10 +5,10 @@ * */ -#include -#include +#include +#include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include @@ -123,9 +123,7 @@ ZMK_SUBSCRIPTION(widget_output_status, zmk_ble_active_profile_changed); #endif int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent) { - widget->obj = lv_img_create(parent, NULL); - - lv_obj_set_size(widget->obj, 40, 15); + widget->obj = lv_img_create(parent); sys_slist_append(&widgets, &widget->node); diff --git a/app/boards/arm/corneish_zen/widgets/output_status.h b/app/boards/arm/corneish_zen/widgets/output_status.h index c171e2bb..ba92f893 100644 --- a/app/boards/arm/corneish_zen/widgets/output_status.h +++ b/app/boards/arm/corneish_zen/widgets/output_status.h @@ -8,7 +8,7 @@ #pragma once #include -#include +#include struct zmk_widget_output_status { sys_snode_t node; @@ -16,4 +16,4 @@ struct zmk_widget_output_status { }; int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent); -lv_obj_t *zmk_widget_output_status_obj(struct zmk_widget_output_status *widget); \ No newline at end of file +lv_obj_t *zmk_widget_output_status_obj(struct zmk_widget_output_status *widget); diff --git a/app/boards/arm/corneish_zen/widgets/peripheral_status.c b/app/boards/arm/corneish_zen/widgets/peripheral_status.c index e18414be..39b62fde 100644 --- a/app/boards/arm/corneish_zen/widgets/peripheral_status.c +++ b/app/boards/arm/corneish_zen/widgets/peripheral_status.c @@ -5,10 +5,10 @@ * */ -#include -#include +#include +#include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include @@ -48,7 +48,7 @@ ZMK_SUBSCRIPTION(widget_peripheral_status, zmk_split_peripheral_status_changed); int zmk_widget_peripheral_status_init(struct zmk_widget_peripheral_status *widget, lv_obj_t *parent) { - widget->obj = lv_img_create(parent, NULL); + widget->obj = lv_img_create(parent); sys_slist_append(&widgets, &widget->node); diff --git a/app/boards/arm/corneish_zen/widgets/peripheral_status.h b/app/boards/arm/corneish_zen/widgets/peripheral_status.h index 59675763..82fe2105 100644 --- a/app/boards/arm/corneish_zen/widgets/peripheral_status.h +++ b/app/boards/arm/corneish_zen/widgets/peripheral_status.h @@ -8,7 +8,7 @@ #pragma once #include -#include +#include struct zmk_widget_peripheral_status { sys_snode_t node; @@ -17,4 +17,4 @@ struct zmk_widget_peripheral_status { int zmk_widget_peripheral_status_init(struct zmk_widget_peripheral_status *widget, lv_obj_t *parent); -lv_obj_t *zmk_widget_peripheral_status_obj(struct zmk_widget_peripheral_status *widget); \ No newline at end of file +lv_obj_t *zmk_widget_peripheral_status_obj(struct zmk_widget_peripheral_status *widget); diff --git a/app/boards/shields/corne/Kconfig.defconfig b/app/boards/shields/corne/Kconfig.defconfig index 9160555c..acf542d7 100644 --- a/app/boards/shields/corne/Kconfig.defconfig +++ b/app/boards/shields/corne/Kconfig.defconfig @@ -28,17 +28,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/elephant42/Kconfig.defconfig b/app/boards/shields/elephant42/Kconfig.defconfig index 1e93762c..e507f2c6 100644 --- a/app/boards/shields/elephant42/Kconfig.defconfig +++ b/app/boards/shields/elephant42/Kconfig.defconfig @@ -31,17 +31,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/jorne/Kconfig.defconfig b/app/boards/shields/jorne/Kconfig.defconfig index 64eb32b8..4664debf 100644 --- a/app/boards/shields/jorne/Kconfig.defconfig +++ b/app/boards/shields/jorne/Kconfig.defconfig @@ -29,17 +29,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/knob_goblin/Kconfig.defconfig b/app/boards/shields/knob_goblin/Kconfig.defconfig index 300fb4eb..d8d468ed 100644 --- a/app/boards/shields/knob_goblin/Kconfig.defconfig +++ b/app/boards/shields/knob_goblin/Kconfig.defconfig @@ -21,17 +21,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/kyria/Kconfig.defconfig b/app/boards/shields/kyria/Kconfig.defconfig index 0da8a18d..cdb57b6b 100644 --- a/app/boards/shields/kyria/Kconfig.defconfig +++ b/app/boards/shields/kyria/Kconfig.defconfig @@ -29,17 +29,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/leeloo/Kconfig.defconfig b/app/boards/shields/leeloo/Kconfig.defconfig index a4295d1e..36306757 100644 --- a/app/boards/shields/leeloo/Kconfig.defconfig +++ b/app/boards/shields/leeloo/Kconfig.defconfig @@ -32,17 +32,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/lily58/Kconfig.defconfig b/app/boards/shields/lily58/Kconfig.defconfig index a5e6fbe8..97cecce1 100644 --- a/app/boards/shields/lily58/Kconfig.defconfig +++ b/app/boards/shields/lily58/Kconfig.defconfig @@ -29,17 +29,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/lotus58/Kconfig.defconfig b/app/boards/shields/lotus58/Kconfig.defconfig index 57ae5ef6..56eef359 100644 --- a/app/boards/shields/lotus58/Kconfig.defconfig +++ b/app/boards/shields/lotus58/Kconfig.defconfig @@ -31,17 +31,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/microdox/Kconfig.defconfig b/app/boards/shields/microdox/Kconfig.defconfig index 7bf40b8b..28f8c811 100644 --- a/app/boards/shields/microdox/Kconfig.defconfig +++ b/app/boards/shields/microdox/Kconfig.defconfig @@ -31,17 +31,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/murphpad/Kconfig.defconfig b/app/boards/shields/murphpad/Kconfig.defconfig index 9f491564..07e71826 100644 --- a/app/boards/shields/murphpad/Kconfig.defconfig +++ b/app/boards/shields/murphpad/Kconfig.defconfig @@ -21,17 +21,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/nibble/Kconfig.defconfig b/app/boards/shields/nibble/Kconfig.defconfig index a1683f3a..d5e8cbeb 100644 --- a/app/boards/shields/nibble/Kconfig.defconfig +++ b/app/boards/shields/nibble/Kconfig.defconfig @@ -25,17 +25,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/nice_view/Kconfig.defconfig b/app/boards/shields/nice_view/Kconfig.defconfig index a699a813..22c5f647 100644 --- a/app/boards/shields/nice_view/Kconfig.defconfig +++ b/app/boards/shields/nice_view/Kconfig.defconfig @@ -4,7 +4,7 @@ if SHIELD_NICE_VIEW config ZMK_DISPLAY - select LVGL_FONT_MONTSERRAT_26 + select LV_FONT_MONTSERRAT_26 if ZMK_DISPLAY @@ -17,11 +17,11 @@ config LS0XX config ZMK_WIDGET_WPM_STATUS default y if !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # ZMK_DISPLAY diff --git a/app/boards/shields/nice_view/nice_view.conf b/app/boards/shields/nice_view/nice_view.conf index 2c1d6c71..ff57c07c 100644 --- a/app/boards/shields/nice_view/nice_view.conf +++ b/app/boards/shields/nice_view/nice_view.conf @@ -1,5 +1,5 @@ # Enable nice!view CONFIG_ZMK_DISPLAY=y -CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_26=y -CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_26=y +CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y +CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE=n diff --git a/app/boards/shields/snap/Kconfig.defconfig b/app/boards/shields/snap/Kconfig.defconfig index 24a8e5cc..fa02421a 100644 --- a/app/boards/shields/snap/Kconfig.defconfig +++ b/app/boards/shields/snap/Kconfig.defconfig @@ -31,17 +31,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/sofle/Kconfig.defconfig b/app/boards/shields/sofle/Kconfig.defconfig index 69dac3f2..1c1c5604 100644 --- a/app/boards/shields/sofle/Kconfig.defconfig +++ b/app/boards/shields/sofle/Kconfig.defconfig @@ -31,17 +31,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig index 5a1eeb13..29de8d7e 100644 --- a/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig @@ -37,17 +37,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig index bbaef0ff..3c8d5f58 100644 --- a/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig @@ -37,17 +37,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig index 51fbc28c..4a2b8973 100644 --- a/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig @@ -37,17 +37,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/tidbit/Kconfig.defconfig b/app/boards/shields/tidbit/Kconfig.defconfig index 013a0a7c..e3655a9e 100644 --- a/app/boards/shields/tidbit/Kconfig.defconfig +++ b/app/boards/shields/tidbit/Kconfig.defconfig @@ -22,17 +22,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/waterfowl/Kconfig.defconfig b/app/boards/shields/waterfowl/Kconfig.defconfig index 897184f6..70029f0b 100644 --- a/app/boards/shields/waterfowl/Kconfig.defconfig +++ b/app/boards/shields/waterfowl/Kconfig.defconfig @@ -29,17 +29,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/zodiark/Kconfig.defconfig b/app/boards/shields/zodiark/Kconfig.defconfig index 76bfcbd4..77648afd 100644 --- a/app/boards/shields/zodiark/Kconfig.defconfig +++ b/app/boards/shields/zodiark/Kconfig.defconfig @@ -31,17 +31,17 @@ endif # ZMK_DISPLAY if LVGL -config LVGL_VDB_SIZE +config LV_Z_VDB_SIZE default 64 -config LVGL_DPI +config LV_Z_DPI default 148 -config LVGL_BITS_PER_PIXEL +config LV_Z_BITS_PER_PIXEL default 1 -choice LVGL_COLOR_DEPTH - default LVGL_COLOR_DEPTH_1 +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/src/display/Kconfig b/app/src/display/Kconfig index c0753358..32be2a27 100644 --- a/app/src/display/Kconfig +++ b/app/src/display/Kconfig @@ -6,8 +6,9 @@ menuconfig ZMK_DISPLAY default n select DISPLAY select LVGL - select LVGL_THEMES - select LVGL_THEME_MONO + select LV_THEMES + select LV_THEME_MONO + select LV_CONF_MINIMAL if ZMK_DISPLAY @@ -15,17 +16,26 @@ config ZMK_DISPLAY_BLANK_ON_IDLE bool "Blank display on idle" default y if SSD1306 -choice LVGL_TXT_ENC - default LVGL_TXT_ENC_UTF8 +choice LV_TXT_ENC + default LV_TXT_ENC_UTF8 endchoice +config LV_MEM_CUSTOM + default y + +config LV_Z_MEM_POOL_MIN_SIZE + default 32 + +config LV_Z_MEM_POOL_MAX_SIZE + default 8192 + choice ZMK_DISPLAY_STATUS_SCREEN prompt "Default status screen for displays" config ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN bool "Built in status screen" - select LVGL_OBJ_LABEL + select LV_OBJ_LABEL config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM bool "Custom status screen" @@ -57,24 +67,105 @@ endif # ZMK_DISPLAY_WORK_QUEUE_DEDICATED if ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN -config LVGL_FONT_MONTSERRAT_16 +config LV_FONT_MONTSERRAT_16 default y -choice LVGL_THEME_DEFAULT_FONT_NORMAL - default LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_16 +choice LV_FONT_DEFAULT + default LV_FONT_DEFAULT_MONTSERRAT_16 endchoice -config LVGL_FONT_MONTSERRAT_12 +config LV_FONT_MONTSERRAT_12 default y - -choice LVGL_THEME_DEFAULT_FONT_SMALL - default LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_12 - -endchoice endif # ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN +choice ZMK_LV_FONT_DEFAULT_SMALL + prompt "Select theme default small font" + default ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_12 + help + Select theme default small font + + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_8 + bool "Montserrat 8" + select LV_FONT_MONTSERRAT_8 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_12 + bool "Montserrat 12" + select LV_FONT_MONTSERRAT_12 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_14 + bool "Montserrat 14" + select LV_FONT_MONTSERRAT_14 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16 + bool "Montserrat 16" + select LV_FONT_MONTSERRAT_16 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_18 + bool "Montserrat 18" + select LV_FONT_MONTSERRAT_18 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_20 + bool "Montserrat 20" + select LV_FONT_MONTSERRAT_20 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_22 + bool "Montserrat 22" + select LV_FONT_MONTSERRAT_22 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_24 + bool "Montserrat 24" + select LV_FONT_MONTSERRAT_24 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26 + bool "Montserrat 26" + select LV_FONT_MONTSERRAT_26 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_28 + bool "Montserrat 28" + select LV_FONT_MONTSERRAT_28 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_30 + bool "Montserrat 30" + select LV_FONT_MONTSERRAT_30 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_32 + bool "Montserrat 32" + select LV_FONT_MONTSERRAT_32 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_34 + bool "Montserrat 34" + select LV_FONT_MONTSERRAT_34 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_36 + bool "Montserrat 36" + select LV_FONT_MONTSERRAT_36 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_38 + bool "Montserrat 38" + select LV_FONT_MONTSERRAT_38 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_40 + bool "Montserrat 40" + select LV_FONT_MONTSERRAT_40 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_42 + bool "Montserrat 42" + select LV_FONT_MONTSERRAT_42 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_44 + bool "Montserrat 44" + select LV_FONT_MONTSERRAT_44 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_46 + bool "Montserrat 46" + select LV_FONT_MONTSERRAT_46 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_48 + bool "Montserrat 48" + select LV_FONT_MONTSERRAT_48 + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_12_SUBPX + bool "Montserrat 12 sub-pixel" + select LV_FONT_MONTSERRAT_12_SUBPX + config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_28_COMPRESSED + bool "Montserrat 28 compressed" + select LV_FONT_MONTSERRAT_28_COMPRESSED + config ZMK_LV_FONT_DEFAULT_SMALL_DEJAVU_16_PERSIAN_HEBREW + bool "Dejavu 16 Persian, Hebrew, Arabic letters" + select LV_FONT_DEJAVU_16_PERSIAN_HEBREW + config ZMK_LV_FONT_DEFAULT_SMALL_SIMSUN_16_CJK + bool "Simsun 16 CJK" + select LV_FONT_SIMSUN_16_CJK + config ZMK_LV_FONT_DEFAULT_SMALL_UNSCII_8 + bool "UNSCII 8 (Perfect monospace font)" + select LV_FONT_UNSCII_8 + config ZMK_LV_FONT_DEFAULT_SMALL_UNSCII_16 + bool "UNSCII 16 (Perfect monospace font)" + select LV_FONT_UNSCII_16 +endchoice + rsource "widgets/Kconfig" endif diff --git a/app/src/display/main.c b/app/src/display/main.c index 8a70cef2..3fb4e8f6 100644 --- a/app/src/display/main.c +++ b/app/src/display/main.c @@ -15,11 +15,13 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include +#include "theme.h" + #include #include #include -#define ZMK_DISPLAY_NAME CONFIG_LVGL_DISPLAY_DEV_NAME +#define ZMK_DISPLAY_NAME CONFIG_LV_Z_DISPLAY_DEV_NAME static const struct device *display; static bool initialized = false; @@ -50,16 +52,21 @@ struct k_work_q *zmk_display_work_q() { #endif } -void display_timer_cb() { - lv_tick_inc(TICK_MS); - k_work_submit_to_queue(zmk_display_work_q(), &display_tick_work); -} - -void blank_display_cb(struct k_work *work) { display_blanking_on(display); } - -void unblank_display_cb(struct k_work *work) { display_blanking_off(display); } +void display_timer_cb() { k_work_submit_to_queue(zmk_display_work_q(), &display_tick_work); } K_TIMER_DEFINE(display_timer, display_timer_cb, NULL); + +void unblank_display_cb(struct k_work *work) { + display_blanking_off(display); + k_timer_start(&display_timer, K_MSEC(TICK_MS), K_MSEC(TICK_MS)); +} + +#if IS_ENABLED(CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE) + +void blank_display_cb(struct k_work *work) { + k_timer_stop(&display_timer); + display_blanking_on(display); +} K_WORK_DEFINE(blank_display_work, blank_display_cb); K_WORK_DEFINE(unblank_display_work, unblank_display_cb); @@ -69,26 +76,30 @@ static void start_display_updates() { } k_work_submit_to_queue(zmk_display_work_q(), &unblank_display_work); - - k_timer_start(&display_timer, K_MSEC(TICK_MS), K_MSEC(TICK_MS)); } -#if IS_ENABLED(CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE) - static void stop_display_updates() { if (display == NULL) { return; } k_work_submit_to_queue(zmk_display_work_q(), &blank_display_work); - - k_timer_stop(&display_timer); } #endif 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); + theme->font_small = CONFIG_ZMK_LV_FONT_DEFAULT_SMALL; + + disp->theme = theme; +#endif // CONFIG_LV_USE_THEME_MONO +} + void initialize_display(struct k_work *work) { LOG_DBG(""); @@ -100,6 +111,8 @@ void initialize_display(struct k_work *work) { initialized = true; + initialize_theme(); + screen = zmk_display_status_screen(); if (screen == NULL) { @@ -109,7 +122,7 @@ void initialize_display(struct k_work *work) { lv_scr_load(screen); - start_display_updates(); + unblank_display_cb(work); } K_WORK_DEFINE(init_work, initialize_display); diff --git a/app/src/display/status_screen.c b/app/src/display/status_screen.c index 0fe7212d..6b58c301 100644 --- a/app/src/display/status_screen.c +++ b/app/src/display/status_screen.c @@ -34,42 +34,43 @@ static struct zmk_widget_layer_status layer_status_widget; static struct zmk_widget_wpm_status wpm_status_widget; #endif +lv_style_t global_style; + lv_obj_t *zmk_display_status_screen() { lv_obj_t *screen; - screen = lv_obj_create(NULL, NULL); + lv_style_init(&global_style); + lv_style_set_text_font(&global_style, &lv_font_montserrat_12); + + screen = lv_obj_create(NULL); + lv_obj_add_style(screen, &global_style, LV_PART_MAIN); #if IS_ENABLED(CONFIG_ZMK_WIDGET_BATTERY_STATUS) zmk_widget_battery_status_init(&battery_status_widget, screen); - lv_obj_align(zmk_widget_battery_status_obj(&battery_status_widget), NULL, LV_ALIGN_IN_TOP_RIGHT, - 0, 0); + lv_obj_align(zmk_widget_battery_status_obj(&battery_status_widget), LV_ALIGN_TOP_RIGHT, 0, 0); #endif #if IS_ENABLED(CONFIG_ZMK_WIDGET_OUTPUT_STATUS) zmk_widget_output_status_init(&output_status_widget, screen); - lv_obj_align(zmk_widget_output_status_obj(&output_status_widget), NULL, LV_ALIGN_IN_TOP_LEFT, 0, - 0); + lv_obj_align(zmk_widget_output_status_obj(&output_status_widget), LV_ALIGN_TOP_LEFT, 0, 0); #endif #if IS_ENABLED(CONFIG_ZMK_WIDGET_PERIPHERAL_STATUS) zmk_widget_peripheral_status_init(&peripheral_status_widget, screen); - lv_obj_align(zmk_widget_peripheral_status_obj(&peripheral_status_widget), NULL, - LV_ALIGN_IN_TOP_LEFT, 0, 0); + lv_obj_align(zmk_widget_peripheral_status_obj(&peripheral_status_widget), LV_ALIGN_TOP_LEFT, 0, + 0); #endif #if IS_ENABLED(CONFIG_ZMK_WIDGET_LAYER_STATUS) zmk_widget_layer_status_init(&layer_status_widget, screen); - lv_obj_set_style_local_text_font(zmk_widget_layer_status_obj(&layer_status_widget), - LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, - lv_theme_get_font_small()); - lv_obj_align(zmk_widget_layer_status_obj(&layer_status_widget), NULL, LV_ALIGN_IN_BOTTOM_LEFT, - 0, 0); + lv_obj_set_style_text_font(zmk_widget_layer_status_obj(&layer_status_widget), + lv_theme_get_font_small(screen), LV_PART_MAIN); + lv_obj_align(zmk_widget_layer_status_obj(&layer_status_widget), LV_ALIGN_BOTTOM_LEFT, 0, 0); #endif #if IS_ENABLED(CONFIG_ZMK_WIDGET_WPM_STATUS) zmk_widget_wpm_status_init(&wpm_status_widget, screen); - lv_obj_align(zmk_widget_wpm_status_obj(&wpm_status_widget), NULL, LV_ALIGN_IN_BOTTOM_RIGHT, 0, - 0); + lv_obj_align(zmk_widget_wpm_status_obj(&wpm_status_widget), LV_ALIGN_BOTTOM_RIGHT, 0, 0); #endif return screen; } diff --git a/app/src/display/theme.c b/app/src/display/theme.c new file mode 100644 index 00000000..3ad41dac --- /dev/null +++ b/app/src/display/theme.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +#if defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_8) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_8 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_10) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_10 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_12) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_12 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_14) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_14 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_16 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_18) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_18 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_20) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_20 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_22) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_22 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_24) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_24 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_26 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_28) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_28 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_30) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_30 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_32) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_32 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_34) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_34 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_36) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_36 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_38) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_38 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_40) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_40 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_42) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_42 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_44) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_44 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_46) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_46 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_48) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_48 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_12_SUBPX) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_12_subpx +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_28_COMPRESSED) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_28_compressed +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_DEJAVU_16_PERSIAN_HEBREW) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_dejavu_16_persian_hebrew +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_SIMSUN_16_CJK) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_simsun_16_cjk +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_UNSCII_8) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_unscii_8 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_UNSCII_16) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_unscii_16 +#endif + +void zmk_display_theme_init(lv_obj_t *obj) { + lv_theme_t *theme = lv_theme_get_from_obj(obj); + + if (theme == NULL) { + return; + } + + theme->font_small = CONFIG_ZMK_LV_FONT_DEFAULT_SMALL; +} \ No newline at end of file diff --git a/app/src/display/theme.h b/app/src/display/theme.h new file mode 100644 index 00000000..94bf7f39 --- /dev/null +++ b/app/src/display/theme.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include + +#if defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_8) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_8 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_10) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_10 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_12) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_12 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_14) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_14 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_16 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_18) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_18 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_20) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_20 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_22) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_22 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_24) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_24 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_26 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_28) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_28 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_30) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_30 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_32) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_32 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_34) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_34 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_36) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_36 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_38) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_38 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_40) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_40 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_42) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_42 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_44) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_44 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_46) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_46 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_48) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_48 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_12_SUBPX) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_12_subpx +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_28_COMPRESSED) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_montserrat_28_compressed +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_DEJAVU_16_PERSIAN_HEBREW) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_dejavu_16_persian_hebrew +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_SIMSUN_16_CJK) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_simsun_16_cjk +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_UNSCII_8) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_unscii_8 +#elif defined(CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_UNSCII_16) +#define CONFIG_ZMK_LV_FONT_DEFAULT_SMALL &lv_font_unscii_16 +#endif diff --git a/app/src/display/widgets/Kconfig b/app/src/display/widgets/Kconfig index 847a47ab..5ef32d20 100644 --- a/app/src/display/widgets/Kconfig +++ b/app/src/display/widgets/Kconfig @@ -7,13 +7,13 @@ 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 LVGL_USE_LABEL + 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 LVGL_USE_LABEL + select LV_USE_LABEL if ZMK_WIDGET_BATTERY_STATUS @@ -26,18 +26,18 @@ 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 LVGL_USE_LABEL + 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 LVGL_USE_LABEL + select LV_USE_LABEL config ZMK_WIDGET_WPM_STATUS bool "Widget for displaying typed words per minute" depends on !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL - select LVGL_USE_LABEL + select LV_USE_LABEL select ZMK_WPM endmenu diff --git a/app/src/display/widgets/battery_status.c b/app/src/display/widgets/battery_status.c index 71b243d3..3480101d 100644 --- a/app/src/display/widgets/battery_status.c +++ b/app/src/display/widgets/battery_status.c @@ -55,7 +55,6 @@ static void set_battery_symbol(lv_obj_t *label, struct battery_status_state stat } #endif lv_label_set_text(label, text); - lv_obj_align(label, NULL, LV_ALIGN_IN_TOP_RIGHT, 0, 0); } void battery_status_update_cb(struct battery_status_state state) { @@ -81,9 +80,7 @@ ZMK_SUBSCRIPTION(widget_battery_status, zmk_usb_conn_state_changed); #endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */ int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent) { - widget->obj = lv_label_create(parent, NULL); - - lv_obj_set_size(widget->obj, 43, 15); + widget->obj = lv_label_create(parent); sys_slist_append(&widgets, &widget->node); diff --git a/app/src/display/widgets/layer_status.c b/app/src/display/widgets/layer_status.c index a4a7be58..8dc0061c 100644 --- a/app/src/display/widgets/layer_status.c +++ b/app/src/display/widgets/layer_status.c @@ -54,9 +54,7 @@ ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, laye ZMK_SUBSCRIPTION(widget_layer_status, zmk_layer_state_changed); int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent) { - widget->obj = lv_label_create(parent, NULL); - - lv_obj_set_size(widget->obj, 40, 15); + widget->obj = lv_label_create(parent); sys_slist_append(&widgets, &widget->node); diff --git a/app/src/display/widgets/output_status.c b/app/src/display/widgets/output_status.c index 8bbe1a7e..135770a6 100644 --- a/app/src/display/widgets/output_status.c +++ b/app/src/display/widgets/output_status.c @@ -81,9 +81,7 @@ ZMK_SUBSCRIPTION(widget_output_status, zmk_ble_active_profile_changed); #endif int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent) { - widget->obj = lv_label_create(parent, NULL); - - lv_obj_set_size(widget->obj, 40, 15); + widget->obj = lv_label_create(parent); sys_slist_append(&widgets, &widget->node); diff --git a/app/src/display/widgets/peripheral_status.c b/app/src/display/widgets/peripheral_status.c index baf48f58..d0c33f20 100644 --- a/app/src/display/widgets/peripheral_status.c +++ b/app/src/display/widgets/peripheral_status.c @@ -45,9 +45,7 @@ ZMK_SUBSCRIPTION(widget_peripheral_status, zmk_split_peripheral_status_changed); int zmk_widget_peripheral_status_init(struct zmk_widget_peripheral_status *widget, lv_obj_t *parent) { - widget->obj = lv_label_create(parent, NULL); - - lv_obj_set_size(widget->obj, 40, 15); + widget->obj = lv_label_create(parent); sys_slist_append(&widgets, &widget->node); diff --git a/app/src/display/widgets/wpm_status.c b/app/src/display/widgets/wpm_status.c index a2c6a287..f3d06d65 100644 --- a/app/src/display/widgets/wpm_status.c +++ b/app/src/display/widgets/wpm_status.c @@ -31,7 +31,7 @@ void set_wpm_symbol(lv_obj_t *label, struct wpm_status_state state) { snprintf(text, sizeof(text), "%i", state.wpm); lv_label_set_text(label, text); - lv_obj_align(label, NULL, LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0); + lv_obj_align(label, LV_ALIGN_BOTTOM_RIGHT, 0, 0); } void wpm_status_update_cb(struct wpm_status_state state) { @@ -44,10 +44,8 @@ ZMK_DISPLAY_WIDGET_LISTENER(widget_wpm_status, struct wpm_status_state, wpm_stat ZMK_SUBSCRIPTION(widget_wpm_status, zmk_wpm_state_changed); int zmk_widget_wpm_status_init(struct zmk_widget_wpm_status *widget, lv_obj_t *parent) { - widget->obj = lv_label_create(parent, NULL); - lv_label_set_align(widget->obj, LV_LABEL_ALIGN_RIGHT); - - lv_obj_set_size(widget->obj, 40, 15); + widget->obj = lv_label_create(parent); + lv_obj_align(widget->obj, LV_ALIGN_RIGHT_MID, 0, 0); sys_slist_append(&widgets, &widget->node); From 243a227ff96e0cc25d4ae362efb30c769b4bc329 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 20 Sep 2022 21:35:40 -0400 Subject: [PATCH 18/64] refactor: Move to LISTIFY/DT_FOREACH_PROP_ELEM macros. --- app/drivers/kscan/kscan_gpio_demux.c | 6 +++--- app/drivers/kscan/kscan_gpio_direct.c | 4 ++-- app/drivers/kscan/kscan_gpio_matrix.c | 8 ++++---- app/src/behaviors/behavior_caps_word.c | 4 ++-- app/src/behaviors/behavior_macro.c | 4 ++-- app/src/behaviors/behavior_tap_dance.c | 4 ++-- app/src/conditional_layer.c | 5 ++--- app/src/keymap.c | 8 ++++---- app/src/matrix_transform.c | 4 ++-- app/src/sensors.c | 17 ++++++++++------- 10 files changed, 33 insertions(+), 31 deletions(-) diff --git a/app/drivers/kscan/kscan_gpio_demux.c b/app/drivers/kscan/kscan_gpio_demux.c index 6e3d9e79..ff2c6c69 100644 --- a/app/drivers/kscan/kscan_gpio_demux.c +++ b/app/drivers/kscan/kscan_gpio_demux.c @@ -28,7 +28,7 @@ struct kscan_gpio_item_config { .label = DT_INST_GPIO_LABEL_BY_IDX(n, prop, idx), \ .pin = DT_INST_GPIO_PIN_BY_IDX(n, prop, idx), \ .flags = DT_INST_GPIO_FLAGS_BY_IDX(n, prop, idx), \ - }, + } // Define row and col cfg #define _KSCAN_GPIO_INPUT_CFG_INIT(idx, n) _KSCAN_GPIO_ITEM_CFG_INIT(n, input_gpios, idx) @@ -240,8 +240,8 @@ struct kscan_gpio_item_config { }; \ \ static const struct kscan_gpio_config_##n kscan_gpio_config_##n = { \ - .rows = {UTIL_LISTIFY(INST_MATRIX_INPUTS(n), _KSCAN_GPIO_INPUT_CFG_INIT, n)}, \ - .cols = {UTIL_LISTIFY(INST_DEMUX_GPIOS(n), _KSCAN_GPIO_OUTPUT_CFG_INIT, n)}, \ + .rows = {LISTIFY(INST_MATRIX_INPUTS(n), _KSCAN_GPIO_INPUT_CFG_INIT, (,), n)}, \ + .cols = {LISTIFY(INST_DEMUX_GPIOS(n), _KSCAN_GPIO_OUTPUT_CFG_INIT, (,), n)}, \ }; \ \ DEVICE_DT_INST_DEFINE(n, kscan_gpio_init_##n, NULL, &kscan_gpio_data_##n, \ diff --git a/app/drivers/kscan/kscan_gpio_direct.c b/app/drivers/kscan/kscan_gpio_direct.c index ee7b13f6..1e0576c5 100644 --- a/app/drivers/kscan/kscan_gpio_direct.c +++ b/app/drivers/kscan/kscan_gpio_direct.c @@ -41,7 +41,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), + GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst_idx), input_gpios, idx) struct kscan_direct_irq_callback { const struct device *dev; @@ -327,7 +327,7 @@ static const struct kscan_driver_api kscan_direct_api = { "ZMK_KSCAN_DEBOUNCE_RELEASE_MS or debounce-release-ms is too large"); \ \ static const struct gpio_dt_spec kscan_direct_inputs_##n[] = { \ - UTIL_LISTIFY(INST_INPUTS_LEN(n), KSCAN_DIRECT_INPUT_CFG_INIT, n)}; \ + LISTIFY(INST_INPUTS_LEN(n), KSCAN_DIRECT_INPUT_CFG_INIT, (,), n)}; \ \ static struct debounce_state kscan_direct_state_##n[INST_INPUTS_LEN(n)]; \ \ diff --git a/app/drivers/kscan/kscan_gpio_matrix.c b/app/drivers/kscan/kscan_gpio_matrix.c index 71fcad29..de65fd49 100644 --- a/app/drivers/kscan/kscan_gpio_matrix.c +++ b/app/drivers/kscan/kscan_gpio_matrix.c @@ -50,9 +50,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), + GPIO_DT_SPEC_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), + GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst_idx), col_gpios, idx) enum kscan_diode_direction { KSCAN_ROW2COL, @@ -433,10 +433,10 @@ static const struct kscan_driver_api kscan_matrix_api = { "ZMK_KSCAN_DEBOUNCE_RELEASE_MS or debounce-release-ms is too large"); \ \ static const struct gpio_dt_spec kscan_matrix_rows_##n[] = { \ - UTIL_LISTIFY(INST_ROWS_LEN(n), KSCAN_GPIO_ROW_CFG_INIT, n)}; \ + LISTIFY(INST_ROWS_LEN(n), KSCAN_GPIO_ROW_CFG_INIT, (,), n)}; \ \ static const struct gpio_dt_spec kscan_matrix_cols_##n[] = { \ - UTIL_LISTIFY(INST_COLS_LEN(n), KSCAN_GPIO_COL_CFG_INIT, n)}; \ + LISTIFY(INST_COLS_LEN(n), KSCAN_GPIO_COL_CFG_INIT, (,), n)}; \ \ static struct debounce_state kscan_matrix_state_##n[INST_MATRIX_LEN(n)]; \ \ diff --git a/app/src/behaviors/behavior_caps_word.c b/app/src/behaviors/behavior_caps_word.c index 3842a31f..7a9612b3 100644 --- a/app/src/behaviors/behavior_caps_word.c +++ b/app/src/behaviors/behavior_caps_word.c @@ -168,7 +168,7 @@ static int behavior_caps_word_init(const struct device *dev) { #define PARSE_BREAK(i) \ {.page = ZMK_HID_USAGE_PAGE(i), \ .id = ZMK_HID_USAGE_ID(i), \ - .implicit_modifiers = SELECT_MODS(i)}, + .implicit_modifiers = SELECT_MODS(i)} #define BREAK_ITEM(i, n) PARSE_BREAK(DT_INST_PROP_BY_IDX(n, continue_list, i)) @@ -177,7 +177,7 @@ static int behavior_caps_word_init(const struct device *dev) { static struct behavior_caps_word_config behavior_caps_word_config_##n = { \ .index = n, \ .mods = DT_INST_PROP_OR(n, mods, MOD_LSFT), \ - .continuations = {UTIL_LISTIFY(DT_INST_PROP_LEN(n, continue_list), BREAK_ITEM, n)}, \ + .continuations = {LISTIFY(DT_INST_PROP_LEN(n, continue_list), BREAK_ITEM, (,), n)}, \ .continuations_count = DT_INST_PROP_LEN(n, continue_list), \ }; \ DEVICE_DT_INST_DEFINE(n, behavior_caps_word_init, NULL, &behavior_caps_word_data_##n, \ diff --git a/app/src/behaviors/behavior_macro.c b/app/src/behaviors/behavior_macro.c index 46fdde3c..5b215b93 100644 --- a/app/src/behaviors/behavior_macro.c +++ b/app/src/behaviors/behavior_macro.c @@ -166,10 +166,10 @@ 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 BINDING_WITH_COMMA(idx, drv_inst) ZMK_KEYMAP_EXTRACT_BINDING(idx, DT_DRV_INST(drv_inst)) #define TRANSFORMED_BEHAVIORS(n) \ - {UTIL_LISTIFY(DT_PROP_LEN(DT_DRV_INST(n), bindings), BINDING_WITH_COMMA, 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 = {}; \ diff --git a/app/src/behaviors/behavior_tap_dance.c b/app/src/behaviors/behavior_tap_dance.c index 3bad2901..6d78cb3e 100644 --- a/app/src/behaviors/behavior_tap_dance.c +++ b/app/src/behaviors/behavior_tap_dance.c @@ -237,10 +237,10 @@ static int behavior_tap_dance_init(const struct device *dev) { return 0; } -#define _TRANSFORM_ENTRY(idx, node) ZMK_KEYMAP_EXTRACT_BINDING(idx, node), +#define _TRANSFORM_ENTRY(idx, node) ZMK_KEYMAP_EXTRACT_BINDING(idx, node) #define TRANSFORMED_BINDINGS(node) \ - { UTIL_LISTIFY(DT_INST_PROP_LEN(node, bindings), _TRANSFORM_ENTRY, DT_DRV_INST(node)) } + { LISTIFY(DT_INST_PROP_LEN(node, bindings), _TRANSFORM_ENTRY, (,), DT_DRV_INST(node)) } #define KP_INST(n) \ static struct zmk_behavior_binding \ diff --git a/app/src/conditional_layer.c b/app/src/conditional_layer.c index 1728a7f4..572652ff 100644 --- a/app/src/conditional_layer.c +++ b/app/src/conditional_layer.c @@ -33,13 +33,12 @@ struct conditional_layer_cfg { int8_t then_layer; }; -#define IF_LAYER_BIT(i, n) BIT(DT_PROP_BY_IDX(n, if_layers, i)) | +#define IF_LAYER_BIT(node_id, prop, idx) BIT(DT_PROP_BY_IDX(node_id, prop, idx)) | // Evaluates to conditional_layer_cfg struct initializer. #define CONDITIONAL_LAYER_DECL(n) \ { \ - /* TODO: Replace UTIL_LISTIFY with DT_FOREACH_PROP_ELEM after Zepyhr 2.6.0 upgrade. */ \ - .if_layers_state_mask = UTIL_LISTIFY(DT_PROP_LEN(n, if_layers), IF_LAYER_BIT, n) 0, \ + .if_layers_state_mask = DT_FOREACH_PROP_ELEM(n, if_layers, IF_LAYER_BIT) 0, \ .then_layer = DT_PROP(n, then_layer), \ }, diff --git a/app/src/keymap.c b/app/src/keymap.c index e586316f..b00d0fba 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -34,10 +34,10 @@ static uint8_t _zmk_keymap_layer_default = 0; #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 BINDING_WITH_COMMA(idx, drv_inst) ZMK_KEYMAP_EXTRACT_BINDING(idx, drv_inst) #define TRANSFORMED_LAYER(node) \ - {UTIL_LISTIFY(DT_PROP_LEN(node, bindings), BINDING_WITH_COMMA, node)}, + {LISTIFY(DT_PROP_LEN(node, bindings), BINDING_WITH_COMMA, (,), node)}, #if ZMK_KEYMAP_HAS_SENSORS #define _TRANSFORM_SENSOR_ENTRY(idx, layer) \ @@ -47,12 +47,12 @@ static uint8_t _zmk_keymap_layer_default = 0; (DT_PHA_BY_IDX(layer, sensor_bindings, idx, param1))), \ .param2 = COND_CODE_0(DT_PHA_HAS_CELL_AT_IDX(layer, sensor_bindings, idx, param2), (0), \ (DT_PHA_BY_IDX(layer, sensor_bindings, idx, param2))), \ - }, + } #define SENSOR_LAYER(node) \ COND_CODE_1( \ DT_NODE_HAS_PROP(node, sensor_bindings), \ - ({UTIL_LISTIFY(DT_PROP_LEN(node, sensor_bindings), _TRANSFORM_SENSOR_ENTRY, node)}), \ + ({LISTIFY(DT_PROP_LEN(node, sensor_bindings), _TRANSFORM_SENSOR_ENTRY, (,), node)}), \ ({})), #endif /* ZMK_KEYMAP_HAS_SENSORS */ diff --git a/app/src/matrix_transform.c b/app/src/matrix_transform.c index 8f54f312..e7c6e95f 100644 --- a/app/src/matrix_transform.c +++ b/app/src/matrix_transform.c @@ -13,9 +13,9 @@ #define _TRANSFORM_ENTRY(i, _) \ [(KT_ROW(DT_PROP_BY_IDX(ZMK_KEYMAP_TRANSFORM_NODE, map, i)) * ZMK_MATRIX_COLS) + \ - KT_COL(DT_PROP_BY_IDX(ZMK_KEYMAP_TRANSFORM_NODE, map, i))] = i, + KT_COL(DT_PROP_BY_IDX(ZMK_KEYMAP_TRANSFORM_NODE, map, i))] = i -static uint32_t transform[] = {UTIL_LISTIFY(ZMK_KEYMAP_LEN, _TRANSFORM_ENTRY, 0)}; +static uint32_t transform[] = {LISTIFY(ZMK_KEYMAP_LEN, _TRANSFORM_ENTRY, (,), 0)}; #endif diff --git a/app/src/sensors.c b/app/src/sensors.c index dd5f4267..184061ac 100644 --- a/app/src/sensors.c +++ b/app/src/sensors.c @@ -25,12 +25,15 @@ struct sensors_data_item { }; #define _SENSOR_ITEM(node) \ - {.dev = NULL, .trigger = {.type = SENSOR_TRIG_DELTA, .chan = SENSOR_CHAN_ROTATION}}, -#define SENSOR_ITEM(idx, _) \ - COND_CODE_1(DT_NODE_HAS_STATUS(ZMK_KEYMAP_SENSORS_BY_IDX(idx), okay), \ - (_SENSOR_ITEM(ZMK_KEYMAP_SENSORS_BY_IDX(idx))), ()) + { \ + .dev = NULL, .trigger = {.type = SENSOR_TRIG_DELTA, .chan = SENSOR_CHAN_ROTATION } \ + } -static struct sensors_data_item sensors[] = {UTIL_LISTIFY(ZMK_KEYMAP_SENSORS_LEN, SENSOR_ITEM, 0)}; +#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))), ({})) + +static struct sensors_data_item sensors[] = {LISTIFY(ZMK_KEYMAP_SENSORS_LEN, SENSOR_ITEM, (, ), 0)}; static void zmk_sensors_trigger_handler(const struct device *dev, struct sensor_trigger *trigger) { int err; @@ -71,10 +74,10 @@ static int zmk_sensors_init(const struct device *_arg) { int local_index = 0; int absolute_index = 0; - UTIL_LISTIFY(ZMK_KEYMAP_SENSORS_LEN, SENSOR_INIT, 0) + LISTIFY(ZMK_KEYMAP_SENSORS_LEN, SENSOR_INIT, (), 0) return 0; } SYS_INIT(zmk_sensors_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY); -#endif /* ZMK_KEYMAP_HAS_SENSORS */ \ No newline at end of file +#endif /* ZMK_KEYMAP_HAS_SENSORS */ From d513dc1766edf52a22d78da0e73d5a09670059e9 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 20 Sep 2022 21:36:13 -0400 Subject: [PATCH 19/64] refactor: Move to new PM API. --- app/src/activity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/activity.c b/app/src/activity.c index 5a1e2385..029908c0 100644 --- a/app/src/activity.c +++ b/app/src/activity.c @@ -70,7 +70,7 @@ void activity_work_handler(struct k_work *work) { if (inactive_time > MAX_SLEEP_MS && !is_usb_power_present()) { // Put devices in suspend power mode before sleeping set_state(ZMK_ACTIVITY_SLEEP); - pm_power_state_force(0U, (struct pm_state_info){PM_STATE_SOFT_OFF, 0, 0}); + pm_state_force(0U, &(struct pm_state_info){PM_STATE_SOFT_OFF, 0, 0}); } else #endif /* IS_ENABLED(CONFIG_ZMK_SLEEP) */ if (inactive_time > MAX_IDLE_MS) { From 4f2f9db1d474dc8754780b27243b1a61acbdad42 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 20 Sep 2022 21:36:53 -0400 Subject: [PATCH 20/64] refactor(ble): New callback API for pairing complete. --- app/src/ble.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/ble.c b/app/src/ble.c index b10aa20b..4d2e4603 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -528,7 +528,6 @@ static void auth_pairing_complete(struct bt_conn *conn, bool bonded) { static struct bt_conn_auth_cb zmk_ble_auth_cb_display = { .pairing_accept = auth_pairing_accept, - .pairing_complete = auth_pairing_complete, // .passkey_display = auth_passkey_display, #if IS_ENABLED(CONFIG_ZMK_BLE_PASSKEY_ENTRY) @@ -537,6 +536,10 @@ static struct bt_conn_auth_cb zmk_ble_auth_cb_display = { .cancel = auth_cancel, }; +static struct bt_conn_auth_info_cb zmk_ble_auth_info_cb_display = { + .pairing_complete = auth_pairing_complete, +}; + static void zmk_ble_ready(int err) { LOG_DBG("ready? %d", err); if (err) { @@ -589,6 +592,7 @@ static int zmk_ble_init(const struct device *_arg) { bt_conn_cb_register(&conn_callbacks); bt_conn_auth_cb_register(&zmk_ble_auth_cb_display); + bt_conn_auth_info_cb_register(&zmk_ble_auth_info_cb_display); zmk_ble_ready(0); From 35a1c5a3d44b92c050d28c0aca3d1cb9c7e53695 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 20 Sep 2022 21:37:16 -0400 Subject: [PATCH 21/64] refactor(behaviors): Rename `reset` behavior. * Upstream now has a node w/ label `reset` on many boards, so renaming our reset behavior node label to `sys_reset`. --- app/boards/arm/bt60/bt60_v1.keymap | 10 +++++----- app/boards/arm/bt60/bt60_v1_hs.keymap | 2 +- app/boards/arm/planck/planck_rev6.keymap | 2 +- app/boards/arm/s40nc/s40nc.keymap | 2 +- app/boards/shields/bfo9000/bfo9000.keymap | 2 +- .../shields/boardsource3x4/boardsource3x4.keymap | 2 +- app/boards/shields/contra/contra.keymap | 2 +- app/boards/shields/cradio/cradio.keymap | 2 +- app/boards/shields/crbn/crbn.keymap | 2 +- app/boards/shields/eek/eek.keymap | 2 +- app/boards/shields/ergodash/ergodash.keymap | 4 ++-- .../shields/eternal_keypad/eternal_keypad.keymap | 4 ++-- .../shields/eternal_keypad/eternal_keypad_lefty.keymap | 4 ++-- app/boards/shields/jian/jian.keymap | 2 +- app/boards/shields/jiran/jiran.keymap | 2 +- app/boards/shields/jorne/jorne.keymap | 2 +- app/boards/shields/leeloo/leeloo.keymap | 2 +- app/boards/shields/lotus58/lotus58.keymap | 6 +++--- app/boards/shields/m60/m60.keymap | 2 +- app/boards/shields/murphpad/murphpad.keymap | 2 +- app/boards/shields/qaz/qaz.keymap | 2 +- app/boards/shields/redox/redox.keymap | 2 +- app/boards/shields/reviung41/reviung41.keymap | 2 +- .../shields/settings_reset/settings_reset.keymap | 2 +- app/boards/shields/tg4x/tg4x.keymap | 2 +- app/boards/shields/tidbit/tidbit.keymap | 2 +- app/boards/shields/tidbit/tidbit_19key.keymap | 2 +- app/boards/shields/waterfowl/waterfowl.keymap | 8 ++++---- app/boards/shields/zodiark/zodiark.keymap | 2 +- app/dts/behaviors/reset.dtsi | 4 ++-- docs/blog/2021-01-27-zmk-sotf-4.md | 2 +- docs/docs/behaviors/reset.md | 6 +++--- docs/src/data/keymap-upgrade.js | 1 + 33 files changed, 48 insertions(+), 47 deletions(-) diff --git a/app/boards/arm/bt60/bt60_v1.keymap b/app/boards/arm/bt60/bt60_v1.keymap index 0985a605..b42f3f3d 100644 --- a/app/boards/arm/bt60/bt60_v1.keymap +++ b/app/boards/arm/bt60/bt60_v1.keymap @@ -56,7 +56,7 @@ // ------------------------------------------------------------------------------------------ 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 &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset + &trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR &trans @@ -84,7 +84,7 @@ raise { bindings = < &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 INS &kp DEL - &kp CLCK &bt BT_PRV &bt BT_NXT &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &kp UP &trans &reset + &kp CLCK &bt BT_PRV &bt BT_NXT &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &kp UP &trans &sys_reset &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp LEFT &kp RIGHT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp DOWN &trans &trans &trans &trans &trans &bootloader &trans &trans &trans @@ -112,7 +112,7 @@ raise { 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 - &reset &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK + &sys_reset &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &trans &bootloader &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR @@ -140,7 +140,7 @@ raise { 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 F1 - &trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset + &trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &bt BT_CLR @@ -168,7 +168,7 @@ raise { 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 &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset + &trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &trans &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR diff --git a/app/boards/arm/bt60/bt60_v1_hs.keymap b/app/boards/arm/bt60/bt60_v1_hs.keymap index 6e62e1bb..167460c6 100644 --- a/app/boards/arm/bt60/bt60_v1_hs.keymap +++ b/app/boards/arm/bt60/bt60_v1_hs.keymap @@ -26,7 +26,7 @@ raise { 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 &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset + &trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR diff --git a/app/boards/arm/planck/planck_rev6.keymap b/app/boards/arm/planck/planck_rev6.keymap index bbfb770e..7e4f6732 100644 --- a/app/boards/arm/planck/planck_rev6.keymap +++ b/app/boards/arm/planck/planck_rev6.keymap @@ -39,7 +39,7 @@ &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC &kp DEL &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 &kp F12 &kp HASH &kp BSLH &kp PG_UP &kp PG_DN &trans - &reset &bootloader &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP + &sys_reset &bootloader &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP >; }; }; diff --git a/app/boards/arm/s40nc/s40nc.keymap b/app/boards/arm/s40nc/s40nc.keymap index d7f349d9..c43bc671 100644 --- a/app/boards/arm/s40nc/s40nc.keymap +++ b/app/boards/arm/s40nc/s40nc.keymap @@ -50,7 +50,7 @@ &bt BT_CLR &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp C_PP &bt BT_SEL 0 &kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &trans &kp K_LOCK &bt BT_SEL 1 &out OUT_USB &kp CAPS &kp KP_NUM &kp SLCK &trans &trans &kp COMMA &kp DOT &kp K_VOL_UP &kp K_MUTE - &bt BT_SEL 2 &out OUT_BLE &kp PAUSE_BREAK &reset &trans &bootloader &kp C_BRI_DN &kp K_VOL_DN &kp C_BRI_UP + &bt BT_SEL 2 &out OUT_BLE &kp PAUSE_BREAK &sys_reset &trans &bootloader &kp C_BRI_DN &kp K_VOL_DN &kp C_BRI_UP >; }; }; diff --git a/app/boards/shields/bfo9000/bfo9000.keymap b/app/boards/shields/bfo9000/bfo9000.keymap index fe904931..22186a1d 100644 --- a/app/boards/shields/bfo9000/bfo9000.keymap +++ b/app/boards/shields/bfo9000/bfo9000.keymap @@ -46,7 +46,7 @@ &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 &bt BT_SEL 7 &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 &bt BT_SEL 7 &out OUT_USB &out OUT_BLE &trans &trans &trans &trans &trans &trans &trans &out OUT_USB &out OUT_BLE &trans &trans &trans &trans &trans &trans &trans &ext_power EP_ON &ext_power EP_OFF &trans &trans &trans &trans &trans &trans &trans &ext_power EP_ON &ext_power EP_OFF &trans &trans &trans &trans &trans &trans &trans - &reset &bootloader &trans &trans &trans &trans &trans &trans &trans &reset &bootloader &trans &trans &trans &trans &trans &trans &trans + &sys_reset &bootloader &trans &trans &trans &trans &trans &trans &trans &sys_reset &bootloader &trans &trans &trans &trans &trans &trans &trans &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &trans &trans &trans &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &trans &trans &trans &trans &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans &trans &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans >; diff --git a/app/boards/shields/boardsource3x4/boardsource3x4.keymap b/app/boards/shields/boardsource3x4/boardsource3x4.keymap index add7efa0..c47126ab 100644 --- a/app/boards/shields/boardsource3x4/boardsource3x4.keymap +++ b/app/boards/shields/boardsource3x4/boardsource3x4.keymap @@ -32,7 +32,7 @@ lower_layer { bindings = < - &bt BT_CLR &none &reset &bootloader + &bt BT_CLR &none &sys_reset &bootloader &trans &bt BT_SEL 3 &bt BT_SEL 4 &none &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 >; diff --git a/app/boards/shields/contra/contra.keymap b/app/boards/shields/contra/contra.keymap index e24b5028..77b431b6 100644 --- a/app/boards/shields/contra/contra.keymap +++ b/app/boards/shields/contra/contra.keymap @@ -30,7 +30,7 @@ &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 F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp PG_UP &kp LBKT &kp RBKT &kp BSLH &kp LSHFT &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp EQUAL &kp PG_DN &kp HOME &kp END &kp ENTER - &kp LCTRL &kp LGUI &kp LALT &reset &to DEFAULT &kp SPACE &trans &mo BT_CTRL &kp LEFT &kp RIGHT &kp UP &kp DOWN + &kp LCTRL &kp LGUI &kp LALT &sys_reset &to DEFAULT &kp SPACE &trans &mo BT_CTRL &kp LEFT &kp RIGHT &kp UP &kp DOWN >; }; diff --git a/app/boards/shields/cradio/cradio.keymap b/app/boards/shields/cradio/cradio.keymap index 587bc7aa..3f6670da 100644 --- a/app/boards/shields/cradio/cradio.keymap +++ b/app/boards/shields/cradio/cradio.keymap @@ -88,7 +88,7 @@ bindings = < //╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮ //│ RESET │ │ │ │PROFILE 0 │ │ │ │ │ │ RESET │ - &reset &trans &trans &trans &bt BT_SEL 0 &trans &trans &trans &trans &reset + &sys_reset &trans &trans &trans &bt BT_SEL 0 &trans &trans &trans &trans &sys_reset //├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤ //│BOOTLOADER│ │ │ │PROFILE 1 │ │ │ │ │ │BOOTLOADER│ &bootloader &trans &trans &trans &bt BT_SEL 1 &trans &trans &trans &trans &bootloader diff --git a/app/boards/shields/crbn/crbn.keymap b/app/boards/shields/crbn/crbn.keymap index 9423e1af..b967e5e2 100644 --- a/app/boards/shields/crbn/crbn.keymap +++ b/app/boards/shields/crbn/crbn.keymap @@ -52,7 +52,7 @@ control { bindings = < - &reset &bootloader &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans + &sys_reset &bootloader &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &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 diff --git a/app/boards/shields/eek/eek.keymap b/app/boards/shields/eek/eek.keymap index 439c90aa..d250cb01 100644 --- a/app/boards/shields/eek/eek.keymap +++ b/app/boards/shields/eek/eek.keymap @@ -49,7 +49,7 @@ &kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &out OUT_USB &out OUT_BLE &none &kp EQUAL &kp MINUS &kp CAPS &kp F5 &kp F6 &kp F7 &kp F8 &kp LBKT &kp RBKT &none &kp GRAVE &kp BSLH &kp LSHFT &kp F9 &kp F10 &kp F11 &kp F12 &none &none &none &none &kp RSHFT - &kp LCTRL &kp LGUI &kp LALT &reset &none &trans + &kp LCTRL &kp LGUI &kp LALT &sys_reset &none &trans >; }; }; diff --git a/app/boards/shields/ergodash/ergodash.keymap b/app/boards/shields/ergodash/ergodash.keymap index a85c58a6..e384e504 100644 --- a/app/boards/shields/ergodash/ergodash.keymap +++ b/app/boards/shields/ergodash/ergodash.keymap @@ -56,7 +56,7 @@ &kp F11 &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &none &none &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F12 &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 -&trans &bootloader &reset &none &none &none &none &none &none &none &none &none &none &trans +&trans &bootloader &sys_reset &none &none &none &none &none &none &none &none &none &none &trans &trans &none &none &trans &trans &none &trans &trans &none &trans &none &none &none &trans >; }; @@ -77,7 +77,7 @@ &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &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 &none &none &none &none -&trans &none &none &none &none &none &none &none &none &none &none &bootloader &reset &trans +&trans &none &none &none &none &none &none &none &none &none &none &bootloader &sys_reset &trans &trans &none &none &trans &trans &none &trans &trans &none &trans &none &none &none &trans >; }; diff --git a/app/boards/shields/eternal_keypad/eternal_keypad.keymap b/app/boards/shields/eternal_keypad/eternal_keypad.keymap index 0f3eda7b..da06d274 100644 --- a/app/boards/shields/eternal_keypad/eternal_keypad.keymap +++ b/app/boards/shields/eternal_keypad/eternal_keypad.keymap @@ -38,7 +38,7 @@ &bt BT_SEL 0 &bt BT_SEL 1 &trans &trans &trans &out OUT_USB &out OUT_BLE &trans &trans &kp UP &trans &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_HUD &bt BT_CLR &trans &kp LEFT &kp DOWN &kp RIGHT &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD - &reset &trans &trans &trans &trans &trans &rgb_ug RGB_EFF &rgb_ug RGB_EFR + &sys_reset &trans &trans &trans &trans &trans &rgb_ug RGB_EFF &rgb_ug RGB_EFR &bootloader &trans &trans &trans &trans &trans >; }; @@ -48,7 +48,7 @@ &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp P &kp O &kp I &kp U &kp Y &kp F7 &bt BT_CLR &kp BSPC &kp SEMI &kp L &kp K &kp J &kp H &kp F8 - &reset &trans &kp LGUI &kp M &kp N &kp F12 &kp F11 &kp F9 + &sys_reset &trans &kp LGUI &kp M &kp N &kp F12 &kp F11 &kp F9 &bootloader &trans &trans &trans &trans &kp F10 >; }; diff --git a/app/boards/shields/eternal_keypad/eternal_keypad_lefty.keymap b/app/boards/shields/eternal_keypad/eternal_keypad_lefty.keymap index e1bddbad..81710032 100644 --- a/app/boards/shields/eternal_keypad/eternal_keypad_lefty.keymap +++ b/app/boards/shields/eternal_keypad/eternal_keypad_lefty.keymap @@ -38,7 +38,7 @@ &bt BT_SEL 0 &bt BT_SEL 1 &trans &trans &trans &out OUT_USB &out OUT_BLE &trans &trans &kp UP &trans &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_HUD &bt BT_CLR &trans &kp RIGHT &kp DOWN &kp RIGHT &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD - &reset &trans &trans &trans &trans &trans &rgb_ug RGB_EFF &rgb_ug RGB_EFR + &sys_reset &trans &trans &trans &trans &trans &rgb_ug RGB_EFF &rgb_ug RGB_EFR &bootloader &trans &trans &trans &trans &trans >; }; @@ -48,7 +48,7 @@ &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp P &kp O &kp I &kp U &kp Y &kp F7 &bt BT_CLR &kp BSPC &kp SEMI &kp L &kp K &kp J &kp H &kp F8 - &reset &trans &kp LGUI &kp M &kp N &kp F12 &kp F11 &kp F9 + &sys_reset &trans &kp LGUI &kp M &kp N &kp F12 &kp F11 &kp F9 &bootloader &trans &trans &trans &trans &kp F10 >; }; diff --git a/app/boards/shields/jian/jian.keymap b/app/boards/shields/jian/jian.keymap index 7b8dd676..e8f7dcc8 100644 --- a/app/boards/shields/jian/jian.keymap +++ b/app/boards/shields/jian/jian.keymap @@ -67,7 +67,7 @@ // | | | | | | | | | | | | | | // | | | | | | | | bindings = < - &reset &bootloader &none &none &none &none &none &none &none &none &none &none &bootloader &reset + &sys_reset &bootloader &none &none &none &none &none &none &none &none &none &none &bootloader &sys_reset &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR &none &none &none &none &none &none &none &none &none &none &none &none &trans &none &trans &trans &none &trans diff --git a/app/boards/shields/jiran/jiran.keymap b/app/boards/shields/jiran/jiran.keymap index e6c073cc..6dcd733c 100644 --- a/app/boards/shields/jiran/jiran.keymap +++ b/app/boards/shields/jiran/jiran.keymap @@ -25,7 +25,7 @@ lower_layer { bindings = < &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp EQUAL - &kp F11 &kp TAB &bt BT_CLR &kp HOME &reset &kp PG_UP &kp C_VOL_UP &kp C_VOL_UP &kp PG_UP &reset &kp HOME &kp INS &kp DEL &kp F12 + &kp F11 &kp TAB &bt BT_CLR &kp HOME &sys_reset &kp PG_UP &kp C_VOL_UP &kp C_VOL_UP &kp PG_UP &sys_reset &kp HOME &kp INS &kp DEL &kp F12 &kp LSHIFT &bt BT_NXT &kp LEFT &kp UP &kp RIGHT &kp C_MUTE &kp C_MUTE &kp LEFT &kp UP &kp RIGHT &kp PSCRN &mt RSHIFT SLCK &kp LCTRL &bt BT_PRV &kp END &kp DOWN &kp PG_DN &kp C_VOL_DN &kp C_VOL_DN &kp PG_DN &kp DOWN &kp END &kp PAUSE_BREAK &mt RCTRL KP_NUM &trans &kp SPACE &kp LALT &mt RALT RET &kp BSPC &trans diff --git a/app/boards/shields/jorne/jorne.keymap b/app/boards/shields/jorne/jorne.keymap index 93c7691a..2a109fe8 100644 --- a/app/boards/shields/jorne/jorne.keymap +++ b/app/boards/shields/jorne/jorne.keymap @@ -64,7 +64,7 @@ // | | | | | | | | | | | | | | // | | | | | | | | bindings = < - &reset &bootloader &none &none &none &none &none &none &none &none &none &none &bootloader &reset + &sys_reset &bootloader &none &none &none &none &none &none &none &none &none &none &bootloader &sys_reset &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR &none &none &none &none &none &none &none &none &none &none &none &none &trans &none &trans &trans &none &trans diff --git a/app/boards/shields/leeloo/leeloo.keymap b/app/boards/shields/leeloo/leeloo.keymap index 4104cc3a..fc3b25e0 100644 --- a/app/boards/shields/leeloo/leeloo.keymap +++ b/app/boards/shields/leeloo/leeloo.keymap @@ -45,7 +45,7 @@ raise_layer { 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 &reset &bootloader +&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 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR &trans diff --git a/app/boards/shields/lotus58/lotus58.keymap b/app/boards/shields/lotus58/lotus58.keymap index cfe4342c..50249146 100644 --- a/app/boards/shields/lotus58/lotus58.keymap +++ b/app/boards/shields/lotus58/lotus58.keymap @@ -57,7 +57,7 @@ bindings = < &kp ESC &kp N1 &kp N2 &kp N3 &fofunc &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp EQUAL &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 LSHFT &kp A &sleft &kp D &fright &kp G &reset &reset &kp H &kp J &kp K &kp L &kp SEMI &mt RSHFT SQT +&kp LSHFT &kp A &sleft &kp D &fright &kp G &sys_reset &sys_reset &kp H &kp J &kp K &kp L &kp SEMI &mt RSHFT SQT &kp LCTRL &kp Z &kp X &kp C &kp V &kp B &kp C_MUTE &kp C_PP &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mt RCTRL BSLH < 2 RET &kp LALT &kp SPACE < 1 DEL < 2 RET &kp BSPC < 1 RBKT &kp LGUI >; @@ -91,8 +91,8 @@ // | | 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 &out OUT_TOG &out OUT_USB &out OUT_BLE &trans &reset &bootloader -&trans &kp INS &kp PSCRN &kp K_CMENU &reset &trans &kp PG_UP &trans &kp UP &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 &out OUT_TOG &out OUT_USB &out OUT_BLE &trans &sys_reset &bootloader +&trans &kp INS &kp PSCRN &kp K_CMENU &sys_reset &trans &kp PG_UP &trans &kp UP &trans &trans &trans &trans &kp LALT &kp LCTRL &kp LSHFT &bootloader &kp CLCK &trans &trans &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 &kp C_PP &kp C_PREV &kp C_NEXT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans diff --git a/app/boards/shields/m60/m60.keymap b/app/boards/shields/m60/m60.keymap index 6caa6370..aa656929 100644 --- a/app/boards/shields/m60/m60.keymap +++ b/app/boards/shields/m60/m60.keymap @@ -32,7 +32,7 @@ fn_layer { 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 &bootloader -&trans &bt BT_CLR &none &none &none &none &none &none &none &none &none &none &none &reset +&trans &bt BT_CLR &none &none &none &none &none &none &none &none &none &none &none &sys_reset &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &none &none &trans &trans &none &none &none &none &none &none &none &none &none &none &trans &trans &trans &trans &trans &trans &trans &trans &trans diff --git a/app/boards/shields/murphpad/murphpad.keymap b/app/boards/shields/murphpad/murphpad.keymap index aec58878..2e8c6f6e 100644 --- a/app/boards/shields/murphpad/murphpad.keymap +++ b/app/boards/shields/murphpad/murphpad.keymap @@ -31,7 +31,7 @@ combo_reset { timeout-ms = ; key-positions = <1 3>; - bindings = <&reset>; + bindings = <&sys_reset>; }; combo_bootloader { timeout-ms = ; diff --git a/app/boards/shields/qaz/qaz.keymap b/app/boards/shields/qaz/qaz.keymap index a832860e..e6794e7b 100644 --- a/app/boards/shields/qaz/qaz.keymap +++ b/app/boards/shields/qaz/qaz.keymap @@ -42,7 +42,7 @@ &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 &kp EQUAL &kp MINUS &kp DEL &none &none &none &none &none &none &none &kp DOT - &bootloader &reset &none &trans &trans &kp RET &trans &kp FSLH + &bootloader &sys_reset &none &trans &trans &kp RET &trans &kp FSLH >; }; diff --git a/app/boards/shields/redox/redox.keymap b/app/boards/shields/redox/redox.keymap index aed22c42..a45595ff 100644 --- a/app/boards/shields/redox/redox.keymap +++ b/app/boards/shields/redox/redox.keymap @@ -73,7 +73,7 @@ bindings = < &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &none &none &none &none &none &bootloader &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &out OUT_TOG - &trans &kp K_MUTE &kp C_VOL_DN &kp C_VOL_UP &kp C_PLAY_PAUSE &none &reset &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 + &trans &kp K_MUTE &kp C_VOL_DN &kp C_VOL_UP &kp C_PLAY_PAUSE &none &sys_reset &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp PSCRN &kp PSCRN &kp CLCK &none &none &trans &trans &trans &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; diff --git a/app/boards/shields/reviung41/reviung41.keymap b/app/boards/shields/reviung41/reviung41.keymap index d291ca8b..12f15ad4 100644 --- a/app/boards/shields/reviung41/reviung41.keymap +++ b/app/boards/shields/reviung41/reviung41.keymap @@ -64,7 +64,7 @@ bindings = < &rgb_ug RGB_BRI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_EFF &none &rgb_ug RGB_TOG &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_CLR &rgb_ug RGB_BRD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_EFR &none &none &none &none &none &none &none &none - &none &none &none &none &none &none &reset &none &none &none &none &none + &none &none &none &none &none &none &sys_reset &none &none &none &none &none &trans &trans &tog 3 &trans &trans >; }; diff --git a/app/boards/shields/settings_reset/settings_reset.keymap b/app/boards/shields/settings_reset/settings_reset.keymap index 05236445..0afdcc2b 100644 --- a/app/boards/shields/settings_reset/settings_reset.keymap +++ b/app/boards/shields/settings_reset/settings_reset.keymap @@ -13,7 +13,7 @@ default_layer { bindings = < - &reset + &sys_reset >; }; }; diff --git a/app/boards/shields/tg4x/tg4x.keymap b/app/boards/shields/tg4x/tg4x.keymap index 84ca3273..e68d0f92 100644 --- a/app/boards/shields/tg4x/tg4x.keymap +++ b/app/boards/shields/tg4x/tg4x.keymap @@ -45,7 +45,7 @@ bindings = < &kp PRINTSCREEN &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans -&trans &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &bootloader &reset &trans +&trans &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &bootloader &sys_reset &trans &trans &trans &trans &trans &trans &kp C_VOL_UP &kp C_VOL_DN &kp C_PP >; }; diff --git a/app/boards/shields/tidbit/tidbit.keymap b/app/boards/shields/tidbit/tidbit.keymap index 7fa98af2..e8cb3789 100644 --- a/app/boards/shields/tidbit/tidbit.keymap +++ b/app/boards/shields/tidbit/tidbit.keymap @@ -36,7 +36,7 @@ func_layer { bindings = < - &none &reset &bootloader + &none &sys_reset &bootloader &out OUT_TOG &out OUT_USB &out OUT_BLE &none &bt BT_SEL 0 &bt BT_PRV &bt BT_NXT &bt BT_CLR &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &tog 0 diff --git a/app/boards/shields/tidbit/tidbit_19key.keymap b/app/boards/shields/tidbit/tidbit_19key.keymap index 6e158b03..8414a012 100644 --- a/app/boards/shields/tidbit/tidbit_19key.keymap +++ b/app/boards/shields/tidbit/tidbit_19key.keymap @@ -37,7 +37,7 @@ func_layer { bindings = < - &tog 0 &reset &bootloader + &tog 0 &sys_reset &bootloader &out OUT_TOG &out OUT_USB &out OUT_BLE &none &bt BT_SEL 0 &bt BT_PRV &bt BT_NXT &bt BT_CLR &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &none diff --git a/app/boards/shields/waterfowl/waterfowl.keymap b/app/boards/shields/waterfowl/waterfowl.keymap index 9a1dabac..d208fe49 100644 --- a/app/boards/shields/waterfowl/waterfowl.keymap +++ b/app/boards/shields/waterfowl/waterfowl.keymap @@ -99,10 +99,10 @@ * `-----' `--------------------' `--------------------' `-----' */ bindings = < - &trans &trans &bt BT_CLR &trans &reset &reset &kp F7 &kp F8 &kp F9 &kp F11 - &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &kp F4 &kp F5 &kp F6 &kp F12 - &trans &trans &trans &trans &trans &kp F10 &kp F1 &kp F2 &kp F3 &kp F13 - &kp N1 < 3 DEL < 1 SPACE &kp TAB &kp N2 &kp N3 &kp ESC &kp BSPC < 2 RET &kp N4 + &trans &trans &bt BT_CLR &trans &sys_reset &sys_reset &kp F7 &kp F8 &kp F9 &kp F11 + &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &kp F4 &kp F5 &kp F6 &kp F12 + &trans &trans &trans &trans &trans &kp F10 &kp F1 &kp F2 &kp F3 &kp F13 + &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)>; diff --git a/app/boards/shields/zodiark/zodiark.keymap b/app/boards/shields/zodiark/zodiark.keymap index 21fdef10..0211f818 100644 --- a/app/boards/shields/zodiark/zodiark.keymap +++ b/app/boards/shields/zodiark/zodiark.keymap @@ -56,7 +56,7 @@ // | | | | | | | | | | | | | | | | | | // | | | | | | | | | | | | | | | | 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 &reset +&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 &sys_reset &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bootloader &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 diff --git a/app/dts/behaviors/reset.dtsi b/app/dts/behaviors/reset.dtsi index cb246814..74a7163b 100644 --- a/app/dts/behaviors/reset.dtsi +++ b/app/dts/behaviors/reset.dtsi @@ -8,9 +8,9 @@ / { behaviors { - reset: behavior_reset { + sys_reset: behavior_reset { compatible = "zmk,behavior-reset"; - label = "RESET"; + label = "SYSRESET"; #binding-cells = <0>; }; diff --git a/docs/blog/2021-01-27-zmk-sotf-4.md b/docs/blog/2021-01-27-zmk-sotf-4.md index cd84da88..e7ff3232 100644 --- a/docs/blog/2021-01-27-zmk-sotf-4.md +++ b/docs/blog/2021-01-27-zmk-sotf-4.md @@ -164,7 +164,7 @@ For anyone looking to contribute, you can find the [ZMK Firmware project](https: Some items listed in the last coming soon section are still under active development. - A power profiler page for the website, to help users estimate their battery life for a given keyboard - [Nicell] -- Behavior "locality", allowing improved split usage for things like `&reset`, and controlling external power and RGB underglow for both sides - [petejohanson] +- Behavior "locality", allowing improved split usage for things like `&sys_reset`, and controlling external power and RGB underglow for both sides - [petejohanson] - More modular approach to external boards/shields, custom code, user keymaps, etc. - More shields and boards diff --git a/docs/docs/behaviors/reset.md b/docs/docs/behaviors/reset.md index c06a13b7..0fc62b2f 100644 --- a/docs/docs/behaviors/reset.md +++ b/docs/docs/behaviors/reset.md @@ -17,13 +17,13 @@ to the device ### Behavior Binding -- Reference: `&reset` +- Reference: `&sys_reset` - Parameters: None Example: ``` -&reset +&sys_reset ``` ## Bootloader Reset @@ -44,7 +44,7 @@ Example: ## Split Keyboards -Both basic and bootloader reset behaviors are source-specific: This means that it affects the side of the keyboard that contains the behavior binding for split keyboards. For example if you press a key with the `&reset` binding on the left half of the keyboard, the left half will be reset. If you want to be able to reset both sides you can put the bindings on both sides of the keyboard and activate it on the side you would like to reset. +Both basic and bootloader reset behaviors are source-specific: This means that it affects the side of the keyboard that contains the behavior binding for split keyboards. For example if you press a key with the `&sys_reset` binding on the left half of the keyboard, the left half will be reset. If you want to be able to reset both sides you can put the bindings on both sides of the keyboard and activate it on the side you would like to reset. :::note Peripheral invocation The peripheral side of the keyboard has to be paired and connected to the central side in order to be able to activate these behaviors, even if it is possible to trigger the behavior using only keys on that side. This is because the key bindings are processed on the central side which would then instruct the peripheral side to reset. diff --git a/docs/src/data/keymap-upgrade.js b/docs/src/data/keymap-upgrade.js index 7936ca16..8e153828 100644 --- a/docs/src/data/keymap-upgrade.js +++ b/docs/src/data/keymap-upgrade.js @@ -81,4 +81,5 @@ export const Codes = { export const Behaviors = { cp: "kp", inc_dec_cp: "inc_dec_kp", + reset: "sys_reset", }; From 3a958c667fcbdf9940d115bbdf3f7fe61d821402 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 8 Oct 2022 00:46:08 -0400 Subject: [PATCH 22/64] refactor: Move to `zephyr/` include paths. * Zephyr moved to properly namespaced headers, so major "rip the bandaid" commit to move us to those everywhere. --- app/boards/arm/mikoto/pinmux.c | 12 +++++----- app/boards/arm/nrfmicro/pinmux.c | 12 +++++----- app/boards/arm/puchi_ble/pinmux.c | 12 +++++----- app/drivers/display/il0323.c | 14 ++++++------ app/drivers/gpio/gpio_595.c | 14 ++++++------ app/drivers/gpio/gpio_mcp23017.c | 8 +++---- app/drivers/gpio/gpio_mcp23017.h | 2 +- app/drivers/kscan/debounce.h | 2 +- app/drivers/kscan/kscan_composite.c | 4 ++-- app/drivers/kscan/kscan_gpio_demux.c | 8 +++---- app/drivers/kscan/kscan_gpio_direct.c | 14 ++++++------ app/drivers/kscan/kscan_gpio_matrix.c | 16 +++++++------- app/drivers/kscan/kscan_mock.c | 6 ++--- app/drivers/sensor/battery/battery_common.c | 2 +- app/drivers/sensor/battery/battery_common.h | 2 +- app/drivers/sensor/battery/battery_nrf_vddh.c | 10 ++++----- .../sensor/battery/battery_voltage_divider.c | 6 ++--- app/drivers/sensor/ec11/ec11.c | 14 ++++++------ app/drivers/sensor/ec11/ec11.h | 6 ++--- app/drivers/sensor/ec11/ec11_trigger.c | 12 +++++----- app/include/drivers/behavior.h | 4 ++-- app/include/drivers/ext_power.h | 2 +- app/include/linker/zmk-events.ld | 2 +- app/include/zmk/behavior_queue.h | 2 +- app/include/zmk/ble/profile.h | 2 +- .../zmk/display/widgets/battery_status.h | 2 +- .../zmk/display/widgets/layer_status.h | 2 +- .../zmk/display/widgets/output_status.h | 2 +- .../zmk/display/widgets/peripheral_status.h | 2 +- app/include/zmk/display/widgets/wpm_status.h | 2 +- app/include/zmk/event_manager.h | 2 +- .../zmk/events/activity_state_changed.h | 2 +- .../zmk/events/battery_state_changed.h | 2 +- .../zmk/events/ble_active_profile_changed.h | 4 ++-- .../zmk/events/endpoint_selection_changed.h | 2 +- .../zmk/events/keycode_state_changed.h | 2 +- app/include/zmk/events/layer_state_changed.h | 2 +- .../zmk/events/modifiers_state_changed.h | 2 +- .../zmk/events/position_state_changed.h | 2 +- app/include/zmk/events/sensor_event.h | 4 ++-- .../events/split_peripheral_status_changed.h | 2 +- .../zmk/events/usb_conn_state_changed.h | 4 ++-- app/include/zmk/events/wpm_state_changed.h | 2 +- app/include/zmk/hid.h | 4 ++-- app/include/zmk/keys.h | 2 +- app/include/zmk/matrix.h | 2 +- app/include/zmk/split/bluetooth/central.h | 2 +- app/include/zmk/split/bluetooth/uuid.h | 2 +- app/include/zmk/usb.h | 4 ++-- app/src/activity.c | 14 ++++++------ app/src/backlight.c | 14 ++++++------ app/src/battery.c | 14 ++++++------ app/src/behavior_queue.c | 4 ++-- app/src/behaviors/behavior_backlight.c | 4 ++-- app/src/behaviors/behavior_bt.c | 10 +++++---- app/src/behaviors/behavior_caps_word.c | 4 ++-- app/src/behaviors/behavior_ext_power.c | 6 ++--- app/src/behaviors/behavior_hold_tap.c | 4 ++-- app/src/behaviors/behavior_key_press.c | 4 ++-- app/src/behaviors/behavior_key_repeat.c | 4 ++-- app/src/behaviors/behavior_key_toggle.c | 4 ++-- app/src/behaviors/behavior_macro.c | 4 ++-- app/src/behaviors/behavior_mod_morph.c | 4 ++-- app/src/behaviors/behavior_momentary_layer.c | 4 ++-- app/src/behaviors/behavior_none.c | 4 ++-- app/src/behaviors/behavior_outputs.c | 6 ++--- app/src/behaviors/behavior_reset.c | 7 +++--- app/src/behaviors/behavior_rgb_underglow.c | 4 ++-- .../behavior_sensor_rotate_key_press.c | 8 +++---- app/src/behaviors/behavior_sticky_key.c | 4 ++-- app/src/behaviors/behavior_tap_dance.c | 4 ++-- app/src/behaviors/behavior_to_layer.c | 4 ++-- app/src/behaviors/behavior_toggle_layer.c | 4 ++-- app/src/behaviors/behavior_transparent.c | 4 ++-- app/src/ble.c | 22 +++++++++---------- app/src/combo.c | 9 ++++---- app/src/conditional_layer.c | 6 ++--- app/src/display/main.c | 10 ++++----- app/src/display/status_screen.c | 2 +- app/src/display/widgets/battery_status.c | 6 ++--- app/src/display/widgets/layer_status.c | 4 ++-- app/src/display/widgets/output_status.c | 5 ++--- app/src/display/widgets/peripheral_status.c | 5 ++--- app/src/display/widgets/wpm_status.c | 2 +- app/src/endpoints.c | 6 ++--- app/src/event_manager.c | 4 ++-- app/src/events/activity_state_changed.c | 2 +- app/src/events/battery_state_changed.c | 2 +- app/src/events/ble_active_profile_changed.c | 2 +- app/src/events/endpoint_selection_changed.c | 2 +- app/src/events/keycode_state_changed.c | 2 +- app/src/events/layer_state_changed.c | 2 +- app/src/events/modifiers_state_changed.c | 2 +- app/src/events/position_state_changed.c | 2 +- app/src/events/sensor_event.c | 2 +- .../events/split_peripheral_status_changed.c | 2 +- app/src/events/usb_conn_state_changed.c | 2 +- app/src/events/wpm_state_changed.c | 2 +- app/src/ext_power_generic.c | 15 +++++++------ app/src/hid.c | 2 +- app/src/hid_listener.c | 2 +- app/src/hog.c | 10 ++++----- app/src/keymap.c | 10 ++++----- app/src/kscan.c | 10 ++++----- app/src/main.c | 10 ++++----- app/src/matrix_transform.c | 4 ++-- app/src/rgb_underglow.c | 12 +++++----- app/src/sensors.c | 8 +++---- app/src/split/bluetooth/central.c | 16 +++++++------- app/src/split/bluetooth/peripheral.c | 22 +++++++++---------- app/src/split/bluetooth/service.c | 10 ++++----- app/src/split/bluetooth/split_listener.c | 4 ++-- app/src/usb.c | 8 +++---- app/src/usb_hid.c | 8 +++---- app/src/wpm.c | 8 +++---- docs/docs/development/new-behavior.md | 4 ++-- 116 files changed, 332 insertions(+), 329 deletions(-) diff --git a/app/boards/arm/mikoto/pinmux.c b/app/boards/arm/mikoto/pinmux.c index 59a38fbf..6d7f46d1 100644 --- a/app/boards/arm/mikoto/pinmux.c +++ b/app/boards/arm/mikoto/pinmux.c @@ -4,12 +4,12 @@ * SPDX-License-Identifier: MIT */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include static int pinmux_mikoto_init(const struct device *port) { ARG_UNUSED(port); diff --git a/app/boards/arm/nrfmicro/pinmux.c b/app/boards/arm/nrfmicro/pinmux.c index ef5b5521..129530d4 100644 --- a/app/boards/arm/nrfmicro/pinmux.c +++ b/app/boards/arm/nrfmicro/pinmux.c @@ -4,12 +4,12 @@ * SPDX-License-Identifier: MIT */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include static int pinmux_nrfmicro_init(const struct device *port) { ARG_UNUSED(port); diff --git a/app/boards/arm/puchi_ble/pinmux.c b/app/boards/arm/puchi_ble/pinmux.c index 78cea314..0817b6e0 100644 --- a/app/boards/arm/puchi_ble/pinmux.c +++ b/app/boards/arm/puchi_ble/pinmux.c @@ -4,12 +4,12 @@ * SPDX-License-Identifier: MIT */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include static int pinmux_puchi_ble_init(const struct device *port) { ARG_UNUSED(port); diff --git a/app/drivers/display/il0323.c b/app/drivers/display/il0323.c index f6c9037e..ec6da159 100644 --- a/app/drivers/display/il0323.c +++ b/app/drivers/display/il0323.c @@ -7,16 +7,16 @@ #define DT_DRV_COMPAT gooddisplay_il0323 #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "il0323_regs.h" -#include +#include LOG_MODULE_REGISTER(il0323, CONFIG_DISPLAY_LOG_LEVEL); /** diff --git a/app/drivers/gpio/gpio_595.c b/app/drivers/gpio/gpio_595.c index 32016702..3d385844 100644 --- a/app/drivers/gpio/gpio_595.c +++ b/app/drivers/gpio/gpio_595.c @@ -12,15 +12,15 @@ #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_595); /** Configuration data */ diff --git a/app/drivers/gpio/gpio_mcp23017.c b/app/drivers/gpio/gpio_mcp23017.c index 1df14e6b..feafbd0a 100644 --- a/app/drivers/gpio/gpio_mcp23017.c +++ b/app/drivers/gpio/gpio_mcp23017.c @@ -12,9 +12,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -22,7 +22,7 @@ #include "gpio_mcp23017.h" #define LOG_LEVEL CONFIG_GPIO_LOG_LEVEL -#include +#include LOG_MODULE_REGISTER(gpio_mcp23017); /** diff --git a/app/drivers/gpio/gpio_mcp23017.h b/app/drivers/gpio/gpio_mcp23017.h index 026565cd..01908c0c 100644 --- a/app/drivers/gpio/gpio_mcp23017.h +++ b/app/drivers/gpio/gpio_mcp23017.h @@ -11,7 +11,7 @@ #ifndef ZEPHYR_DRIVERS_GPIO_GPIO_MCP23017_H_ #define ZEPHYR_DRIVERS_GPIO_GPIO_MCP23017_H_ -#include +#include #include #include diff --git a/app/drivers/kscan/debounce.h b/app/drivers/kscan/debounce.h index 9fa4531b..6e9faa66 100644 --- a/app/drivers/kscan/debounce.h +++ b/app/drivers/kscan/debounce.h @@ -8,7 +8,7 @@ #include #include -#include +#include #define DEBOUNCE_COUNTER_BITS 14 #define DEBOUNCE_COUNTER_MAX BIT_MASK(DEBOUNCE_COUNTER_BITS) diff --git a/app/drivers/kscan/kscan_composite.c b/app/drivers/kscan/kscan_composite.c index 35584d9c..e0cf47f9 100644 --- a/app/drivers/kscan/kscan_composite.c +++ b/app/drivers/kscan/kscan_composite.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_kscan_composite -#include +#include #include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #define MATRIX_NODE_ID DT_DRV_INST(0) diff --git a/app/drivers/kscan/kscan_gpio_demux.c b/app/drivers/kscan/kscan_gpio_demux.c index ff2c6c69..5fdd3a7e 100644 --- a/app/drivers/kscan/kscan_gpio_demux.c +++ b/app/drivers/kscan/kscan_gpio_demux.c @@ -6,10 +6,10 @@ #define DT_DRV_COMPAT zmk_kscan_gpio_demux -#include -#include -#include -#include +#include +#include +#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); diff --git a/app/drivers/kscan/kscan_gpio_direct.c b/app/drivers/kscan/kscan_gpio_direct.c index 1e0576c5..18a9348d 100644 --- a/app/drivers/kscan/kscan_gpio_direct.c +++ b/app/drivers/kscan/kscan_gpio_direct.c @@ -6,13 +6,13 @@ #include "debounce.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); diff --git a/app/drivers/kscan/kscan_gpio_matrix.c b/app/drivers/kscan/kscan_gpio_matrix.c index de65fd49..70502148 100644 --- a/app/drivers/kscan/kscan_gpio_matrix.c +++ b/app/drivers/kscan/kscan_gpio_matrix.c @@ -6,14 +6,14 @@ #include "debounce.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); diff --git a/app/drivers/kscan/kscan_mock.c b/app/drivers/kscan/kscan_mock.c index 4ccce69f..57862b0d 100644 --- a/app/drivers/kscan/kscan_mock.c +++ b/app/drivers/kscan/kscan_mock.c @@ -7,9 +7,9 @@ #define DT_DRV_COMPAT zmk_kscan_mock #include -#include -#include -#include +#include +#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); diff --git a/app/drivers/sensor/battery/battery_common.c b/app/drivers/sensor/battery/battery_common.c index 36e98aff..9afe2d5b 100644 --- a/app/drivers/sensor/battery/battery_common.c +++ b/app/drivers/sensor/battery/battery_common.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include "battery_common.h" diff --git a/app/drivers/sensor/battery/battery_common.h b/app/drivers/sensor/battery/battery_common.h index d81c39e2..3e16ceed 100644 --- a/app/drivers/sensor/battery/battery_common.h +++ b/app/drivers/sensor/battery/battery_common.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #include struct battery_value { diff --git a/app/drivers/sensor/battery/battery_nrf_vddh.c b/app/drivers/sensor/battery/battery_nrf_vddh.c index 60104a69..3f230812 100644 --- a/app/drivers/sensor/battery/battery_nrf_vddh.c +++ b/app/drivers/sensor/battery/battery_nrf_vddh.c @@ -9,11 +9,11 @@ #define DT_DRV_COMPAT zmk_battery_nrf_vddh -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "battery_common.h" diff --git a/app/drivers/sensor/battery/battery_voltage_divider.c b/app/drivers/sensor/battery/battery_voltage_divider.c index 09e5525e..bc35d002 100644 --- a/app/drivers/sensor/battery/battery_voltage_divider.c +++ b/app/drivers/sensor/battery/battery_voltage_divider.c @@ -6,12 +6,12 @@ #define DT_DRV_COMPAT zmk_battery_voltage_divider -#include -#include +#include +#include #include #include #include -#include +#include #include "battery_common.h" diff --git a/app/drivers/sensor/ec11/ec11.c b/app/drivers/sensor/ec11/ec11.c index 2fe641fa..5f26ebc3 100644 --- a/app/drivers/sensor/ec11/ec11.c +++ b/app/drivers/sensor/ec11/ec11.c @@ -6,13 +6,13 @@ #define DT_DRV_COMPAT alps_ec11 -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "ec11.h" diff --git a/app/drivers/sensor/ec11/ec11.h b/app/drivers/sensor/ec11/ec11.h index 1cb9c5f7..04750df5 100644 --- a/app/drivers/sensor/ec11/ec11.h +++ b/app/drivers/sensor/ec11/ec11.h @@ -6,9 +6,9 @@ #pragma once -#include -#include -#include +#include +#include +#include struct ec11_config { const char *a_label; diff --git a/app/drivers/sensor/ec11/ec11_trigger.c b/app/drivers/sensor/ec11/ec11_trigger.c index 555e1f4a..804a21d9 100644 --- a/app/drivers/sensor/ec11/ec11_trigger.c +++ b/app/drivers/sensor/ec11/ec11_trigger.c @@ -6,17 +6,17 @@ #define DT_DRV_COMPAT alps_ec11 -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "ec11.h" extern struct ec11_data ec11_driver; -#include +#include LOG_MODULE_DECLARE(EC11, CONFIG_SENSOR_LOG_LEVEL); static inline void setup_int(const struct device *dev, bool enable) { diff --git a/app/include/drivers/behavior.h b/app/include/drivers/behavior.h index fcb24f6f..71df7344 100644 --- a/app/include/drivers/behavior.h +++ b/app/include/drivers/behavior.h @@ -8,9 +8,9 @@ #include #include -#include +#include #include -#include +#include #include #include diff --git a/app/include/drivers/ext_power.h b/app/include/drivers/ext_power.h index b422750c..287679e1 100644 --- a/app/include/drivers/ext_power.h +++ b/app/include/drivers/ext_power.h @@ -8,7 +8,7 @@ #include #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/app/include/linker/zmk-events.ld b/app/include/linker/zmk-events.ld index 78d00bb7..66c1264a 100644 --- a/app/include/linker/zmk-events.ld +++ b/app/include/linker/zmk-events.ld @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include __event_type_start = .; \ KEEP(*(".event_type")); \ diff --git a/app/include/zmk/behavior_queue.h b/app/include/zmk/behavior_queue.h index 8a184e4a..307482e7 100644 --- a/app/include/zmk/behavior_queue.h +++ b/app/include/zmk/behavior_queue.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #include #include diff --git a/app/include/zmk/ble/profile.h b/app/include/zmk/ble/profile.h index 1df27436..0a57f16f 100644 --- a/app/include/zmk/ble/profile.h +++ b/app/include/zmk/ble/profile.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #define ZMK_BLE_PROFILE_NAME_MAX 15 diff --git a/app/include/zmk/display/widgets/battery_status.h b/app/include/zmk/display/widgets/battery_status.h index b87e87ee..ce22da4d 100644 --- a/app/include/zmk/display/widgets/battery_status.h +++ b/app/include/zmk/display/widgets/battery_status.h @@ -7,7 +7,7 @@ #pragma once #include -#include +#include struct zmk_widget_battery_status { sys_snode_t node; diff --git a/app/include/zmk/display/widgets/layer_status.h b/app/include/zmk/display/widgets/layer_status.h index 3779351a..a11c4039 100644 --- a/app/include/zmk/display/widgets/layer_status.h +++ b/app/include/zmk/display/widgets/layer_status.h @@ -7,7 +7,7 @@ #pragma once #include -#include +#include struct zmk_widget_layer_status { sys_snode_t node; diff --git a/app/include/zmk/display/widgets/output_status.h b/app/include/zmk/display/widgets/output_status.h index 66f09271..ed8ee813 100644 --- a/app/include/zmk/display/widgets/output_status.h +++ b/app/include/zmk/display/widgets/output_status.h @@ -7,7 +7,7 @@ #pragma once #include -#include +#include struct zmk_widget_output_status { sys_snode_t node; diff --git a/app/include/zmk/display/widgets/peripheral_status.h b/app/include/zmk/display/widgets/peripheral_status.h index e3b41355..07caeaa7 100644 --- a/app/include/zmk/display/widgets/peripheral_status.h +++ b/app/include/zmk/display/widgets/peripheral_status.h @@ -7,7 +7,7 @@ #pragma once #include -#include +#include struct zmk_widget_peripheral_status { sys_snode_t node; diff --git a/app/include/zmk/display/widgets/wpm_status.h b/app/include/zmk/display/widgets/wpm_status.h index 0592299e..fbe96cc2 100644 --- a/app/include/zmk/display/widgets/wpm_status.h +++ b/app/include/zmk/display/widgets/wpm_status.h @@ -7,7 +7,7 @@ #pragma once #include -#include +#include struct zmk_widget_wpm_status { sys_snode_t node; diff --git a/app/include/zmk/event_manager.h b/app/include/zmk/event_manager.h index 5acb26eb..aa9942ea 100644 --- a/app/include/zmk/event_manager.h +++ b/app/include/zmk/event_manager.h @@ -7,7 +7,7 @@ #pragma once #include -#include +#include #include struct zmk_event_type { diff --git a/app/include/zmk/events/activity_state_changed.h b/app/include/zmk/events/activity_state_changed.h index 998fa2d4..6a3481f3 100644 --- a/app/include/zmk/events/activity_state_changed.h +++ b/app/include/zmk/events/activity_state_changed.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #include #include diff --git a/app/include/zmk/events/battery_state_changed.h b/app/include/zmk/events/battery_state_changed.h index 6a003d8d..5a8c625e 100644 --- a/app/include/zmk/events/battery_state_changed.h +++ b/app/include/zmk/events/battery_state_changed.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #include struct zmk_battery_state_changed { diff --git a/app/include/zmk/events/ble_active_profile_changed.h b/app/include/zmk/events/ble_active_profile_changed.h index 4d3bb7ae..620e19b4 100644 --- a/app/include/zmk/events/ble_active_profile_changed.h +++ b/app/include/zmk/events/ble_active_profile_changed.h @@ -6,9 +6,9 @@ #pragma once -#include +#include #include -#include +#include #include diff --git a/app/include/zmk/events/endpoint_selection_changed.h b/app/include/zmk/events/endpoint_selection_changed.h index 38a6a8e5..198fe5a1 100644 --- a/app/include/zmk/events/endpoint_selection_changed.h +++ b/app/include/zmk/events/endpoint_selection_changed.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #include #include diff --git a/app/include/zmk/events/keycode_state_changed.h b/app/include/zmk/events/keycode_state_changed.h index 233ec62f..c3a3ed30 100644 --- a/app/include/zmk/events/keycode_state_changed.h +++ b/app/include/zmk/events/keycode_state_changed.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #include #include diff --git a/app/include/zmk/events/layer_state_changed.h b/app/include/zmk/events/layer_state_changed.h index 33183546..405d1365 100644 --- a/app/include/zmk/events/layer_state_changed.h +++ b/app/include/zmk/events/layer_state_changed.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #include struct zmk_layer_state_changed { diff --git a/app/include/zmk/events/modifiers_state_changed.h b/app/include/zmk/events/modifiers_state_changed.h index 504c2c9c..3f772cdb 100644 --- a/app/include/zmk/events/modifiers_state_changed.h +++ b/app/include/zmk/events/modifiers_state_changed.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #include #include diff --git a/app/include/zmk/events/position_state_changed.h b/app/include/zmk/events/position_state_changed.h index 5323e943..3e4e9238 100644 --- a/app/include/zmk/events/position_state_changed.h +++ b/app/include/zmk/events/position_state_changed.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #include #define ZMK_POSITION_STATE_CHANGE_SOURCE_LOCAL UINT8_MAX diff --git a/app/include/zmk/events/sensor_event.h b/app/include/zmk/events/sensor_event.h index f579bc39..9398bcbb 100644 --- a/app/include/zmk/events/sensor_event.h +++ b/app/include/zmk/events/sensor_event.h @@ -6,9 +6,9 @@ #pragma once -#include +#include #include -#include +#include struct zmk_sensor_event { uint8_t sensor_number; const struct device *sensor; diff --git a/app/include/zmk/events/split_peripheral_status_changed.h b/app/include/zmk/events/split_peripheral_status_changed.h index c75a879f..6ea59f60 100644 --- a/app/include/zmk/events/split_peripheral_status_changed.h +++ b/app/include/zmk/events/split_peripheral_status_changed.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #include struct zmk_split_peripheral_status_changed { diff --git a/app/include/zmk/events/usb_conn_state_changed.h b/app/include/zmk/events/usb_conn_state_changed.h index b40158c3..5f4ac5d2 100644 --- a/app/include/zmk/events/usb_conn_state_changed.h +++ b/app/include/zmk/events/usb_conn_state_changed.h @@ -6,8 +6,8 @@ #pragma once -#include -#include +#include +#include #include #include diff --git a/app/include/zmk/events/wpm_state_changed.h b/app/include/zmk/events/wpm_state_changed.h index 3d1a3695..76253e20 100644 --- a/app/include/zmk/events/wpm_state_changed.h +++ b/app/include/zmk/events/wpm_state_changed.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #include #include diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h index 01104d1c..ab42adaa 100644 --- a/app/include/zmk/hid.h +++ b/app/include/zmk/hid.h @@ -6,8 +6,8 @@ #pragma once -#include -#include +#include +#include #include #include diff --git a/app/include/zmk/keys.h b/app/include/zmk/keys.h index 38777ec8..fa6e7cfe 100644 --- a/app/include/zmk/keys.h +++ b/app/include/zmk/keys.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #include typedef uint32_t zmk_key_t; diff --git a/app/include/zmk/matrix.h b/app/include/zmk/matrix.h index b3e2323b..5f8cd7d7 100644 --- a/app/include/zmk/matrix.h +++ b/app/include/zmk/matrix.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #define ZMK_MATRIX_NODE_ID DT_CHOSEN(zmk_kscan) diff --git a/app/include/zmk/split/bluetooth/central.h b/app/include/zmk/split/bluetooth/central.h index 07240860..443d9b1b 100644 --- a/app/include/zmk/split/bluetooth/central.h +++ b/app/include/zmk/split/bluetooth/central.h @@ -1,7 +1,7 @@ #pragma once -#include +#include #include int zmk_split_bt_invoke_behavior(uint8_t source, struct zmk_behavior_binding *binding, diff --git a/app/include/zmk/split/bluetooth/uuid.h b/app/include/zmk/split/bluetooth/uuid.h index 735f5751..cbdb1772 100644 --- a/app/include/zmk/split/bluetooth/uuid.h +++ b/app/include/zmk/split/bluetooth/uuid.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #ifndef BT_UUID_NUM_OF_DIGITALS #define BT_UUID_NUM_OF_DIGITALS BT_UUID_DECLARE_16(0x2909) diff --git a/app/include/zmk/usb.h b/app/include/zmk/usb.h index 786d9c73..9e92a836 100644 --- a/app/include/zmk/usb.h +++ b/app/include/zmk/usb.h @@ -6,8 +6,8 @@ #pragma once -#include -#include +#include +#include #include #include diff --git a/app/src/activity.c b/app/src/activity.c index 029908c0..41fe2e15 100644 --- a/app/src/activity.c +++ b/app/src/activity.c @@ -4,12 +4,12 @@ * SPDX-License-Identifier: MIT */ -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); @@ -74,8 +74,8 @@ void activity_work_handler(struct k_work *work) { } else #endif /* IS_ENABLED(CONFIG_ZMK_SLEEP) */ if (inactive_time > MAX_IDLE_MS) { - set_state(ZMK_ACTIVITY_IDLE); - } + set_state(ZMK_ACTIVITY_IDLE); + } } K_WORK_DEFINE(activity_work, activity_work_handler); diff --git a/app/src/backlight.c b/app/src/backlight.c index 159c6fb2..f633ddb7 100644 --- a/app/src/backlight.c +++ b/app/src/backlight.c @@ -4,14 +4,14 @@ * SPDX-License-Identifier: MIT */ -#include -#include -#include -#include +#include +#include +#include +#include +#include -#include -#include -#include +#include +#include #include #include diff --git a/app/src/battery.c b/app/src/battery.c index 3f662241..540f7c3e 100644 --- a/app/src/battery.c +++ b/app/src/battery.c @@ -4,14 +4,14 @@ * SPDX-License-Identifier: MIT */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); diff --git a/app/src/behavior_queue.c b/app/src/behavior_queue.c index 617d5aad..529e5782 100644 --- a/app/src/behavior_queue.c +++ b/app/src/behavior_queue.c @@ -6,8 +6,8 @@ #include -#include -#include +#include +#include #include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); diff --git a/app/src/behaviors/behavior_backlight.c b/app/src/behaviors/behavior_backlight.c index a1eaaf86..fe2155b7 100644 --- a/app/src/behaviors/behavior_backlight.c +++ b/app/src/behaviors/behavior_backlight.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_behavior_backlight -#include +#include #include -#include +#include #include #include diff --git a/app/src/behaviors/behavior_bt.c b/app/src/behaviors/behavior_bt.c index 79b805b6..71cf2322 100644 --- a/app/src/behaviors/behavior_bt.c +++ b/app/src/behaviors/behavior_bt.c @@ -6,14 +6,16 @@ #define DT_DRV_COMPAT zmk_behavior_bluetooth -#include +#include +#include + +#include +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + #include #include -#include -#include #include -LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include diff --git a/app/src/behaviors/behavior_caps_word.c b/app/src/behaviors/behavior_caps_word.c index 7a9612b3..8ee5bb5c 100644 --- a/app/src/behaviors/behavior_caps_word.c +++ b/app/src/behaviors/behavior_caps_word.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_behavior_caps_word -#include +#include #include -#include +#include #include #include diff --git a/app/src/behaviors/behavior_ext_power.c b/app/src/behaviors/behavior_ext_power.c index 5db8aac2..690ac971 100644 --- a/app/src/behaviors/behavior_ext_power.c +++ b/app/src/behaviors/behavior_ext_power.c @@ -6,14 +6,14 @@ #define DT_DRV_COMPAT zmk_behavior_ext_power -#include -#include +#include +#include #include #include #include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) diff --git a/app/src/behaviors/behavior_hold_tap.c b/app/src/behaviors/behavior_hold_tap.c index a9e4d642..6ea2fe97 100644 --- a/app/src/behaviors/behavior_hold_tap.c +++ b/app/src/behaviors/behavior_hold_tap.c @@ -6,11 +6,11 @@ #define DT_DRV_COMPAT zmk_behavior_hold_tap -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/app/src/behaviors/behavior_key_press.c b/app/src/behaviors/behavior_key_press.c index 215da41d..2765db9f 100644 --- a/app/src/behaviors/behavior_key_press.c +++ b/app/src/behaviors/behavior_key_press.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_behavior_key_press -#include +#include #include -#include +#include #include #include diff --git a/app/src/behaviors/behavior_key_repeat.c b/app/src/behaviors/behavior_key_repeat.c index ad29cb0a..033f498b 100644 --- a/app/src/behaviors/behavior_key_repeat.c +++ b/app/src/behaviors/behavior_key_repeat.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_behavior_key_repeat -#include +#include #include -#include +#include #include #include diff --git a/app/src/behaviors/behavior_key_toggle.c b/app/src/behaviors/behavior_key_toggle.c index cd2a5dcd..cbbdd0d9 100644 --- a/app/src/behaviors/behavior_key_toggle.c +++ b/app/src/behaviors/behavior_key_toggle.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_behavior_key_toggle -#include +#include #include -#include +#include #include #include diff --git a/app/src/behaviors/behavior_macro.c b/app/src/behaviors/behavior_macro.c index 5b215b93..c86d732a 100644 --- a/app/src/behaviors/behavior_macro.c +++ b/app/src/behaviors/behavior_macro.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_behavior_macro -#include +#include #include -#include +#include #include #include #include diff --git a/app/src/behaviors/behavior_mod_morph.c b/app/src/behaviors/behavior_mod_morph.c index effbe4ac..e5ba346e 100644 --- a/app/src/behaviors/behavior_mod_morph.c +++ b/app/src/behaviors/behavior_mod_morph.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_behavior_mod_morph -#include +#include #include -#include +#include #include #include diff --git a/app/src/behaviors/behavior_momentary_layer.c b/app/src/behaviors/behavior_momentary_layer.c index 46e49fcc..c2bd0ffc 100644 --- a/app/src/behaviors/behavior_momentary_layer.c +++ b/app/src/behaviors/behavior_momentary_layer.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_behavior_momentary_layer -#include +#include #include -#include +#include #include #include diff --git a/app/src/behaviors/behavior_none.c b/app/src/behaviors/behavior_none.c index 1e7eb2b0..613ecbad 100644 --- a/app/src/behaviors/behavior_none.c +++ b/app/src/behaviors/behavior_none.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_behavior_none -#include +#include #include -#include +#include #include diff --git a/app/src/behaviors/behavior_outputs.c b/app/src/behaviors/behavior_outputs.c index 366abd8f..7aab8ee3 100644 --- a/app/src/behaviors/behavior_outputs.c +++ b/app/src/behaviors/behavior_outputs.c @@ -6,8 +6,8 @@ #define DT_DRV_COMPAT zmk_behavior_outputs -#include -#include +#include +#include #include #include @@ -15,7 +15,7 @@ #include #include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) diff --git a/app/src/behaviors/behavior_reset.c b/app/src/behaviors/behavior_reset.c index 47b11fa4..0b983c84 100644 --- a/app/src/behaviors/behavior_reset.c +++ b/app/src/behaviors/behavior_reset.c @@ -6,10 +6,11 @@ #define DT_DRV_COMPAT zmk_behavior_reset -#include -#include +#include +#include +#include + #include -#include #include diff --git a/app/src/behaviors/behavior_rgb_underglow.c b/app/src/behaviors/behavior_rgb_underglow.c index 3459cd22..0af07f81 100644 --- a/app/src/behaviors/behavior_rgb_underglow.c +++ b/app/src/behaviors/behavior_rgb_underglow.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_behavior_rgb_underglow -#include +#include #include -#include +#include #include #include diff --git a/app/src/behaviors/behavior_sensor_rotate_key_press.c b/app/src/behaviors/behavior_sensor_rotate_key_press.c index c4a34a94..ed6eedae 100644 --- a/app/src/behaviors/behavior_sensor_rotate_key_press.c +++ b/app/src/behaviors/behavior_sensor_rotate_key_press.c @@ -6,11 +6,11 @@ #define DT_DRV_COMPAT zmk_behavior_sensor_rotate_key_press -#include -#include -#include +#include +#include +#include -#include +#include #include #include diff --git a/app/src/behaviors/behavior_sticky_key.c b/app/src/behaviors/behavior_sticky_key.c index 267b81ab..22936086 100644 --- a/app/src/behaviors/behavior_sticky_key.c +++ b/app/src/behaviors/behavior_sticky_key.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_behavior_sticky_key -#include +#include #include -#include +#include #include #include diff --git a/app/src/behaviors/behavior_tap_dance.c b/app/src/behaviors/behavior_tap_dance.c index 6d78cb3e..ddb4aeab 100644 --- a/app/src/behaviors/behavior_tap_dance.c +++ b/app/src/behaviors/behavior_tap_dance.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_behavior_tap_dance -#include +#include #include -#include +#include #include #include #include diff --git a/app/src/behaviors/behavior_to_layer.c b/app/src/behaviors/behavior_to_layer.c index cce39d5d..c05b83ea 100644 --- a/app/src/behaviors/behavior_to_layer.c +++ b/app/src/behaviors/behavior_to_layer.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_behavior_to_layer -#include +#include #include -#include +#include #include #include diff --git a/app/src/behaviors/behavior_toggle_layer.c b/app/src/behaviors/behavior_toggle_layer.c index a682c6fe..73a700ed 100644 --- a/app/src/behaviors/behavior_toggle_layer.c +++ b/app/src/behaviors/behavior_toggle_layer.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_behavior_toggle_layer -#include +#include #include -#include +#include #include #include diff --git a/app/src/behaviors/behavior_transparent.c b/app/src/behaviors/behavior_transparent.c index 2ba05747..eeb2242d 100644 --- a/app/src/behaviors/behavior_transparent.c +++ b/app/src/behaviors/behavior_transparent.c @@ -6,9 +6,9 @@ #define DT_DRV_COMPAT zmk_behavior_transparent -#include +#include #include -#include +#include #include diff --git a/app/src/ble.c b/app/src/ble.c index 4d2e4603..aee90d5d 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -4,29 +4,29 @@ * SPDX-License-Identifier: MIT */ -#include -#include +#include +#include #include #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #if IS_ENABLED(CONFIG_SETTINGS) -#include +#include #endif -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); diff --git a/app/src/combo.c b/app/src/combo.c index e434ae17..2e237330 100644 --- a/app/src/combo.c +++ b/app/src/combo.c @@ -6,11 +6,12 @@ #define DT_DRV_COMPAT zmk_combos -#include +#include +#include +#include +#include + #include -#include -#include -#include #include #include diff --git a/app/src/conditional_layer.c b/app/src/conditional_layer.c index 572652ff..9ba02a5c 100644 --- a/app/src/conditional_layer.c +++ b/app/src/conditional_layer.c @@ -7,10 +7,10 @@ #define DT_DRV_COMPAT zmk_conditional_layers #include -#include +#include -#include -#include +#include +#include #include #include diff --git a/app/src/display/main.c b/app/src/display/main.c index 3fb4e8f6..52fa3c69 100644 --- a/app/src/display/main.c +++ b/app/src/display/main.c @@ -4,12 +4,12 @@ * SPDX-License-Identifier: MIT */ -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include diff --git a/app/src/display/status_screen.c b/app/src/display/status_screen.c index 6b58c301..7c3870a8 100644 --- a/app/src/display/status_screen.c +++ b/app/src/display/status_screen.c @@ -11,7 +11,7 @@ #include #include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if IS_ENABLED(CONFIG_ZMK_WIDGET_BATTERY_STATUS) diff --git a/app/src/display/widgets/battery_status.c b/app/src/display/widgets/battery_status.c index 3480101d..e35f890a 100644 --- a/app/src/display/widgets/battery_status.c +++ b/app/src/display/widgets/battery_status.c @@ -4,10 +4,10 @@ * SPDX-License-Identifier: MIT */ -#include -#include +#include +#include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include diff --git a/app/src/display/widgets/layer_status.c b/app/src/display/widgets/layer_status.c index 8dc0061c..c3ddd07c 100644 --- a/app/src/display/widgets/layer_status.c +++ b/app/src/display/widgets/layer_status.c @@ -4,8 +4,8 @@ * SPDX-License-Identifier: MIT */ -#include -#include +#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include diff --git a/app/src/display/widgets/output_status.c b/app/src/display/widgets/output_status.c index 135770a6..1c6da4b9 100644 --- a/app/src/display/widgets/output_status.c +++ b/app/src/display/widgets/output_status.c @@ -4,10 +4,9 @@ * SPDX-License-Identifier: MIT */ -#include -#include +#include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include diff --git a/app/src/display/widgets/peripheral_status.c b/app/src/display/widgets/peripheral_status.c index d0c33f20..fdfe4d9c 100644 --- a/app/src/display/widgets/peripheral_status.c +++ b/app/src/display/widgets/peripheral_status.c @@ -4,10 +4,9 @@ * SPDX-License-Identifier: MIT */ -#include -#include +#include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include diff --git a/app/src/display/widgets/wpm_status.c b/app/src/display/widgets/wpm_status.c index f3d06d65..9ae8b540 100644 --- a/app/src/display/widgets/wpm_status.c +++ b/app/src/display/widgets/wpm_status.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include diff --git a/app/src/endpoints.c b/app/src/endpoints.c index 33760010..9c824f44 100644 --- a/app/src/endpoints.c +++ b/app/src/endpoints.c @@ -4,8 +4,8 @@ * SPDX-License-Identifier: MIT */ -#include -#include +#include +#include #include #include @@ -18,7 +18,7 @@ #include #include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #define DEFAULT_ENDPOINT \ diff --git a/app/src/event_manager.c b/app/src/event_manager.c index 471432a8..0f4a5547 100644 --- a/app/src/event_manager.c +++ b/app/src/event_manager.c @@ -4,8 +4,8 @@ * SPDX-License-Identifier: MIT */ -#include -#include +#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); diff --git a/app/src/events/activity_state_changed.c b/app/src/events/activity_state_changed.c index 2c27ce74..95be678e 100644 --- a/app/src/events/activity_state_changed.c +++ b/app/src/events/activity_state_changed.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include #include ZMK_EVENT_IMPL(zmk_activity_state_changed); \ No newline at end of file diff --git a/app/src/events/battery_state_changed.c b/app/src/events/battery_state_changed.c index 435fb24d..508ee971 100644 --- a/app/src/events/battery_state_changed.c +++ b/app/src/events/battery_state_changed.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include #include ZMK_EVENT_IMPL(zmk_battery_state_changed); \ No newline at end of file diff --git a/app/src/events/ble_active_profile_changed.c b/app/src/events/ble_active_profile_changed.c index c4887f73..dccbc7e0 100644 --- a/app/src/events/ble_active_profile_changed.c +++ b/app/src/events/ble_active_profile_changed.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include #include ZMK_EVENT_IMPL(zmk_ble_active_profile_changed); \ No newline at end of file diff --git a/app/src/events/endpoint_selection_changed.c b/app/src/events/endpoint_selection_changed.c index 7f9014da..34bc39dd 100644 --- a/app/src/events/endpoint_selection_changed.c +++ b/app/src/events/endpoint_selection_changed.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include #include ZMK_EVENT_IMPL(zmk_endpoint_selection_changed); diff --git a/app/src/events/keycode_state_changed.c b/app/src/events/keycode_state_changed.c index c9ef6aa7..a134f341 100644 --- a/app/src/events/keycode_state_changed.c +++ b/app/src/events/keycode_state_changed.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include #include ZMK_EVENT_IMPL(zmk_keycode_state_changed); diff --git a/app/src/events/layer_state_changed.c b/app/src/events/layer_state_changed.c index bd6234c9..79326ccc 100644 --- a/app/src/events/layer_state_changed.c +++ b/app/src/events/layer_state_changed.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include #include ZMK_EVENT_IMPL(zmk_layer_state_changed); \ No newline at end of file diff --git a/app/src/events/modifiers_state_changed.c b/app/src/events/modifiers_state_changed.c index 3dfea25f..f44d90dd 100644 --- a/app/src/events/modifiers_state_changed.c +++ b/app/src/events/modifiers_state_changed.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include #include ZMK_EVENT_IMPL(zmk_modifiers_state_changed); \ No newline at end of file diff --git a/app/src/events/position_state_changed.c b/app/src/events/position_state_changed.c index bb40584e..7b9be89f 100644 --- a/app/src/events/position_state_changed.c +++ b/app/src/events/position_state_changed.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include #include ZMK_EVENT_IMPL(zmk_position_state_changed); \ No newline at end of file diff --git a/app/src/events/sensor_event.c b/app/src/events/sensor_event.c index 94ade947..bec1e6e7 100644 --- a/app/src/events/sensor_event.c +++ b/app/src/events/sensor_event.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include #include ZMK_EVENT_IMPL(zmk_sensor_event); \ No newline at end of file diff --git a/app/src/events/split_peripheral_status_changed.c b/app/src/events/split_peripheral_status_changed.c index 1d70b2ff..3f4c967d 100644 --- a/app/src/events/split_peripheral_status_changed.c +++ b/app/src/events/split_peripheral_status_changed.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include #include ZMK_EVENT_IMPL(zmk_split_peripheral_status_changed); \ No newline at end of file diff --git a/app/src/events/usb_conn_state_changed.c b/app/src/events/usb_conn_state_changed.c index b3555569..ae1f0503 100644 --- a/app/src/events/usb_conn_state_changed.c +++ b/app/src/events/usb_conn_state_changed.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include #include ZMK_EVENT_IMPL(zmk_usb_conn_state_changed); \ No newline at end of file diff --git a/app/src/events/wpm_state_changed.c b/app/src/events/wpm_state_changed.c index 3d9830bf..f16f54d2 100644 --- a/app/src/events/wpm_state_changed.c +++ b/app/src/events/wpm_state_changed.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include #include ZMK_EVENT_IMPL(zmk_wpm_state_changed); \ No newline at end of file diff --git a/app/src/ext_power_generic.c b/app/src/ext_power_generic.c index aab09cec..654f683f 100644 --- a/app/src/ext_power_generic.c +++ b/app/src/ext_power_generic.c @@ -7,17 +7,18 @@ #define DT_DRV_COMPAT zmk_ext_power_generic #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include + #include #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); struct ext_power_generic_config { diff --git a/app/src/hid.c b/app/src/hid.c index b66a910d..2a6b5d39 100644 --- a/app/src/hid.c +++ b/app/src/hid.c @@ -5,7 +5,7 @@ */ #include "zmk/keys.h" -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include diff --git a/app/src/hid_listener.c b/app/src/hid_listener.c index e233b0b8..3a11101d 100644 --- a/app/src/hid_listener.c +++ b/app/src/hid_listener.c @@ -5,7 +5,7 @@ */ #include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); diff --git a/app/src/hog.c b/app/src/hog.c index 3dd3e874..930714b0 100644 --- a/app/src/hog.c +++ b/app/src/hog.c @@ -4,15 +4,15 @@ * SPDX-License-Identifier: MIT */ -#include -#include +#include +#include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); -#include -#include +#include +#include #include #include diff --git a/app/src/keymap.c b/app/src/keymap.c index b00d0fba..0f06a39a 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -4,9 +4,9 @@ * SPDX-License-Identifier: MIT */ -#include -#include -#include +#include +#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include @@ -37,7 +37,7 @@ static uint8_t _zmk_keymap_layer_default = 0; #define BINDING_WITH_COMMA(idx, drv_inst) ZMK_KEYMAP_EXTRACT_BINDING(idx, drv_inst) #define TRANSFORMED_LAYER(node) \ - {LISTIFY(DT_PROP_LEN(node, bindings), BINDING_WITH_COMMA, (,), node)}, + {LISTIFY(DT_PROP_LEN(node, bindings), BINDING_WITH_COMMA, (, ), node)}, #if ZMK_KEYMAP_HAS_SENSORS #define _TRANSFORM_SENSOR_ENTRY(idx, layer) \ @@ -52,7 +52,7 @@ static uint8_t _zmk_keymap_layer_default = 0; #define SENSOR_LAYER(node) \ COND_CODE_1( \ DT_NODE_HAS_PROP(node, sensor_bindings), \ - ({LISTIFY(DT_PROP_LEN(node, sensor_bindings), _TRANSFORM_SENSOR_ENTRY, (,), node)}), \ + ({LISTIFY(DT_PROP_LEN(node, sensor_bindings), _TRANSFORM_SENSOR_ENTRY, (, ), node)}), \ ({})), #endif /* ZMK_KEYMAP_HAS_SENSORS */ diff --git a/app/src/kscan.c b/app/src/kscan.c index c7cf2881..f9db8b1c 100644 --- a/app/src/kscan.c +++ b/app/src/kscan.c @@ -4,11 +4,11 @@ * SPDX-License-Identifier: MIT */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); diff --git a/app/src/main.c b/app/src/main.c index ae604a7b..8ea67057 100644 --- a/app/src/main.c +++ b/app/src/main.c @@ -4,12 +4,12 @@ * SPDX-License-Identifier: MIT */ -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include LOG_MODULE_REGISTER(zmk, CONFIG_ZMK_LOG_LEVEL); #include diff --git a/app/src/matrix_transform.c b/app/src/matrix_transform.c index e7c6e95f..47256608 100644 --- a/app/src/matrix_transform.c +++ b/app/src/matrix_transform.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include #include #include #include @@ -15,7 +15,7 @@ [(KT_ROW(DT_PROP_BY_IDX(ZMK_KEYMAP_TRANSFORM_NODE, map, i)) * ZMK_MATRIX_COLS) + \ KT_COL(DT_PROP_BY_IDX(ZMK_KEYMAP_TRANSFORM_NODE, map, i))] = i -static uint32_t transform[] = {LISTIFY(ZMK_KEYMAP_LEN, _TRANSFORM_ENTRY, (,), 0)}; +static uint32_t transform[] = {LISTIFY(ZMK_KEYMAP_LEN, _TRANSFORM_ENTRY, (, ), 0)}; #endif diff --git a/app/src/rgb_underglow.c b/app/src/rgb_underglow.c index 18614a4e..47c3658e 100644 --- a/app/src/rgb_underglow.c +++ b/app/src/rgb_underglow.c @@ -4,17 +4,17 @@ * SPDX-License-Identifier: MIT */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include -#include +#include -#include +#include #include #include diff --git a/app/src/sensors.c b/app/src/sensors.c index 184061ac..9873de4f 100644 --- a/app/src/sensors.c +++ b/app/src/sensors.c @@ -4,11 +4,11 @@ * SPDX-License-Identifier: MIT */ -#include -#include -#include +#include +#include +#include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index e94a59ae..82cf7e01 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -5,15 +5,16 @@ */ #include +#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); @@ -24,7 +25,6 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include -#include static int start_scan(void); diff --git a/app/src/split/bluetooth/peripheral.c b/app/src/split/bluetooth/peripheral.c index aa690ab2..07d3ee3f 100644 --- a/app/src/split/bluetooth/peripheral.c +++ b/app/src/split/bluetooth/peripheral.c @@ -4,29 +4,29 @@ * SPDX-License-Identifier: MIT */ -#include -#include +#include +#include #include #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #if IS_ENABLED(CONFIG_SETTINGS) -#include +#include #endif -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); diff --git a/app/src/split/bluetooth/service.c b/app/src/split/bluetooth/service.c index 5da5401d..cc20c72f 100644 --- a/app/src/split/bluetooth/service.c +++ b/app/src/split/bluetooth/service.c @@ -5,15 +5,15 @@ */ #include -#include -#include +#include +#include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); -#include -#include +#include +#include #include #include diff --git a/app/src/split/bluetooth/split_listener.c b/app/src/split/bluetooth/split_listener.c index 3f3763ae..eb5398c4 100644 --- a/app/src/split/bluetooth/split_listener.c +++ b/app/src/split/bluetooth/split_listener.c @@ -4,8 +4,8 @@ * SPDX-License-Identifier: MIT */ -#include -#include +#include +#include #include diff --git a/app/src/usb.c b/app/src/usb.c index 146e7bb7..cf04ef46 100644 --- a/app/src/usb.c +++ b/app/src/usb.c @@ -4,11 +4,11 @@ * SPDX-License-Identifier: MIT */ -#include -#include +#include +#include -#include -#include +#include +#include #include #include diff --git a/app/src/usb_hid.c b/app/src/usb_hid.c index 4b90cf96..f46c70a0 100644 --- a/app/src/usb_hid.c +++ b/app/src/usb_hid.c @@ -4,11 +4,11 @@ * SPDX-License-Identifier: MIT */ -#include -#include +#include +#include -#include -#include +#include +#include #include #include diff --git a/app/src/wpm.c b/app/src/wpm.c index bcabf377..00a5942e 100644 --- a/app/src/wpm.c +++ b/app/src/wpm.c @@ -4,11 +4,11 @@ * SPDX-License-Identifier: MIT */ -#include -#include -#include +#include +#include +#include -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); diff --git a/docs/docs/development/new-behavior.md b/docs/docs/development/new-behavior.md index af98613e..e65bb296 100644 --- a/docs/docs/development/new-behavior.md +++ b/docs/docs/development/new-behavior.md @@ -137,9 +137,9 @@ The code snippet below shows the essential components of a new driver. #define DT_DRV_COMPAT zmk_ // Dependencies -#include +#include #include -#include +#include #include From e84b4299b5ee15a922397c3485de83468b7036fd Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 8 Oct 2022 00:47:36 -0400 Subject: [PATCH 23/64] refactor: Remove deprecated Kconfig override. --- app/Kconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 358d5d14..cf2cc6b3 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -429,9 +429,6 @@ config USB_CDC_ACM_RINGBUF_SIZE config LOG_BUFFER_SIZE default 8192 -config LOG_STRDUP_BUF_COUNT - default 16 - config LOG_PROCESS_THREAD_STARTUP_DELAY_MS default 1000 From 062f94d0144530fa699e5158b87293e7ebb526fc Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 17 Jan 2023 20:36:34 -0500 Subject: [PATCH 24/64] refactor: Remove v1 logging vestiges. --- app/drivers/kscan/kscan_composite.c | 4 ++-- app/drivers/kscan/kscan_gpio_demux.c | 4 ++-- app/drivers/kscan/kscan_gpio_direct.c | 2 +- app/drivers/kscan/kscan_gpio_matrix.c | 4 ++-- app/src/behavior_queue.c | 2 +- app/src/ble.c | 30 +++++++++++++-------------- app/src/endpoints.c | 2 +- app/src/keymap.c | 5 ++--- app/src/split/bluetooth/central.c | 14 ++++++------- app/src/split/bluetooth/peripheral.c | 8 +++---- app/src/split/bluetooth/service.c | 4 ++-- 11 files changed, 39 insertions(+), 40 deletions(-) diff --git a/app/drivers/kscan/kscan_composite.c b/app/drivers/kscan/kscan_composite.c index e0cf47f9..b452a9d2 100644 --- a/app/drivers/kscan/kscan_composite.c +++ b/app/drivers/kscan/kscan_composite.c @@ -43,7 +43,7 @@ static int kscan_composite_enable_callback(const struct device *dev) { const struct device *dev = device_get_binding(cfg->label); if (!dev) { - LOG_WRN("Failed to load child kscan device %s", log_strdup(cfg->label)); + LOG_WRN("Failed to load child kscan device %s", cfg->label); continue; } kscan_enable_callback(dev); @@ -57,7 +57,7 @@ static int kscan_composite_disable_callback(const struct device *dev) { const struct device *dev = device_get_binding(cfg->label); if (!dev) { - LOG_WRN("Failed to load child kscan device %s", log_strdup(cfg->label)); + LOG_WRN("Failed to load child kscan device %s", cfg->label); continue; } kscan_disable_callback(dev); diff --git a/app/drivers/kscan/kscan_gpio_demux.c b/app/drivers/kscan/kscan_gpio_demux.c index 5fdd3a7e..3ca300a3 100644 --- a/app/drivers/kscan/kscan_gpio_demux.c +++ b/app/drivers/kscan/kscan_gpio_demux.c @@ -240,8 +240,8 @@ struct kscan_gpio_item_config { }; \ \ static const struct kscan_gpio_config_##n kscan_gpio_config_##n = { \ - .rows = {LISTIFY(INST_MATRIX_INPUTS(n), _KSCAN_GPIO_INPUT_CFG_INIT, (,), n)}, \ - .cols = {LISTIFY(INST_DEMUX_GPIOS(n), _KSCAN_GPIO_OUTPUT_CFG_INIT, (,), n)}, \ + .rows = {LISTIFY(INST_MATRIX_INPUTS(n), _KSCAN_GPIO_INPUT_CFG_INIT, (, ), n)}, \ + .cols = {LISTIFY(INST_DEMUX_GPIOS(n), _KSCAN_GPIO_OUTPUT_CFG_INIT, (, ), n)}, \ }; \ \ DEVICE_DT_INST_DEFINE(n, kscan_gpio_init_##n, NULL, &kscan_gpio_data_##n, \ diff --git a/app/drivers/kscan/kscan_gpio_direct.c b/app/drivers/kscan/kscan_gpio_direct.c index 18a9348d..586e0d95 100644 --- a/app/drivers/kscan/kscan_gpio_direct.c +++ b/app/drivers/kscan/kscan_gpio_direct.c @@ -327,7 +327,7 @@ static const struct kscan_driver_api kscan_direct_api = { "ZMK_KSCAN_DEBOUNCE_RELEASE_MS or debounce-release-ms is too large"); \ \ static const struct gpio_dt_spec kscan_direct_inputs_##n[] = { \ - LISTIFY(INST_INPUTS_LEN(n), KSCAN_DIRECT_INPUT_CFG_INIT, (,), n)}; \ + LISTIFY(INST_INPUTS_LEN(n), KSCAN_DIRECT_INPUT_CFG_INIT, (, ), n)}; \ \ static struct debounce_state kscan_direct_state_##n[INST_INPUTS_LEN(n)]; \ \ diff --git a/app/drivers/kscan/kscan_gpio_matrix.c b/app/drivers/kscan/kscan_gpio_matrix.c index 70502148..d2121273 100644 --- a/app/drivers/kscan/kscan_gpio_matrix.c +++ b/app/drivers/kscan/kscan_gpio_matrix.c @@ -433,10 +433,10 @@ static const struct kscan_driver_api kscan_matrix_api = { "ZMK_KSCAN_DEBOUNCE_RELEASE_MS or debounce-release-ms is too large"); \ \ static const struct gpio_dt_spec kscan_matrix_rows_##n[] = { \ - LISTIFY(INST_ROWS_LEN(n), KSCAN_GPIO_ROW_CFG_INIT, (,), n)}; \ + LISTIFY(INST_ROWS_LEN(n), KSCAN_GPIO_ROW_CFG_INIT, (, ), n)}; \ \ static const struct gpio_dt_spec kscan_matrix_cols_##n[] = { \ - LISTIFY(INST_COLS_LEN(n), KSCAN_GPIO_COL_CFG_INIT, (,), n)}; \ + LISTIFY(INST_COLS_LEN(n), KSCAN_GPIO_COL_CFG_INIT, (, ), n)}; \ \ static struct debounce_state kscan_matrix_state_##n[INST_MATRIX_LEN(n)]; \ \ diff --git a/app/src/behavior_queue.c b/app/src/behavior_queue.c index 529e5782..971816f2 100644 --- a/app/src/behavior_queue.c +++ b/app/src/behavior_queue.c @@ -28,7 +28,7 @@ static void behavior_queue_process_next(struct k_work *work) { struct q_item item = {.wait = 0}; while (k_msgq_get(&zmk_behavior_queue_msgq, &item, K_NO_WAIT) == 0) { - LOG_DBG("Invoking %s: 0x%02x 0x%02x", log_strdup(item.binding.behavior_dev), + LOG_DBG("Invoking %s: 0x%02x 0x%02x", item.binding.behavior_dev, item.binding.param1, item.binding.param2); struct zmk_behavior_binding_event event = {.position = item.position, diff --git a/app/src/ble.c b/app/src/ble.c index aee90d5d..a7037d0c 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -111,7 +111,7 @@ void set_profile_address(uint8_t index, const bt_addr_le_t *addr) { memcpy(&profiles[index].peer, addr, sizeof(bt_addr_le_t)); sprintf(setting_name, "ble/profiles/%d", index); - LOG_DBG("Setting profile addr for %s to %s", log_strdup(setting_name), log_strdup(addr_str)); + LOG_DBG("Setting profile addr for %s to %s", setting_name, addr_str); settings_save_one(setting_name, &profiles[index], sizeof(struct zmk_ble_profile)); k_work_submit(&raise_profile_changed_event_work); } @@ -177,7 +177,7 @@ int update_advertising() { // addr_str[BT_ADDR_LE_STR_LEN]; bt_addr_le_to_str(zmk_ble_active_profile_addr(), addr_str, // sizeof(addr_str)); - // LOG_DBG("Directed advertising to %s", log_strdup(addr_str)); + // LOG_DBG("Directed advertising to %s", addr_str); // desired_adv = ZMK_ADV_DIR; } LOG_DBG("advertising from %d to %d", advertising_status, desired_adv); @@ -293,13 +293,13 @@ static int ble_profiles_handle_set(const char *name, size_t len, settings_read_c void *cb_arg) { const char *next; - LOG_DBG("Setting BLE value %s", log_strdup(name)); + LOG_DBG("Setting BLE value %s", name); if (settings_name_steq(name, "profiles", &next) && next) { char *endptr; uint8_t idx = strtoul(next, &endptr, 10); if (*endptr != '\0') { - LOG_WRN("Invalid profile index: %s", log_strdup(next)); + LOG_WRN("Invalid profile index: %s", next); return -EINVAL; } @@ -324,7 +324,7 @@ static int ble_profiles_handle_set(const char *name, size_t len, settings_read_c char addr_str[BT_ADDR_LE_STR_LEN]; bt_addr_le_to_str(&profiles[idx].peer, addr_str, sizeof(addr_str)); - LOG_DBG("Loaded %s address for profile %d", log_strdup(addr_str), idx); + LOG_DBG("Loaded %s address for profile %d", addr_str, idx); } else if (settings_name_steq(name, "active_profile", &next) && !next) { if (len != sizeof(active_profile)) { return -EINVAL; @@ -376,12 +376,12 @@ static void connected(struct bt_conn *conn, uint8_t err) { advertising_status = ZMK_ADV_NONE; if (err) { - LOG_WRN("Failed to connect to %s (%u)", log_strdup(addr), err); + LOG_WRN("Failed to connect to %s (%u)", addr, err); update_advertising(); return; } - LOG_DBG("Connected %s", log_strdup(addr)); + LOG_DBG("Connected %s", addr); if (bt_conn_set_security(conn, BT_SECURITY_L2)) { LOG_ERR("Failed to set security"); @@ -401,7 +401,7 @@ static void disconnected(struct bt_conn *conn, uint8_t reason) { bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr)); - LOG_DBG("Disconnected from %s (reason 0x%02x)", log_strdup(addr), reason); + LOG_DBG("Disconnected from %s (reason 0x%02x)", addr, reason); bt_conn_get_info(conn, &info); @@ -426,9 +426,9 @@ static void security_changed(struct bt_conn *conn, bt_security_t level, enum bt_ bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr)); if (!err) { - LOG_DBG("Security changed: %s level %u", log_strdup(addr), level); + LOG_DBG("Security changed: %s level %u", addr, level); } else { - LOG_ERR("Security failed: %s level %u err %d", log_strdup(addr), level, err); + LOG_ERR("Security failed: %s level %u err %d", addr, level, err); } } @@ -438,7 +438,7 @@ static void le_param_updated(struct bt_conn *conn, uint16_t interval, uint16_t l bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr)); - LOG_DBG("%s: interval %d latency %d timeout %d", log_strdup(addr), interval, latency, timeout); + LOG_DBG("%s: interval %d latency %d timeout %d", addr, interval, latency, timeout); } static struct bt_conn_cb conn_callbacks = { @@ -454,7 +454,7 @@ static void auth_passkey_display(struct bt_conn *conn, unsigned int passkey) { bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr)); - LOG_DBG("Passkey for %s: %06u", log_strdup(addr), passkey); + LOG_DBG("Passkey for %s: %06u", addr, passkey); } */ @@ -465,7 +465,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", log_strdup(addr)); + LOG_DBG("Passkey entry requested for %s", addr); passkey_digit = 0; auth_passkey_entry_conn = bt_conn_ref(conn); } @@ -486,7 +486,7 @@ static void auth_cancel(struct bt_conn *conn) { passkey_digit = 0; #endif - LOG_DBG("Pairing cancelled: %s", log_strdup(addr)); + LOG_DBG("Pairing cancelled: %s", addr); } static enum bt_security_err auth_pairing_accept(struct bt_conn *conn, @@ -517,7 +517,7 @@ static void auth_pairing_complete(struct bt_conn *conn, bool bonded) { } if (!zmk_ble_active_profile_is_open()) { - LOG_ERR("Pairing completed but current profile is not open: %s", log_strdup(addr)); + LOG_ERR("Pairing completed but current profile is not open: %s", addr); bt_unpair(BT_ID_DEFAULT, dst); return; } diff --git a/app/src/endpoints.c b/app/src/endpoints.c index 9c824f44..dbd1a3e6 100644 --- a/app/src/endpoints.c +++ b/app/src/endpoints.c @@ -148,7 +148,7 @@ int zmk_endpoints_send_report(uint16_t usage_page) { static int endpoints_handle_set(const char *name, size_t len, settings_read_cb read_cb, void *cb_arg) { - LOG_DBG("Setting endpoint value %s", log_strdup(name)); + LOG_DBG("Setting endpoint value %s", name); if (settings_name_steq(name, "preferred", NULL)) { if (len != sizeof(enum zmk_endpoint)) { diff --git a/app/src/keymap.c b/app/src/keymap.c index 0f06a39a..99483592 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -179,8 +179,7 @@ int zmk_keymap_apply_position_state(uint8_t source, int layer, uint32_t position .timestamp = timestamp, }; - LOG_DBG("layer: %d position: %d, binding name: %s", layer, position, - log_strdup(binding.behavior_dev)); + LOG_DBG("layer: %d position: %d, binding name: %s", layer, position, binding.behavior_dev); behavior = device_get_binding(binding.behavior_dev); @@ -260,7 +259,7 @@ int zmk_keymap_sensor_triggered(uint8_t sensor_number, const struct device *sens int ret; LOG_DBG("layer: %d sensor_number: %d, binding name: %s", layer, sensor_number, - log_strdup(binding->behavior_dev)); + binding->behavior_dev); behavior = device_get_binding(binding->behavior_dev); diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index 82cf7e01..5b952dfc 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -377,8 +377,8 @@ static bool split_central_eir_found(struct bt_data *data, void *user_data) { bt_uuid_to_str(&uuid.uuid, uuid_str, sizeof(uuid_str)); bt_uuid_to_str(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SERVICE_UUID), service_uuid_str, sizeof(service_uuid_str)); - LOG_DBG("UUID %s does not match split UUID: %s", log_strdup(uuid_str), - log_strdup(service_uuid_str)); + LOG_DBG("UUID %s does not match split UUID: %s", uuid_str, + service_uuid_str); continue; } @@ -433,7 +433,7 @@ static void split_central_device_found(const bt_addr_le_t *addr, int8_t rssi, ui char dev[BT_ADDR_LE_STR_LEN]; bt_addr_le_to_str(addr, dev, sizeof(dev)); - LOG_DBG("[DEVICE]: %s, AD evt type %u, AD data len %u, RSSI %i", log_strdup(dev), type, ad->len, + 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 */ @@ -469,7 +469,7 @@ static void split_central_connected(struct bt_conn *conn, uint8_t conn_err) { } if (conn_err) { - LOG_ERR("Failed to connect to %s (%u)", log_strdup(addr), conn_err); + LOG_ERR("Failed to connect to %s (%u)", addr, conn_err); release_peripheral_slot_for_conn(conn); @@ -477,7 +477,7 @@ static void split_central_connected(struct bt_conn *conn, uint8_t conn_err) { return; } - LOG_DBG("Connected: %s", log_strdup(addr)); + LOG_DBG("Connected: %s", addr); confirm_peripheral_slot_conn(conn); split_central_process_connection(conn); @@ -489,7 +489,7 @@ static void split_central_disconnected(struct bt_conn *conn, uint8_t reason) { bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr)); - LOG_DBG("Disconnected: %s (reason %d)", log_strdup(addr), reason); + LOG_DBG("Disconnected: %s (reason %d)", addr, reason); err = release_peripheral_slot_for_conn(conn); @@ -579,7 +579,7 @@ int zmk_split_bt_invoke_behavior(uint8_t source, struct zmk_behavior_binding *bi if (strlcpy(payload.behavior_dev, binding->behavior_dev, payload_dev_size) >= payload_dev_size) { LOG_ERR("Truncated behavior label %s to %s before invoking peripheral behavior", - log_strdup(binding->behavior_dev), log_strdup(payload.behavior_dev)); + binding->behavior_dev, payload.behavior_dev); } struct zmk_split_run_behavior_payload_wrapper wrapper = {.source = source, .payload = payload}; diff --git a/app/src/split/bluetooth/peripheral.c b/app/src/split/bluetooth/peripheral.c index 07d3ee3f..6b767baa 100644 --- a/app/src/split/bluetooth/peripheral.c +++ b/app/src/split/bluetooth/peripheral.c @@ -59,7 +59,7 @@ static void disconnected(struct bt_conn *conn, uint8_t reason) { bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr)); - LOG_DBG("Disconnected from %s (reason 0x%02x)", log_strdup(addr), reason); + LOG_DBG("Disconnected from %s (reason 0x%02x)", addr, reason); is_connected = false; @@ -73,9 +73,9 @@ static void security_changed(struct bt_conn *conn, bt_security_t level, enum bt_ bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr)); if (!err) { - LOG_DBG("Security changed: %s level %u", log_strdup(addr), level); + LOG_DBG("Security changed: %s level %u", addr, level); } else { - LOG_ERR("Security failed: %s level %u err %d", log_strdup(addr), level, err); + LOG_ERR("Security failed: %s level %u err %d", addr, level, err); } } @@ -85,7 +85,7 @@ static void le_param_updated(struct bt_conn *conn, uint16_t interval, uint16_t l bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr)); - LOG_DBG("%s: interval %d latency %d timeout %d", log_strdup(addr), interval, latency, timeout); + LOG_DBG("%s: interval %d latency %d timeout %d", addr, interval, latency, timeout); } static struct bt_conn_cb conn_callbacks = { diff --git a/app/src/split/bluetooth/service.c b/app/src/split/bluetooth/service.c index cc20c72f..fa4b7718 100644 --- a/app/src/split/bluetooth/service.c +++ b/app/src/split/bluetooth/service.c @@ -60,7 +60,7 @@ static ssize_t split_svc_run_behavior(struct bt_conn *conn, const struct bt_gatt .param2 = payload->data.param2, .behavior_dev = payload->behavior_dev, }; - LOG_DBG("%s with params %d %d: pressed? %d", log_strdup(binding.behavior_dev), + LOG_DBG("%s with params %d %d: pressed? %d", binding.behavior_dev, binding.param1, binding.param2, payload->data.state); struct zmk_behavior_binding_event event = {.position = payload->data.position, .timestamp = k_uptime_get()}; @@ -72,7 +72,7 @@ static ssize_t split_svc_run_behavior(struct bt_conn *conn, const struct bt_gatt } if (err) { - LOG_ERR("Failed to invoke behavior %s: %d", log_strdup(binding.behavior_dev), err); + LOG_ERR("Failed to invoke behavior %s: %d", binding.behavior_dev, err); } } From 09ed79a867b9d360270d505ff361a65ed66735e3 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 17 Jan 2023 20:40:44 -0500 Subject: [PATCH 25/64] refactor: Move away from deprecated label usages. * Move away from DT_LABEL. * Move to DEVICE_DT_GET for non-behavior device access. * Move various drivers to `gpio_spec_dt` and `DT` related macros. * Remove mcp23017 while at it, since better upstream driver is available. --- app/boards/arm/ferris/ferris_rev02.dts | 3 +- app/boards/arm/ferris/ferris_rev02_defconfig | 3 - app/boards/arm/mikoto/pinmux.c | 4 +- app/boards/arm/nrfmicro/pinmux.c | 2 +- app/boards/arm/puchi_ble/pinmux.c | 2 +- app/drivers/display/il0323.c | 146 +++----- app/drivers/gpio/CMakeLists.txt | 1 - app/drivers/gpio/Kconfig | 1 - app/drivers/gpio/Kconfig.mcp23017 | 22 -- app/drivers/gpio/gpio_mcp23017.c | 332 ------------------ app/drivers/gpio/gpio_mcp23017.h | 86 ----- app/drivers/kscan/kscan_composite.c | 26 +- app/drivers/kscan/kscan_gpio_demux.c | 90 ++--- .../sensor/battery/battery_voltage_divider.c | 77 ++-- app/drivers/sensor/ec11/ec11.c | 30 +- app/drivers/sensor/ec11/ec11.h | 11 +- app/drivers/sensor/ec11/ec11_trigger.c | 15 +- .../dts/bindings/gpio/microchip,mcp23017.yaml | 29 -- .../dts/bindings/gpio/zmk,gpio-595.yaml | 3 - .../bindings/sensor/zmk,battery-nrf-vddh.yaml | 5 - .../sensor/zmk,battery-voltage-divider.yaml | 5 - app/include/zmk/keymap.h | 2 +- app/include/zmk/kscan.h | 4 +- app/src/activity.c | 4 +- app/src/behavior_queue.c | 4 +- app/src/behaviors/behavior_bt.c | 1 - app/src/behaviors/behavior_caps_word.c | 9 +- app/src/behaviors/behavior_hold_tap.c | 4 +- app/src/behaviors/behavior_macro.c | 14 +- app/src/behaviors/behavior_mod_morph.c | 2 +- app/src/behaviors/behavior_tap_dance.c | 2 +- app/src/display/main.c | 11 +- app/src/ext_power_generic.c | 30 +- app/src/keymap.c | 5 +- app/src/kscan.c | 3 +- app/src/main.c | 4 +- app/src/rgb_underglow.c | 18 +- app/src/sensors.c | 3 +- app/src/split/bluetooth/central.c | 6 +- app/src/split/bluetooth/service.c | 4 +- docs/docs/development/new-behavior.md | 4 +- 41 files changed, 199 insertions(+), 828 deletions(-) delete mode 100644 app/drivers/gpio/Kconfig.mcp23017 delete mode 100644 app/drivers/gpio/gpio_mcp23017.c delete mode 100644 app/drivers/gpio/gpio_mcp23017.h delete mode 100644 app/drivers/zephyr/dts/bindings/gpio/microchip,mcp23017.yaml diff --git a/app/boards/arm/ferris/ferris_rev02.dts b/app/boards/arm/ferris/ferris_rev02.dts index 50de9526..55055e9a 100644 --- a/app/boards/arm/ferris/ferris_rev02.dts +++ b/app/boards/arm/ferris/ferris_rev02.dts @@ -104,11 +104,10 @@ clock-frequency = ; right_io: mcp23017@20 { - compatible = "microchip,mcp23017"; + compatible = "microchip,mcp230xx"; status = "okay"; gpio-controller; reg = <0x20>; - label = "RIGHT_IO"; #gpio-cells = <2>; ngpios = <16>; }; diff --git a/app/boards/arm/ferris/ferris_rev02_defconfig b/app/boards/arm/ferris/ferris_rev02_defconfig index 934dc4a0..267035c9 100644 --- a/app/boards/arm/ferris/ferris_rev02_defconfig +++ b/app/boards/arm/ferris/ferris_rev02_defconfig @@ -20,9 +20,6 @@ CONFIG_ZMK_USB=y CONFIG_ZMK_KSCAN_MATRIX_POLLING=y CONFIG_USB_SELF_POWERED=n -# Enable IO multiplexer -CONFIG_GPIO_MCP23017=y - # Needed to reduce this to size that will fit on F072 CONFIG_HEAP_MEM_POOL_SIZE=1024 diff --git a/app/boards/arm/mikoto/pinmux.c b/app/boards/arm/mikoto/pinmux.c index 6d7f46d1..524aa17e 100644 --- a/app/boards/arm/mikoto/pinmux.c +++ b/app/boards/arm/mikoto/pinmux.c @@ -15,8 +15,8 @@ static int pinmux_mikoto_init(const struct device *port) { ARG_UNUSED(port); #if CONFIG_BOARD_MIKOTO_520 - const struct device *p0 = device_get_binding("GPIO_0"); - const struct device *p1 = device_get_binding("GPIO_1"); + const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0)); + const struct device *p1 = DEVICE_DT_GET(DT_NODELABEL(gpio1)); #if CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_40MA gpio_pin_configure(p0, 26, GPIO_INPUT | GPIO_PULL_DOWN); gpio_pin_configure(p1, 15, GPIO_INPUT); diff --git a/app/boards/arm/nrfmicro/pinmux.c b/app/boards/arm/nrfmicro/pinmux.c index 129530d4..6362b392 100644 --- a/app/boards/arm/nrfmicro/pinmux.c +++ b/app/boards/arm/nrfmicro/pinmux.c @@ -15,7 +15,7 @@ static int pinmux_nrfmicro_init(const struct device *port) { ARG_UNUSED(port); #if (CONFIG_BOARD_NRFMICRO_13 || CONFIG_BOARD_NRFMICRO_13_52833) - const struct device *p0 = device_get_binding("GPIO_0"); + const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0)); #if CONFIG_BOARD_NRFMICRO_CHARGER gpio_pin_configure(p0, 5, GPIO_OUTPUT); gpio_pin_set(p0, 5, 0); diff --git a/app/boards/arm/puchi_ble/pinmux.c b/app/boards/arm/puchi_ble/pinmux.c index 0817b6e0..28178274 100644 --- a/app/boards/arm/puchi_ble/pinmux.c +++ b/app/boards/arm/puchi_ble/pinmux.c @@ -15,7 +15,7 @@ static int pinmux_puchi_ble_init(const struct device *port) { ARG_UNUSED(port); #if CONFIG_BOARD_PUCHI_BLE_v1 - const struct device *p0 = device_get_binding("GPIO_0"); + const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0)); #if CONFIG_BOARD_PUCHI_BLE_CHARGER gpio_pin_configure(p0, 5, GPIO_OUTPUT); gpio_pin_set(p0, 5, 0); diff --git a/app/drivers/display/il0323.c b/app/drivers/display/il0323.c index ec6da159..94e38481 100644 --- a/app/drivers/display/il0323.c +++ b/app/drivers/display/il0323.c @@ -24,23 +24,6 @@ LOG_MODULE_REGISTER(il0323, CONFIG_DISPLAY_LOG_LEVEL); * */ -#define IL0323_SPI_FREQ DT_INST_PROP(0, spi_max_frequency) -#define IL0323_BUS_NAME DT_INST_BUS_LABEL(0) -#define IL0323_DC_PIN DT_INST_GPIO_PIN(0, dc_gpios) -#define IL0323_DC_FLAGS DT_INST_GPIO_FLAGS(0, dc_gpios) -#define IL0323_DC_CNTRL DT_INST_GPIO_LABEL(0, dc_gpios) -#define IL0323_CS_PIN DT_INST_SPI_DEV_CS_GPIOS_PIN(0) -#define IL0323_CS_FLAGS DT_INST_SPI_DEV_CS_GPIOS_FLAGS(0) -#if DT_INST_SPI_DEV_HAS_CS_GPIOS(0) -#define IL0323_CS_CNTRL DT_INST_SPI_DEV_CS_GPIOS_LABEL(0) -#endif -#define IL0323_BUSY_PIN DT_INST_GPIO_PIN(0, busy_gpios) -#define IL0323_BUSY_CNTRL DT_INST_GPIO_LABEL(0, busy_gpios) -#define IL0323_BUSY_FLAGS DT_INST_GPIO_FLAGS(0, busy_gpios) -#define IL0323_RESET_PIN DT_INST_GPIO_PIN(0, reset_gpios) -#define IL0323_RESET_CNTRL DT_INST_GPIO_LABEL(0, reset_gpios) -#define IL0323_RESET_FLAGS DT_INST_GPIO_FLAGS(0, reset_gpios) - #define EPD_PANEL_WIDTH DT_INST_PROP(0, width) #define EPD_PANEL_HEIGHT DT_INST_PROP(0, height) #define IL0323_PIXELS_PER_BYTE 8U @@ -53,15 +36,11 @@ LOG_MODULE_REGISTER(il0323, CONFIG_DISPLAY_LOG_LEVEL); #define IL0323_PANEL_LAST_PAGE (IL0323_NUMOF_PAGES - 1) #define IL0323_BUFFER_SIZE 1280 -struct il0323_data { - const struct device *reset; - const struct device *dc; - const struct device *busy; - const struct device *spi_dev; - struct spi_config spi_config; -#if defined(IL0323_CS_CNTRL) - struct spi_cs_control cs_ctrl; -#endif +struct il0323_cfg { + struct gpio_dt_spec reset; + struct gpio_dt_spec dc; + struct gpio_dt_spec busy; + struct spi_dt_spec spi; }; static uint8_t il0323_pwr[] = DT_INST_PROP(0, pwr); @@ -69,21 +48,21 @@ static uint8_t il0323_pwr[] = DT_INST_PROP(0, pwr); static uint8_t last_buffer[IL0323_BUFFER_SIZE]; static bool blanking_on = true; -static inline int il0323_write_cmd(struct il0323_data *driver, uint8_t cmd, uint8_t *data, +static inline int il0323_write_cmd(const struct il0323_cfg *cfg, uint8_t cmd, uint8_t *data, size_t len) { struct spi_buf buf = {.buf = &cmd, .len = sizeof(cmd)}; struct spi_buf_set buf_set = {.buffers = &buf, .count = 1}; - gpio_pin_set(driver->dc, IL0323_DC_PIN, 1); - if (spi_write(driver->spi_dev, &driver->spi_config, &buf_set)) { + gpio_pin_set_dt(&cfg->dc, 1); + if (spi_write_dt(&cfg->spi, &buf_set)) { return -EIO; } if (data != NULL) { buf.buf = data; buf.len = len; - gpio_pin_set(driver->dc, IL0323_DC_PIN, 0); - if (spi_write(driver->spi_dev, &driver->spi_config, &buf_set)) { + gpio_pin_set_dt(&cfg->dc, 0); + if (spi_write_dt(&cfg->spi, &buf_set)) { return -EIO; } } @@ -91,22 +70,22 @@ static inline int il0323_write_cmd(struct il0323_data *driver, uint8_t cmd, uint return 0; } -static inline void il0323_busy_wait(struct il0323_data *driver) { - int pin = gpio_pin_get(driver->busy, IL0323_BUSY_PIN); +static inline void il0323_busy_wait(const struct il0323_cfg *cfg) { + int pin = gpio_pin_get_dt(&cfg->busy); while (pin > 0) { __ASSERT(pin >= 0, "Failed to get pin level"); // LOG_DBG("wait %u", pin); k_msleep(IL0323_BUSY_DELAY); - pin = gpio_pin_get(driver->busy, IL0323_BUSY_PIN); + pin = gpio_pin_get_dt(&cfg->busy); } } static int il0323_update_display(const struct device *dev) { - struct il0323_data *driver = dev->data; + const struct il0323_cfg *cfg = dev->config; LOG_DBG("Trigger update sequence"); - if (il0323_write_cmd(driver, IL0323_CMD_DRF, NULL, 0)) { + if (il0323_write_cmd(cfg, IL0323_CMD_DRF, NULL, 0)) { return -EIO; } @@ -117,7 +96,7 @@ static int il0323_update_display(const struct device *dev) { static int il0323_write(const struct device *dev, const uint16_t x, const uint16_t y, const struct display_buffer_descriptor *desc, const void *buf) { - struct il0323_data *driver = dev->data; + const struct il0323_cfg *cfg = dev->config; uint16_t x_end_idx = x + desc->width - 1; uint16_t y_end_idx = y + desc->height - 1; uint8_t ptl[IL0323_PTL_REG_LENGTH] = {0}; @@ -147,20 +126,20 @@ static int il0323_write(const struct device *dev, const uint16_t x, const uint16 ptl[sizeof(ptl) - 1] = IL0323_PTL_PT_SCAN; LOG_HEXDUMP_DBG(ptl, sizeof(ptl), "ptl"); - il0323_busy_wait(driver); - if (il0323_write_cmd(driver, IL0323_CMD_PIN, NULL, 0)) { + il0323_busy_wait(cfg); + if (il0323_write_cmd(cfg, IL0323_CMD_PIN, NULL, 0)) { return -EIO; } - if (il0323_write_cmd(driver, IL0323_CMD_PTL, ptl, sizeof(ptl))) { + if (il0323_write_cmd(cfg, IL0323_CMD_PTL, ptl, sizeof(ptl))) { return -EIO; } - if (il0323_write_cmd(driver, IL0323_CMD_DTM1, last_buffer, IL0323_BUFFER_SIZE)) { + if (il0323_write_cmd(cfg, IL0323_CMD_DTM1, last_buffer, IL0323_BUFFER_SIZE)) { return -EIO; } - if (il0323_write_cmd(driver, IL0323_CMD_DTM2, (uint8_t *)buf, buf_len)) { + if (il0323_write_cmd(cfg, IL0323_CMD_DTM2, (uint8_t *)buf, buf_len)) { return -EIO; } @@ -173,7 +152,7 @@ static int il0323_write(const struct device *dev, const uint16_t x, const uint16 } } - if (il0323_write_cmd(driver, IL0323_CMD_POUT, NULL, 0)) { + if (il0323_write_cmd(cfg, IL0323_CMD_POUT, NULL, 0)) { return -EIO; } @@ -217,11 +196,11 @@ static int il0323_clear_and_write_buffer(const struct device *dev, uint8_t patte } static int il0323_blanking_off(const struct device *dev) { - struct il0323_data *driver = dev->data; + const struct il0323_cfg *cfg = dev->config; if (blanking_on) { - /* Update EPD pannel in normal mode */ - il0323_busy_wait(driver); + /* Update EPD panel in normal mode */ + il0323_busy_wait(cfg); if (il0323_clear_and_write_buffer(dev, 0xff, true)) { return -EIO; } @@ -278,30 +257,30 @@ static int il0323_set_pixel_format(const struct device *dev, const enum display_ } static int il0323_controller_init(const struct device *dev) { - struct il0323_data *driver = dev->data; + const struct il0323_cfg *cfg = dev->config; uint8_t tmp[IL0323_TRES_REG_LENGTH]; LOG_DBG(""); - gpio_pin_set(driver->reset, IL0323_RESET_PIN, 1); + gpio_pin_set_dt(&cfg->reset, 1); k_msleep(IL0323_RESET_DELAY); - gpio_pin_set(driver->reset, IL0323_RESET_PIN, 0); + gpio_pin_set_dt(&cfg->reset, 0); k_msleep(IL0323_RESET_DELAY); - il0323_busy_wait(driver); + il0323_busy_wait(cfg); LOG_DBG("Initialize IL0323 controller"); - if (il0323_write_cmd(driver, IL0323_CMD_PWR, il0323_pwr, sizeof(il0323_pwr))) { + if (il0323_write_cmd(cfg, IL0323_CMD_PWR, il0323_pwr, sizeof(il0323_pwr))) { return -EIO; } /* Turn on: booster, controller, regulators, and sensor. */ - if (il0323_write_cmd(driver, IL0323_CMD_PON, NULL, 0)) { + if (il0323_write_cmd(cfg, IL0323_CMD_PON, NULL, 0)) { return -EIO; } k_msleep(IL0323_PON_DELAY); - il0323_busy_wait(driver); + il0323_busy_wait(cfg); /* Pannel settings, KW mode */ tmp[0] = IL0323_PSR_UD | IL0323_PSR_SHL | IL0323_PSR_SHD | IL0323_PSR_RST; @@ -321,7 +300,7 @@ static int il0323_controller_init(const struct device *dev) { #endif /* panel width */ LOG_HEXDUMP_DBG(tmp, 1, "PSR"); - if (il0323_write_cmd(driver, IL0323_CMD_PSR, tmp, 1)) { + if (il0323_write_cmd(cfg, IL0323_CMD_PSR, tmp, 1)) { return -EIO; } @@ -329,24 +308,24 @@ static int il0323_controller_init(const struct device *dev) { tmp[IL0323_TRES_HRES_IDX] = EPD_PANEL_WIDTH; tmp[IL0323_TRES_VRES_IDX] = EPD_PANEL_HEIGHT; LOG_HEXDUMP_DBG(tmp, IL0323_TRES_REG_LENGTH, "TRES"); - if (il0323_write_cmd(driver, IL0323_CMD_TRES, tmp, IL0323_TRES_REG_LENGTH)) { + if (il0323_write_cmd(cfg, IL0323_CMD_TRES, tmp, IL0323_TRES_REG_LENGTH)) { return -EIO; } tmp[IL0323_CDI_CDI_IDX] = DT_INST_PROP(0, cdi); LOG_HEXDUMP_DBG(tmp, IL0323_CDI_REG_LENGTH, "CDI"); - if (il0323_write_cmd(driver, IL0323_CMD_CDI, tmp, IL0323_CDI_REG_LENGTH)) { + if (il0323_write_cmd(cfg, IL0323_CMD_CDI, tmp, IL0323_CDI_REG_LENGTH)) { return -EIO; } tmp[0] = DT_INST_PROP(0, tcon); - if (il0323_write_cmd(driver, IL0323_CMD_TCON, tmp, 1)) { + if (il0323_write_cmd(cfg, IL0323_CMD_TCON, tmp, 1)) { return -EIO; } /* Enable Auto Sequence */ tmp[0] = IL0323_AUTO_PON_DRF_POF; - if (il0323_write_cmd(driver, IL0323_CMD_AUTO, tmp, 1)) { + if (il0323_write_cmd(cfg, IL0323_CMD_AUTO, tmp, 1)) { return -EIO; } @@ -354,62 +333,43 @@ static int il0323_controller_init(const struct device *dev) { } static int il0323_init(const struct device *dev) { - struct il0323_data *driver = dev->data; + const struct il0323_cfg *cfg = dev->config; - LOG_DBG(""); - - driver->spi_dev = device_get_binding(IL0323_BUS_NAME); - if (driver->spi_dev == NULL) { - LOG_ERR("Could not get SPI device for IL0323"); + if (!spi_is_ready(&cfg->spi)) { + LOG_ERR("SPI device not ready for IL0323"); return -EIO; } - driver->spi_config.frequency = IL0323_SPI_FREQ; - driver->spi_config.operation = SPI_OP_MODE_MASTER | SPI_WORD_SET(8); - driver->spi_config.slave = DT_INST_REG_ADDR(0); - driver->spi_config.cs = NULL; - - driver->reset = device_get_binding(IL0323_RESET_CNTRL); - if (driver->reset == NULL) { + if (!device_is_ready(cfg->reset.port)) { LOG_ERR("Could not get GPIO port for IL0323 reset"); return -EIO; } - gpio_pin_configure(driver->reset, IL0323_RESET_PIN, GPIO_OUTPUT_INACTIVE | IL0323_RESET_FLAGS); + gpio_pin_configure_dt(&cfg->reset, GPIO_OUTPUT_INACTIVE); - driver->dc = device_get_binding(IL0323_DC_CNTRL); - if (driver->dc == NULL) { + if (!device_is_ready(cfg->dc.port)) { LOG_ERR("Could not get GPIO port for IL0323 DC signal"); return -EIO; } - gpio_pin_configure(driver->dc, IL0323_DC_PIN, GPIO_OUTPUT_INACTIVE | IL0323_DC_FLAGS); + gpio_pin_configure_dt(&cfg->dc, GPIO_OUTPUT_INACTIVE); - driver->busy = device_get_binding(IL0323_BUSY_CNTRL); - if (driver->busy == NULL) { + if (!device_is_ready(cfg->busy.port)) { LOG_ERR("Could not get GPIO port for IL0323 busy signal"); return -EIO; } - gpio_pin_configure(driver->busy, IL0323_BUSY_PIN, GPIO_INPUT | IL0323_BUSY_FLAGS); - -#if defined(IL0323_CS_CNTRL) - driver->cs_ctrl.gpio_dev = device_get_binding(IL0323_CS_CNTRL); - if (!driver->cs_ctrl.gpio_dev) { - LOG_ERR("Unable to get SPI GPIO CS device"); - return -EIO; - } - - driver->cs_ctrl.gpio_pin = IL0323_CS_PIN; - driver->cs_ctrl.gpio_dt_flags = IL0323_CS_FLAGS; - driver->cs_ctrl.delay = 0U; - driver->spi_config.cs = &driver->cs_ctrl; -#endif + gpio_pin_configure_dt(&cfg->busy, GPIO_INPUT); return il0323_controller_init(dev); } -static struct il0323_data il0323_driver; +static struct il0323_cfg il0323_config = { + .spi = SPI_DT_SPEC_INST_GET(0, SPI_OP_MODE_MASTER | SPI_WORD_SET(8), 0), + .reset = GPIO_DT_SPEC_INST_GET(0, reset_gpios), + .busy = GPIO_DT_SPEC_INST_GET(0, busy_gpios), + .dc = GPIO_DT_SPEC_INST_GET(0, dc_gpios), +}; static struct display_driver_api il0323_driver_api = { .blanking_on = il0323_blanking_on, @@ -424,5 +384,5 @@ static struct display_driver_api il0323_driver_api = { .set_orientation = il0323_set_orientation, }; -DEVICE_DT_INST_DEFINE(0, il0323_init, NULL, &il0323_driver, NULL, POST_KERNEL, +DEVICE_DT_INST_DEFINE(0, il0323_init, NULL, NULL, &il0323_config, POST_KERNEL, CONFIG_APPLICATION_INIT_PRIORITY, &il0323_driver_api); diff --git a/app/drivers/gpio/CMakeLists.txt b/app/drivers/gpio/CMakeLists.txt index f4378151..0756ed38 100644 --- a/app/drivers/gpio/CMakeLists.txt +++ b/app/drivers/gpio/CMakeLists.txt @@ -5,5 +5,4 @@ zephyr_library_named(zmk__drivers__gpio) zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include) zephyr_library_sources_ifdef(CONFIG_GPIO_595 gpio_595.c) -zephyr_library_sources_ifdef(CONFIG_GPIO_MCP23017 gpio_mcp23017.c) zephyr_library_sources_ifdef(CONFIG_GPIO_MAX7318 gpio_max7318.c) diff --git a/app/drivers/gpio/Kconfig b/app/drivers/gpio/Kconfig index 43c7c24e..54b30590 100644 --- a/app/drivers/gpio/Kconfig +++ b/app/drivers/gpio/Kconfig @@ -1,6 +1,5 @@ menuconfig ZMK_DRIVERS_GPIO bool "GPIO" -rsource "Kconfig.mcp23017" rsource "Kconfig.max7318" rsource "Kconfig.595" diff --git a/app/drivers/gpio/Kconfig.mcp23017 b/app/drivers/gpio/Kconfig.mcp23017 deleted file mode 100644 index 049ca82e..00000000 --- a/app/drivers/gpio/Kconfig.mcp23017 +++ /dev/null @@ -1,22 +0,0 @@ -# MCP23017 GPIO configuration options - -# Copyright (c) 2021 Pete Johanson -# SPDX-License-Identifier: Apache-2.0 - -menuconfig GPIO_MCP23017 - bool "MCP23017 I2C-based GPIO chip" - depends on I2C - select HAS_DTS_GPIO - select ZMK_DRIVERS_GPIO - help - Enable driver for MCP23017 I2C-based GPIO chip. - -if GPIO_MCP23017 - -config GPIO_MCP23017_INIT_PRIORITY - int "Init priority" - default 75 - help - Device driver initialization priority. - -endif #GPIO_MCP23017 diff --git a/app/drivers/gpio/gpio_mcp23017.c b/app/drivers/gpio/gpio_mcp23017.c deleted file mode 100644 index feafbd0a..00000000 --- a/app/drivers/gpio/gpio_mcp23017.c +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright (c) 2020 Geanix ApS - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#define DT_DRV_COMPAT microchip_mcp23017 - -/** - * @file Driver for MCP23017 SPI-based GPIO driver. - */ - -#include - -#include -#include -#include -#include -#include -#include - -#include "gpio_mcp23017.h" - -#define LOG_LEVEL CONFIG_GPIO_LOG_LEVEL -#include -LOG_MODULE_REGISTER(gpio_mcp23017); - -/** - * @brief Read both port 0 and port 1 registers of certain register function. - * - * Given the register in reg, read the pair of port 0 and port 1. - * - * @param dev Device struct of the MCP23017. - * @param reg Register to read (the PORTA of the pair of registers). - * @param buf Buffer to read data into. - * - * @return 0 if successful, failed otherwise. - */ -static int read_port_regs(const struct device *dev, uint8_t reg, uint16_t *buf) { - const struct mcp23017_config *const config = dev->config; - struct mcp23017_drv_data *const drv_data = (struct mcp23017_drv_data *const)dev->data; - int ret; - uint16_t port_data; - - uint8_t addr = config->slave; - - ret = i2c_burst_read(drv_data->i2c, addr, reg, (uint8_t *)&port_data, sizeof(port_data)); - if (ret) { - LOG_DBG("i2c_write_read FAIL %d\n", ret); - return ret; - } - - *buf = sys_le16_to_cpu(port_data); - - LOG_DBG("MCP23017: Read: REG[0x%X] = 0x%X, REG[0x%X] = 0x%X", reg, (*buf & 0xFF), (reg + 1), - (*buf >> 8)); - - return 0; -} - -/** - * @brief Write both port 0 and port 1 registers of certain register function. - * - * Given the register in reg, write the pair of port 0 and port 1. - * - * @param dev Device struct of the MCP23017. - * @param reg Register to write into (the PORTA of the pair of registers). - * @param buf Buffer to write data from. - * - * @return 0 if successful, failed otherwise. - */ -static int write_port_regs(const struct device *dev, uint8_t reg, uint16_t value) { - const struct mcp23017_config *const config = dev->config; - struct mcp23017_drv_data *const drv_data = (struct mcp23017_drv_data *const)dev->data; - int ret; - uint16_t port_data; - - LOG_DBG("MCP23017: Write: REG[0x%X] = 0x%X, REG[0x%X] = 0x%X", reg, (value & 0xFF), (reg + 1), - (value >> 8)); - - port_data = sys_cpu_to_le16(value); - - ret = i2c_burst_write(drv_data->i2c, config->slave, reg, (uint8_t *)&port_data, - sizeof(port_data)); - if (ret) { - LOG_DBG("i2c_write FAIL %d\n", ret); - return ret; - } - - return 0; -} - -/** - * @brief Setup the pin direction (input or output) - * - * @param dev Device struct of the MCP23017 - * @param pin The pin number - * @param flags Flags of pin or port - * - * @return 0 if successful, failed otherwise - */ -static int setup_pin_dir(const struct device *dev, uint32_t pin, int flags) { - struct mcp23017_drv_data *const drv_data = (struct mcp23017_drv_data *const)dev->data; - uint16_t *dir = &drv_data->reg_cache.iodir; - uint16_t *output = &drv_data->reg_cache.gpio; - int ret; - - if ((flags & GPIO_OUTPUT) != 0U) { - if ((flags & GPIO_OUTPUT_INIT_HIGH) != 0U) { - *output |= BIT(pin); - } else if ((flags & GPIO_OUTPUT_INIT_LOW) != 0U) { - *output &= ~BIT(pin); - } - *dir &= ~BIT(pin); - } else { - *dir |= BIT(pin); - } - - ret = write_port_regs(dev, REG_GPIO_PORTA, *output); - if (ret != 0) { - return ret; - } - - ret = write_port_regs(dev, REG_IODIR_PORTA, *dir); - - return ret; -} - -/** - * @brief Setup the pin pull up/pull down status - * - * @param dev Device struct of the MCP23017 - * @param pin The pin number - * @param flags Flags of pin or port - * - * @return 0 if successful, failed otherwise - */ -static int setup_pin_pullupdown(const struct device *dev, uint32_t pin, int flags) { - struct mcp23017_drv_data *const drv_data = (struct mcp23017_drv_data *const)dev->data; - uint16_t port; - int ret; - - /* Setup pin pull up or pull down */ - port = drv_data->reg_cache.gppu; - - /* pull down == 0, pull up == 1 */ - if ((flags & GPIO_PULL_DOWN) != 0U) { - return -ENOTSUP; - } - - WRITE_BIT(port, pin, (flags & GPIO_PULL_UP) != 0U); - - ret = write_port_regs(dev, REG_GPPU_PORTA, port); - if (ret == 0) { - drv_data->reg_cache.gppu = port; - } - - return ret; -} - -static int mcp23017_config(const struct device *dev, gpio_pin_t pin, gpio_flags_t flags) { - struct mcp23017_drv_data *const drv_data = (struct mcp23017_drv_data *const)dev->data; - int ret; - - /* Can't do SPI bus operations from an ISR */ - if (k_is_in_isr()) { - return -EWOULDBLOCK; - } - - k_sem_take(&drv_data->lock, K_FOREVER); - - if ((flags & GPIO_OPEN_DRAIN) != 0U) { - ret = -ENOTSUP; - goto done; - }; - - ret = setup_pin_dir(dev, pin, flags); - if (ret) { - LOG_ERR("MCP23017: error setting pin direction (%d)", ret); - goto done; - } - - ret = setup_pin_pullupdown(dev, pin, flags); - if (ret) { - LOG_ERR("MCP23017: error setting pin pull up/down (%d)", ret); - goto done; - } - -done: - k_sem_give(&drv_data->lock); - return ret; -} - -static int mcp23017_port_get_raw(const struct device *dev, uint32_t *value) { - struct mcp23017_drv_data *const drv_data = (struct mcp23017_drv_data *const)dev->data; - uint16_t buf; - int ret; - - /* Can't do SPI bus operations from an ISR */ - if (k_is_in_isr()) { - return -EWOULDBLOCK; - } - - k_sem_take(&drv_data->lock, K_FOREVER); - - ret = read_port_regs(dev, REG_GPIO_PORTA, &buf); - if (ret != 0) { - goto done; - } - - *value = buf; - -done: - k_sem_give(&drv_data->lock); - return ret; -} - -static int mcp23017_port_set_masked_raw(const struct device *dev, uint32_t mask, uint32_t value) { - struct mcp23017_drv_data *const drv_data = (struct mcp23017_drv_data *const)dev->data; - uint16_t buf; - int ret; - - /* Can't do SPI bus operations from an ISR */ - if (k_is_in_isr()) { - return -EWOULDBLOCK; - } - - k_sem_take(&drv_data->lock, K_FOREVER); - - buf = drv_data->reg_cache.gpio; - buf = (buf & ~mask) | (mask & value); - - ret = write_port_regs(dev, REG_GPIO_PORTA, buf); - if (ret == 0) { - drv_data->reg_cache.gpio = buf; - } - - k_sem_give(&drv_data->lock); - - return ret; -} - -static int mcp23017_port_set_bits_raw(const struct device *dev, uint32_t mask) { - return mcp23017_port_set_masked_raw(dev, mask, mask); -} - -static int mcp23017_port_clear_bits_raw(const struct device *dev, uint32_t mask) { - return mcp23017_port_set_masked_raw(dev, mask, 0); -} - -static int mcp23017_port_toggle_bits(const struct device *dev, uint32_t mask) { - struct mcp23017_drv_data *const drv_data = (struct mcp23017_drv_data *const)dev->data; - uint16_t buf; - int ret; - - /* Can't do SPI bus operations from an ISR */ - if (k_is_in_isr()) { - return -EWOULDBLOCK; - } - - k_sem_take(&drv_data->lock, K_FOREVER); - - buf = drv_data->reg_cache.gpio; - buf ^= mask; - - ret = write_port_regs(dev, REG_GPIO_PORTA, buf); - if (ret == 0) { - drv_data->reg_cache.gpio = buf; - } - - k_sem_give(&drv_data->lock); - - return ret; -} - -static int mcp23017_pin_interrupt_configure(const struct device *dev, gpio_pin_t pin, - enum gpio_int_mode mode, enum gpio_int_trig trig) { - return -ENOTSUP; -} - -static const struct gpio_driver_api api_table = { - .pin_configure = mcp23017_config, - .port_get_raw = mcp23017_port_get_raw, - .port_set_masked_raw = mcp23017_port_set_masked_raw, - .port_set_bits_raw = mcp23017_port_set_bits_raw, - .port_clear_bits_raw = mcp23017_port_clear_bits_raw, - .port_toggle_bits = mcp23017_port_toggle_bits, - .pin_interrupt_configure = mcp23017_pin_interrupt_configure, -}; - -/** - * @brief Initialization function of MCP23017 - * - * @param dev Device struct - * @return 0 if successful, failed otherwise. - */ -static int mcp23017_init(const struct device *dev) { - const struct mcp23017_config *const config = dev->config; - struct mcp23017_drv_data *const drv_data = (struct mcp23017_drv_data *const)dev->data; - - drv_data->i2c = device_get_binding((char *)config->i2c_dev_name); - if (!drv_data->i2c) { - LOG_DBG("Unable to get i2c device"); - return -ENODEV; - } - - k_sem_init(&drv_data->lock, 1, 1); - - return 0; -} - -#define MCP23017_INIT(inst) \ - static struct mcp23017_config mcp23017_##inst##_config = { \ - .i2c_dev_name = DT_INST_BUS_LABEL(inst), \ - .slave = DT_INST_REG_ADDR(inst), \ - \ - }; \ - \ - static struct mcp23017_drv_data mcp23017_##inst##_drvdata = { \ - /* Default for registers according to datasheet */ \ - .reg_cache.iodir = 0xFFFF, .reg_cache.ipol = 0x0, .reg_cache.gpinten = 0x0, \ - .reg_cache.defval = 0x0, .reg_cache.intcon = 0x0, .reg_cache.iocon = 0x0, \ - .reg_cache.gppu = 0x0, .reg_cache.intf = 0x0, .reg_cache.intcap = 0x0, \ - .reg_cache.gpio = 0x0, .reg_cache.olat = 0x0, \ - }; \ - \ - /* This has to init after SPI master */ \ - DEVICE_DT_INST_DEFINE(inst, mcp23017_init, NULL, &mcp23017_##inst##_drvdata, \ - &mcp23017_##inst##_config, POST_KERNEL, \ - CONFIG_GPIO_MCP23017_INIT_PRIORITY, &api_table); - -DT_INST_FOREACH_STATUS_OKAY(MCP23017_INIT) diff --git a/app/drivers/gpio/gpio_mcp23017.h b/app/drivers/gpio/gpio_mcp23017.h deleted file mode 100644 index 01908c0c..00000000 --- a/app/drivers/gpio/gpio_mcp23017.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2020 Geanix ApS, Pete Johanson - * - * SPDX-License-Identifier: Apache-2.0 - */ - -/** - * @file Header file for the MCP23017 driver. - */ - -#ifndef ZEPHYR_DRIVERS_GPIO_GPIO_MCP23017_H_ -#define ZEPHYR_DRIVERS_GPIO_GPIO_MCP23017_H_ - -#include - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Register definitions */ -#define REG_IODIR_PORTA 0x00 -#define REG_IODIR_PORTB 0x01 -#define REG_IPOL_PORTA 0x02 -#define REG_IPOL_PORTB 0x03 -#define REG_GPINTEN_PORTA 0x04 -#define REG_GPINTEN_PORTB 0x05 -#define REG_DEFVAL_PORTA 0x06 -#define REG_DEFVAL_PORTB 0x07 -#define REG_INTCON_PORTA 0x08 -#define REG_INTCON_PORTB 0x09 -#define REG_GPPU_PORTA 0x0C -#define REG_GPPU_PORTB 0x0D -#define REG_INTF_PORTA 0x0E -#define REG_INTF_PORTB 0x0F -#define REG_INTCAP_PORTA 0x10 -#define REG_INTCAP_PORTB 0x11 -#define REG_GPIO_PORTA 0x12 -#define REG_GPIO_PORTB 0x13 -#define REG_OLAT_PORTA 0x14 -#define REG_OLAT_PORTB 0x15 - -#define MCP23017_ADDR 0x40 -#define MCP23017_READBIT 0x01 - -/** Configuration data */ -struct mcp23017_config { - /* gpio_driver_data needs to be first */ - struct gpio_driver_config common; - - const char *const i2c_dev_name; - const uint16_t slave; -}; - -/** Runtime driver data */ -struct mcp23017_drv_data { - /* gpio_driver_data needs to be first */ - struct gpio_driver_config data; - - /** Master SPI device */ - const struct device *i2c; - - struct k_sem lock; - - struct { - uint16_t iodir; - uint16_t ipol; - uint16_t gpinten; - uint16_t defval; - uint16_t intcon; - uint16_t iocon; - uint16_t gppu; - uint16_t intf; - uint16_t intcap; - uint16_t gpio; - uint16_t olat; - } reg_cache; -}; - -#ifdef __cplusplus -} -#endif - -#endif /* ZEPHYR_DRIVERS_GPIO_GPIO_MCP23017_H_ */ diff --git a/app/drivers/kscan/kscan_composite.c b/app/drivers/kscan/kscan_composite.c index b452a9d2..9909a4cf 100644 --- a/app/drivers/kscan/kscan_composite.c +++ b/app/drivers/kscan/kscan_composite.c @@ -7,7 +7,7 @@ #define DT_DRV_COMPAT zmk_kscan_composite #include -#include +#include #include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); @@ -16,13 +16,13 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #define MATRIX_COLS DT_PROP(MATRIX_NODE_ID, columns) struct kscan_composite_child_config { - char *label; + const struct device *child; uint8_t row_offset; uint8_t column_offset; }; #define CHILD_CONFIG(inst) \ - {.label = DT_LABEL(DT_PHANDLE(inst, kscan)), \ + {.child = DEVICE_DT_GET(DT_PHANDLE(inst, kscan)), \ .row_offset = DT_PROP(inst, row_offset), \ .column_offset = DT_PROP(inst, column_offset)}, @@ -41,12 +41,7 @@ static int kscan_composite_enable_callback(const struct device *dev) { for (int i = 0; i < ARRAY_SIZE(kscan_composite_children); i++) { const struct kscan_composite_child_config *cfg = &kscan_composite_children[i]; - const struct device *dev = device_get_binding(cfg->label); - if (!dev) { - LOG_WRN("Failed to load child kscan device %s", cfg->label); - continue; - } - kscan_enable_callback(dev); + kscan_enable_callback(cfg->child); } return 0; } @@ -55,12 +50,7 @@ static int kscan_composite_disable_callback(const struct device *dev) { for (int i = 0; i < ARRAY_SIZE(kscan_composite_children); i++) { const struct kscan_composite_child_config *cfg = &kscan_composite_children[i]; - const struct device *dev = device_get_binding(cfg->label); - if (!dev) { - LOG_WRN("Failed to load child kscan device %s", cfg->label); - continue; - } - kscan_disable_callback(dev); + kscan_disable_callback(cfg->child); } return 0; } @@ -68,13 +58,13 @@ static int kscan_composite_disable_callback(const struct device *dev) { static void kscan_composite_child_callback(const struct device *child_dev, uint32_t row, uint32_t column, bool pressed) { // TODO: Ideally we can get this passed into our callback! - const struct device *dev = device_get_binding(DT_INST_LABEL(0)); + const struct device *dev = DEVICE_DT_GET(DT_DRV_INST(0)); struct kscan_composite_data *data = dev->data; for (int i = 0; i < ARRAY_SIZE(kscan_composite_children); i++) { const struct kscan_composite_child_config *cfg = &kscan_composite_children[i]; - if (device_get_binding(cfg->label) != child_dev) { + if (cfg->child != child_dev) { continue; } @@ -92,7 +82,7 @@ static int kscan_composite_configure(const struct device *dev, kscan_callback_t for (int i = 0; i < ARRAY_SIZE(kscan_composite_children); i++) { const struct kscan_composite_child_config *cfg = &kscan_composite_children[i]; - kscan_config(device_get_binding(cfg->label), &kscan_composite_child_callback); + kscan_config(cfg->child, &kscan_composite_child_callback); } data->callback = callback; diff --git a/app/drivers/kscan/kscan_gpio_demux.c b/app/drivers/kscan/kscan_gpio_demux.c index 3ca300a3..812a899d 100644 --- a/app/drivers/kscan/kscan_gpio_demux.c +++ b/app/drivers/kscan/kscan_gpio_demux.c @@ -13,26 +13,11 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); -struct kscan_gpio_item_config { - char *label; - gpio_pin_t pin; - gpio_flags_t flags; -}; - // Helper macro #define PWR_TWO(x) (1 << (x)) -// Define GPIO cfg -#define _KSCAN_GPIO_ITEM_CFG_INIT(n, prop, idx) \ - { \ - .label = DT_INST_GPIO_LABEL_BY_IDX(n, prop, idx), \ - .pin = DT_INST_GPIO_PIN_BY_IDX(n, prop, idx), \ - .flags = DT_INST_GPIO_FLAGS_BY_IDX(n, prop, idx), \ - } - // Define row and col cfg -#define _KSCAN_GPIO_INPUT_CFG_INIT(idx, n) _KSCAN_GPIO_ITEM_CFG_INIT(n, input_gpios, idx) -#define _KSCAN_GPIO_OUTPUT_CFG_INIT(idx, n) _KSCAN_GPIO_ITEM_CFG_INIT(n, output_gpios, idx) +#define _KSCAN_GPIO_CFG_INIT(n, prop, idx) GPIO_DT_SPEC_GET_BY_IDX(n, prop, idx), // Check debounce config #define CHECK_DEBOUNCE_CFG(n, a, b) COND_CODE_0(DT_INST_PROP(n, debounce_period), a, b) @@ -51,8 +36,8 @@ struct kscan_gpio_item_config { }; \ \ struct kscan_gpio_config_##n { \ - struct kscan_gpio_item_config rows[INST_MATRIX_INPUTS(n)]; \ - struct kscan_gpio_item_config cols[INST_DEMUX_GPIOS(n)]; \ + const struct gpio_dt_spec rows[INST_MATRIX_INPUTS(n)]; \ + const struct gpio_dt_spec cols[INST_DEMUX_GPIOS(n)]; \ }; \ \ struct kscan_gpio_data_##n { \ @@ -60,33 +45,16 @@ struct kscan_gpio_item_config { struct k_timer poll_timer; \ struct CHECK_DEBOUNCE_CFG(n, (k_work), (k_work_delayable)) work; \ bool matrix_state[INST_MATRIX_INPUTS(n)][INST_MATRIX_OUTPUTS(n)]; \ - const struct device *rows[INST_MATRIX_INPUTS(n)]; \ - const struct device *cols[INST_MATRIX_OUTPUTS(n)]; \ const struct device *dev; \ }; \ /* IO/GPIO SETUP */ \ - /* gpio_input_devices are PHYSICAL IO devices */ \ - static const struct device **kscan_gpio_input_devices_##n(const struct device *dev) { \ - struct kscan_gpio_data_##n *data = dev->data; \ - return data->rows; \ - } \ - \ - static const struct kscan_gpio_item_config *kscan_gpio_input_configs_##n( \ - const struct device *dev) { \ + static const struct gpio_dt_spec *kscan_gpio_input_specs_##n(const struct device *dev) { \ const struct kscan_gpio_config_##n *cfg = dev->config; \ return cfg->rows; \ } \ \ - /* gpio_output_devices are PHYSICAL IO devices */ \ - static const struct device **kscan_gpio_output_devices_##n(const struct device *dev) { \ - struct kscan_gpio_data_##n *data = dev->data; \ - return data->cols; \ - } \ - \ - static const struct kscan_gpio_item_config *kscan_gpio_output_configs_##n( \ - const struct device *dev) { \ + static const struct gpio_dt_spec *kscan_gpio_output_specs_##n(const struct device *dev) { \ const struct kscan_gpio_config_##n *cfg = dev->config; \ - /* If row2col, rows = outputs & cols = inputs */ \ return cfg->cols; \ } \ /* POLLING SETUP */ \ @@ -106,21 +74,16 @@ struct kscan_gpio_item_config { /* Iterate over bits and set GPIOs accordingly */ \ for (uint8_t bit = 0; bit < INST_DEMUX_GPIOS(n); bit++) { \ uint8_t state = (o & (0b1 << bit)) >> bit; \ - const struct device *out_dev = kscan_gpio_output_devices_##n(dev)[bit]; \ - const struct kscan_gpio_item_config *out_cfg = \ - &kscan_gpio_output_configs_##n(dev)[bit]; \ - gpio_pin_set(out_dev, out_cfg->pin, state); \ + const struct gpio_dt_spec *out_spec = &kscan_gpio_output_specs_##n(dev)[bit]; \ + gpio_pin_set_dt(out_spec, state); \ } \ /* Let the col settle before reading the rows */ \ k_usleep(1); \ \ for (int i = 0; i < INST_MATRIX_INPUTS(n); i++) { \ - /* Get the input device (port) */ \ - const struct device *in_dev = kscan_gpio_input_devices_##n(dev)[i]; \ - /* Get the input device config (pin) */ \ - const struct kscan_gpio_item_config *in_cfg = \ - &kscan_gpio_input_configs_##n(dev)[i]; \ - read_state[i][o] = gpio_pin_get(in_dev, in_cfg->pin) > 0; \ + /* Get the input spec */ \ + const struct gpio_dt_spec *in_spec = &kscan_gpio_input_specs_##n(dev)[i]; \ + read_state[i][o] = gpio_pin_get_dt(in_spec) > 0; \ } \ } \ for (int r = 0; r < INST_MATRIX_INPUTS(n); r++) { \ @@ -146,8 +109,7 @@ struct kscan_gpio_item_config { kscan_gpio_read_##n(data->dev); \ } \ \ - static struct kscan_gpio_data_##n kscan_gpio_data_##n = { \ - .rows = {[INST_MATRIX_INPUTS(n) - 1] = NULL}, .cols = {[INST_DEMUX_GPIOS(n) - 1] = NULL}}; \ + static struct kscan_gpio_data_##n kscan_gpio_data_##n = {}; \ \ /* KSCAN API configure function */ \ static int kscan_gpio_configure_##n(const struct device *dev, kscan_callback_t callback) { \ @@ -185,20 +147,18 @@ struct kscan_gpio_item_config { struct kscan_gpio_data_##n *data = dev->data; \ int err; \ /* configure input devices*/ \ - const struct device **input_devices = kscan_gpio_input_devices_##n(dev); \ for (int i = 0; i < INST_MATRIX_INPUTS(n); i++) { \ - const struct kscan_gpio_item_config *in_cfg = &kscan_gpio_input_configs_##n(dev)[i]; \ - input_devices[i] = device_get_binding(in_cfg->label); \ - if (!input_devices[i]) { \ + const struct gpio_dt_spec *in_spec = &kscan_gpio_input_specs_##n(dev)[i]; \ + if (!device_is_ready(in_spec->port)) { \ LOG_ERR("Unable to find input GPIO device"); \ return -EINVAL; \ } \ - err = gpio_pin_configure(input_devices[i], in_cfg->pin, GPIO_INPUT | in_cfg->flags); \ + err = gpio_pin_configure_dt(in_spec, GPIO_INPUT); \ if (err) { \ - LOG_ERR("Unable to configure pin %d on %s for input", in_cfg->pin, in_cfg->label); \ + LOG_ERR("Unable to configure pin %d for input", in_spec->pin); \ return err; \ } else { \ - LOG_DBG("Configured pin %d on %s for input", in_cfg->pin, in_cfg->label); \ + LOG_DBG("Configured pin %d for input", in_spec->pin); \ } \ if (err) { \ LOG_ERR("Error adding the callback to the column device"); \ @@ -206,22 +166,18 @@ struct kscan_gpio_item_config { } \ } \ /* configure output devices*/ \ - const struct device **output_devices = kscan_gpio_output_devices_##n(dev); \ for (int o = 0; o < INST_DEMUX_GPIOS(n); o++) { \ - const struct kscan_gpio_item_config *out_cfg = &kscan_gpio_output_configs_##n(dev)[o]; \ - output_devices[o] = device_get_binding(out_cfg->label); \ - if (!output_devices[o]) { \ + const struct gpio_dt_spec *out_spec = &kscan_gpio_output_specs_##n(dev)[o]; \ + if (!device_is_ready(out_spec->port)) { \ LOG_ERR("Unable to find output GPIO device"); \ return -EINVAL; \ } \ - err = gpio_pin_configure(output_devices[o], out_cfg->pin, \ - GPIO_OUTPUT_ACTIVE | out_cfg->flags); \ + err = gpio_pin_configure_dt(out_spec, GPIO_OUTPUT_ACTIVE); \ if (err) { \ - LOG_ERR("Unable to configure pin %d on %s for output", out_cfg->pin, \ - out_cfg->label); \ + LOG_ERR("Unable to configure pin %d for output", out_spec->pin); \ return err; \ } else { \ - LOG_DBG("Configured pin %d on %s for output", out_cfg->pin, out_cfg->label); \ + LOG_DBG("Configured pin %d for output", out_spec->pin); \ } \ } \ data->dev = dev; \ @@ -240,8 +196,8 @@ struct kscan_gpio_item_config { }; \ \ static const struct kscan_gpio_config_##n kscan_gpio_config_##n = { \ - .rows = {LISTIFY(INST_MATRIX_INPUTS(n), _KSCAN_GPIO_INPUT_CFG_INIT, (, ), n)}, \ - .cols = {LISTIFY(INST_DEMUX_GPIOS(n), _KSCAN_GPIO_OUTPUT_CFG_INIT, (, ), n)}, \ + .rows = {DT_FOREACH_PROP_ELEM(DT_DRV_INST(n), input_gpios, _KSCAN_GPIO_CFG_INIT)}, \ + .cols = {DT_FOREACH_PROP_ELEM(DT_DRV_INST(n), output_gpios, _KSCAN_GPIO_CFG_INIT)}, \ }; \ \ DEVICE_DT_INST_DEFINE(n, kscan_gpio_init_##n, NULL, &kscan_gpio_data_##n, \ diff --git a/app/drivers/sensor/battery/battery_voltage_divider.c b/app/drivers/sensor/battery/battery_voltage_divider.c index bc35d002..655af3db 100644 --- a/app/drivers/sensor/battery/battery_voltage_divider.c +++ b/app/drivers/sensor/battery/battery_voltage_divider.c @@ -8,9 +8,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include "battery_common.h" @@ -21,22 +21,15 @@ struct io_channel_config { uint8_t channel; }; -struct gpio_channel_config { - const char *label; - uint8_t pin; - uint8_t flags; -}; - struct bvd_config { struct io_channel_config io_channel; - struct gpio_channel_config power_gpios; + struct gpio_dt_spec power; uint32_t output_ohm; uint32_t full_ohm; }; struct bvd_data { const struct device *adc; - const struct device *gpio; struct adc_channel_cfg acc; struct adc_sequence as; struct battery_value value; @@ -56,19 +49,19 @@ static int bvd_sample_fetch(const struct device *dev, enum sensor_channel chan) int rc = 0; - // Enable power GPIO if present - if (drv_data->gpio) { - rc = gpio_pin_set(drv_data->gpio, drv_cfg->power_gpios.pin, 1); +#if DT_INST_NODE_HAS_PROP(0, power_gpios) + // Enable power before sampling + rc = gpio_pin_set_dt(&drv_cfg->power, 1); - if (rc != 0) { - LOG_DBG("Failed to enable ADC power GPIO: %d", rc); - return rc; - } - - // wait for any capacitance to charge up - k_sleep(K_MSEC(10)); + if (rc != 0) { + LOG_DBG("Failed to enable ADC power GPIO: %d", rc); + return rc; } + // wait for any capacitance to charge up + k_sleep(K_MSEC(10)); +#endif // DT_INST_NODE_HAS_PROP(0, power_gpios) + // Read ADC rc = adc_read(drv_data->adc, as); as->calibrate = false; @@ -90,15 +83,15 @@ static int bvd_sample_fetch(const struct device *dev, enum sensor_channel chan) LOG_DBG("Failed to read ADC: %d", rc); } +#if DT_INST_NODE_HAS_PROP(0, power_gpios) // Disable power GPIO if present - if (drv_data->gpio) { - int rc2 = gpio_pin_set(drv_data->gpio, drv_cfg->power_gpios.pin, 0); + int rc2 = gpio_pin_set_dt(&drv_cfg->power, 0); - if (rc2 != 0) { - LOG_DBG("Failed to disable ADC power GPIO: %d", rc2); - return rc2; - } + if (rc2 != 0) { + LOG_DBG("Failed to disable ADC power GPIO: %d", rc2); + return rc2; } +#endif // DT_INST_NODE_HAS_PROP(0, power_gpios) return rc; } @@ -125,20 +118,17 @@ static int bvd_init(const struct device *dev) { int rc = 0; - if (drv_cfg->power_gpios.label) { - drv_data->gpio = device_get_binding(drv_cfg->power_gpios.label); - if (drv_data->gpio == NULL) { - LOG_ERR("Failed to get GPIO %s", drv_cfg->power_gpios.label); - return -ENODEV; - } - rc = gpio_pin_configure(drv_data->gpio, drv_cfg->power_gpios.pin, - GPIO_OUTPUT_INACTIVE | drv_cfg->power_gpios.flags); - if (rc != 0) { - LOG_ERR("Failed to control feed %s.%u: %d", drv_cfg->power_gpios.label, - drv_cfg->power_gpios.pin, rc); - return rc; - } +#if DT_INST_NODE_HAS_PROP(0, power_gpios) + if (!device_is_ready(drv_cfg->power.port)) { + LOG_ERR("GPIO port for power control is not ready"); + return -ENODEV; } + rc = gpio_pin_configure_dt(&drv_cfg->power, GPIO_OUTPUT_INACTIVE); + if (rc != 0) { + LOG_ERR("Failed to control feed %u: %d", drv_cfg->power.pin, rc); + return rc; + } +#endif // DT_INST_NODE_HAS_PROP(0, power_gpios) drv_data->as = (struct adc_sequence){ .channels = BIT(0), @@ -175,12 +165,7 @@ static const struct bvd_config bvd_cfg = { DT_IO_CHANNELS_INPUT(DT_DRV_INST(0)), }, #if DT_INST_NODE_HAS_PROP(0, power_gpios) - .power_gpios = - { - DT_INST_GPIO_LABEL(0, power_gpios), - DT_INST_GPIO_PIN(0, power_gpios), - DT_INST_GPIO_FLAGS(0, power_gpios), - }, + .power = GPIO_DT_SPEC_INST_GET(0, power_gpios), #endif .output_ohm = DT_INST_PROP(0, output_ohms), .full_ohm = DT_INST_PROP(0, full_ohms), diff --git a/app/drivers/sensor/ec11/ec11.c b/app/drivers/sensor/ec11/ec11.c index 5f26ebc3..7091f73e 100644 --- a/app/drivers/sensor/ec11/ec11.c +++ b/app/drivers/sensor/ec11/ec11.c @@ -19,11 +19,9 @@ LOG_MODULE_REGISTER(EC11, CONFIG_SENSOR_LOG_LEVEL); static int ec11_get_ab_state(const struct device *dev) { - struct ec11_data *drv_data = dev->data; const struct ec11_config *drv_cfg = dev->config; - return (gpio_pin_get(drv_data->a, drv_cfg->a_pin) << 1) | - gpio_pin_get(drv_data->b, drv_cfg->b_pin); + return (gpio_pin_get_dt(&drv_cfg->a) << 1) | gpio_pin_get_dt(&drv_cfg->b); } static int ec11_sample_fetch(const struct device *dev, enum sensor_channel chan) { @@ -94,27 +92,25 @@ int ec11_init(const struct device *dev) { struct ec11_data *drv_data = dev->data; const struct ec11_config *drv_cfg = dev->config; - LOG_DBG("A: %s %d B: %s %d resolution %d", drv_cfg->a_label, drv_cfg->a_pin, drv_cfg->b_label, - drv_cfg->b_pin, drv_cfg->resolution); + LOG_DBG("A: %s %d B: %s %d resolution %d", drv_cfg->a.port->name, drv_cfg->a.pin, + drv_cfg->b.port->name, drv_cfg->b.pin, drv_cfg->resolution); - drv_data->a = device_get_binding(drv_cfg->a_label); - if (drv_data->a == NULL) { - LOG_ERR("Failed to get pointer to A GPIO device"); + if (!device_is_ready(drv_cfg->a.port)) { + LOG_ERR("A GPIO device is not ready"); return -EINVAL; } - drv_data->b = device_get_binding(drv_cfg->b_label); - if (drv_data->b == NULL) { - LOG_ERR("Failed to get pointer to B GPIO device"); + if (!device_is_ready(drv_cfg->b.port)) { + LOG_ERR("B GPIO device is not ready"); return -EINVAL; } - if (gpio_pin_configure(drv_data->a, drv_cfg->a_pin, drv_cfg->a_flags | GPIO_INPUT)) { + if (gpio_pin_configure_dt(&drv_cfg->a, GPIO_INPUT)) { LOG_DBG("Failed to configure A pin"); return -EIO; } - if (gpio_pin_configure(drv_data->b, drv_cfg->b_pin, drv_cfg->b_flags | GPIO_INPUT)) { + if (gpio_pin_configure_dt(&drv_cfg->b, GPIO_INPUT)) { LOG_DBG("Failed to configure B pin"); return -EIO; } @@ -134,12 +130,8 @@ int ec11_init(const struct device *dev) { #define EC11_INST(n) \ struct ec11_data ec11_data_##n; \ const struct ec11_config ec11_cfg_##n = { \ - .a_label = DT_INST_GPIO_LABEL(n, a_gpios), \ - .a_pin = DT_INST_GPIO_PIN(n, a_gpios), \ - .a_flags = DT_INST_GPIO_FLAGS(n, a_gpios), \ - .b_label = DT_INST_GPIO_LABEL(n, b_gpios), \ - .b_pin = DT_INST_GPIO_PIN(n, b_gpios), \ - .b_flags = DT_INST_GPIO_FLAGS(n, b_gpios), \ + .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))), \ }; \ DEVICE_DT_INST_DEFINE(n, ec11_init, NULL, &ec11_data_##n, &ec11_cfg_##n, POST_KERNEL, \ diff --git a/app/drivers/sensor/ec11/ec11.h b/app/drivers/sensor/ec11/ec11.h index 04750df5..82c21572 100644 --- a/app/drivers/sensor/ec11/ec11.h +++ b/app/drivers/sensor/ec11/ec11.h @@ -11,20 +11,13 @@ #include struct ec11_config { - const char *a_label; - const uint8_t a_pin; - const uint8_t a_flags; - - const char *b_label; - const uint8_t b_pin; - const uint8_t b_flags; + const struct gpio_dt_spec a; + const struct gpio_dt_spec b; const uint8_t resolution; }; struct ec11_data { - const struct device *a; - const struct device *b; uint8_t ab_state; int8_t pulses; int8_t ticks; diff --git a/app/drivers/sensor/ec11/ec11_trigger.c b/app/drivers/sensor/ec11/ec11_trigger.c index 804a21d9..f9384a66 100644 --- a/app/drivers/sensor/ec11/ec11_trigger.c +++ b/app/drivers/sensor/ec11/ec11_trigger.c @@ -20,18 +20,15 @@ extern struct ec11_data ec11_driver; LOG_MODULE_DECLARE(EC11, CONFIG_SENSOR_LOG_LEVEL); static inline void setup_int(const struct device *dev, bool enable) { - struct ec11_data *data = dev->data; const struct ec11_config *cfg = dev->config; LOG_DBG("enabled %s", (enable ? "true" : "false")); - if (gpio_pin_interrupt_configure(data->a, cfg->a_pin, - enable ? GPIO_INT_EDGE_BOTH : GPIO_INT_DISABLE)) { + if (gpio_pin_interrupt_configure_dt(&cfg->a, enable ? GPIO_INT_EDGE_BOTH : GPIO_INT_DISABLE)) { LOG_WRN("Unable to set A pin GPIO interrupt"); } - if (gpio_pin_interrupt_configure(data->b, cfg->b_pin, - enable ? GPIO_INT_EDGE_BOTH : GPIO_INT_DISABLE)) { + if (gpio_pin_interrupt_configure_dt(&cfg->b, enable ? GPIO_INT_EDGE_BOTH : GPIO_INT_DISABLE)) { LOG_WRN("Unable to set A pin GPIO interrupt"); } } @@ -121,16 +118,16 @@ int ec11_init_interrupt(const struct device *dev) { drv_data->dev = dev; /* setup gpio interrupt */ - gpio_init_callback(&drv_data->a_gpio_cb, ec11_a_gpio_callback, BIT(drv_cfg->a_pin)); + gpio_init_callback(&drv_data->a_gpio_cb, ec11_a_gpio_callback, BIT(drv_cfg->a.pin)); - if (gpio_add_callback(drv_data->a, &drv_data->a_gpio_cb) < 0) { + if (gpio_add_callback(drv_cfg->a.port, &drv_data->a_gpio_cb) < 0) { LOG_DBG("Failed to set A callback!"); return -EIO; } - gpio_init_callback(&drv_data->b_gpio_cb, ec11_b_gpio_callback, BIT(drv_cfg->b_pin)); + gpio_init_callback(&drv_data->b_gpio_cb, ec11_b_gpio_callback, BIT(drv_cfg->b.pin)); - if (gpio_add_callback(drv_data->b, &drv_data->b_gpio_cb) < 0) { + if (gpio_add_callback(drv_cfg->b.port, &drv_data->b_gpio_cb) < 0) { LOG_DBG("Failed to set B callback!"); return -EIO; } diff --git a/app/drivers/zephyr/dts/bindings/gpio/microchip,mcp23017.yaml b/app/drivers/zephyr/dts/bindings/gpio/microchip,mcp23017.yaml deleted file mode 100644 index 75e19c49..00000000 --- a/app/drivers/zephyr/dts/bindings/gpio/microchip,mcp23017.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (c) 2020 Geanix ApS -# -# SPDX-License-Identifier: Apache-2.0 -# - -description: > - This is a representation of the Microchip MCP23017 I2C Gpio Expander. - -compatible: "microchip,mcp23017" - -include: [gpio-controller.yaml, i2c-device.yaml] - -properties: - label: - required: true - - "#gpio-cells": - const: 2 - - ngpios: - type: int - required: true - const: 16 - description: Number of gpios supported - -gpio-cells: - - pin - - flags diff --git a/app/drivers/zephyr/dts/bindings/gpio/zmk,gpio-595.yaml b/app/drivers/zephyr/dts/bindings/gpio/zmk,gpio-595.yaml index 43fa7511..605c969d 100644 --- a/app/drivers/zephyr/dts/bindings/gpio/zmk,gpio-595.yaml +++ b/app/drivers/zephyr/dts/bindings/gpio/zmk,gpio-595.yaml @@ -12,9 +12,6 @@ compatible: "zmk,gpio-595" include: [gpio-controller.yaml, spi-device.yaml] properties: - label: - required: true - "#gpio-cells": const: 2 diff --git a/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml b/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml index a8904360..28b7541b 100644 --- a/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml +++ b/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml @@ -4,8 +4,3 @@ description: Battery SoC monitoring using nRF VDDH compatible: "zmk,battery-nrf-vddh" - -properties: - label: - required: true - type: string diff --git a/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-voltage-divider.yaml b/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-voltage-divider.yaml index c4c6f80c..d9e07b79 100644 --- a/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-voltage-divider.yaml +++ b/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-voltage-divider.yaml @@ -6,8 +6,3 @@ description: Battery SoC monitoring using voltage divider compatible: "zmk,battery-voltage-divider" include: voltage-divider.yaml - -properties: - label: - required: true - type: string diff --git a/app/include/zmk/keymap.h b/app/include/zmk/keymap.h index 1195b943..a47cd505 100644 --- a/app/include/zmk/keymap.h +++ b/app/include/zmk/keymap.h @@ -25,7 +25,7 @@ int zmk_keymap_position_state_changed(uint8_t source, uint32_t position, bool pr #define ZMK_KEYMAP_EXTRACT_BINDING(idx, drv_inst) \ { \ - .behavior_dev = DT_LABEL(DT_PHANDLE_BY_IDX(drv_inst, bindings, idx)), \ + .behavior_dev = DT_PROP(DT_PHANDLE_BY_IDX(drv_inst, bindings, idx), label), \ .param1 = COND_CODE_0(DT_PHA_HAS_CELL_AT_IDX(drv_inst, bindings, idx, param1), (0), \ (DT_PHA_BY_IDX(drv_inst, bindings, idx, param1))), \ .param2 = COND_CODE_0(DT_PHA_HAS_CELL_AT_IDX(drv_inst, bindings, idx, param2), (0), \ diff --git a/app/include/zmk/kscan.h b/app/include/zmk/kscan.h index 33526008..eebe41e7 100644 --- a/app/include/zmk/kscan.h +++ b/app/include/zmk/kscan.h @@ -6,4 +6,6 @@ #pragma once -int zmk_kscan_init(char *name); +#include + +int zmk_kscan_init(const struct device *dev); diff --git a/app/src/activity.c b/app/src/activity.c index 41fe2e15..46af56fb 100644 --- a/app/src/activity.c +++ b/app/src/activity.c @@ -74,8 +74,8 @@ void activity_work_handler(struct k_work *work) { } else #endif /* IS_ENABLED(CONFIG_ZMK_SLEEP) */ if (inactive_time > MAX_IDLE_MS) { - set_state(ZMK_ACTIVITY_IDLE); - } + set_state(ZMK_ACTIVITY_IDLE); + } } K_WORK_DEFINE(activity_work, activity_work_handler); diff --git a/app/src/behavior_queue.c b/app/src/behavior_queue.c index 971816f2..1511e755 100644 --- a/app/src/behavior_queue.c +++ b/app/src/behavior_queue.c @@ -28,8 +28,8 @@ static void behavior_queue_process_next(struct k_work *work) { struct q_item item = {.wait = 0}; while (k_msgq_get(&zmk_behavior_queue_msgq, &item, K_NO_WAIT) == 0) { - LOG_DBG("Invoking %s: 0x%02x 0x%02x", item.binding.behavior_dev, - item.binding.param1, item.binding.param2); + LOG_DBG("Invoking %s: 0x%02x 0x%02x", item.binding.behavior_dev, item.binding.param1, + item.binding.param2); struct zmk_behavior_binding_event event = {.position = item.position, .timestamp = k_uptime_get()}; diff --git a/app/src/behaviors/behavior_bt.c b/app/src/behaviors/behavior_bt.c index 71cf2322..6d44b5f5 100644 --- a/app/src/behaviors/behavior_bt.c +++ b/app/src/behaviors/behavior_bt.c @@ -16,7 +16,6 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include - #include #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) diff --git a/app/src/behaviors/behavior_caps_word.c b/app/src/behaviors/behavior_caps_word.c index 8ee5bb5c..4c9fd711 100644 --- a/app/src/behaviors/behavior_caps_word.c +++ b/app/src/behaviors/behavior_caps_word.c @@ -166,9 +166,10 @@ static int behavior_caps_word_init(const struct device *dev) { #define CAPS_WORD_LABEL(i, _n) DT_INST_LABEL(i) #define PARSE_BREAK(i) \ - {.page = ZMK_HID_USAGE_PAGE(i), \ - .id = ZMK_HID_USAGE_ID(i), \ - .implicit_modifiers = SELECT_MODS(i)} + { \ + .page = ZMK_HID_USAGE_PAGE(i), .id = ZMK_HID_USAGE_ID(i), \ + .implicit_modifiers = SELECT_MODS(i) \ + } #define BREAK_ITEM(i, n) PARSE_BREAK(DT_INST_PROP_BY_IDX(n, continue_list, i)) @@ -177,7 +178,7 @@ static int behavior_caps_word_init(const struct device *dev) { static struct behavior_caps_word_config behavior_caps_word_config_##n = { \ .index = n, \ .mods = DT_INST_PROP_OR(n, mods, MOD_LSFT), \ - .continuations = {LISTIFY(DT_INST_PROP_LEN(n, continue_list), BREAK_ITEM, (,), n)}, \ + .continuations = {LISTIFY(DT_INST_PROP_LEN(n, continue_list), BREAK_ITEM, (, ), n)}, \ .continuations_count = DT_INST_PROP_LEN(n, continue_list), \ }; \ DEVICE_DT_INST_DEFINE(n, behavior_caps_word_init, NULL, &behavior_caps_word_data_##n, \ diff --git a/app/src/behaviors/behavior_hold_tap.c b/app/src/behaviors/behavior_hold_tap.c index 6ea2fe97..30350ef2 100644 --- a/app/src/behaviors/behavior_hold_tap.c +++ b/app/src/behaviors/behavior_hold_tap.c @@ -700,8 +700,8 @@ static int behavior_hold_tap_init(const struct device *dev) { #define KP_INST(n) \ static struct behavior_hold_tap_config behavior_hold_tap_config_##n = { \ .tapping_term_ms = DT_INST_PROP(n, tapping_term_ms), \ - .hold_behavior_dev = DT_LABEL(DT_INST_PHANDLE_BY_IDX(n, bindings, 0)), \ - .tap_behavior_dev = DT_LABEL(DT_INST_PHANDLE_BY_IDX(n, bindings, 1)), \ + .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), \ .flavor = DT_ENUM_IDX(DT_DRV_INST(n), flavor), \ diff --git a/app/src/behaviors/behavior_macro.c b/app/src/behaviors/behavior_macro.c index c86d732a..e84f1fc8 100644 --- a/app/src/behaviors/behavior_macro.c +++ b/app/src/behaviors/behavior_macro.c @@ -44,13 +44,13 @@ struct behavior_macro_config { struct zmk_behavior_binding bindings[]; }; -#define TAP_MODE DT_LABEL(DT_INST(0, zmk_macro_control_mode_tap)) -#define PRESS_MODE DT_LABEL(DT_INST(0, zmk_macro_control_mode_press)) -#define REL_MODE DT_LABEL(DT_INST(0, zmk_macro_control_mode_release)) +#define TAP_MODE DT_PROP(DT_INST(0, zmk_macro_control_mode_tap), label) +#define PRESS_MODE DT_PROP(DT_INST(0, zmk_macro_control_mode_press), label) +#define REL_MODE DT_PROP(DT_INST(0, zmk_macro_control_mode_release), label) -#define TAP_TIME DT_LABEL(DT_INST(0, zmk_macro_control_tap_time)) -#define WAIT_TIME DT_LABEL(DT_INST(0, zmk_macro_control_wait_time)) -#define WAIT_REL DT_LABEL(DT_INST(0, zmk_macro_pause_for_release)) +#define TAP_TIME DT_PROP(DT_INST(0, zmk_macro_control_tap_time), label) +#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 ZM_IS_NODE_MATCH(a, b) (strcmp(a, b) == 0) #define IS_TAP_MODE(dev) ZM_IS_NODE_MATCH(dev, TAP_MODE) @@ -169,7 +169,7 @@ static const struct behavior_driver_api behavior_macro_driver_api = { #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)}, + {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 = {}; \ diff --git a/app/src/behaviors/behavior_mod_morph.c b/app/src/behaviors/behavior_mod_morph.c index e5ba346e..d540abd9 100644 --- a/app/src/behaviors/behavior_mod_morph.c +++ b/app/src/behaviors/behavior_mod_morph.c @@ -81,7 +81,7 @@ static int behavior_mod_morph_init(const struct device *dev) { return 0; } #define _TRANSFORM_ENTRY(idx, node) \ { \ - .behavior_dev = DT_LABEL(DT_INST_PHANDLE_BY_IDX(node, bindings, idx)), \ + .behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(node, bindings, idx), label), \ .param1 = COND_CODE_0(DT_INST_PHA_HAS_CELL_AT_IDX(node, bindings, idx, param1), (0), \ (DT_INST_PHA_BY_IDX(node, bindings, idx, param1))), \ .param2 = COND_CODE_0(DT_INST_PHA_HAS_CELL_AT_IDX(node, bindings, idx, param2), (0), \ diff --git a/app/src/behaviors/behavior_tap_dance.c b/app/src/behaviors/behavior_tap_dance.c index ddb4aeab..fc685124 100644 --- a/app/src/behaviors/behavior_tap_dance.c +++ b/app/src/behaviors/behavior_tap_dance.c @@ -240,7 +240,7 @@ static int behavior_tap_dance_init(const struct device *dev) { #define _TRANSFORM_ENTRY(idx, node) ZMK_KEYMAP_EXTRACT_BINDING(idx, node) #define TRANSFORMED_BINDINGS(node) \ - { LISTIFY(DT_INST_PROP_LEN(node, bindings), _TRANSFORM_ENTRY, (,), DT_DRV_INST(node)) } + { LISTIFY(DT_INST_PROP_LEN(node, bindings), _TRANSFORM_ENTRY, (, ), DT_DRV_INST(node)) } #define KP_INST(n) \ static struct zmk_behavior_binding \ diff --git a/app/src/display/main.c b/app/src/display/main.c index 52fa3c69..e34f8a53 100644 --- a/app/src/display/main.c +++ b/app/src/display/main.c @@ -12,7 +12,7 @@ #include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); -#include +#include #include #include "theme.h" @@ -21,9 +21,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include -#define ZMK_DISPLAY_NAME CONFIG_LV_Z_DISPLAY_DEV_NAME - -static const struct device *display; +static const struct device *display = DEVICE_DT_GET(DT_CHOSEN(zephyr_display)); static bool initialized = false; static lv_obj_t *screen; @@ -103,8 +101,7 @@ static void initialize_theme() { void initialize_display(struct k_work *work) { LOG_DBG(""); - display = device_get_binding(ZMK_DISPLAY_NAME); - if (display == NULL) { + if (!device_is_ready(display)) { LOG_ERR("Failed to find display device"); return; } @@ -165,4 +162,4 @@ int display_event_handler(const zmk_event_t *eh) { ZMK_LISTENER(display, display_event_handler); ZMK_SUBSCRIPTION(display, zmk_activity_state_changed); -#endif /* IS_ENABLED(CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE) */ \ No newline at end of file +#endif /* IS_ENABLED(CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE) */ diff --git a/app/src/ext_power_generic.c b/app/src/ext_power_generic.c index 654f683f..e35714da 100644 --- a/app/src/ext_power_generic.c +++ b/app/src/ext_power_generic.c @@ -22,14 +22,11 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); struct ext_power_generic_config { - const char *label; - const uint8_t pin; - const uint8_t flags; + const struct gpio_dt_spec control; const uint16_t init_delay_ms; }; struct ext_power_generic_data { - const struct device *gpio; bool status; #if IS_ENABLED(CONFIG_SETTINGS) bool settings_init; @@ -39,10 +36,10 @@ struct ext_power_generic_data { #if IS_ENABLED(CONFIG_SETTINGS) static void ext_power_save_state_work(struct k_work *work) { char setting_path[40]; - const struct device *ext_power = device_get_binding(DT_INST_LABEL(0)); + const struct device *ext_power = DEVICE_DT_GET(DT_DRV_INST(0)); struct ext_power_generic_data *data = ext_power->data; - snprintf(setting_path, 40, "ext_power/state/%s", DT_INST_LABEL(0)); + snprintf(setting_path, 40, "ext_power/state/%s", DT_INST_PROP(0, label)); settings_save_one(setting_path, &data->status, sizeof(data->status)); } @@ -62,7 +59,7 @@ static int ext_power_generic_enable(const struct device *dev) { struct ext_power_generic_data *data = dev->data; const struct ext_power_generic_config *config = dev->config; - if (gpio_pin_set(data->gpio, config->pin, 1)) { + if (gpio_pin_set_dt(&config->control, 1)) { LOG_WRN("Failed to set ext-power control pin"); return -EIO; } @@ -74,7 +71,8 @@ static int ext_power_generic_disable(const struct device *dev) { struct ext_power_generic_data *data = dev->data; const struct ext_power_generic_config *config = dev->config; - if (gpio_pin_set(data->gpio, config->pin, 0)) { + if (gpio_pin_set_dt(&config->control, 0)) { + LOG_WRN("Failed to set ext-power control pin"); LOG_WRN("Failed to clear ext-power control pin"); return -EIO; } @@ -93,7 +91,7 @@ static int ext_power_settings_set(const char *name, size_t len, settings_read_cb const char *next; int rc; - if (settings_name_steq(name, DT_INST_LABEL(0), &next) && !next) { + if (settings_name_steq(name, DT_INST_PROP(0, label), &next) && !next) { const struct device *ext_power = DEVICE_DT_GET(DT_DRV_INST(0)); struct ext_power_generic_data *data = ext_power->data; @@ -106,7 +104,7 @@ static int ext_power_settings_set(const char *name, size_t len, settings_read_cb data->settings_init = true; if (ext_power == NULL) { - LOG_ERR("Unable to retrieve ext_power device: %s", DT_INST_LABEL(0)); + LOG_ERR("Unable to retrieve ext_power device: %s", DT_INST_PROP(0, label)); return -EIO; } @@ -131,13 +129,7 @@ static int ext_power_generic_init(const struct device *dev) { struct ext_power_generic_data *data = dev->data; const struct ext_power_generic_config *config = dev->config; - data->gpio = device_get_binding(config->label); - if (data->gpio == NULL) { - LOG_ERR("Failed to get ext-power control device"); - return -EINVAL; - } - - if (gpio_pin_configure(data->gpio, config->pin, config->flags | GPIO_OUTPUT)) { + if (gpio_pin_configure_dt(&config->control, GPIO_OUTPUT_INACTIVE)) { LOG_ERR("Failed to configure ext-power control pin"); return -EIO; } @@ -190,9 +182,7 @@ static int ext_power_generic_pm_action(const struct device *dev, enum pm_device_ #endif /* CONFIG_PM_DEVICE */ static const struct ext_power_generic_config config = { - .label = DT_INST_GPIO_LABEL(0, control_gpios), - .pin = DT_INST_GPIO_PIN(0, control_gpios), - .flags = DT_INST_GPIO_FLAGS(0, control_gpios), + .control = GPIO_DT_SPEC_INST_GET(0, control_gpios), .init_delay_ms = DT_INST_PROP_OR(0, init_delay_ms, 0)}; static struct ext_power_generic_data data = { diff --git a/app/src/keymap.c b/app/src/keymap.c index 99483592..c4e304d4 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -42,7 +42,7 @@ static uint8_t _zmk_keymap_layer_default = 0; #if ZMK_KEYMAP_HAS_SENSORS #define _TRANSFORM_SENSOR_ENTRY(idx, layer) \ { \ - .behavior_dev = DT_LABEL(DT_PHANDLE_BY_IDX(layer, sensor_bindings, idx)), \ + .behavior_dev = DT_PROP(DT_PHANDLE_BY_IDX(layer, sensor_bindings, idx), label), \ .param1 = COND_CODE_0(DT_PHA_HAS_CELL_AT_IDX(layer, sensor_bindings, idx, param1), (0), \ (DT_PHA_BY_IDX(layer, sensor_bindings, idx, param1))), \ .param2 = COND_CODE_0(DT_PHA_HAS_CELL_AT_IDX(layer, sensor_bindings, idx, param2), (0), \ @@ -57,7 +57,8 @@ static uint8_t _zmk_keymap_layer_default = 0; #endif /* ZMK_KEYMAP_HAS_SENSORS */ -#define LAYER_LABEL(node) COND_CODE_0(DT_NODE_HAS_PROP(node, label), (NULL), (DT_LABEL(node))), +#define LAYER_LABEL(node) \ + COND_CODE_0(DT_NODE_HAS_PROP(node, label), (NULL), (DT_PROP(node, label))), // State diff --git a/app/src/kscan.c b/app/src/kscan.c index f9db8b1c..b0713320 100644 --- a/app/src/kscan.c +++ b/app/src/kscan.c @@ -58,8 +58,7 @@ void zmk_kscan_process_msgq(struct k_work *item) { } } -int zmk_kscan_init(char *name) { - const struct device *dev = device_get_binding(name); +int zmk_kscan_init(const struct device *dev) { if (dev == NULL) { LOG_ERR("Failed to get the KSCAN device"); return -EINVAL; diff --git a/app/src/main.c b/app/src/main.c index 8ea67057..3fd6b116 100644 --- a/app/src/main.c +++ b/app/src/main.c @@ -17,12 +17,10 @@ LOG_MODULE_REGISTER(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include -#define ZMK_KSCAN_DEV DT_LABEL(ZMK_MATRIX_NODE_ID) - void main(void) { LOG_INF("Welcome to ZMK!\n"); - if (zmk_kscan_init(ZMK_KSCAN_DEV) != 0) { + if (zmk_kscan_init(DEVICE_DT_GET(ZMK_MATRIX_NODE_ID)) != 0) { return; } diff --git a/app/src/rgb_underglow.c b/app/src/rgb_underglow.c index 47c3658e..0ed2087a 100644 --- a/app/src/rgb_underglow.c +++ b/app/src/rgb_underglow.c @@ -27,8 +27,14 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); -#define STRIP_LABEL DT_LABEL(DT_CHOSEN(zmk_underglow)) -#define STRIP_NUM_PIXELS DT_PROP(DT_CHOSEN(zmk_underglow), chain_length) +#if !DT_CHOSEN(zmk_underglow) + +#error "A zmk,underglow chosen node must be declared" + +#endif + +#define STRIP_CHOSEN DT_CHOSEN(zmk_underglow) +#define STRIP_NUM_PIXELS DT_PROP(STRIP_CHOSEN, chain_length) #define HUE_MAX 360 #define SAT_MAX 100 @@ -230,13 +236,7 @@ static struct k_work_delayable underglow_save_work; #endif static int zmk_rgb_underglow_init(const struct device *_arg) { - led_strip = device_get_binding(STRIP_LABEL); - if (led_strip) { - LOG_INF("Found LED strip device %s", STRIP_LABEL); - } else { - LOG_ERR("LED strip device %s not found", STRIP_LABEL); - return -EINVAL; - } + led_strip = DEVICE_DT_GET(STRIP_CHOSEN); #if IS_ENABLED(CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER) ext_power = device_get_binding("EXT_POWER"); diff --git a/app/src/sensors.c b/app/src/sensors.c index 9873de4f..efae2bd9 100644 --- a/app/src/sensors.c +++ b/app/src/sensors.c @@ -65,7 +65,8 @@ static void zmk_sensors_init_item(const char *node, uint8_t i, uint8_t abs_i) { sensor_trigger_set(sensors[i].dev, &sensors[i].trigger, zmk_sensors_trigger_handler); } -#define _SENSOR_INIT(node) zmk_sensors_init_item(DT_LABEL(node), local_index++, absolute_index++); +#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++;)) diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index 5b952dfc..ac073c59 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -377,8 +377,7 @@ static bool split_central_eir_found(struct bt_data *data, void *user_data) { bt_uuid_to_str(&uuid.uuid, uuid_str, sizeof(uuid_str)); bt_uuid_to_str(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SERVICE_UUID), service_uuid_str, sizeof(service_uuid_str)); - LOG_DBG("UUID %s does not match split UUID: %s", uuid_str, - service_uuid_str); + LOG_DBG("UUID %s does not match split UUID: %s", uuid_str, service_uuid_str); continue; } @@ -433,8 +432,7 @@ static void split_central_device_found(const bt_addr_le_t *addr, int8_t rssi, ui char dev[BT_ADDR_LE_STR_LEN]; bt_addr_le_to_str(addr, dev, sizeof(dev)); - LOG_DBG("[DEVICE]: %s, AD evt type %u, AD data len %u, RSSI %i", dev, type, ad->len, - rssi); + 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) { diff --git a/app/src/split/bluetooth/service.c b/app/src/split/bluetooth/service.c index fa4b7718..f7b0d587 100644 --- a/app/src/split/bluetooth/service.c +++ b/app/src/split/bluetooth/service.c @@ -60,8 +60,8 @@ static ssize_t split_svc_run_behavior(struct bt_conn *conn, const struct bt_gatt .param2 = payload->data.param2, .behavior_dev = payload->behavior_dev, }; - LOG_DBG("%s with params %d %d: pressed? %d", binding.behavior_dev, - binding.param1, binding.param2, payload->data.state); + LOG_DBG("%s with params %d %d: pressed? %d", binding.behavior_dev, binding.param1, + binding.param2, payload->data.state); struct zmk_behavior_binding_event event = {.position = payload->data.position, .timestamp = k_uptime_get()}; int err; diff --git a/docs/docs/development/new-behavior.md b/docs/docs/development/new-behavior.md index e65bb296..6d026f2b 100644 --- a/docs/docs/development/new-behavior.md +++ b/docs/docs/development/new-behavior.md @@ -258,8 +258,8 @@ An example of this can be seen below, taking the `#define KP_INST(n)` from the h #define KP_INST(n) \ static struct behavior_hold_tap_config behavior_hold_tap_config_##n = { \ .tapping_term_ms = DT_INST_PROP(n, tapping_term_ms), \ - .hold_behavior_dev = DT_LABEL(DT_INST_PHANDLE_BY_IDX(n, bindings, 0)), \ - .tap_behavior_dev = DT_LABEL(DT_INST_PHANDLE_BY_IDX(n, bindings, 1)), \ + .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), \ .flavor = DT_ENUM_IDX(DT_DRV_INST(n), flavor), \ .retro_tap = DT_INST_PROP(n, retro_tap), \ From 4ff1a4d3ea98390325e6330802e56381f9e910d5 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 8 Oct 2022 01:52:25 -0400 Subject: [PATCH 26/64] refactor: Move to updated Docker images. --- .devcontainer/Dockerfile | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/hardware-metadata-validation.yml | 2 +- .github/workflows/test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 21a7fd5a..5b69e180 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/zmkfirmware/zmk-dev-arm:3.0 +FROM docker.io/zmkfirmware/zmk-dev-arm:3.2 COPY .bashrc tmp RUN mv /tmp/.bashrc ~/.bashrc diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6305b741..f472f755 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: if: ${{ always() }} runs-on: ubuntu-latest container: - image: docker.io/zmkfirmware/zmk-build-arm:3.0 + image: docker.io/zmkfirmware/zmk-build-arm:3.2 needs: compile-matrix strategy: matrix: diff --git a/.github/workflows/hardware-metadata-validation.yml b/.github/workflows/hardware-metadata-validation.yml index c6566feb..4b10a28b 100644 --- a/.github/workflows/hardware-metadata-validation.yml +++ b/.github/workflows/hardware-metadata-validation.yml @@ -29,7 +29,7 @@ jobs: validate-metadata: runs-on: ubuntu-latest container: - image: docker.io/zmkfirmware/zmk-dev-arm:3.0 + image: docker.io/zmkfirmware/zmk-dev-arm:3.2 steps: - uses: actions/checkout@v3 - name: Install dependencies diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 38c61eea..e8a9d220 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }} runs-on: ubuntu-latest container: - image: docker.io/zmkfirmware/zmk-build-arm:3.0 + image: docker.io/zmkfirmware/zmk-build-arm:3.2 steps: - name: Checkout uses: actions/checkout@v3 From 31f664ffec0e90fe2123e1dfcaca4b34654d4714 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 23 Dec 2021 23:45:29 -0500 Subject: [PATCH 27/64] fix(boards): Base config/overlay for rp2040 boards Baseline config and overlay for the following: * `rpi_pico` * `adafruit_kb2040` * `sparkfun_pro_micro_rp2040` * `adafruit_qt_py_rp2040` * `seeeduino_xiao_rp2040` * `boardsource_blok` * `01space_rp2040_042lcd` Co-authored-by: Joel Spadin --- app/boards/01space_rp2040_042lcd.conf | 6 ++++++ app/boards/01space_rp2040_042lcd.overlay | 9 +++++++++ app/boards/adafruit_kb2040.conf | 4 ++++ app/boards/adafruit_kb2040.overlay | 9 +++++++++ app/boards/adafruit_qt_py_rp2040.conf | 4 ++++ app/boards/adafruit_qt_py_rp2040.overlay | 9 +++++++++ .../adafruit_kb2040/adafruit_kb2040.zmk.yml | 9 +++++++++ .../adafruit_qt_py_rp2040.zmk.yml | 9 +++++++++ .../boardsource_blok/boardsource_blok.zmk.yml | 9 +++++++++ .../seeeduino_xiao_rp2040.zmk.yml | 9 +++++++++ .../sparkfun_pro_micro_rp2040.zmk.yml | 9 +++++++++ app/boards/boardsource_blok.conf | 4 ++++ app/boards/boardsource_blok.overlay | 9 +++++++++ app/boards/rpi_pico.conf | 5 +++++ app/boards/rpi_pico.overlay | 8 ++++++++ app/boards/seeeduino_xiao_rp2040.conf | 4 ++++ app/boards/seeeduino_xiao_rp2040.overlay | 9 +++++++++ app/boards/sparkfun_pro_micro_rp2040.conf | 4 ++++ app/boards/sparkfun_pro_micro_rp2040.overlay | 9 +++++++++ app/boards/usb_console.dtsi | 20 +++++++++++++++++++ 20 files changed, 158 insertions(+) create mode 100644 app/boards/01space_rp2040_042lcd.conf create mode 100644 app/boards/01space_rp2040_042lcd.overlay create mode 100644 app/boards/adafruit_kb2040.conf create mode 100644 app/boards/adafruit_kb2040.overlay create mode 100644 app/boards/adafruit_qt_py_rp2040.conf create mode 100644 app/boards/adafruit_qt_py_rp2040.overlay create mode 100644 app/boards/arm/adafruit_kb2040/adafruit_kb2040.zmk.yml create mode 100644 app/boards/arm/adafruit_qt_py_rp2040/adafruit_qt_py_rp2040.zmk.yml create mode 100644 app/boards/arm/boardsource_blok/boardsource_blok.zmk.yml create mode 100644 app/boards/arm/seeeduino_xiao_rp2040/seeeduino_xiao_rp2040.zmk.yml create mode 100644 app/boards/arm/sparkfun_pro_micro_rp2040/sparkfun_pro_micro_rp2040.zmk.yml create mode 100644 app/boards/boardsource_blok.conf create mode 100644 app/boards/boardsource_blok.overlay create mode 100644 app/boards/rpi_pico.conf create mode 100644 app/boards/rpi_pico.overlay create mode 100644 app/boards/seeeduino_xiao_rp2040.conf create mode 100644 app/boards/seeeduino_xiao_rp2040.overlay create mode 100644 app/boards/sparkfun_pro_micro_rp2040.conf create mode 100644 app/boards/sparkfun_pro_micro_rp2040.overlay create mode 100644 app/boards/usb_console.dtsi diff --git a/app/boards/01space_rp2040_042lcd.conf b/app/boards/01space_rp2040_042lcd.conf new file mode 100644 index 00000000..c520a3b7 --- /dev/null +++ b/app/boards/01space_rp2040_042lcd.conf @@ -0,0 +1,6 @@ +CONFIG_ZMK_DISPLAY=y +CONFIG_LV_FONT_UNSCII_8=n +CONFIG_ZMK_USB=y +CONFIG_I2C=y +CONFIG_I2C_DW=y +CONFIG_LV_Z_VDB_SIZE=50 diff --git a/app/boards/01space_rp2040_042lcd.overlay b/app/boards/01space_rp2040_042lcd.overlay new file mode 100644 index 00000000..d89e53f4 --- /dev/null +++ b/app/boards/01space_rp2040_042lcd.overlay @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "usb_console.dtsi" + +&xiao_serial { status = "disabled"; }; diff --git a/app/boards/adafruit_kb2040.conf b/app/boards/adafruit_kb2040.conf new file mode 100644 index 00000000..21c1893d --- /dev/null +++ b/app/boards/adafruit_kb2040.conf @@ -0,0 +1,4 @@ +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_ZMK_USB=y diff --git a/app/boards/adafruit_kb2040.overlay b/app/boards/adafruit_kb2040.overlay new file mode 100644 index 00000000..b14e0d04 --- /dev/null +++ b/app/boards/adafruit_kb2040.overlay @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "usb_console.dtsi" + +&pro_micro_serial { status = "disabled"; }; diff --git a/app/boards/adafruit_qt_py_rp2040.conf b/app/boards/adafruit_qt_py_rp2040.conf new file mode 100644 index 00000000..21c1893d --- /dev/null +++ b/app/boards/adafruit_qt_py_rp2040.conf @@ -0,0 +1,4 @@ +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_ZMK_USB=y diff --git a/app/boards/adafruit_qt_py_rp2040.overlay b/app/boards/adafruit_qt_py_rp2040.overlay new file mode 100644 index 00000000..d89e53f4 --- /dev/null +++ b/app/boards/adafruit_qt_py_rp2040.overlay @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "usb_console.dtsi" + +&xiao_serial { status = "disabled"; }; diff --git a/app/boards/arm/adafruit_kb2040/adafruit_kb2040.zmk.yml b/app/boards/arm/adafruit_kb2040/adafruit_kb2040.zmk.yml new file mode 100644 index 00000000..c8973f5c --- /dev/null +++ b/app/boards/arm/adafruit_kb2040/adafruit_kb2040.zmk.yml @@ -0,0 +1,9 @@ +file_format: "1" +id: adafruit_kb2040 +name: Adafruit KB2040 +type: board +arch: arm +outputs: + - usb +url: https://www.adafruit.com/product/5302 +exposes: [pro_micro] diff --git a/app/boards/arm/adafruit_qt_py_rp2040/adafruit_qt_py_rp2040.zmk.yml b/app/boards/arm/adafruit_qt_py_rp2040/adafruit_qt_py_rp2040.zmk.yml new file mode 100644 index 00000000..9b9c1450 --- /dev/null +++ b/app/boards/arm/adafruit_qt_py_rp2040/adafruit_qt_py_rp2040.zmk.yml @@ -0,0 +1,9 @@ +file_format: "1" +id: adafruit_qt_py_rp2040 +name: Adafruit QT Py RP2040 +type: board +arch: arm +outputs: + - usb +url: https://www.adafruit.com/product/4900 +exposes: [seeed_xiao] diff --git a/app/boards/arm/boardsource_blok/boardsource_blok.zmk.yml b/app/boards/arm/boardsource_blok/boardsource_blok.zmk.yml new file mode 100644 index 00000000..a6e91afd --- /dev/null +++ b/app/boards/arm/boardsource_blok/boardsource_blok.zmk.yml @@ -0,0 +1,9 @@ +file_format: "1" +id: boardsource_blok +name: BoardSource blok +type: board +arch: arm +outputs: + - usb +url: https://peg.software/docs/blok +exposes: [pro_micro] diff --git a/app/boards/arm/seeeduino_xiao_rp2040/seeeduino_xiao_rp2040.zmk.yml b/app/boards/arm/seeeduino_xiao_rp2040/seeeduino_xiao_rp2040.zmk.yml new file mode 100644 index 00000000..77d8d664 --- /dev/null +++ b/app/boards/arm/seeeduino_xiao_rp2040/seeeduino_xiao_rp2040.zmk.yml @@ -0,0 +1,9 @@ +file_format: "1" +id: seeeduino_xiao_rp2040 +name: Seeeduino XIAO RP2040 +type: board +arch: arm +outputs: + - usb +url: https://wiki.seeedstudio.com/XIAO-RP2040/ +exposes: [seeed_xiao] diff --git a/app/boards/arm/sparkfun_pro_micro_rp2040/sparkfun_pro_micro_rp2040.zmk.yml b/app/boards/arm/sparkfun_pro_micro_rp2040/sparkfun_pro_micro_rp2040.zmk.yml new file mode 100644 index 00000000..26a2ca64 --- /dev/null +++ b/app/boards/arm/sparkfun_pro_micro_rp2040/sparkfun_pro_micro_rp2040.zmk.yml @@ -0,0 +1,9 @@ +file_format: "1" +id: sparkfun_pro_micro_rp2040 +name: SparkFun Pro Micro RP2040 +type: board +arch: arm +outputs: + - usb +url: https://www.sparkfun.com/products/18288 +exposes: [pro_micro] diff --git a/app/boards/boardsource_blok.conf b/app/boards/boardsource_blok.conf new file mode 100644 index 00000000..21c1893d --- /dev/null +++ b/app/boards/boardsource_blok.conf @@ -0,0 +1,4 @@ +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_ZMK_USB=y diff --git a/app/boards/boardsource_blok.overlay b/app/boards/boardsource_blok.overlay new file mode 100644 index 00000000..b14e0d04 --- /dev/null +++ b/app/boards/boardsource_blok.overlay @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "usb_console.dtsi" + +&pro_micro_serial { status = "disabled"; }; diff --git a/app/boards/rpi_pico.conf b/app/boards/rpi_pico.conf new file mode 100644 index 00000000..f0db8ed1 --- /dev/null +++ b/app/boards/rpi_pico.conf @@ -0,0 +1,5 @@ +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_UART_INTERRUPT_DRIVEN=n +CONFIG_ZMK_USB=y diff --git a/app/boards/rpi_pico.overlay b/app/boards/rpi_pico.overlay new file mode 100644 index 00000000..efc8e080 --- /dev/null +++ b/app/boards/rpi_pico.overlay @@ -0,0 +1,8 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "usb_console.dtsi" + diff --git a/app/boards/seeeduino_xiao_rp2040.conf b/app/boards/seeeduino_xiao_rp2040.conf new file mode 100644 index 00000000..21c1893d --- /dev/null +++ b/app/boards/seeeduino_xiao_rp2040.conf @@ -0,0 +1,4 @@ +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_ZMK_USB=y diff --git a/app/boards/seeeduino_xiao_rp2040.overlay b/app/boards/seeeduino_xiao_rp2040.overlay new file mode 100644 index 00000000..d89e53f4 --- /dev/null +++ b/app/boards/seeeduino_xiao_rp2040.overlay @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "usb_console.dtsi" + +&xiao_serial { status = "disabled"; }; diff --git a/app/boards/sparkfun_pro_micro_rp2040.conf b/app/boards/sparkfun_pro_micro_rp2040.conf new file mode 100644 index 00000000..21c1893d --- /dev/null +++ b/app/boards/sparkfun_pro_micro_rp2040.conf @@ -0,0 +1,4 @@ +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_ZMK_USB=y diff --git a/app/boards/sparkfun_pro_micro_rp2040.overlay b/app/boards/sparkfun_pro_micro_rp2040.overlay new file mode 100644 index 00000000..b14e0d04 --- /dev/null +++ b/app/boards/sparkfun_pro_micro_rp2040.overlay @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "usb_console.dtsi" + +&pro_micro_serial { status = "disabled"; }; diff --git a/app/boards/usb_console.dtsi b/app/boards/usb_console.dtsi new file mode 100644 index 00000000..4ce59408 --- /dev/null +++ b/app/boards/usb_console.dtsi @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + + +/ { + chosen { + zephyr,console = &cdc_acm_uart; + }; +}; + +&usbd { + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; +}; + From 2f9bc2f1f7b2ad0e0662ef53f5479b72c0f84d02 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 13 Jul 2022 23:34:32 -0400 Subject: [PATCH 28/64] fix(logging): Disable USB driver logging. When enabling our high level USB logging, disable the USB driver logging itself entirely, to avoid logging in the driver causing errors when USB isn't up yet to send the logs. --- app/Kconfig | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index cf2cc6b3..01817107 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -419,9 +419,16 @@ if ZMK_USB_LOGGING config ZMK_LOG_LEVEL default 4 +choice USB_CDC_ACM_LOG_LEVEL_CHOICE + default USB_CDC_ACM_LOG_LEVEL_OFF +endchoice + +choice USB_DRIVER_LOG_LEVEL_CHOICE + default USB_DRIVER_LOG_LEVEL_OFF + +endchoice + # We do this to avoid log loop where logging to USB generates more log messages. -config USB_CDC_ACM_LOG_LEVEL - default 1 config USB_CDC_ACM_RINGBUF_SIZE default 1024 From a6ebdb7180f5b49d0603de91ca899ea789af0365 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 15 Jul 2022 11:14:51 -0400 Subject: [PATCH 29/64] fix(kscan): Default wait between outputs on RP2040. --- app/drivers/kscan/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/app/drivers/kscan/Kconfig b/app/drivers/kscan/Kconfig index 51546006..216651a1 100644 --- a/app/drivers/kscan/Kconfig +++ b/app/drivers/kscan/Kconfig @@ -44,6 +44,7 @@ config ZMK_KSCAN_MATRIX_WAIT_BEFORE_INPUTS config ZMK_KSCAN_MATRIX_WAIT_BETWEEN_OUTPUTS int "Ticks to wait between each output when scanning" + default 1 if SOC_RP2040 default 0 help When iterating over each output to drive it active, read inputs, then set From c3d06b22c8b501fc69f6c2c140c10c95f989c76b Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 3 Aug 2022 20:24:45 -0400 Subject: [PATCH 30/64] fix(core): Bump system work queue stack on RP2040. --- app/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Kconfig b/app/Kconfig index 01817107..824d2700 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -121,6 +121,7 @@ menuconfig ZMK_BLE if ZMK_BLE config SYSTEM_WORKQUEUE_STACK_SIZE + default 4096 if SOC_RP2040 default 2048 config ZMK_BLE_THREAD_STACK_SIZE From 198daaf524a2c1223393922195d8f1004964ae2e Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 20 Oct 2022 02:21:25 -0400 Subject: [PATCH 31/64] fix(shields): Don't try to disable xiao_i2c on Hummingbird. --- app/boards/shields/hummingbird/hummingbird.overlay | 1 - 1 file changed, 1 deletion(-) diff --git a/app/boards/shields/hummingbird/hummingbird.overlay b/app/boards/shields/hummingbird/hummingbird.overlay index 327200a8..4af9cbdf 100644 --- a/app/boards/shields/hummingbird/hummingbird.overlay +++ b/app/boards/shields/hummingbird/hummingbird.overlay @@ -53,5 +53,4 @@ }; &xiao_spi { status = "disabled"; }; -&xiao_i2c { status = "disabled"; }; &xiao_serial { status = "disabled"; }; From 518f9a550f5016dad4e8d96ed68f1c4e6a8ccb93 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 20 Oct 2022 17:23:43 +0000 Subject: [PATCH 32/64] fix(underglow): Use `DT_HAS_CHOSEN` properly. --- app/src/rgb_underglow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/rgb_underglow.c b/app/src/rgb_underglow.c index 0ed2087a..048b58b4 100644 --- a/app/src/rgb_underglow.c +++ b/app/src/rgb_underglow.c @@ -27,7 +27,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); -#if !DT_CHOSEN(zmk_underglow) +#if !DT_HAS_CHOSEN(zmk_underglow) #error "A zmk,underglow chosen node must be declared" From 1493620bf76e05d8419ceec37681b69ca024a871 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 5 Nov 2022 00:35:58 -0400 Subject: [PATCH 33/64] refactor(boards): Move to pinctrl. --- .../bluemicro840/bluemicro840_v1-pinctrl.dtsi | 39 ++++++++++ .../arm/bluemicro840/bluemicro840_v1.dts | 13 ++-- .../bluemicro840/bluemicro840_v1_defconfig | 4 +- .../arm/corneish_zen/corneish_zen_v2_left.dts | 27 ++++++- .../corneish_zen_v2_left_defconfig | 3 + .../corneish_zen/corneish_zen_v2_right.dts | 25 +++++- .../corneish_zen_v2_right_defconfig | 3 + app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi | 39 ++++++++++ app/boards/arm/mikoto/mikoto_520.dts | 12 ++- app/boards/arm/mikoto/mikoto_520_defconfig | 2 + app/boards/arm/nice60/nice60-pinctrl.dtsi | 12 +++ app/boards/arm/nice60/nice60.dts | 7 +- app/boards/arm/nice60/nice60_defconfig | 2 + .../arm/nice_nano/nice_nano-pinctrl.dtsi | 39 ++++++++++ app/boards/arm/nice_nano/nice_nano.dtsi | 12 ++- app/boards/arm/nice_nano/nice_nano_defconfig | 5 +- .../arm/nice_nano/nice_nano_v2_defconfig | 5 +- .../nrfmicro/nrfmicro-flipped-pinctrl.dtsi | 39 ++++++++++ app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi | 39 ++++++++++ app/boards/arm/nrfmicro/nrfmicro_11.dts | 13 ++-- app/boards/arm/nrfmicro/nrfmicro_11_defconfig | 2 + .../arm/nrfmicro/nrfmicro_11_flipped.dts | 15 ++-- .../nrfmicro/nrfmicro_11_flipped_defconfig | 2 + app/boards/arm/nrfmicro/nrfmicro_13.dts | 13 ++-- app/boards/arm/nrfmicro/nrfmicro_13_52833.dts | 13 ++-- .../arm/nrfmicro/nrfmicro_13_52833_defconfig | 2 + app/boards/arm/nrfmicro/nrfmicro_13_defconfig | 2 + app/boards/arm/pillbug/pillbug-pinctrl.dtsi | 56 +++++++++++++ app/boards/arm/pillbug/pillbug.dts | 20 +++-- .../arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi | 39 ++++++++++ app/boards/arm/puchi_ble/puchi_ble_v1.dts | 11 ++- .../arm/puchi_ble/puchi_ble_v1_defconfig | 3 + .../shields/chalice/boards/nice_nano.overlay | 25 ++++-- .../chalice/boards/nice_nano_v2.overlay | 25 ++++-- .../shields/corne/boards/nice_nano.overlay | 28 +++++-- .../shields/corne/boards/nice_nano_v2.overlay | 47 +++++++++++ .../elephant42/boards/nice_nano.overlay | 47 +++++++++++ .../elephant42/boards/nice_nano_v2.overlay | 29 +++++-- .../eternal_keypad/boards/nice_nano.overlay | 47 +++++++++++ .../boards/nice_nano_v2.overlay | 35 +++++---- .../shields/helix/boards/nice_nano.overlay | 65 +++++++++------- .../shields/helix/boards/nice_nano_v2.overlay | 47 +++++++++++ .../shields/jorne/boards/nice_nano.overlay | 27 +++++-- .../shields/jorne/boards/nice_nano_v2.overlay | 47 +++++++++++ .../shields/kyria/boards/nice_nano.overlay | 24 +++++- .../shields/kyria/boards/nice_nano_v2.overlay | 23 +++++- .../shields/kyria/boards/nrfmicro_11.overlay | 25 ++++-- .../kyria/boards/nrfmicro_11_flipped.overlay | 24 +++++- .../shields/kyria/boards/nrfmicro_13.overlay | 24 +++++- .../shields/lily58/boards/nice_nano.overlay | 32 +++++--- .../lily58/boards/nice_nano_v2.overlay | 47 +++++++++++ .../shields/microdox/boards/nice_nano.overlay | 35 +++++---- .../microdox/boards/nice_nano_v2.overlay | 47 +++++++++++ .../shields/murphpad/boards/nice_nano.overlay | 33 +++++--- .../murphpad/boards/nice_nano_v2.overlay | 47 +++++++++++ .../shields/nibble/boards/nice_nano.overlay | 32 +++++--- .../nibble/boards/nice_nano_v2.overlay | 47 +++++++++++ .../boards/bluemicro840_v1.overlay | 16 +++- .../boards/mikoto_520.overlay | 15 +++- .../boards/nice_nano.overlay | 15 +++- .../boards/nice_nano_v2.overlay | 15 +++- .../boards/nrfmicro_11.overlay | 16 +++- .../boards/nrfmicro_11_flipped.overlay | 15 +++- .../boards/nrfmicro_13.overlay | 15 +++- .../boards/puchi_ble_v1.overlay | 15 +++- .../shields/redox/boards/nice_nano.overlay | 31 +++++--- .../shields/redox/boards/nice_nano_v2.overlay | 47 +++++++++++ .../reviung41/boards/nice_nano.overlay | 26 +++++-- .../reviung41/boards/nice_nano_v2.overlay | 47 +++++++++++ .../romac_plus/boards/nice_nano.overlay | 78 +++++++++++-------- .../romac_plus/boards/nice_nano_v2.overlay | 47 +++++++++++ .../shields/snap/boards/nice_nano.overlay | 32 +++++--- .../shields/snap/boards/nice_nano_v2.overlay | 32 +++++--- .../boards/nice_nano.overlay | 26 +++++-- .../boards/nice_nano_v2.overlay | 26 +++++-- .../boards/nice_nano.overlay | 24 +++++- .../boards/nice_nano_v2.overlay | 23 +++++- .../boards/nice_nano.overlay | 26 +++++-- .../boards/nice_nano_v2.overlay | 26 +++++-- .../shields/tg4x/boards/nice_nano.overlay | 32 +++++--- .../shields/tg4x/boards/nice_nano_v2.overlay | 47 +++++++++++ .../shields/tidbit/boards/nice_nano.overlay | 32 +++++--- .../tidbit/boards/nice_nano_v2.overlay | 47 +++++++++++ .../two_percent_milk/boards/nice_nano.overlay | 26 +++++-- .../boards/nice_nano_v2.overlay | 26 +++++-- .../boards/nrfmicro_11.overlay | 27 +++++-- .../boards/nrfmicro_11_flipped.overlay | 26 +++++-- .../boards/nrfmicro_13.overlay | 26 +++++-- docs/docs/features/underglow.md | 28 ++++--- 89 files changed, 1981 insertions(+), 376 deletions(-) create mode 100644 app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi create mode 100644 app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi create mode 100644 app/boards/arm/nice60/nice60-pinctrl.dtsi create mode 100644 app/boards/arm/nice_nano/nice_nano-pinctrl.dtsi create mode 100644 app/boards/arm/nrfmicro/nrfmicro-flipped-pinctrl.dtsi create mode 100644 app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi create mode 100644 app/boards/arm/pillbug/pillbug-pinctrl.dtsi create mode 100644 app/boards/arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi create mode 100644 app/boards/shields/corne/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/elephant42/boards/nice_nano.overlay create mode 100644 app/boards/shields/eternal_keypad/boards/nice_nano.overlay create mode 100644 app/boards/shields/helix/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/jorne/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/lily58/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/microdox/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/murphpad/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/nibble/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/redox/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/reviung41/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/romac_plus/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/tg4x/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/tidbit/boards/nice_nano_v2.overlay diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi b/app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi new file mode 100644 index 00000000..18b90f21 --- /dev/null +++ b/app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; + + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.dts b/app/boards/arm/bluemicro840/bluemicro840_v1.dts index 29bf0f8d..c636ca31 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1.dts +++ b/app/boards/arm/bluemicro840/bluemicro840_v1.dts @@ -7,6 +7,7 @@ /dts-v1/; #include #include "arduino_pro_micro_pins.dtsi" +#include "bluemicro840_v1-pinctrl.dtsi" / { model = "BlueMicro840_V1"; @@ -62,15 +63,17 @@ }; &i2c0 { - compatible = "nordic,nrf-twi"; - sda-pin = <15>; - scl-pin = <17>; + compatible = "nordic,nrf-twim"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { compatible = "nordic,nrf-uarte"; - tx-pin = <6>; - rx-pin = <8>; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig b/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig index b8e4e805..99d51a94 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig +++ b/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig @@ -7,6 +7,8 @@ CONFIG_BOARD_BLUEMICRO840_V1=y # Enable MPU CONFIG_ARM_MPU=y +CONFIG_PINCTRL=y + # enable GPIO CONFIG_GPIO=y @@ -18,4 +20,4 @@ CONFIG_NVS=y CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y -CONFIG_FLASH_MAP=y \ No newline at end of file +CONFIG_FLASH_MAP=y diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts b/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts index 2d8f0a81..4dbdaef5 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts @@ -53,12 +53,31 @@ }; +&pinctrl { + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; + + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; +}; + &spi0 { status = "okay"; compatible = "nordic,nrf-spim"; - sck-pin = <27>; - mosi-pin = <8>; - miso-pin = <22>; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; epd: il0323@0 { @@ -75,4 +94,4 @@ cdi = <0xd2>; tcon = <0x22>; }; -}; \ No newline at end of file +}; 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 42e27037..305ce72e 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig @@ -13,6 +13,9 @@ CONFIG_ZMK_DISPLAY=y # Enable MPU CONFIG_ARM_MPU=y +# enable pinctrl +CONFIG_PINCTRL=y + # enable GPIO CONFIG_GPIO=y diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts b/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts index 097872f5..52439e4f 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts @@ -60,12 +60,31 @@ col-offset = <6>; }; +&pinctrl { + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; + + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; +}; + &spi0 { status = "okay"; compatible = "nordic,nrf-spim"; - sck-pin = <20>; - mosi-pin = <24>; - miso-pin = <27>; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; epd: il0323@0 { 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 e9b36f2e..0fd0fd6c 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig @@ -13,6 +13,9 @@ CONFIG_ZMK_DISPLAY=y # Enable MPU CONFIG_ARM_MPU=y +# enable pinctrl +CONFIG_PINCTRL=y + # enable GPIO CONFIG_GPIO=y diff --git a/app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi b/app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi new file mode 100644 index 00000000..4a8ff82c --- /dev/null +++ b/app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; + + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; diff --git a/app/boards/arm/mikoto/mikoto_520.dts b/app/boards/arm/mikoto/mikoto_520.dts index 49d9d6be..3fff0835 100644 --- a/app/boards/arm/mikoto/mikoto_520.dts +++ b/app/boards/arm/mikoto/mikoto_520.dts @@ -7,6 +7,7 @@ /dts-v1/; #include #include "arduino_pro_micro_pins.dtsi" +#include "mikoto_520-pinctrl.dtsi" / { model = "mikoto"; @@ -62,14 +63,17 @@ &i2c0 { compatible = "nordic,nrf-twi"; - sda-pin = <17>; - scl-pin = <20>; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { compatible = "nordic,nrf-uarte"; - tx-pin = <8>; - rx-pin = <4>; + current-speed = <115200>; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { diff --git a/app/boards/arm/mikoto/mikoto_520_defconfig b/app/boards/arm/mikoto/mikoto_520_defconfig index d5fd8958..c755633e 100644 --- a/app/boards/arm/mikoto/mikoto_520_defconfig +++ b/app/boards/arm/mikoto/mikoto_520_defconfig @@ -7,6 +7,8 @@ CONFIG_BOARD_MIKOTO_520=y # Enable MPU CONFIG_ARM_MPU=y +CONFIG_PINCTRL=y + # enable GPIO CONFIG_GPIO=y diff --git a/app/boards/arm/nice60/nice60-pinctrl.dtsi b/app/boards/arm/nice60/nice60-pinctrl.dtsi new file mode 100644 index 00000000..aced76b4 --- /dev/null +++ b/app/boards/arm/nice60/nice60-pinctrl.dtsi @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + spi0_default: spi0_default { + group1 { + psels = ; + }; + }; +}; diff --git a/app/boards/arm/nice60/nice60.dts b/app/boards/arm/nice60/nice60.dts index bb058da8..c982f88e 100644 --- a/app/boards/arm/nice60/nice60.dts +++ b/app/boards/arm/nice60/nice60.dts @@ -10,6 +10,8 @@ #include #include +#include "nice60-pinctrl.dtsi" + / { model = "nice!60"; compatible = "nice,60"; @@ -110,10 +112,9 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R &spi0 { compatible = "nordic,nrf-spim"; /* Cannot be used together with i2c0. */ + pinctrl-0 = <&spi0_default>; + pinctrl-names = "default"; status = "okay"; - sck-pin = <12>; - mosi-pin = <27>; - miso-pin = <13>; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; diff --git a/app/boards/arm/nice60/nice60_defconfig b/app/boards/arm/nice60/nice60_defconfig index 9fac3a30..48936a04 100644 --- a/app/boards/arm/nice60/nice60_defconfig +++ b/app/boards/arm/nice60/nice60_defconfig @@ -8,6 +8,8 @@ CONFIG_BOARD_NICE60=y # Enable MPU CONFIG_ARM_MPU=y +CONFIG_PINCTRL=y + # enable GPIO CONFIG_GPIO=y diff --git a/app/boards/arm/nice_nano/nice_nano-pinctrl.dtsi b/app/boards/arm/nice_nano/nice_nano-pinctrl.dtsi new file mode 100644 index 00000000..18b90f21 --- /dev/null +++ b/app/boards/arm/nice_nano/nice_nano-pinctrl.dtsi @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; + + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; diff --git a/app/boards/arm/nice_nano/nice_nano.dtsi b/app/boards/arm/nice_nano/nice_nano.dtsi index 6c9d081c..ad5ef278 100644 --- a/app/boards/arm/nice_nano/nice_nano.dtsi +++ b/app/boards/arm/nice_nano/nice_nano.dtsi @@ -5,6 +5,7 @@ */ #include +#include "nice_nano-pinctrl.dtsi" #include "arduino_pro_micro_pins.dtsi" / { @@ -45,14 +46,17 @@ &i2c0 { compatible = "nordic,nrf-twi"; - sda-pin = <17>; - scl-pin = <20>; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { compatible = "nordic,nrf-uarte"; - tx-pin = <6>; - rx-pin = <8>; + current-speed = <115200>; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { diff --git a/app/boards/arm/nice_nano/nice_nano_defconfig b/app/boards/arm/nice_nano/nice_nano_defconfig index 1ff025ec..a837b7d2 100644 --- a/app/boards/arm/nice_nano/nice_nano_defconfig +++ b/app/boards/arm/nice_nano/nice_nano_defconfig @@ -10,6 +10,9 @@ CONFIG_ARM_MPU=y # enable GPIO CONFIG_GPIO=y +# Use pinctrl +CONFIG_PINCTRL=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y @@ -18,4 +21,4 @@ CONFIG_NVS=y CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y -CONFIG_FLASH_MAP=y \ No newline at end of file +CONFIG_FLASH_MAP=y diff --git a/app/boards/arm/nice_nano/nice_nano_v2_defconfig b/app/boards/arm/nice_nano/nice_nano_v2_defconfig index 206e51c2..667cf71a 100644 --- a/app/boards/arm/nice_nano/nice_nano_v2_defconfig +++ b/app/boards/arm/nice_nano/nice_nano_v2_defconfig @@ -7,6 +7,9 @@ CONFIG_BOARD_NICE_NANO_V2=y # Enable MPU CONFIG_ARM_MPU=y +# Use pinctrl +CONFIG_PINCTRL=y + # enable GPIO CONFIG_GPIO=y @@ -18,4 +21,4 @@ CONFIG_NVS=y CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y -CONFIG_FLASH_MAP=y \ No newline at end of file +CONFIG_FLASH_MAP=y diff --git a/app/boards/arm/nrfmicro/nrfmicro-flipped-pinctrl.dtsi b/app/boards/arm/nrfmicro/nrfmicro-flipped-pinctrl.dtsi new file mode 100644 index 00000000..a54c2598 --- /dev/null +++ b/app/boards/arm/nrfmicro/nrfmicro-flipped-pinctrl.dtsi @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; + + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; diff --git a/app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi b/app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi new file mode 100644 index 00000000..a5385690 --- /dev/null +++ b/app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; + + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; diff --git a/app/boards/arm/nrfmicro/nrfmicro_11.dts b/app/boards/arm/nrfmicro/nrfmicro_11.dts index 82951b5f..48186ac9 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_11.dts @@ -7,6 +7,7 @@ /dts-v1/; #include #include "arduino_pro_micro_pins.dtsi" +#include "nrfmicro-pinctrl.dtsi" / { model = "nrfmicro"; @@ -47,15 +48,17 @@ }; &i2c0 { - compatible = "nordic,nrf-twi"; - sda-pin = <15>; - scl-pin = <17>; + compatible = "nordic,nrf-twim"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { compatible = "nordic,nrf-uarte"; - tx-pin = <6>; - rx-pin = <8>; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_defconfig b/app/boards/arm/nrfmicro/nrfmicro_11_defconfig index 3f6a447d..b51929b0 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_11_defconfig @@ -7,6 +7,8 @@ CONFIG_BOARD_NRFMICRO_11=y # Enable MPU CONFIG_ARM_MPU=y +CONFIG_PINCTRL=y + # enable GPIO CONFIG_GPIO=y diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts index fdfba507..656873a0 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts @@ -7,6 +7,7 @@ /dts-v1/; #include #include "arduino_pro_micro_pins_flipped.dtsi" +#include "nrfmicro-flipped-pinctrl.dtsi" / { model = "nrfmicro"; @@ -47,15 +48,17 @@ }; &i2c0 { - compatible = "nordic,nrf-twi"; - sda-pin = <30>; - scl-pin = <31>; + compatible = "nordic,nrf-twim"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { compatible = "nordic,nrf-uarte"; - tx-pin = <6>; - rx-pin = <8>; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { @@ -105,4 +108,4 @@ reg = <0x000f4000 0x0000c000>; }; }; -}; \ 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 efe924f2..335a2d75 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig @@ -7,6 +7,8 @@ CONFIG_BOARD_NRFMICRO_11_FLIPPED=y # Enable MPU CONFIG_ARM_MPU=y +CONFIG_PINCTRL=y + # enable GPIO CONFIG_GPIO=y diff --git a/app/boards/arm/nrfmicro/nrfmicro_13.dts b/app/boards/arm/nrfmicro/nrfmicro_13.dts index a0f74170..9fb68562 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_13.dts @@ -7,6 +7,7 @@ /dts-v1/; #include #include "arduino_pro_micro_pins.dtsi" +#include "nrfmicro-pinctrl.dtsi" / { model = "nrfmicro"; @@ -60,15 +61,17 @@ }; &i2c0 { - compatible = "nordic,nrf-twi"; - sda-pin = <15>; - scl-pin = <17>; + compatible = "nordic,nrf-twim"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { compatible = "nordic,nrf-uarte"; - tx-pin = <6>; - rx-pin = <8>; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts b/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts index 7f833ff5..9ade364d 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts @@ -7,6 +7,7 @@ /dts-v1/; #include #include "arduino_pro_micro_pins_52833.dtsi" +#include "nrfmicro-pinctrl.dtsi" / { model = "nrfmicro"; @@ -60,15 +61,17 @@ }; &i2c0 { - compatible = "nordic,nrf-twi"; - sda-pin = <15>; - scl-pin = <17>; + compatible = "nordic,nrf-twim"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { compatible = "nordic,nrf-uarte"; - tx-pin = <6>; - rx-pin = <8>; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig b/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig index 112e0344..4af1ff86 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig @@ -7,6 +7,8 @@ CONFIG_BOARD_NRFMICRO_13_52833=y # Enable MPU CONFIG_ARM_MPU=y +CONFIG_PINCTRL=y + # enable GPIO CONFIG_GPIO=y diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_defconfig b/app/boards/arm/nrfmicro/nrfmicro_13_defconfig index 06758784..43ba40e2 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_13_defconfig @@ -7,6 +7,8 @@ CONFIG_BOARD_NRFMICRO_13=y # Enable MPU CONFIG_ARM_MPU=y +CONFIG_PINCTRL=y + # enable GPIO CONFIG_GPIO=y diff --git a/app/boards/arm/pillbug/pillbug-pinctrl.dtsi b/app/boards/arm/pillbug/pillbug-pinctrl.dtsi new file mode 100644 index 00000000..8751bc4b --- /dev/null +++ b/app/boards/arm/pillbug/pillbug-pinctrl.dtsi @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; + + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + + spi1_default: spi1_default { + group1 { + psels = , + , + ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; +}; diff --git a/app/boards/arm/pillbug/pillbug.dts b/app/boards/arm/pillbug/pillbug.dts index 85c5cccd..c1330319 100644 --- a/app/boards/arm/pillbug/pillbug.dts +++ b/app/boards/arm/pillbug/pillbug.dts @@ -7,6 +7,7 @@ /dts-v1/; #include +#include "pillbug-pinctrl.dtsi" #include "blackpill_pins.dtsi" / { @@ -63,22 +64,25 @@ &i2c0 { compatible = "nordic,nrf-twi"; - sda-pin = <15>; - scl-pin = <13>; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; -&spi1{ +&spi1 { status = "disabled"; compatible = "nordic,nrf-spim"; - sck-pin = <40>; - mosi-pin = <11>; - miso-pin = <26>; + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { compatible = "nordic,nrf-uarte"; - tx-pin = <6>; - rx-pin = <8>; + current-speed = <115200>; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi b/app/boards/arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi new file mode 100644 index 00000000..a5385690 --- /dev/null +++ b/app/boards/arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; + + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1.dts b/app/boards/arm/puchi_ble/puchi_ble_v1.dts index e324cccc..a8f25c37 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1.dts +++ b/app/boards/arm/puchi_ble/puchi_ble_v1.dts @@ -7,6 +7,7 @@ /dts-v1/; #include #include "arduino_pro_micro_pins.dtsi" +#include "puchi_ble_v1-pinctrl.dtsi" / { model = "puchi_ble"; @@ -61,14 +62,16 @@ &i2c0 { compatible = "nordic,nrf-twi"; - sda-pin = <15>; - scl-pin = <17>; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { compatible = "nordic,nrf-uarte"; - tx-pin = <6>; - rx-pin = <8>; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig b/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig index e32886d0..1adb9217 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig +++ b/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig @@ -11,6 +11,9 @@ CONFIG_ARM_MPU=y # enable GPIO CONFIG_GPIO=y +# Use pinctrl +CONFIG_PINCTRL=y + CONFIG_USE_DT_CODE_PARTITION=y CONFIG_BUILD_OUTPUT_UF2=y diff --git a/app/boards/shields/chalice/boards/nice_nano.overlay b/app/boards/shields/chalice/boards/nice_nano.overlay index 5a74582a..172859ae 100644 --- a/app/boards/shields/chalice/boards/nice_nano.overlay +++ b/app/boards/shields/chalice/boards/nice_nano.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -17,7 +32,7 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <14>; /* arbitrary; change at will */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; diff --git a/app/boards/shields/chalice/boards/nice_nano_v2.overlay b/app/boards/shields/chalice/boards/nice_nano_v2.overlay index 5a74582a..172859ae 100644 --- a/app/boards/shields/chalice/boards/nice_nano_v2.overlay +++ b/app/boards/shields/chalice/boards/nice_nano_v2.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -17,7 +32,7 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <14>; /* arbitrary; change at will */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; diff --git a/app/boards/shields/corne/boards/nice_nano.overlay b/app/boards/shields/corne/boards/nice_nano.overlay index e5f84063..172859ae 100644 --- a/app/boards/shields/corne/boards/nice_nano.overlay +++ b/app/boards/shields/corne/boards/nice_nano.overlay @@ -1,24 +1,38 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; - /* Cannot be used together with i2c0. */ status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "SK6812mini"; + label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <6>; /* There are per-key RGB, but the first 6 are underglow */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; diff --git a/app/boards/shields/corne/boards/nice_nano_v2.overlay b/app/boards/shields/corne/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..172859ae --- /dev/null +++ b/app/boards/shields/corne/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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>; /* 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/elephant42/boards/nice_nano.overlay b/app/boards/shields/elephant42/boards/nice_nano.overlay new file mode 100644 index 00000000..172859ae --- /dev/null +++ b/app/boards/shields/elephant42/boards/nice_nano.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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>; /* 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/elephant42/boards/nice_nano_v2.overlay b/app/boards/shields/elephant42/boards/nice_nano_v2.overlay index 87c8da21..172859ae 100644 --- a/app/boards/shields/elephant42/boards/nice_nano_v2.overlay +++ b/app/boards/shields/elephant42/boards/nice_nano_v2.overlay @@ -1,23 +1,38 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; - /* Cannot be used together with i2c0. */ status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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 = <27>; /* There are per-key RGB and the LAST 6 are underglow */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; @@ -29,4 +44,4 @@ chosen { zmk,underglow = &led_strip; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/eternal_keypad/boards/nice_nano.overlay b/app/boards/shields/eternal_keypad/boards/nice_nano.overlay new file mode 100644 index 00000000..172859ae --- /dev/null +++ b/app/boards/shields/eternal_keypad/boards/nice_nano.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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>; /* 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/eternal_keypad/boards/nice_nano_v2.overlay b/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay index 61950d18..172859ae 100644 --- a/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay +++ b/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay @@ -1,32 +1,41 @@ -/* - * Copyright (c) 2022 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; - /* Cannot be used together with i2c0. */ status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "SK6812mini"; + label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <8>; + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/helix/boards/nice_nano.overlay b/app/boards/shields/helix/boards/nice_nano.overlay index da7deed1..172859ae 100644 --- a/app/boards/shields/helix/boards/nice_nano.overlay +++ b/app/boards/shields/helix/boards/nice_nano.overlay @@ -1,38 +1,47 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { - compatible = "nordic,nrf-spim"; - status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + compatible = "nordic,nrf-spim"; + status = "okay"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* WS2812 */ - chain-length = <32>; /* number of LEDs */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/helix/boards/nice_nano_v2.overlay b/app/boards/shields/helix/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..172859ae --- /dev/null +++ b/app/boards/shields/helix/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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>; /* 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/jorne/boards/nice_nano.overlay b/app/boards/shields/jorne/boards/nice_nano.overlay index 2864fd60..172859ae 100644 --- a/app/boards/shields/jorne/boards/nice_nano.overlay +++ b/app/boards/shields/jorne/boards/nice_nano.overlay @@ -1,13 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; - /* Cannot be used together with i2c0. */ status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -18,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <6>; /* There are per-key RGB, but the first 6 are underglow */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/jorne/boards/nice_nano_v2.overlay b/app/boards/shields/jorne/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..172859ae --- /dev/null +++ b/app/boards/shields/jorne/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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>; /* 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/kyria/boards/nice_nano.overlay b/app/boards/shields/kyria/boards/nice_nano.overlay index b774b4ba..172859ae 100644 --- a/app/boards/shields/kyria/boards/nice_nano.overlay +++ b/app/boards/shields/kyria/boards/nice_nano.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -20,6 +35,7 @@ chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/kyria/boards/nice_nano_v2.overlay b/app/boards/shields/kyria/boards/nice_nano_v2.overlay index b1e7fbb5..172859ae 100644 --- a/app/boards/shields/kyria/boards/nice_nano_v2.overlay +++ b/app/boards/shields/kyria/boards/nice_nano_v2.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; diff --git a/app/boards/shields/kyria/boards/nrfmicro_11.overlay b/app/boards/shields/kyria/boards/nrfmicro_11.overlay index 1cff5f77..172859ae 100644 --- a/app/boards/shields/kyria/boards/nrfmicro_11.overlay +++ b/app/boards/shields/kyria/boards/nrfmicro_11.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <12>; // 0.12 is not broken out on the nRFMicro - miso-pin = <22>; // 0.22 is not broken out on the nRFMicro + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -20,6 +35,7 @@ chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; @@ -29,4 +45,3 @@ zmk,underglow = &led_strip; }; }; - diff --git a/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay b/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay index 80d0c898..172859ae 100644 --- a/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay +++ b/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <12>; // 0.12 is not broken out on the nRFMicro - miso-pin = <22>; // 0.22 is not broken out on the nRFMicro + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -20,6 +35,7 @@ chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/kyria/boards/nrfmicro_13.overlay b/app/boards/shields/kyria/boards/nrfmicro_13.overlay index 80d0c898..172859ae 100644 --- a/app/boards/shields/kyria/boards/nrfmicro_13.overlay +++ b/app/boards/shields/kyria/boards/nrfmicro_13.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <12>; // 0.12 is not broken out on the nRFMicro - miso-pin = <22>; // 0.22 is not broken out on the nRFMicro + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -20,6 +35,7 @@ chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/lily58/boards/nice_nano.overlay b/app/boards/shields/lily58/boards/nice_nano.overlay index 69bfffa0..172859ae 100644 --- a/app/boards/shields/lily58/boards/nice_nano.overlay +++ b/app/boards/shields/lily58/boards/nice_nano.overlay @@ -1,18 +1,27 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -23,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <5>; /* number of LEDs */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/lily58/boards/nice_nano_v2.overlay b/app/boards/shields/lily58/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..172859ae --- /dev/null +++ b/app/boards/shields/lily58/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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>; /* 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/microdox/boards/nice_nano.overlay b/app/boards/shields/microdox/boards/nice_nano.overlay index 360e7098..172859ae 100644 --- a/app/boards/shields/microdox/boards/nice_nano.overlay +++ b/app/boards/shields/microdox/boards/nice_nano.overlay @@ -1,32 +1,41 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; - /* Cannot be used together with i2c0. */ status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "SK6812mini"; + label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <6>; /* There are per-key RGB, but the first 6 are underglow */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/microdox/boards/nice_nano_v2.overlay b/app/boards/shields/microdox/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..172859ae --- /dev/null +++ b/app/boards/shields/microdox/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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>; /* 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/murphpad/boards/nice_nano.overlay b/app/boards/shields/murphpad/boards/nice_nano.overlay index d7cdcff7..89ba4f9d 100644 --- a/app/boards/shields/murphpad/boards/nice_nano.overlay +++ b/app/boards/shields/murphpad/boards/nice_nano.overlay @@ -1,18 +1,27 @@ -/* - * Copyright (c) 2021 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ +#include - #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <31>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -23,7 +32,7 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <8>; /* number of LEDs */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; @@ -35,4 +44,4 @@ chosen { zmk,underglow = &led_strip; }; -}; \ No newline at end of file +}; diff --git a/app/boards/shields/murphpad/boards/nice_nano_v2.overlay b/app/boards/shields/murphpad/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..89ba4f9d --- /dev/null +++ b/app/boards/shields/murphpad/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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>; /* 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/nibble/boards/nice_nano.overlay b/app/boards/shields/nibble/boards/nice_nano.overlay index 0a08c770..ece699e2 100644 --- a/app/boards/shields/nibble/boards/nice_nano.overlay +++ b/app/boards/shields/nibble/boards/nice_nano.overlay @@ -1,18 +1,27 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <11>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -23,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <10>; /* number of LEDs */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/nibble/boards/nice_nano_v2.overlay b/app/boards/shields/nibble/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..ece699e2 --- /dev/null +++ b/app/boards/shields/nibble/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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>; /* 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/nice_view_adapter/boards/bluemicro840_v1.overlay b/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay index 9d9ab734..27d76b07 100644 --- a/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay +++ b/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay @@ -4,11 +4,21 @@ * SPDX-License-Identifier: MIT */ +&pinctrl { + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; +}; + + nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; - sck-pin = <17>; - mosi-pin = <15>; - miso-pin = <25>; + pinctrl-0 = &spi0_default; + pinctrl-names = "default"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay b/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay index 9f6fad1c..fc2667f3 100644 --- a/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay +++ b/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay @@ -4,11 +4,20 @@ * SPDX-License-Identifier: MIT */ +&pinctrl { + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; +}; + nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; - sck-pin = <20>; - mosi-pin = <17>; - miso-pin = <5>; + pinctrl-0 = &spi0_default; + pinctrl-names = "default"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay b/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay index 3a0ad462..c9a0e788 100644 --- a/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay @@ -4,11 +4,20 @@ * SPDX-License-Identifier: MIT */ +&pinctrl { + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; +}; + nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; - sck-pin = <20>; - mosi-pin = <17>; - miso-pin = <25>; + pinctrl-0 = &spi0_default; + pinctrl-names = "default"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay b/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay index 3a0ad462..0068b5b2 100644 --- a/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay @@ -4,11 +4,20 @@ * SPDX-License-Identifier: MIT */ +&pinctrl { + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; +}; + nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; - sck-pin = <20>; - mosi-pin = <17>; - miso-pin = <25>; + pinctrl-0 = <&spi0_default>; + pinctrl-names = "default"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay index 9d9ab734..27d76b07 100644 --- a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay @@ -4,11 +4,21 @@ * SPDX-License-Identifier: MIT */ +&pinctrl { + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; +}; + + nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; - sck-pin = <17>; - mosi-pin = <15>; - miso-pin = <25>; + pinctrl-0 = &spi0_default; + pinctrl-names = "default"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay index 7b12c252..5074d0f9 100644 --- a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay @@ -4,11 +4,20 @@ * SPDX-License-Identifier: MIT */ +&pinctrl { + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; +}; + nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; - sck-pin = <31>; - mosi-pin = <30>; - miso-pin = <25>; + pinctrl-0 = &spi0_default; + pinctrl-names = "default"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay b/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay index 9d9ab734..9a4f3170 100644 --- a/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay @@ -4,11 +4,20 @@ * SPDX-License-Identifier: MIT */ +&pinctrl { + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; +}; + nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; - sck-pin = <17>; - mosi-pin = <15>; - miso-pin = <25>; + pinctrl-0 = &spi0_default; + pinctrl-names = "default"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay b/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay index 9d9ab734..9a4f3170 100644 --- a/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay +++ b/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay @@ -4,11 +4,20 @@ * SPDX-License-Identifier: MIT */ +&pinctrl { + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; +}; + nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; - sck-pin = <17>; - mosi-pin = <15>; - miso-pin = <25>; + pinctrl-0 = &spi0_default; + pinctrl-names = "default"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/redox/boards/nice_nano.overlay b/app/boards/shields/redox/boards/nice_nano.overlay index d67e46f9..172859ae 100644 --- a/app/boards/shields/redox/boards/nice_nano.overlay +++ b/app/boards/shields/redox/boards/nice_nano.overlay @@ -1,18 +1,27 @@ -/* - * Copyright (c) 2021 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ +#include - #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -23,7 +32,7 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <5>; /* number of LEDs */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; diff --git a/app/boards/shields/redox/boards/nice_nano_v2.overlay b/app/boards/shields/redox/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..172859ae --- /dev/null +++ b/app/boards/shields/redox/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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>; /* 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/reviung41/boards/nice_nano.overlay b/app/boards/shields/reviung41/boards/nice_nano.overlay index b52faac6..172859ae 100644 --- a/app/boards/shields/reviung41/boards/nice_nano.overlay +++ b/app/boards/shields/reviung41/boards/nice_nano.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -17,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <11>; /* arbitrary; change at will */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/reviung41/boards/nice_nano_v2.overlay b/app/boards/shields/reviung41/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..172859ae --- /dev/null +++ b/app/boards/shields/reviung41/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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>; /* 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/romac_plus/boards/nice_nano.overlay b/app/boards/shields/romac_plus/boards/nice_nano.overlay index dc686af8..172859ae 100644 --- a/app/boards/shields/romac_plus/boards/nice_nano.overlay +++ b/app/boards/shields/romac_plus/boards/nice_nano.overlay @@ -1,31 +1,47 @@ -#include - -&spi1 { - compatible = "nordic,nrf-spim"; - status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; - - 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>; /* 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 +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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>; /* 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/romac_plus/boards/nice_nano_v2.overlay b/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..172859ae --- /dev/null +++ b/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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>; /* 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/snap/boards/nice_nano.overlay b/app/boards/shields/snap/boards/nice_nano.overlay index f869db5d..15c5801e 100644 --- a/app/boards/shields/snap/boards/nice_nano.overlay +++ b/app/boards/shields/snap/boards/nice_nano.overlay @@ -1,18 +1,27 @@ -/* - * Copyright (c) 2022 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <10>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -23,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <5>; /* arbitrary; change at will */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/snap/boards/nice_nano_v2.overlay b/app/boards/shields/snap/boards/nice_nano_v2.overlay index f869db5d..15c5801e 100644 --- a/app/boards/shields/snap/boards/nice_nano_v2.overlay +++ b/app/boards/shields/snap/boards/nice_nano_v2.overlay @@ -1,18 +1,27 @@ -/* - * Copyright (c) 2022 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <10>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -23,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <5>; /* arbitrary; change at will */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay index 0087208c..172859ae 100644 --- a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay +++ b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -17,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <6>; /* arbitrary; change at will */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay index 0087208c..172859ae 100644 --- a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay +++ b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -17,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <6>; /* arbitrary; change at will */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay index eb838b24..4a6b717d 100644 --- a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay +++ b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay @@ -1,12 +1,28 @@ #include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; diff --git a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay index eb838b24..ed03ed0d 100644 --- a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay +++ b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; diff --git a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay index 0087208c..172859ae 100644 --- a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay +++ b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -17,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <6>; /* arbitrary; change at will */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay index 0087208c..172859ae 100644 --- a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay +++ b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -17,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <6>; /* arbitrary; change at will */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/tg4x/boards/nice_nano.overlay b/app/boards/shields/tg4x/boards/nice_nano.overlay index fe7fbf18..62f20140 100644 --- a/app/boards/shields/tg4x/boards/nice_nano.overlay +++ b/app/boards/shields/tg4x/boards/nice_nano.overlay @@ -1,18 +1,27 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <8>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -23,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <7>; /* number of LEDs */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/tg4x/boards/nice_nano_v2.overlay b/app/boards/shields/tg4x/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..62f20140 --- /dev/null +++ b/app/boards/shields/tg4x/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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>; /* 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/tidbit/boards/nice_nano.overlay b/app/boards/shields/tidbit/boards/nice_nano.overlay index d8a647e9..08379e30 100644 --- a/app/boards/shields/tidbit/boards/nice_nano.overlay +++ b/app/boards/shields/tidbit/boards/nice_nano.overlay @@ -1,18 +1,27 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <9>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -23,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <8>; /* number of LEDs */ + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/tidbit/boards/nice_nano_v2.overlay b/app/boards/shields/tidbit/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..08379e30 --- /dev/null +++ b/app/boards/shields/tidbit/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#include + +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_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>; /* 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/two_percent_milk/boards/nice_nano.overlay b/app/boards/shields/two_percent_milk/boards/nice_nano.overlay index dd7e34c4..08379e30 100644 --- a/app/boards/shields/two_percent_milk/boards/nice_nano.overlay +++ b/app/boards/shields/two_percent_milk/boards/nice_nano.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <9>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -17,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <2>; + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay b/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay index dd7e34c4..08379e30 100644 --- a/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay +++ b/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <9>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -17,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <2>; + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/two_percent_milk/boards/nrfmicro_11.overlay b/app/boards/shields/two_percent_milk/boards/nrfmicro_11.overlay index c2dab5a6..64d16572 100644 --- a/app/boards/shields/two_percent_milk/boards/nrfmicro_11.overlay +++ b/app/boards/shields/two_percent_milk/boards/nrfmicro_11.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <43>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <12>; // 0.12 is not broken out on the nRFMicro - miso-pin = <22>; // 0.22 is not broken out on the nRFMicro + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -17,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <2>; + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; @@ -29,4 +45,3 @@ zmk,underglow = &led_strip; }; }; - diff --git a/app/boards/shields/two_percent_milk/boards/nrfmicro_11_flipped.overlay b/app/boards/shields/two_percent_milk/boards/nrfmicro_11_flipped.overlay index e53b149a..b84beb93 100644 --- a/app/boards/shields/two_percent_milk/boards/nrfmicro_11_flipped.overlay +++ b/app/boards/shields/two_percent_milk/boards/nrfmicro_11_flipped.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <38>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <12>; // 0.12 is not broken out on the nRFMicro - miso-pin = <22>; // 0.22 is not broken out on the nRFMicro + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -17,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <2>; + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/app/boards/shields/two_percent_milk/boards/nrfmicro_13.overlay b/app/boards/shields/two_percent_milk/boards/nrfmicro_13.overlay index 252329b4..64d16572 100644 --- a/app/boards/shields/two_percent_milk/boards/nrfmicro_13.overlay +++ b/app/boards/shields/two_percent_milk/boards/nrfmicro_13.overlay @@ -1,12 +1,27 @@ #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <43>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <12>; // 0.12 is not broken out on the nRFMicro - miso-pin = <22>; // 0.22 is not broken out on the nRFMicro + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; @@ -17,9 +32,10 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <2>; + chain-length = <10>; /* arbitrary; change at will */ spi-one-frame = <0x70>; spi-zero-frame = <0x40>; + color-mapping = ; }; }; diff --git a/docs/docs/features/underglow.md b/docs/docs/features/underglow.md index 020701fd..c70ffffb 100644 --- a/docs/docs/features/underglow.md +++ b/docs/docs/features/underglow.md @@ -54,23 +54,33 @@ For example, the Kyria shield has a `boards/nice_nano.overlay` file that defines With nRF52 boards, you can just use `&spi1` and define the pins you want to use. -To identify which pin number you need to put in the config you need do to a bit of math. You need the hardware port and run it through a function. -**32 \* X + Y** = `` where X is first part of the hardware port "PX.01" and Y is the second part of the hardware port "P1.Y". - -(_P1.13_ would give you _32 \* 1 + 13_ = `<45>` and P0.15 would give you _32 \* 0 + 15_ = `<15>`) - Here's an example on a definition that uses P0.06: ``` #include +&pinctrl { + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; + + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <6>; - // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. - sck-pin = <5>; - miso-pin = <7>; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; From 0c5bcf5fe4dff38f55219c213a745a6731544896 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 16 Jan 2023 04:28:35 +0000 Subject: [PATCH 34/64] feat(docs): Add BLE feature/config pages. Co-authored-by: Cem Aksoylar --- docs/docs/config/bluetooth.md | 14 ++++++++ docs/docs/features/bluetooth.md | 59 +++++++++++++++++++++++++++++++++ docs/sidebars.js | 2 ++ 3 files changed, 75 insertions(+) create mode 100644 docs/docs/config/bluetooth.md create mode 100644 docs/docs/features/bluetooth.md diff --git a/docs/docs/config/bluetooth.md b/docs/docs/config/bluetooth.md new file mode 100644 index 00000000..420dd5c3 --- /dev/null +++ b/docs/docs/config/bluetooth.md @@ -0,0 +1,14 @@ +--- +title: Bluetooth Configuration +sidebar_label: Bluetooth +--- + +See the [bluetooth feature page](../features/bluetooth.md) for more details on the general Bluetooth functionality in ZMK. + +See [Configuration Overview](index.md) for instructions on how to change these settings. + +## 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 | diff --git a/docs/docs/features/bluetooth.md b/docs/docs/features/bluetooth.md new file mode 100644 index 00000000..f1a3e241 --- /dev/null +++ b/docs/docs/features/bluetooth.md @@ -0,0 +1,59 @@ +--- +title: Bluetooth +sidebar_label: Bluetooth +--- + +ZMK's bluetooth functionality allows users to connect their keyboards to hosts using Bluetooth Low Energy (BLE) technology. It also is used for split keyboards to connect the two halves wirelessly. + +:::note + +Bluetooth 4.2 or newer is required in order to connect to a ZMK keyboard. ZMK implements advanced security using BLE's Secure Connection feature, which requires Bluetooth 4.2 at a minimum. To avoid well-known security vulnerabilities, we disallow using Legacy pairing. + +::: + +## Security + +BLE connections between keyboards and hosts are secured by an initial pairing/bonding process that establishes long term keys (LTK) shared between the two sides, using Elliptic Curve Diffie Hellman (ECDH) for key generation. The same security is used to secure the communication between the two sides of split keyboards running ZMK. + +The only known vulnerability in the protocol is a risk of an active man-in-the-middle (MITM) attack exactly during the initial pairing, which can be mitigated in the future using the Numeric Comparison association model. Support for that in ZMK is still experimental, so if you have serious concerns about an active attacker with physical proximity to your device, consider only pairing/bonding your keyboards in a controlled environment. + +## Profiles + +By default, ZMK supports five "profiles" for selecting which bonded host +device should receive the keyboard input. + +:::note Connection Management + +When pairing to a host device ZMK saves bond information to the selected profile. It will not replace this automatically when you initiate pairing with another device. To pair with a new device select an unused profile with or clearing the current profile, using the [`&bt` behavior](../behaviors/bluetooth.md) on your keyboard. + +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. + +::: + +Failure to manage the profiles can result in unexpected/broken behavior with hosts due to bond key mismatches, so it is an important aspect of ZMK to understand. + +## Bluetooth Behavior + +Management of the bluetooth in ZMK is accomplished using the [`&bt` behavior](../behaviors/bluetooth.md). Be sure to refer to that documentation to learn how to manage profiles, switch between connected hosts, etc. + +## Troubleshooting + +## Known Issues + +There are a few known issues related to BLE and ZMK: + +### Windows Battery Reporting + +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: + +``` +CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n +``` + +### macOS Connected But Not Working + +If you attempt to pair a ZMK keyboard from macOS in a way that causes a bonding issue, macOS may report the keyboard as connected, but fail to actually work. If this occurs: + +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. diff --git a/docs/sidebars.js b/docs/sidebars.js index 7b445a29..a52f3302 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -10,6 +10,7 @@ module.exports = { ], Features: [ "features/keymaps", + "features/bluetooth", "features/combos", "features/conditional-layers", "features/debouncing", @@ -57,6 +58,7 @@ module.exports = { "config/backlight", "config/battery", "config/behaviors", + "config/bluetooth", "config/combos", "config/displays", "config/encoders", From 313ed6adb6db3154c14f783b791255b6f3422fb3 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 17 Mar 2023 06:20:33 +0000 Subject: [PATCH 35/64] fix(display): Tweak EPD driver init/blanking. Ensure we only clear the display when turning blanking off the first time, not every time, to avoid duplicate clears. --- app/drivers/display/il0323.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/drivers/display/il0323.c b/app/drivers/display/il0323.c index 94e38481..6555e5c1 100644 --- a/app/drivers/display/il0323.c +++ b/app/drivers/display/il0323.c @@ -47,6 +47,7 @@ static uint8_t il0323_pwr[] = DT_INST_PROP(0, pwr); static uint8_t last_buffer[IL0323_BUFFER_SIZE]; static bool blanking_on = true; +static bool init_clear_done = false; static inline int il0323_write_cmd(const struct il0323_cfg *cfg, uint8_t cmd, uint8_t *data, size_t len) { @@ -198,16 +199,21 @@ static int il0323_clear_and_write_buffer(const struct device *dev, uint8_t patte static int il0323_blanking_off(const struct device *dev) { const struct il0323_cfg *cfg = dev->config; - if (blanking_on) { + if (!init_clear_done) { /* Update EPD panel in normal mode */ il0323_busy_wait(cfg); if (il0323_clear_and_write_buffer(dev, 0xff, true)) { return -EIO; } + init_clear_done = true; } blanking_on = false; + if (il0323_update_display(dev)) { + return -EIO; + } + return 0; } From 2614b856349a39a39ddb88c71b695c70a6fa1c05 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 24 Oct 2022 03:54:49 +0000 Subject: [PATCH 36/64] feat(docs): Add blog post for Zephyr 3.2. Co-authored-by: Cem Aksoylar --- docs/blog/2023-04-06-zephyr-3-2.md | 303 +++++++++++++++++++++++++++++ 1 file changed, 303 insertions(+) create mode 100644 docs/blog/2023-04-06-zephyr-3-2.md diff --git a/docs/blog/2023-04-06-zephyr-3-2.md b/docs/blog/2023-04-06-zephyr-3-2.md new file mode 100644 index 00000000..b60ad27c --- /dev/null +++ b/docs/blog/2023-04-06-zephyr-3-2.md @@ -0,0 +1,303 @@ +--- +title: "Zephyr 3.2 Update" +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, core] +--- + +I'm happy to announce that we have completed the [work](https://github.com/zmkfirmware/zmk/pull/1499) to upgrade ZMK to [Zephyr 3.2](https://docs.zephyrproject.org/3.2.0/releases/release-notes-3.2.html)! + +[petejohanson] did the upgrade work to adjust ZMK for the Zephyr changes, with help from [Nicell] on the LVGL pieces. + +- Upgrade to LVGL 8.x API, and move to the new Kconfig settings. +- Tons of RP2040 work. +- Zephyr core API changes, including DTS `label` use changes. +- Move to [pinctrl](https://docs.zephyrproject.org/3.2.0/hardware/pinctrl/index.html) Zephyr subsystem. + +## Getting The Changes + +Use the following steps to update to the latest tooling in order to properly use the new ZMK changes: + +### User Config Repositories Using GitHub Actions + +Existing user config repositories using Github Actions to build will pull down Zephyr 3.2 automatically, however if you created your user config a while ago, you may need to update it to reference our shared build configuration to leverage the correct Docker image. + +1. Replace the contents of your `.github/workflows/build.yml` with: + + ``` + on: [push, pull_request, workflow_dispatch] + + jobs: + build: + uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main + ``` + +1. If it doesn't exist already, add a new file to your repository named `build.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 + # control, add individual board + shield combinations to + # the `include` property, e.g: + # + # board: [ "nice_nano_v2" ] + # shield: [ "corne_left", "corne_right" ] + # include: + # - board: bdn9_rev2 + # - board: nice_nano_v2 + # shield: reviung41 + # + --- + ``` + +and then update it as appropriate to build the right shields/boards for your configuration. + +### Upgrade a manual script + +If you have a custom GitHub Actions workflow you need to maintain for some reason, you can update the workflow to to use the `stable` Docker image tag for the build: + +- Open `.github/workflows/build.yml` in your editor/IDE +- 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 + ``` + +### VS Code & Docker (Dev Container) + +If you build locally using VS Code & Docker then: + +- pull the latest ZMK `main` with `git pull` for your ZMK checkout +- reload the project +- if you are prompted to rebuild the remote container, click `Rebuild` +- otherwise, press `F1` and run `Remote Containers: Rebuild Container` +- Once the container has rebuilt and reloaded, run `west update` to pull the updated Zephyr version and its dependencies. + +Once the container has rebuilt, VS Code will be running the 3.2 Docker image. + +### Local Host Development + +The following steps will get you building ZMK locally against Zephyr 3.2: + +- Run the updated [toolchain installation](/docs/development/setup#toolchain-installation) steps, and once completed, remove the previously installed SDK version (optional, existing SDK should still work) +- Install the latest version of `west` by running `pip3 install --user --update west`. +- pull the latest ZMK `main` with `git pull` for your ZMK checkout +- run `west update` to pull the updated Zephyr version and its dependencies + +From there, you should be ready to build as normal! + +## Known Issues + +A few testers have reported inconsistent issues with bluetooth connections on Windows after upgrading, which can be resolved by re-pairing your keyboard by: + +1. Remove the device from Windows. +1. Clear the profile on your keyboard that is associated with the Windows device by triggering `&bt BT_CLR` on your keymap while that profile is active. +1. Restart Windows. +1. Re-connect Windows to your keyboard. + +## Windows Battery Reporting Fix + +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: + +``` +CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n +``` + +## Keymap Changes + +Due to conflicts with new devicetree node labels added for Zephyr's [reset system](https://docs.zephyrproject.org/3.2.0/hardware/peripherals/reset.html), the `&reset` behavior has been renamed to `&sys_reset`. + +All of the in-tree keymaps have been fixed, but you may encounter build failures about duplicate names, requiring you rename the behavior reference in your keymap. Use the [Keymap Upgrader](docs/codes/keymap-upgrader) and this will get fixed for you automatically. + +## Board/Shield Changes + +The following changes have [already been completed](https://github.com/zmkfirmware/zmk/pull/1499/commits) for all boards/shields in ZMK `main` branch. For existing or new PRs, or out of tree boards, the following changes are necessary to properly work with the latest changes. + +### Move to `pinctrl` driver + +Before this change, setting up the details of pins to use them for peripherals like SPI, I2C, etc. was a mix of platform specific driver code. Zephyr has moved to the newer `pinctrl` system to unify the handling of pin configuration, with additional flexibility for things like low power modes for those pins, etc. + +#### Board specific shield overlays + +The main area this affects existing shields is those with board specific overrides, e.g. `/boards/seeeduino_xiao_ble.overlay`, that sets up additional components on custom buses, e.g. addressable RGB LEDs leveraging the SPI MOSI pin. + +#### nRF52 Pin Assignments + +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: + +``` +&i2c0 { + compatible = "nordic,nrf-twi"; + sda-pin = <17>; + scl-pin = <20>; +}; +``` + +With the move to the `pinctrl` system, this setup now look like: + +``` + &i2c0 { + compatible = "nordic,nrf-twi"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; + }; +``` + +which references the `pinctrl` configuration: + +``` +&pinctrl { + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; +``` + +Although slightly more _verbose_ this allows pin configuration infrastructure to be re-used, specify other modes, like sleep, etc. in a standard way across architectures. + +#### Out of Tree Boards/Shields + +All of the in-tree boards and shields have been upgraded, but if you maintain/use an out-of-tree board or shield that uses the converted boards and overrides pins for various buses, you may need to switch to `pinctrl` to match ZMK's new approach. + +The approach is the following when updating a _board_: + +1. Add an entry `CONFIG_PINCTRL=y` to the `_defconfig` file in the board directory. +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: + + ``` + /* + * Copyright (c) 2022 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + + &pinctrl { + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; + + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + }; + ``` + +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: + + ``` + &i2c0 { + compatible = "nordic,nrf-twi"; + sda-pin = <15>; + scl-pin = <17>; + }; + ``` + + would be changed to: + + ``` + &i2c0 { + compatible = "nordic,nrf-twi"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; + }; + ``` + +Because `pinctrl` configuration is very dependent on the specific target SoC, you will rarely need to consider it for a shield overlay that leverages a pro micro or XIAO abstraction. As noted, you're more likely to need to fix up pinctrl settings is using a board specific shield overlay, e.g. `/boards/.overlay` to set things up. + +### LVGL Kconfig changes. + +With the update to LVGL 8.x, Zephyr now leverages an upstream Kconfig file for most LVGL settings. Due to this, the naming for many existing configs has been adjusted. For any configs moved upstream, the naming mostly involves a prefix change from `LVGL_` to the shorter `LV_`. For any that are still Zephyr specific configs, they are now prefixed with `LV_Z_` prefix. + +If you maintain or use an out of tree board/shield with a display, the following will need to be changed in your Kconfig files: + +- `LVGL_VDB_SIZE` -> `LV_Z_VDB_SIZE` +- `LVGL_DPI` -> `LV_DPI_DEF` +- `LVGL_BITS_PER_PIXEL` -> `LV_Z_BITS_PER_PIXEL` + +Other than those specific examples, most other Kconfig values can simply change the `LVGL_` prefix to `LV_`. + +## Raspberry Pi Pico/RP2040 Support + +This Zephyr update allows ZMK to support the new(-ish) RP2040 SoC found in the Raspberry Pi Pico. + +:::note + +ZMK does _not_ support wired split communication yet, so RP2040 is only usable for non-split keyboards. To follow progress on wired splits, see [#1117](https://github.com/zmkfirmware/zmk/pull/1117). + +::: + +### Supported Controllers + +The following RP2040 powered controllers have board definitions for folks to test: + +- Raspberry Pi Pico (`rpi_pico`) +- SparkFun Pro Micro RP2040 (`sparkfun_pro_micro_rp2040`) +- Adafruit Keyboar/KB2040 (`adafruit_kb2040`) +- Seeeduino XIAO RP2040 (`seeeduino_xiao_rp2040`) +- Adafruit Qt PY RP2040 (`adafruit_qt_py_rp2040`) +- BoardSource blok (`boardsource_blok`) +- Elite-Pi (compatible with the `sparkfun_pro_micro_rp2040` board) + +## Upcoming Changes + +### Display re-init + +Zephyr's improved [power domain](https://docs.zephyrproject.org/3.2.0/services/pm/power_domain.html#pm-power-domain) support is a foundation +upon which we can provide a proper fix for the [longstanding display re-init bug](https://github.com/zmkfirmware/zmk/issues/674) which has prevented +ZMK from formally supporting our display code. + +There is work still remaining to fully leverage the power domain system within ZMK to fix the bug, but upgrading Zephyr is the first necessary step. + +## Thanks! + +Thanks to all the testers who have helped verify ZMK functionality on the newer Zephyr version. + +[petejohanson]: https://github.com/petejohanson +[nicell]: https://github.com/Nicell From 134b64ef5bbc67dd9f1c2a961609c62d4f226711 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 6 Apr 2023 06:14:44 +0000 Subject: [PATCH 37/64] fix(docs): Make link to keymap upgrader work. --- docs/blog/2023-04-06-zephyr-3-2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/blog/2023-04-06-zephyr-3-2.md b/docs/blog/2023-04-06-zephyr-3-2.md index b60ad27c..693d93dc 100644 --- a/docs/blog/2023-04-06-zephyr-3-2.md +++ b/docs/blog/2023-04-06-zephyr-3-2.md @@ -115,7 +115,7 @@ CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n Due to conflicts with new devicetree node labels added for Zephyr's [reset system](https://docs.zephyrproject.org/3.2.0/hardware/peripherals/reset.html), the `&reset` behavior has been renamed to `&sys_reset`. -All of the in-tree keymaps have been fixed, but you may encounter build failures about duplicate names, requiring you rename the behavior reference in your keymap. Use the [Keymap Upgrader](docs/codes/keymap-upgrader) and this will get fixed for you automatically. +All of the in-tree keymaps have been fixed, but you may encounter build failures about duplicate names, requiring you rename the behavior reference in your keymap. Use the [Keymap Upgrader](/docs/codes/keymap-upgrader) and this will get fixed for you automatically. ## Board/Shield Changes From 9dcc3ac3753d06db752a1fa7610df1f1be376bd2 Mon Sep 17 00:00:00 2001 From: Hooky <117450225+HookyKB@users.noreply.github.com> Date: Fri, 7 Apr 2023 21:53:10 +0800 Subject: [PATCH 38/64] fix(shields): Fixup nice!view adapter pinctrl props. `pinctrl-0` setting missing `<>`. --- .../shields/nice_view_adapter/boards/bluemicro840_v1.overlay | 2 +- app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay | 2 +- app/boards/shields/nice_view_adapter/boards/nice_nano.overlay | 2 +- app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay | 2 +- .../nice_view_adapter/boards/nrfmicro_11_flipped.overlay | 2 +- app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay | 2 +- .../shields/nice_view_adapter/boards/puchi_ble_v1.overlay | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay b/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay index 27d76b07..9667edf9 100644 --- a/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay +++ b/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay @@ -17,7 +17,7 @@ nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; - pinctrl-0 = &spi0_default; + pinctrl-0 = <&spi0_default>; pinctrl-names = "default"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay b/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay index fc2667f3..21383c70 100644 --- a/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay +++ b/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay @@ -16,7 +16,7 @@ nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; - pinctrl-0 = &spi0_default; + pinctrl-0 = <&spi0_default>; pinctrl-names = "default"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay b/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay index c9a0e788..0068b5b2 100644 --- a/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay @@ -16,7 +16,7 @@ nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; - pinctrl-0 = &spi0_default; + pinctrl-0 = <&spi0_default>; pinctrl-names = "default"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay index 27d76b07..9667edf9 100644 --- a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay @@ -17,7 +17,7 @@ nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; - pinctrl-0 = &spi0_default; + pinctrl-0 = <&spi0_default>; pinctrl-names = "default"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay index 5074d0f9..09b57d16 100644 --- a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay @@ -16,7 +16,7 @@ nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; - pinctrl-0 = &spi0_default; + pinctrl-0 = <&spi0_default>; pinctrl-names = "default"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay b/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay index 9a4f3170..0cdb933a 100644 --- a/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay @@ -16,7 +16,7 @@ nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; - pinctrl-0 = &spi0_default; + pinctrl-0 = <&spi0_default>; pinctrl-names = "default"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay b/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay index 9a4f3170..0cdb933a 100644 --- a/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay +++ b/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay @@ -16,7 +16,7 @@ nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; - pinctrl-0 = &spi0_default; + pinctrl-0 = <&spi0_default>; pinctrl-names = "default"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; From 7434a6b99b01561ea20088819dd1e3cc2b989973 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sat, 8 Apr 2023 00:30:20 -0700 Subject: [PATCH 39/64] fix(shields): Fix nice!view for deep sleep --- .../nice_view_adapter/boards/bluemicro840_v1.overlay | 12 ++++++++++-- .../nice_view_adapter/boards/mikoto_520.overlay | 11 ++++++++++- .../nice_view_adapter/boards/nice_nano.overlay | 11 ++++++++++- .../nice_view_adapter/boards/nice_nano_v2.overlay | 11 ++++++++++- .../nice_view_adapter/boards/nrfmicro_11.overlay | 12 ++++++++++-- .../boards/nrfmicro_11_flipped.overlay | 11 ++++++++++- .../nice_view_adapter/boards/nrfmicro_13.overlay | 11 ++++++++++- .../nice_view_adapter/boards/puchi_ble_v1.overlay | 11 ++++++++++- 8 files changed, 80 insertions(+), 10 deletions(-) diff --git a/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay b/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay index 9667edf9..b8b07258 100644 --- a/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay +++ b/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay @@ -12,13 +12,21 @@ ; }; }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; - nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; pinctrl-0 = <&spi0_default>; - pinctrl-names = "default"; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay b/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay index 21383c70..d9cc0835 100644 --- a/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay +++ b/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay @@ -12,12 +12,21 @@ ; }; }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; pinctrl-0 = <&spi0_default>; - pinctrl-names = "default"; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay b/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay index 0068b5b2..2a1b757d 100644 --- a/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay @@ -12,12 +12,21 @@ ; }; }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; pinctrl-0 = <&spi0_default>; - pinctrl-names = "default"; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay b/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay index 0068b5b2..2a1b757d 100644 --- a/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay @@ -12,12 +12,21 @@ ; }; }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; pinctrl-0 = <&spi0_default>; - pinctrl-names = "default"; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay index 9667edf9..b8b07258 100644 --- a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay @@ -12,13 +12,21 @@ ; }; }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; - nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; pinctrl-0 = <&spi0_default>; - pinctrl-names = "default"; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay index 09b57d16..1cd19db9 100644 --- a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay @@ -12,12 +12,21 @@ ; }; }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; pinctrl-0 = <&spi0_default>; - pinctrl-names = "default"; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay b/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay index 0cdb933a..b8b07258 100644 --- a/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay @@ -12,12 +12,21 @@ ; }; }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; pinctrl-0 = <&spi0_default>; - pinctrl-names = "default"; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay b/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay index 0cdb933a..b8b07258 100644 --- a/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay +++ b/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay @@ -12,12 +12,21 @@ ; }; }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; nice_view_spi: &spi0 { compatible = "nordic,nrf-spim"; pinctrl-0 = <&spi0_default>; - pinctrl-names = "default"; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; From b31b42018ae4368b03b72f038d4dfbbeb31a630a Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sat, 8 Apr 2023 11:08:12 -0500 Subject: [PATCH 40/64] fix: Remove deprecated labels from zmk_uno --- app/boards/shields/zmk_uno/zmk_uno.overlay | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/boards/shields/zmk_uno/zmk_uno.overlay b/app/boards/shields/zmk_uno/zmk_uno.overlay index f10d18af..12b5e2b3 100644 --- a/app/boards/shields/zmk_uno/zmk_uno.overlay +++ b/app/boards/shields/zmk_uno/zmk_uno.overlay @@ -16,7 +16,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "RGB"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ @@ -126,8 +125,6 @@ kscan_matrix: kscan_matrix { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN_MATRIX"; - diode-direction = "col2row"; col-gpios @@ -146,8 +143,6 @@ compatible = "zmk,kscan-gpio-direct"; status = "disabled"; - label = "KSCAN_DIRECT"; - input-gpios = <&arduino_header 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&arduino_header 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> @@ -161,8 +156,6 @@ compatible = "zmk,kscan-gpio-direct"; toggle-mode; - label = "KSCAN_TOGGLE"; - input-gpios = <&arduino_header 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&arduino_header 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> From 374104dec616013bd85bcdf095e1ecc4fea40954 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sun, 9 Apr 2023 12:35:34 -0700 Subject: [PATCH 41/64] fix(underglow): Move to spi3 for underglow bus. * Workaround Zephyr bug for Nordic SPI(M) driver after the pinctrl refactor by using spi3 peripheral for the SPI bus for the WS2812 led_strip driver. --- .../shields/chalice/boards/nice_nano.overlay | 10 +++++----- .../shields/chalice/boards/nice_nano_v2.overlay | 10 +++++----- .../shields/corne/boards/nice_nano.overlay | 10 +++++----- .../shields/corne/boards/nice_nano_v2.overlay | 10 +++++----- .../shields/elephant42/boards/nice_nano.overlay | 10 +++++----- .../elephant42/boards/nice_nano_v2.overlay | 10 +++++----- .../eternal_keypad/boards/nice_nano.overlay | 10 +++++----- .../eternal_keypad/boards/nice_nano_v2.overlay | 10 +++++----- .../shields/helix/boards/nice_nano.overlay | 10 +++++----- .../shields/helix/boards/nice_nano_v2.overlay | 10 +++++----- .../shields/jorne/boards/nice_nano.overlay | 10 +++++----- .../shields/jorne/boards/nice_nano_v2.overlay | 10 +++++----- .../shields/kyria/boards/nice_nano.overlay | 10 +++++----- .../shields/kyria/boards/nice_nano_v2.overlay | 10 +++++----- .../shields/lily58/boards/nice_nano.overlay | 10 +++++----- .../shields/lily58/boards/nice_nano_v2.overlay | 10 +++++----- .../shields/microdox/boards/nice_nano.overlay | 10 +++++----- .../shields/microdox/boards/nice_nano_v2.overlay | 10 +++++----- .../shields/murphpad/boards/nice_nano.overlay | 10 +++++----- .../shields/murphpad/boards/nice_nano_v2.overlay | 10 +++++----- .../shields/nibble/boards/nice_nano.overlay | 10 +++++----- .../shields/nibble/boards/nice_nano_v2.overlay | 10 +++++----- .../shields/redox/boards/nice_nano.overlay | 10 +++++----- .../shields/redox/boards/nice_nano_v2.overlay | 10 +++++----- .../shields/reviung41/boards/nice_nano.overlay | 12 ++++++------ .../reviung41/boards/nice_nano_v2.overlay | 12 ++++++------ .../shields/romac_plus/boards/nice_nano.overlay | 10 +++++----- .../romac_plus/boards/nice_nano_v2.overlay | 10 +++++----- app/boards/shields/snap/boards/nice_nano.overlay | 10 +++++----- .../shields/snap/boards/nice_nano_v2.overlay | 10 +++++----- .../boards/nice_nano.overlay | 10 +++++----- .../boards/nice_nano_v2.overlay | 10 +++++----- .../boards/nice_nano.overlay | 10 +++++----- .../boards/nice_nano_v2.overlay | 10 +++++----- .../boards/nice_nano.overlay | 10 +++++----- .../boards/nice_nano_v2.overlay | 10 +++++----- app/boards/shields/tg4x/boards/nice_nano.overlay | 10 +++++----- .../shields/tg4x/boards/nice_nano_v2.overlay | 10 +++++----- .../shields/tidbit/boards/nice_nano.overlay | 10 +++++----- .../shields/tidbit/boards/nice_nano_v2.overlay | 10 +++++----- .../two_percent_milk/boards/nice_nano.overlay | 10 +++++----- .../two_percent_milk/boards/nice_nano_v2.overlay | 10 +++++----- docs/docs/features/underglow.md | 16 ++++++++-------- 43 files changed, 220 insertions(+), 220 deletions(-) diff --git a/app/boards/shields/chalice/boards/nice_nano.overlay b/app/boards/shields/chalice/boards/nice_nano.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/chalice/boards/nice_nano.overlay +++ b/app/boards/shields/chalice/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/chalice/boards/nice_nano_v2.overlay b/app/boards/shields/chalice/boards/nice_nano_v2.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/chalice/boards/nice_nano_v2.overlay +++ b/app/boards/shields/chalice/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/corne/boards/nice_nano.overlay b/app/boards/shields/corne/boards/nice_nano.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/corne/boards/nice_nano.overlay +++ b/app/boards/shields/corne/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/corne/boards/nice_nano_v2.overlay b/app/boards/shields/corne/boards/nice_nano_v2.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/corne/boards/nice_nano_v2.overlay +++ b/app/boards/shields/corne/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/elephant42/boards/nice_nano.overlay b/app/boards/shields/elephant42/boards/nice_nano.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/elephant42/boards/nice_nano.overlay +++ b/app/boards/shields/elephant42/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/elephant42/boards/nice_nano_v2.overlay b/app/boards/shields/elephant42/boards/nice_nano_v2.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/elephant42/boards/nice_nano_v2.overlay +++ b/app/boards/shields/elephant42/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/eternal_keypad/boards/nice_nano.overlay b/app/boards/shields/eternal_keypad/boards/nice_nano.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/eternal_keypad/boards/nice_nano.overlay +++ b/app/boards/shields/eternal_keypad/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay b/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay +++ b/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/helix/boards/nice_nano.overlay b/app/boards/shields/helix/boards/nice_nano.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/helix/boards/nice_nano.overlay +++ b/app/boards/shields/helix/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/helix/boards/nice_nano_v2.overlay b/app/boards/shields/helix/boards/nice_nano_v2.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/helix/boards/nice_nano_v2.overlay +++ b/app/boards/shields/helix/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/jorne/boards/nice_nano.overlay b/app/boards/shields/jorne/boards/nice_nano.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/jorne/boards/nice_nano.overlay +++ b/app/boards/shields/jorne/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/jorne/boards/nice_nano_v2.overlay b/app/boards/shields/jorne/boards/nice_nano_v2.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/jorne/boards/nice_nano_v2.overlay +++ b/app/boards/shields/jorne/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/kyria/boards/nice_nano.overlay b/app/boards/shields/kyria/boards/nice_nano.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/kyria/boards/nice_nano.overlay +++ b/app/boards/shields/kyria/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/kyria/boards/nice_nano_v2.overlay b/app/boards/shields/kyria/boards/nice_nano_v2.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/kyria/boards/nice_nano_v2.overlay +++ b/app/boards/shields/kyria/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/lily58/boards/nice_nano.overlay b/app/boards/shields/lily58/boards/nice_nano.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/lily58/boards/nice_nano.overlay +++ b/app/boards/shields/lily58/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/lily58/boards/nice_nano_v2.overlay b/app/boards/shields/lily58/boards/nice_nano_v2.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/lily58/boards/nice_nano_v2.overlay +++ b/app/boards/shields/lily58/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/microdox/boards/nice_nano.overlay b/app/boards/shields/microdox/boards/nice_nano.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/microdox/boards/nice_nano.overlay +++ b/app/boards/shields/microdox/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/microdox/boards/nice_nano_v2.overlay b/app/boards/shields/microdox/boards/nice_nano_v2.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/microdox/boards/nice_nano_v2.overlay +++ b/app/boards/shields/microdox/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/murphpad/boards/nice_nano.overlay b/app/boards/shields/murphpad/boards/nice_nano.overlay index 89ba4f9d..3e2241a2 100644 --- a/app/boards/shields/murphpad/boards/nice_nano.overlay +++ b/app/boards/shields/murphpad/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/murphpad/boards/nice_nano_v2.overlay b/app/boards/shields/murphpad/boards/nice_nano_v2.overlay index 89ba4f9d..3e2241a2 100644 --- a/app/boards/shields/murphpad/boards/nice_nano_v2.overlay +++ b/app/boards/shields/murphpad/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/nibble/boards/nice_nano.overlay b/app/boards/shields/nibble/boards/nice_nano.overlay index ece699e2..54ab9fec 100644 --- a/app/boards/shields/nibble/boards/nice_nano.overlay +++ b/app/boards/shields/nibble/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/nibble/boards/nice_nano_v2.overlay b/app/boards/shields/nibble/boards/nice_nano_v2.overlay index ece699e2..54ab9fec 100644 --- a/app/boards/shields/nibble/boards/nice_nano_v2.overlay +++ b/app/boards/shields/nibble/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/redox/boards/nice_nano.overlay b/app/boards/shields/redox/boards/nice_nano.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/redox/boards/nice_nano.overlay +++ b/app/boards/shields/redox/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/redox/boards/nice_nano_v2.overlay b/app/boards/shields/redox/boards/nice_nano_v2.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/redox/boards/nice_nano_v2.overlay +++ b/app/boards/shields/redox/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/reviung41/boards/nice_nano.overlay b/app/boards/shields/reviung41/boards/nice_nano.overlay index 172859ae..741237e1 100644 --- a/app/boards/shields/reviung41/boards/nice_nano.overlay +++ b/app/boards/shields/reviung41/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { @@ -32,7 +32,7 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ + chain-length = <11>; spi-one-frame = <0x70>; spi-zero-frame = <0x40>; diff --git a/app/boards/shields/reviung41/boards/nice_nano_v2.overlay b/app/boards/shields/reviung41/boards/nice_nano_v2.overlay index 172859ae..741237e1 100644 --- a/app/boards/shields/reviung41/boards/nice_nano_v2.overlay +++ b/app/boards/shields/reviung41/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { @@ -32,7 +32,7 @@ spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ + chain-length = <11>; spi-one-frame = <0x70>; spi-zero-frame = <0x40>; diff --git a/app/boards/shields/romac_plus/boards/nice_nano.overlay b/app/boards/shields/romac_plus/boards/nice_nano.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/romac_plus/boards/nice_nano.overlay +++ b/app/boards/shields/romac_plus/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay b/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay +++ b/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/snap/boards/nice_nano.overlay b/app/boards/shields/snap/boards/nice_nano.overlay index 15c5801e..28e9ce69 100644 --- a/app/boards/shields/snap/boards/nice_nano.overlay +++ b/app/boards/shields/snap/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/snap/boards/nice_nano_v2.overlay b/app/boards/shields/snap/boards/nice_nano_v2.overlay index 15c5801e..28e9ce69 100644 --- a/app/boards/shields/snap/boards/nice_nano_v2.overlay +++ b/app/boards/shields/snap/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay +++ b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay +++ b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay index 4a6b717d..5b9ce4a8 100644 --- a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay +++ b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay @@ -2,13 +2,13 @@ &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -16,12 +16,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay index ed03ed0d..9e168625 100644 --- a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay +++ b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay +++ b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay index 172859ae..f1330669 100644 --- a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay +++ b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/tg4x/boards/nice_nano.overlay b/app/boards/shields/tg4x/boards/nice_nano.overlay index 62f20140..54046bf5 100644 --- a/app/boards/shields/tg4x/boards/nice_nano.overlay +++ b/app/boards/shields/tg4x/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/tg4x/boards/nice_nano_v2.overlay b/app/boards/shields/tg4x/boards/nice_nano_v2.overlay index 62f20140..54046bf5 100644 --- a/app/boards/shields/tg4x/boards/nice_nano_v2.overlay +++ b/app/boards/shields/tg4x/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/tidbit/boards/nice_nano.overlay b/app/boards/shields/tidbit/boards/nice_nano.overlay index 08379e30..ad66feac 100644 --- a/app/boards/shields/tidbit/boards/nice_nano.overlay +++ b/app/boards/shields/tidbit/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/tidbit/boards/nice_nano_v2.overlay b/app/boards/shields/tidbit/boards/nice_nano_v2.overlay index 08379e30..ad66feac 100644 --- a/app/boards/shields/tidbit/boards/nice_nano_v2.overlay +++ b/app/boards/shields/tidbit/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/two_percent_milk/boards/nice_nano.overlay b/app/boards/shields/two_percent_milk/boards/nice_nano.overlay index 08379e30..ad66feac 100644 --- a/app/boards/shields/two_percent_milk/boards/nice_nano.overlay +++ b/app/boards/shields/two_percent_milk/boards/nice_nano.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay b/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay index 08379e30..ad66feac 100644 --- a/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay +++ b/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay @@ -1,13 +1,13 @@ #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -15,12 +15,12 @@ }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { diff --git a/docs/docs/features/underglow.md b/docs/docs/features/underglow.md index c70ffffb..c1dc68d3 100644 --- a/docs/docs/features/underglow.md +++ b/docs/docs/features/underglow.md @@ -52,7 +52,7 @@ For example, the Kyria shield has a `boards/nice_nano.overlay` file that defines ### nRF52-based boards -With nRF52 boards, you can just use `&spi1` and define the pins you want to use. +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: @@ -60,13 +60,13 @@ Here's an example on a definition that uses P0.06: #include &pinctrl { - spi1_default: spi1_default { + spi3_default: spi3_default { group1 { psels = ; }; }; - spi1_sleep: spi1_sleep { + spi3_sleep: spi3_sleep { group1 { psels = ; low-power-enable; @@ -74,12 +74,12 @@ Here's an example on a definition that uses P0.06: }; }; -&spi1 { +&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; led_strip: ws2812@0 { @@ -119,12 +119,12 @@ If your board/shield uses LEDs that require the data sent in a different order, For other boards, you must select an SPI definition that has the `MOSI` pin as your data pin going to your LED strip. -Here's another example for a non-nRF52 board on `spi1`: +Here's another example for a non-nRF52 board on `spi3`: ``` #include -&spi1 { +&spi3 { led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; From 064aff6bc074febd394a288403129e95c386395d Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sat, 8 Apr 2023 16:32:29 -0500 Subject: [PATCH 42/64] fix(behaviors): Fix use after free in sticky key Fixed an issue where the sticky key behavior would call ZMK_EVENT_RAISE_AFTER(), which would free the provided event, but then it would keep using that now-freed event data. --- app/src/behaviors/behavior_sticky_key.c | 30 +++++++++++++++---------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/app/src/behaviors/behavior_sticky_key.c b/app/src/behaviors/behavior_sticky_key.c index 22936086..6697b9b1 100644 --- a/app/src/behaviors/behavior_sticky_key.c +++ b/app/src/behaviors/behavior_sticky_key.c @@ -191,6 +191,11 @@ static int sticky_key_keycode_state_changed_listener(const zmk_event_t *eh) { // keep track whether the event has been reraised, so we only reraise it once bool event_reraised = false; + + // reraising the event frees it, so make a copy of any event data we might + // need after it's been freed. + const struct zmk_keycode_state_changed ev_copy = *ev; + for (int i = 0; i < ZMK_BHV_STICKY_KEY_MAX_HELD; i++) { struct active_sticky_key *sticky_key = &active_sticky_keys[i]; if (sticky_key->position == ZMK_BHV_STICKY_KEY_POSITION_FREE) { @@ -198,23 +203,24 @@ static int sticky_key_keycode_state_changed_listener(const zmk_event_t *eh) { } if (strcmp(sticky_key->config->behavior.behavior_dev, "KEY_PRESS") == 0 && - ZMK_HID_USAGE_ID(sticky_key->param1) == ev->keycode && - ZMK_HID_USAGE_PAGE(sticky_key->param1) == ev->usage_page && - SELECT_MODS(sticky_key->param1) == ev->implicit_modifiers) { + ZMK_HID_USAGE_ID(sticky_key->param1) == ev_copy.keycode && + ZMK_HID_USAGE_PAGE(sticky_key->param1) == ev_copy.usage_page && + SELECT_MODS(sticky_key->param1) == ev_copy.implicit_modifiers) { // don't catch key down events generated by the sticky key behavior itself continue; } // If this event was queued, the timer may be triggered late or not at all. // Release the sticky key if the timer should've run out in the meantime. - if (sticky_key->release_at != 0 && ev->timestamp > sticky_key->release_at) { + if (sticky_key->release_at != 0 && ev_copy.timestamp > sticky_key->release_at) { stop_timer(sticky_key); release_sticky_key_behavior(sticky_key, sticky_key->release_at); continue; } - if (ev->state) { // key down - if (sticky_key->config->ignore_modifiers && is_mod(ev->usage_page, ev->keycode)) { + if (ev_copy.state) { // key down + if (sticky_key->config->ignore_modifiers && + is_mod(ev_copy.usage_page, ev_copy.keycode)) { // ignore modifier key press so we can stack sticky keys and combine with other // modifiers continue; @@ -231,17 +237,17 @@ static int sticky_key_keycode_state_changed_listener(const zmk_event_t *eh) { ZMK_EVENT_RAISE_AFTER(eh, behavior_sticky_key); event_reraised = true; } - release_sticky_key_behavior(sticky_key, ev->timestamp); + release_sticky_key_behavior(sticky_key, ev_copy.timestamp); } } - sticky_key->modified_key_usage_page = ev->usage_page; - sticky_key->modified_key_keycode = ev->keycode; + sticky_key->modified_key_usage_page = ev_copy.usage_page; + sticky_key->modified_key_keycode = ev_copy.keycode; } else { // key up if (sticky_key->timer_started && - sticky_key->modified_key_usage_page == ev->usage_page && - sticky_key->modified_key_keycode == ev->keycode) { + sticky_key->modified_key_usage_page == ev_copy.usage_page && + sticky_key->modified_key_keycode == ev_copy.keycode) { stop_timer(sticky_key); - release_sticky_key_behavior(sticky_key, ev->timestamp); + release_sticky_key_behavior(sticky_key, ev_copy.timestamp); } } } From 3c8f55ede0a8f08f0cc11e500c0f2e3d05a87f7c Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sun, 9 Apr 2023 18:08:35 -0700 Subject: [PATCH 43/64] fix(display): Do not override font size in status screen --- app/src/display/status_screen.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/src/display/status_screen.c b/app/src/display/status_screen.c index 7c3870a8..58de09ae 100644 --- a/app/src/display/status_screen.c +++ b/app/src/display/status_screen.c @@ -34,16 +34,9 @@ static struct zmk_widget_layer_status layer_status_widget; static struct zmk_widget_wpm_status wpm_status_widget; #endif -lv_style_t global_style; - lv_obj_t *zmk_display_status_screen() { lv_obj_t *screen; - - lv_style_init(&global_style); - lv_style_set_text_font(&global_style, &lv_font_montserrat_12); - screen = lv_obj_create(NULL); - lv_obj_add_style(screen, &global_style, LV_PART_MAIN); #if IS_ENABLED(CONFIG_ZMK_WIDGET_BATTERY_STATUS) zmk_widget_battery_status_init(&battery_status_widget, screen); From 702d79c108bfd02d85dda3dda55f31ce8316cfd8 Mon Sep 17 00:00:00 2001 From: nguyendown <50001260+nguyendown@users.noreply.github.com> Date: Mon, 10 Apr 2023 12:50:57 +0700 Subject: [PATCH 44/64] test(behaviors): add unit tests for sticky key `quick-release` Duplicate the existing tests with `quick-release` enabled: - 8-lsk-osk-combination-quick-release - 10-callum-mods-quick-release --- .../events.patterns | 1 + .../keycode_events.snapshot | 10 ++++ .../native_posix_64.keymap | 40 +++++++++++++ .../events.patterns | 1 + .../keycode_events.snapshot | 12 ++++ .../native_posix_64.keymap | 56 +++++++++++++++++++ 6 files changed, 120 insertions(+) create mode 100644 app/tests/sticky-keys/10-callum-mods-quick-release/events.patterns create mode 100644 app/tests/sticky-keys/10-callum-mods-quick-release/keycode_events.snapshot create mode 100644 app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap create mode 100644 app/tests/sticky-keys/8-lsk-osk-combination-quick-release/events.patterns create mode 100644 app/tests/sticky-keys/8-lsk-osk-combination-quick-release/keycode_events.snapshot create mode 100644 app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap diff --git a/app/tests/sticky-keys/10-callum-mods-quick-release/events.patterns b/app/tests/sticky-keys/10-callum-mods-quick-release/events.patterns new file mode 100644 index 00000000..b1342af4 --- /dev/null +++ b/app/tests/sticky-keys/10-callum-mods-quick-release/events.patterns @@ -0,0 +1 @@ +s/.*hid_listener_keycode_//p diff --git a/app/tests/sticky-keys/10-callum-mods-quick-release/keycode_events.snapshot b/app/tests/sticky-keys/10-callum-mods-quick-release/keycode_events.snapshot new file mode 100644 index 00000000..5ee7c103 --- /dev/null +++ b/app/tests/sticky-keys/10-callum-mods-quick-release/keycode_events.snapshot @@ -0,0 +1,10 @@ +pressed: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0xE2 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0xE2 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 +released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap b/app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap new file mode 100644 index 00000000..5c1c2264 --- /dev/null +++ b/app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap @@ -0,0 +1,40 @@ +#include +#include +#include + +&sk { + quick-release; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &sk LEFT_CONTROL &kp A + &sk LEFT_SHIFT &sk LEFT_ALT>; + }; + }; +}; + +&kscan { + events = < + /* tap sk LEFT_CONTROL */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* tap sk LEFT_SHIFT */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + /* tap sk LEFT_ALT */ + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + /* tap A */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* tap A (no sticky keys anymore) */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + >; +}; diff --git a/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/events.patterns b/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/events.patterns new file mode 100644 index 00000000..b1342af4 --- /dev/null +++ b/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/events.patterns @@ -0,0 +1 @@ +s/.*hid_listener_keycode_//p diff --git a/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/keycode_events.snapshot b/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/keycode_events.snapshot new file mode 100644 index 00000000..d71c3968 --- /dev/null +++ b/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/keycode_events.snapshot @@ -0,0 +1,12 @@ +pressed: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00 +released: 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 0x05 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x1C implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x1C implicit_mods 0x00 explicit_mods 0x00 +pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 +released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap b/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap new file mode 100644 index 00000000..6d88a9ea --- /dev/null +++ b/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap @@ -0,0 +1,56 @@ +#include +#include +#include + +&sk { + quick-release; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &sk LEFT_SHIFT &sl 1 + &kp A &kp B>; + }; + + lower_layer { + bindings = < + &sk LEFT_CONTROL &kp X + &kp Y &kp Z>; + }; + }; +}; + +&kscan { + events = < + /* tap sl lower_layer */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* tap sk LEFT_CONTROL */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* tap A */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + /* tap B */ + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + + /* tap sk LEFT_SHIFT */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* tap sl lower_layer */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* tap Y */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + /* tap B */ + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + >; +}; From 3f48062225e0382de35cecc3da6914be89a2c91e Mon Sep 17 00:00:00 2001 From: Xudong Zheng <7pkvm5aw@slicealias.com> Date: Fri, 24 Feb 2023 18:11:46 -0500 Subject: [PATCH 45/64] feat(core): Add Kconfig option to exclude debug log messages --- app/Kconfig | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 824d2700..794b6762 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -402,6 +402,17 @@ endmenu menu "USB Logging" +config ZMK_LOGGING_MINIMAL + bool "Suppress all ZMK debug log messages" + default false + +if !ZMK_LOGGING_MINIMAL + +config ZMK_LOG_LEVEL + default 4 + +endif + config ZMK_USB_LOGGING bool "Enable USB CDC ACM logging to help debug" select LOG @@ -417,16 +428,12 @@ config ZMK_USB_LOGGING if ZMK_USB_LOGGING -config ZMK_LOG_LEVEL - default 4 - choice USB_CDC_ACM_LOG_LEVEL_CHOICE default USB_CDC_ACM_LOG_LEVEL_OFF endchoice choice USB_DRIVER_LOG_LEVEL_CHOICE default USB_DRIVER_LOG_LEVEL_OFF - endchoice # We do this to avoid log loop where logging to USB generates more log messages. From a20b9502bc069cac94a55243cf091e3174a9992b Mon Sep 17 00:00:00 2001 From: Xudong Zheng <7pkvm5aw@slicealias.com> Date: Fri, 24 Feb 2023 18:14:23 -0500 Subject: [PATCH 46/64] feat(core): Add RTT logging Kconfig option --- app/Kconfig | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 794b6762..75a37f63 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -400,7 +400,7 @@ config ZMK_KSCAN_EVENT_QUEUE_SIZE #KSCAN Settings endmenu -menu "USB Logging" +menu "Logging" config ZMK_LOGGING_MINIMAL bool "Suppress all ZMK debug log messages" @@ -441,16 +441,38 @@ endchoice config USB_CDC_ACM_RINGBUF_SIZE default 1024 -config LOG_BUFFER_SIZE - default 8192 - config LOG_PROCESS_THREAD_STARTUP_DELAY_MS default 1000 #ZMK_USB_LOGGING endif -#USB Logging +config ZMK_RTT_LOGGING + bool "Enable RTT logging to help debug" + select LOG + select DEBUG + select ASSERT + select USE_SEGGER_RTT + select CONSOLE + select RTT_CONSOLE + +if ZMK_RTT_LOGGING + +config SEGGER_RTT_BUFFER_SIZE_UP + default 8192 + +#ZMK_RTT_LOGGING +endif + +if ZMK_USB_LOGGING || ZMK_RTT_LOGGING + +config LOG_BUFFER_SIZE + default 8192 + +#ZMK_USB_LOGGING || ZMK_RTT_LOGGING +endif + +#Logging endmenu if SETTINGS From ee9fcec3c97c23e15a2369b95cc0a590f04f1875 Mon Sep 17 00:00:00 2001 From: Xudong Zheng <7pkvm5aw@slicealias.com> Date: Fri, 24 Feb 2023 18:16:18 -0500 Subject: [PATCH 47/64] feat(core): Process log every 100ms --- app/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Kconfig b/app/Kconfig index 75a37f63..431a1bb1 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -469,6 +469,9 @@ if ZMK_USB_LOGGING || ZMK_RTT_LOGGING config LOG_BUFFER_SIZE default 8192 +config LOG_PROCESS_THREAD_SLEEP_MS + default 100 + #ZMK_USB_LOGGING || ZMK_RTT_LOGGING endif From 309359b32f2ce46adc2b720b1cca20d9ac333d6c Mon Sep 17 00:00:00 2001 From: Purdea Andrei Date: Mon, 10 Apr 2023 10:27:19 +0300 Subject: [PATCH 48/64] fix(keymaps): fix keypresses that are not in the transform Before this change, if a matrix position was not present in the transform, various incorrect behaviors would happen: 1) In some cases out-of-bounds accesses: Note that the size of the`transform[]` array does not necessarily match the size of the matrix. So for example if key position (ZMK_MATRIX_COLS-1, ZMK_MATRIX_ROWS-1) is not present in the transform, but ends up being pressed, then the array will be accessed beyond its size, and any data could be returned. 2) In other cases the 0th position in the keymap will be used because the `transform[]` array is initialized to all zeros. --- app/include/zmk/matrix_transform.h | 2 +- app/src/kscan.c | 9 ++++++- app/src/matrix_transform.c | 43 +++++++++++++++++++++++------- 3 files changed, 43 insertions(+), 11 deletions(-) diff --git a/app/include/zmk/matrix_transform.h b/app/include/zmk/matrix_transform.h index 413678a7..ffd3e3f1 100644 --- a/app/include/zmk/matrix_transform.h +++ b/app/include/zmk/matrix_transform.h @@ -6,4 +6,4 @@ #pragma once -uint32_t zmk_matrix_transform_row_column_to_position(uint32_t row, uint32_t column); \ No newline at end of file +int32_t zmk_matrix_transform_row_column_to_position(uint32_t row, uint32_t column); \ No newline at end of file diff --git a/app/src/kscan.c b/app/src/kscan.c index b0713320..62d0cf07 100644 --- a/app/src/kscan.c +++ b/app/src/kscan.c @@ -47,7 +47,14 @@ void zmk_kscan_process_msgq(struct k_work *item) { while (k_msgq_get(&zmk_kscan_msgq, &ev, K_NO_WAIT) == 0) { bool pressed = (ev.state == ZMK_KSCAN_EVENT_STATE_PRESSED); - uint32_t position = zmk_matrix_transform_row_column_to_position(ev.row, ev.column); + int32_t position = zmk_matrix_transform_row_column_to_position(ev.row, ev.column); + + if (position < 0) { + LOG_WRN("Not found in transform: row: %d, col: %d, pressed: %s", ev.row, ev.column, + (pressed ? "true" : "false")); + continue; + } + LOG_DBG("Row: %d, col: %d, position: %d, pressed: %s", ev.row, ev.column, position, (pressed ? "true" : "false")); ZMK_EVENT_RAISE(new_zmk_position_state_changed( diff --git a/app/src/matrix_transform.c b/app/src/matrix_transform.c index 47256608..6c616d5e 100644 --- a/app/src/matrix_transform.c +++ b/app/src/matrix_transform.c @@ -11,17 +11,32 @@ #ifdef ZMK_KEYMAP_TRANSFORM_NODE -#define _TRANSFORM_ENTRY(i, _) \ - [(KT_ROW(DT_PROP_BY_IDX(ZMK_KEYMAP_TRANSFORM_NODE, map, i)) * ZMK_MATRIX_COLS) + \ - KT_COL(DT_PROP_BY_IDX(ZMK_KEYMAP_TRANSFORM_NODE, map, i))] = i +/* the transform in the device tree is a list of (row,column) pairs that is + * indexed by by the keymap position of that key. We want to invert this in + * order to be able to quickly determine what keymap position a particular + * row,column pair is associated with, using a single lookup. + * + * We do this by creating the `transform` array at compile time, which is + * indexed by (row * ZMK_MATRIX_COLS) + column, and the value contains an + * encoded keymap index it is associated with. The keymap index is encoded + * by adding INDEX_OFFSET to it, because not all row,column pairs have an + * associated keymap index (some matrices are sparse), C globals are + * initialized to 0, and the keymap index of 0 is a valid index. We want to + * be able to detect the condition when an unassigned matrix position is + * pressed and we want to return an error. + */ -static uint32_t transform[] = {LISTIFY(ZMK_KEYMAP_LEN, _TRANSFORM_ENTRY, (, ), 0)}; +#define INDEX_OFFSET 1 + +#define TRANSFORM_ENTRY(i, _) \ + [(KT_ROW(DT_PROP_BY_IDX(ZMK_KEYMAP_TRANSFORM_NODE, map, i)) * ZMK_MATRIX_COLS) + \ + KT_COL(DT_PROP_BY_IDX(ZMK_KEYMAP_TRANSFORM_NODE, map, i))] = i + INDEX_OFFSET + +static uint32_t transform[] = {LISTIFY(ZMK_KEYMAP_LEN, TRANSFORM_ENTRY, (, ), 0)}; #endif -uint32_t zmk_matrix_transform_row_column_to_position(uint32_t row, uint32_t column) { - uint32_t matrix_index; - +int32_t zmk_matrix_transform_row_column_to_position(uint32_t row, uint32_t column) { #if DT_NODE_HAS_PROP(ZMK_KEYMAP_TRANSFORM_NODE, col_offset) column += DT_PROP(ZMK_KEYMAP_TRANSFORM_NODE, col_offset); #endif @@ -30,10 +45,20 @@ uint32_t zmk_matrix_transform_row_column_to_position(uint32_t row, uint32_t colu row += DT_PROP(ZMK_KEYMAP_TRANSFORM_NODE, row_offset); #endif - matrix_index = (row * ZMK_MATRIX_COLS) + column; + const uint32_t matrix_index = (row * ZMK_MATRIX_COLS) + column; #ifdef ZMK_KEYMAP_TRANSFORM_NODE - return transform[matrix_index]; + if (matrix_index >= ARRAY_SIZE(transform)) { + return -EINVAL; + } + + const uint32_t value = transform[matrix_index]; + + if (!value) { + return -EINVAL; + } + + return value - INDEX_OFFSET; #else return matrix_index; #endif /* ZMK_KEYMAP_TRANSFORM_NODE */ From f1b138cbf0a37147f24150af2721899fa17e9fd4 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 14 Apr 2023 14:22:53 -0700 Subject: [PATCH 49/64] fix(boards): Fix Zen logo alignment --- app/boards/arm/corneish_zen/custom_status_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/boards/arm/corneish_zen/custom_status_screen.c b/app/boards/arm/corneish_zen/custom_status_screen.c index c45a6243..492239c8 100644 --- a/app/boards/arm/corneish_zen/custom_status_screen.c +++ b/app/boards/arm/corneish_zen/custom_status_screen.c @@ -70,7 +70,7 @@ lv_obj_t *zmk_display_status_screen() { lv_obj_t *zenlogo_icon; zenlogo_icon = lv_img_create(screen); lv_img_set_src(zenlogo_icon, &zenlogo); - lv_obj_align(zenlogo_icon, LV_ALIGN_BOTTOM_MID, 2, -5); + lv_obj_align(zenlogo_icon, LV_ALIGN_BOTTOM_MID, 0, -5); #endif return screen; From 71855af14fa079606d4cbdd3d6403e8956c136f8 Mon Sep 17 00:00:00 2001 From: Josep Roca Date: Sun, 16 Apr 2023 10:04:49 +0300 Subject: [PATCH 50/64] fix(docs): ignore-modifiers clarification * Clarify the potential need of adding the ignore-modifiers setting for new sticky key behaviors. * Add ignore-modifiers setting to skq example * Update docs/docs/behaviors/sticky-key.md Co-authored-by: Cem Aksoylar --- docs/docs/behaviors/sticky-key.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs/behaviors/sticky-key.md b/docs/docs/behaviors/sticky-key.md index 12541ed8..d881e6b0 100644 --- a/docs/docs/behaviors/sticky-key.md +++ b/docs/docs/behaviors/sticky-key.md @@ -36,7 +36,7 @@ Some typists may find that using a sticky shift key interspersed with rapid typi #### `ignore-modifiers` -This setting is enabled by default. It ensures that if a sticky key modifier is pressed before a previously pressed sticky key is released, the modifiers will get combined so you can add more sticky keys or press a regular key to apply the modifiers. This is to accommodate _callum-style mods_ where you are prone to rolling sticky keys. If you want sticky key modifiers to only chain after release, you can disable this setting. +This setting is enabled by default. It ensures that if a sticky key modifier is pressed before a previously pressed sticky key is released, the modifiers will get combined so you can add more sticky keys or press a regular key to apply the modifiers. This is to accommodate _callum-style mods_ where you are prone to rolling sticky keys. If you want sticky key modifiers to only chain after release, you can disable this setting. Please note that activating multiple modifiers via [modifier functions](https://zmk.dev/docs/codes/modifiers#modifier-functions) such as `&sk LS(LALT)`, require `ignore-modifiers` enabled in order to function properly. #### Example @@ -66,6 +66,7 @@ This configuration would apply to all sticky keys. This may not be appropriate i bindings = <&kp>; release-after-ms = <1000>; quick-release; + ignore-modifiers; }; }; From 83a151890cd9491036ef2d73cd22db86a7a55f5c Mon Sep 17 00:00:00 2001 From: sporkus <102923689+sporkus@users.noreply.github.com> Date: Sun, 16 Apr 2023 13:28:08 -0700 Subject: [PATCH 51/64] fix(docs): Correct example keymap filename --- docs/docs/development/boards-shields-keymaps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/development/boards-shields-keymaps.md b/docs/docs/development/boards-shields-keymaps.md index 4644ee79..77d8361a 100644 --- a/docs/docs/development/boards-shields-keymaps.md +++ b/docs/docs/development/boards-shields-keymaps.md @@ -30,7 +30,7 @@ in the `app/boards/${arch}/${board_name}` directory, e.g. `app/boards/arm/planck - A [chosen](https://docs.zephyrproject.org/2.5.0/guides/dts/intro.html#aliases-and-chosen-nodes) node named `zmk,kscan` which references the configured KSCAN driver (usually a GPIO matrix) - (Optional) A [chosen](https://docs.zephyrproject.org/2.5.0/guides/dts/intro.html#aliases-and-chosen-nodes) node named `zmk,matrix_transform` that defines the mapping from KSCAN row/column values to the logical key position for the keyboard. - A `board.cmake` file with CMake directives for how to flash to the device. -- A `keymap/keymap.overlay` file that includes the default keymap for that keyboard. Users will be able to override this keymap in their user configs. +- A `${board_name}.keymap` file that includes the default keymap for that keyboard. Users will be able to override this keymap in their user configs. ## Pro Micro Compatible Keyboard From e7a6e4016d757d37f0b8df28d7b78f38554e0b27 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sat, 29 Oct 2022 23:17:12 -0500 Subject: [PATCH 52/64] feat(behaviors): Add key position to key events Extended the virtual key position system from combos so that each sensor also gets a virtual key position. This allows sensor behaviors to use the behavior queue API. --- app/include/drivers/behavior.h | 13 +++++++----- app/include/zmk/sensors.h | 7 ++++++- app/include/zmk/virtual_key_position.h | 20 +++++++++++++++++++ .../behavior_sensor_rotate_key_press.c | 3 ++- app/src/combo.c | 3 ++- app/src/keymap.c | 10 ++++++---- 6 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 app/include/zmk/virtual_key_position.h diff --git a/app/include/drivers/behavior.h b/app/include/drivers/behavior.h index 71df7344..df18385f 100644 --- a/app/include/drivers/behavior.h +++ b/app/include/drivers/behavior.h @@ -26,6 +26,7 @@ typedef int (*behavior_keymap_binding_callback_t)(struct zmk_behavior_binding *b struct zmk_behavior_binding_event event); typedef int (*behavior_sensor_keymap_binding_callback_t)(struct zmk_behavior_binding *binding, const struct device *sensor, + uint32_t virtual_key_position, int64_t timestamp); enum behavior_locality { @@ -150,21 +151,23 @@ static inline int z_impl_behavior_keymap_binding_released(struct zmk_behavior_bi /** * @brief Handle the a sensor keymap binding being triggered - * @param dev Pointer to the device structure for the driver instance. + * @param binding Sensor keymap binding which was triggered. * @param sensor Pointer to the sensor device structure for the sensor driver instance. - * @param param1 User parameter specified at time of behavior binding. - * @param param2 User parameter specified at time of behavior binding. + * @param virtual_key_position ZMK_KEYMAP_LEN + sensor number + * @param timestamp Time at which the binding was triggered. * * @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, + uint32_t virtual_key_position, int64_t timestamp); static inline int z_impl_behavior_sensor_keymap_binding_triggered(struct zmk_behavior_binding *binding, - const struct device *sensor, int64_t timestamp) { + const struct device *sensor, + uint32_t virtual_key_position, int64_t timestamp) { const struct device *dev = device_get_binding(binding->behavior_dev); if (dev == NULL) { @@ -177,7 +180,7 @@ z_impl_behavior_sensor_keymap_binding_triggered(struct zmk_behavior_binding *bin return -ENOTSUP; } - return api->sensor_binding_triggered(binding, sensor, timestamp); + return api->sensor_binding_triggered(binding, sensor, virtual_key_position, timestamp); } /** diff --git a/app/include/zmk/sensors.h b/app/include/zmk/sensors.h index 8c6c28b3..9e54695f 100644 --- a/app/include/zmk/sensors.h +++ b/app/include/zmk/sensors.h @@ -8,5 +8,10 @@ #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_LEN DT_PROP_LEN(ZMK_KEYMAP_SENSORS_NODE, sensors) #define ZMK_KEYMAP_SENSORS_BY_IDX(idx) DT_PHANDLE_BY_IDX(ZMK_KEYMAP_SENSORS_NODE, sensors, idx) + +#if ZMK_KEYMAP_HAS_SENSORS +#define ZMK_KEYMAP_SENSORS_LEN DT_PROP_LEN(ZMK_KEYMAP_SENSORS_NODE, sensors) +#else +#define ZMK_KEYMAP_SENSORS_LEN 0 +#endif diff --git a/app/include/zmk/virtual_key_position.h b/app/include/zmk/virtual_key_position.h new file mode 100644 index 00000000..48deee5c --- /dev/null +++ b/app/include/zmk/virtual_key_position.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include + +/** + * Gets the virtual key position to use for the sensor with the given index. + */ +#define ZMK_VIRTUAL_KEY_POSITION_SENSOR(index) (ZMK_KEYMAP_LEN + (index)) + +/** + * Gets the virtual key position to use for the combo with the given index. + */ +#define ZMK_VIRTUAL_KEY_POSITION_COMBO(index) (ZMK_KEYMAP_LEN + ZMK_KEYMAP_SENSORS_LEN + (index)) diff --git a/app/src/behaviors/behavior_sensor_rotate_key_press.c b/app/src/behaviors/behavior_sensor_rotate_key_press.c index ed6eedae..72e33ea4 100644 --- a/app/src/behaviors/behavior_sensor_rotate_key_press.c +++ b/app/src/behaviors/behavior_sensor_rotate_key_press.c @@ -21,7 +21,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); static int behavior_sensor_rotate_key_press_init(const struct device *dev) { return 0; }; static int on_sensor_binding_triggered(struct zmk_behavior_binding *binding, - const struct device *sensor, int64_t timestamp) { + const struct device *sensor, uint32_t virtual_key_position, + int64_t timestamp) { struct sensor_value value; int err; uint32_t keycode; diff --git a/app/src/combo.c b/app/src/combo.c index 2e237330..90c89c15 100644 --- a/app/src/combo.c +++ b/app/src/combo.c @@ -19,6 +19,7 @@ #include #include #include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); @@ -476,7 +477,7 @@ ZMK_SUBSCRIPTION(combo, zmk_position_state_changed); .key_positions = DT_PROP(n, key_positions), \ .key_position_len = DT_PROP_LEN(n, key_positions), \ .behavior = ZMK_KEYMAP_EXTRACT_BINDING(0, n), \ - .virtual_key_position = ZMK_KEYMAP_LEN + __COUNTER__, \ + .virtual_key_position = ZMK_VIRTUAL_KEY_POSITION_COMBO(__COUNTER__), \ .slow_release = DT_PROP(n, slow_release), \ .layers = DT_PROP(n, layers), \ .layers_len = DT_PROP_LEN(n, layers), \ diff --git a/app/src/keymap.c b/app/src/keymap.c index c4e304d4..825246fa 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -4,16 +4,17 @@ * SPDX-License-Identifier: MIT */ +#include #include #include #include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); +#include +#include #include #include -#include -#include -#include +#include #include #if ZMK_BLE_IS_CENTRAL @@ -269,7 +270,8 @@ int zmk_keymap_sensor_triggered(uint8_t sensor_number, const struct device *sens continue; } - ret = behavior_sensor_keymap_binding_triggered(binding, sensor, timestamp); + const uint32_t position = ZMK_VIRTUAL_KEY_POSITION_SENSOR(sensor_number); + ret = behavior_sensor_keymap_binding_triggered(binding, sensor, position, timestamp); if (ret > 0) { LOG_DBG("behavior processing to continue to next layer"); From 5c6f21b0e0fe0e85b43056e1ec8b6087b5d31e29 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sat, 29 Oct 2022 23:26:25 -0500 Subject: [PATCH 53/64] fix: Fix compiler warnings in sensor code --- app/src/keymap.c | 2 +- app/src/sensors.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/keymap.c b/app/src/keymap.c index 825246fa..1f55ad03 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -255,7 +255,7 @@ int zmk_keymap_position_state_changed(uint8_t source, uint32_t position, bool pr int zmk_keymap_sensor_triggered(uint8_t sensor_number, const struct device *sensor, int64_t timestamp) { for (int layer = ZMK_KEYMAP_LAYERS_LEN - 1; layer >= _zmk_keymap_layer_default; layer--) { - if (zmk_keymap_layer_active(layer) && zmk_sensor_keymap[layer] != NULL) { + if (zmk_keymap_layer_active(layer)) { struct zmk_behavior_binding *binding = &zmk_sensor_keymap[layer][sensor_number]; const struct device *behavior; int ret; diff --git a/app/src/sensors.c b/app/src/sensors.c index efae2bd9..1b92147f 100644 --- a/app/src/sensors.c +++ b/app/src/sensors.c @@ -35,9 +35,10 @@ struct sensors_data_item { static struct sensors_data_item sensors[] = {LISTIFY(ZMK_KEYMAP_SENSORS_LEN, SENSOR_ITEM, (, ), 0)}; -static void zmk_sensors_trigger_handler(const struct device *dev, struct sensor_trigger *trigger) { +static void zmk_sensors_trigger_handler(const struct device *dev, + const struct sensor_trigger *trigger) { int err; - struct sensors_data_item *item = CONTAINER_OF(trigger, struct sensors_data_item, trigger); + const struct sensors_data_item *item = CONTAINER_OF(trigger, struct sensors_data_item, trigger); LOG_DBG("sensor %d", item->sensor_number); From 9a73650041da7008fa2df7bd8bbb02ecc8efd9b4 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 21 Apr 2023 09:16:28 -0700 Subject: [PATCH 54/64] fix(boards): Move nice!60 to SPI3 for underglow * Move to SPI3 for underglow peripheral, needed after the move to pinctrl. --- app/boards/arm/nice60/nice60-pinctrl.dtsi | 2 +- app/boards/arm/nice60/nice60.dts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/boards/arm/nice60/nice60-pinctrl.dtsi b/app/boards/arm/nice60/nice60-pinctrl.dtsi index aced76b4..ace80f10 100644 --- a/app/boards/arm/nice60/nice60-pinctrl.dtsi +++ b/app/boards/arm/nice60/nice60-pinctrl.dtsi @@ -4,7 +4,7 @@ */ &pinctrl { - spi0_default: spi0_default { + spi3_default: spi3_default { group1 { psels = ; }; diff --git a/app/boards/arm/nice60/nice60.dts b/app/boards/arm/nice60/nice60.dts index c982f88e..fdc65d6b 100644 --- a/app/boards/arm/nice60/nice60.dts +++ b/app/boards/arm/nice60/nice60.dts @@ -109,10 +109,10 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R status = "okay"; }; -&spi0 { +&spi3 { compatible = "nordic,nrf-spim"; - /* Cannot be used together with i2c0. */ - pinctrl-0 = <&spi0_default>; + + pinctrl-0 = <&spi3_default>; pinctrl-names = "default"; status = "okay"; From 3db163aa2cf7db2bd710ba93b57f3eb804b086c7 Mon Sep 17 00:00:00 2001 From: Nick Conway Date: Mon, 23 May 2022 16:33:08 -0400 Subject: [PATCH 55/64] feat(behaviors): Add reusable sensor behaviors. * Add new sensor behaviors that either take full bindings add definition, or accept parameters when bound in the keymap. * Remove existing hard-coded key press sensor behavior and instead leverage new generic sensor behaviors to achieve the same functionality. Co-authored-by: nick@conway.dev --- app/CMakeLists.txt | 4 +- app/Kconfig | 6 +- app/Kconfig.behaviors | 24 ++++++ .../behaviors/sensor_rotate_key_press.dtsi | 3 +- .../zmk,behavior-sensor-rotate-key-press.yaml | 19 ----- .../zmk,behavior-sensor-rotate-var.yaml | 25 ++++++ .../behaviors/zmk,behavior-sensor-rotate.yaml | 21 +++++ app/include/drivers/behavior.h | 10 +-- app/src/behaviors/behavior_sensor_rotate.c | 40 ++++++++++ .../behaviors/behavior_sensor_rotate_common.c | 52 +++++++++++++ .../behaviors/behavior_sensor_rotate_common.h | 13 ++++ .../behavior_sensor_rotate_key_press.c | 69 ----------------- .../behaviors/behavior_sensor_rotate_var.c | 31 ++++++++ app/src/keymap.c | 5 +- docs/docs/behaviors/sensor-rotate.md | 77 +++++++++++++++++++ docs/docs/features/encoders.md | 8 +- docs/sidebars.js | 1 + 17 files changed, 301 insertions(+), 107 deletions(-) create mode 100644 app/Kconfig.behaviors delete mode 100644 app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml create mode 100644 app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-var.yaml create mode 100644 app/dts/bindings/behaviors/zmk,behavior-sensor-rotate.yaml create mode 100644 app/src/behaviors/behavior_sensor_rotate.c create mode 100644 app/src/behaviors/behavior_sensor_rotate_common.c create mode 100644 app/src/behaviors/behavior_sensor_rotate_common.h delete mode 100644 app/src/behaviors/behavior_sensor_rotate_key_press.c create mode 100644 app/src/behaviors/behavior_sensor_rotate_var.c create mode 100644 docs/docs/behaviors/sensor-rotate.md diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 3da50b57..a647e883 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -51,7 +51,9 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) target_sources(app PRIVATE src/behaviors/behavior_to_layer.c) target_sources(app PRIVATE src/behaviors/behavior_transparent.c) target_sources(app PRIVATE src/behaviors/behavior_none.c) - target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c) + 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(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 431a1bb1..ccc5f42d 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -350,11 +350,7 @@ config ZMK_BEHAVIORS_QUEUE_SIZE int "Maximum number of behaviors to allow queueing from a macro or other complex behavior" default 64 -DT_COMPAT_ZMK_BEHAVIOR_KEY_TOGGLE := zmk,behavior-key-toggle - -config ZMK_BEHAVIOR_KEY_TOGGLE - bool - default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BEHAVIOR_KEY_TOGGLE)) +rsource "Kconfig.behaviors" config ZMK_MACRO_DEFAULT_WAIT_MS int "Default time to wait (in milliseconds) before triggering the next behavior in macros" diff --git a/app/Kconfig.behaviors b/app/Kconfig.behaviors new file mode 100644 index 00000000..17850eae --- /dev/null +++ b/app/Kconfig.behaviors @@ -0,0 +1,24 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config ZMK_BEHAVIOR_KEY_TOGGLE + bool + default y + depends on DT_HAS_ZMK_BEHAVIOR_KEY_TOGGLE_ENABLED + + +config ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON + bool + default n + +config ZMK_BEHAVIOR_SENSOR_ROTATE + bool + default y + depends on DT_HAS_ZMK_BEHAVIOR_SENSOR_ROTATE_ENABLED + select ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON + +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 diff --git a/app/dts/behaviors/sensor_rotate_key_press.dtsi b/app/dts/behaviors/sensor_rotate_key_press.dtsi index d3f084b0..ed1b4cd0 100644 --- a/app/dts/behaviors/sensor_rotate_key_press.dtsi +++ b/app/dts/behaviors/sensor_rotate_key_press.dtsi @@ -8,9 +8,10 @@ behaviors { /* DEPRECATED: `inc_dec_cp` will be removed in the future */ /omit-if-no-ref/ inc_dec_cp: inc_dec_kp: behavior_sensor_rotate_key_press { - compatible = "zmk,behavior-sensor-rotate-key-press"; + compatible = "zmk,behavior-sensor-rotate-var"; label = "ENC_KEY_PRESS"; #sensor-binding-cells = <2>; + bindings = <&kp>, <&kp>; }; }; }; diff --git a/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml b/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml deleted file mode 100644 index 1fc60fcf..00000000 --- a/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT - -description: Sensor rotate key press/release behavior - -compatible: "zmk,behavior-sensor-rotate-key-press" - -properties: - label: - type: string - required: true - "#sensor-binding-cells": - type: int - required: true - const: 2 - -sensor-binding-cells: - - param1 - - param2 diff --git a/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-var.yaml b/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-var.yaml new file mode 100644 index 00000000..0da3b4db --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-var.yaml @@ -0,0 +1,25 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Sensor rotate behavior + +compatible: "zmk,behavior-sensor-rotate-var" + +properties: + label: + type: string + required: true + "#sensor-binding-cells": + type: int + required: true + const: 2 + bindings: + type: phandles + required: true + tap-ms: + type: int + default: 5 + +sensor-binding-cells: + - param1 + - param2 diff --git a/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate.yaml b/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate.yaml new file mode 100644 index 00000000..d20777b8 --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate.yaml @@ -0,0 +1,21 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Sensor rotate behavior + +compatible: "zmk,behavior-sensor-rotate" + +properties: + label: + type: string + required: true + "#sensor-binding-cells": + type: int + required: true + const: 0 + bindings: + type: phandle-array + required: true + tap-ms: + type: int + default: 5 diff --git a/app/include/drivers/behavior.h b/app/include/drivers/behavior.h index df18385f..380fc76f 100644 --- a/app/include/drivers/behavior.h +++ b/app/include/drivers/behavior.h @@ -26,8 +26,7 @@ typedef int (*behavior_keymap_binding_callback_t)(struct zmk_behavior_binding *b struct zmk_behavior_binding_event event); typedef int (*behavior_sensor_keymap_binding_callback_t)(struct zmk_behavior_binding *binding, const struct device *sensor, - uint32_t virtual_key_position, - int64_t timestamp); + struct zmk_behavior_binding_event event); enum behavior_locality { BEHAVIOR_LOCALITY_CENTRAL, @@ -161,13 +160,12 @@ static inline int z_impl_behavior_keymap_binding_released(struct zmk_behavior_bi */ __syscall int behavior_sensor_keymap_binding_triggered(struct zmk_behavior_binding *binding, const struct device *sensor, - uint32_t virtual_key_position, - int64_t timestamp); + 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, - uint32_t virtual_key_position, int64_t timestamp) { + struct zmk_behavior_binding_event event) { const struct device *dev = device_get_binding(binding->behavior_dev); if (dev == NULL) { @@ -180,7 +178,7 @@ z_impl_behavior_sensor_keymap_binding_triggered(struct zmk_behavior_binding *bin return -ENOTSUP; } - return api->sensor_binding_triggered(binding, sensor, virtual_key_position, timestamp); + return api->sensor_binding_triggered(binding, sensor, event); } /** diff --git a/app/src/behaviors/behavior_sensor_rotate.c b/app/src/behaviors/behavior_sensor_rotate.c new file mode 100644 index 00000000..e12278bb --- /dev/null +++ b/app/src/behaviors/behavior_sensor_rotate.c @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_behavior_sensor_rotate + +#include + +#include + +#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}; + +static int behavior_sensor_rotate_init(const struct device *dev) { return 0; }; + +#define _TRANSFORM_ENTRY(idx, node) \ + { \ + .behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(node, bindings, idx), label), \ + .param1 = COND_CODE_0(DT_INST_PHA_HAS_CELL_AT_IDX(node, bindings, idx, param1), (0), \ + (DT_INST_PHA_BY_IDX(node, bindings, idx, param1))), \ + .param2 = COND_CODE_0(DT_INST_PHA_HAS_CELL_AT_IDX(node, bindings, idx, param2), (0), \ + (DT_INST_PHA_BY_IDX(node, bindings, idx, param2))), \ + } + +#define SENSOR_ROTATE_INST(n) \ + static struct behavior_sensor_rotate_config behavior_sensor_rotate_config_##n = { \ + .cw_binding = _TRANSFORM_ENTRY(0, n), \ + .ccw_binding = _TRANSFORM_ENTRY(1, n), \ + .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); + +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 new file mode 100644 index 00000000..bd31170e --- /dev/null +++ b/app/src/behaviors/behavior_sensor_rotate_common.c @@ -0,0 +1,52 @@ + +#include +#include +#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) { + const struct device *dev = device_get_binding(binding->behavior_dev); + const struct behavior_sensor_rotate_config *cfg = dev->config; + + struct sensor_value value; + + const int err = sensor_channel_get(sensor, SENSOR_CHAN_ROTATION, &value); + + if (err < 0) { + LOG_WRN("Failed to get sensor rotation value: %d", err); + return err; + } + + struct zmk_behavior_binding triggered_binding; + switch (value.val1) { + case 1: + triggered_binding = cfg->cw_binding; + if (cfg->override_params) { + triggered_binding.param1 = binding->param1; + } + break; + case -1: + triggered_binding = cfg->ccw_binding; + if (cfg->override_params) { + triggered_binding.param1 = binding->param2; + } + break; + default: + return -ENOTSUP; + } + + 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); + + return ZMK_BEHAVIOR_OPAQUE; +} diff --git a/app/src/behaviors/behavior_sensor_rotate_common.h b/app/src/behaviors/behavior_sensor_rotate_common.h new file mode 100644 index 00000000..2d58218d --- /dev/null +++ b/app/src/behaviors/behavior_sensor_rotate_common.h @@ -0,0 +1,13 @@ + +#include + +struct behavior_sensor_rotate_config { + struct zmk_behavior_binding cw_binding; + struct zmk_behavior_binding ccw_binding; + int tap_ms; + bool override_params; +}; + +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 diff --git a/app/src/behaviors/behavior_sensor_rotate_key_press.c b/app/src/behaviors/behavior_sensor_rotate_key_press.c deleted file mode 100644 index 72e33ea4..00000000 --- a/app/src/behaviors/behavior_sensor_rotate_key_press.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -#define DT_DRV_COMPAT zmk_behavior_sensor_rotate_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_sensor_rotate_key_press_init(const struct device *dev) { return 0; }; - -static int on_sensor_binding_triggered(struct zmk_behavior_binding *binding, - const struct device *sensor, uint32_t virtual_key_position, - int64_t timestamp) { - struct sensor_value value; - int err; - uint32_t keycode; - LOG_DBG("inc keycode 0x%02X dec keycode 0x%02X", binding->param1, binding->param2); - - err = sensor_channel_get(sensor, SENSOR_CHAN_ROTATION, &value); - - if (err) { - LOG_WRN("Failed to ge sensor rotation value: %d", err); - return err; - } - - switch (value.val1) { - case 1: - keycode = binding->param1; - break; - case -1: - keycode = binding->param2; - break; - default: - return -ENOTSUP; - } - - LOG_DBG("SEND %d", keycode); - - ZMK_EVENT_RAISE(zmk_keycode_state_changed_from_encoded(keycode, true, timestamp)); - - // TODO: Better way to do this? - k_msleep(5); - - return ZMK_EVENT_RAISE(zmk_keycode_state_changed_from_encoded(keycode, false, timestamp)); -} - -static const struct behavior_driver_api behavior_sensor_rotate_key_press_driver_api = { - .sensor_binding_triggered = on_sensor_binding_triggered}; - -#define KP_INST(n) \ - DEVICE_DT_INST_DEFINE(n, behavior_sensor_rotate_key_press_init, NULL, NULL, NULL, APPLICATION, \ - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ - &behavior_sensor_rotate_key_press_driver_api); - -DT_INST_FOREACH_STATUS_OKAY(KP_INST) - -#endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_sensor_rotate_var.c b/app/src/behaviors/behavior_sensor_rotate_var.c new file mode 100644 index 00000000..a82267a5 --- /dev/null +++ b/app/src/behaviors/behavior_sensor_rotate_var.c @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_behavior_sensor_rotate_var + +#include + +#include + +#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}; + +static int behavior_sensor_rotate_var_init(const struct device *dev) { return 0; }; + +#define SENSOR_ROTATE_VAR_INST(n) \ + static struct behavior_sensor_rotate_config behavior_sensor_rotate_var_config_##n = { \ + .cw_binding = {.behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(n, bindings, 0), label)}, \ + .ccw_binding = {.behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(n, bindings, 1), label)}, \ + .tap_ms = DT_INST_PROP(n, tap_ms), \ + .override_params = true, \ + }; \ + 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); + +DT_INST_FOREACH_STATUS_OKAY(SENSOR_ROTATE_VAR_INST) diff --git a/app/src/keymap.c b/app/src/keymap.c index 1f55ad03..909fd20d 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -270,8 +270,9 @@ int zmk_keymap_sensor_triggered(uint8_t sensor_number, const struct device *sens continue; } - const uint32_t position = ZMK_VIRTUAL_KEY_POSITION_SENSOR(sensor_number); - ret = behavior_sensor_keymap_binding_triggered(binding, sensor, position, timestamp); + 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); if (ret > 0) { LOG_DBG("behavior processing to continue to next layer"); diff --git a/docs/docs/behaviors/sensor-rotate.md b/docs/docs/behaviors/sensor-rotate.md new file mode 100644 index 00000000..bd8a50bc --- /dev/null +++ b/docs/docs/behaviors/sensor-rotate.md @@ -0,0 +1,77 @@ +--- +title: Sensor Rotation +sidebar_label: Sensor Rotation +--- + +## Summary + +The Sensor Rotation behavior triggers a different behavior, depending on whether the sensor is rotated clockwise or counter-clockwise. Two variants of this behavior are available, allowing either fully specifying the +two behaviors and their parameters together, or allowing binding the sensor rotation with different clockwise and counterclockwise parameters in the keymap itself. + +## Sensor Rotation + +The standard sensor rotation behavior allows fully binding behaviors to be invoked: + +- If rotated counter-clockwise, the first bound behavior is triggered. +- If rotated clockwise, the second bound behavior is triggered. + +### Configuration + +Here is an example that binds the [RGB Underglow Behavior](/docs/behaviors/underglow.md) to change the RGB brightness: + +``` +/ { + behaviors { + rgb_encoder: rgb_encoder { + compatible = "zmk,behavior-sensor-rotate"; + label = "RGB_ENCODER"; + #sensor-binding-cells = <0>; + bindings = <&rgb_ug RGB_BRD>, <&rgb_ug RGB_BRI>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + + base { + ... + sensor-bindings = <&rgb_encoder>; + } + }; +}; +``` + +## Variable Sensor Rotation + +The variable sensor rotation behavior is configured with two behaviors that each expect a single parameter, +allowing the sensor rotation instance to be bound with two parameters at usage time. + +- If rotated counter-clockwise, the first bound behavior is triggered with the first parameter passed to the sensor rotation. +- If rotated clockwise, the second bound behavior is triggered with the second parameter passed to the sensor rotation. + +### Configuration + +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: + +``` +/ { + behaviors { + rot_kp: behavior_sensor_rotate_kp { + compatible = "zmk,behavior-sensor-rotate-var"; + label = "ENC_KP"; + #sensor-binding-cells = <2>; + bindings = <&kp>, <&kp>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + base { + ... + sensor-bindings = <&rot_kp PG_DN PG_UP>; + } + } +}; +``` diff --git a/docs/docs/features/encoders.md b/docs/docs/features/encoders.md index 225ee6f3..29906c90 100644 --- a/docs/docs/features/encoders.md +++ b/docs/docs/features/encoders.md @@ -23,17 +23,17 @@ Keyboards and macropads with encoder support will typically take the two EC11 pi ### Rotation -Rotation is handled separately as a type of sensor. The behavior for this is set in `sensor-bindings`, which is defined in each keymap layer in the following format: +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. ``` -sensor-bindings = ; +sensor-bindings = ; ``` -- `BINDING`, for now, has only one behavior available; `&inc_dec_kp` for key presses (see [Key Press](../behaviors/key-press.md) for details on available keycodes). +- `BINDING` is either a user-defined behavior, or `&inc_dec_kp` for key presses (see [Key Press](../behaviors/key-press.md) for details on available keycodes). - `CW_KEY` is the keycode activated by a clockwise turn. - `CCW_KEY` is the keycode activated by a counter-clockwise turn. -Additional encoders can be configured by adding more `BINDING CW_KEY CCW_KEY` sets immediately after the first. +Additional encoders can be configured by adding more bindings immediately after the first. As an example, a complete `sensor-bindings` for a Kyria with two encoders could look like: diff --git a/docs/sidebars.js b/docs/sidebars.js index a52f3302..21585747 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -35,6 +35,7 @@ module.exports = { "behaviors/tap-dance", "behaviors/caps-word", "behaviors/key-repeat", + "behaviors/sensor-rotate", "behaviors/reset", "behaviors/bluetooth", "behaviors/outputs", From 9d64c2a3a0bdd3d092585be1c6ba86fc8e26d084 Mon Sep 17 00:00:00 2001 From: Nick Coutsos Date: Sat, 22 Apr 2023 20:14:08 -0400 Subject: [PATCH 56/64] fix(docs): switch sensor rotate parameter order --- docs/docs/behaviors/sensor-rotate.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docs/behaviors/sensor-rotate.md b/docs/docs/behaviors/sensor-rotate.md index bd8a50bc..02e56924 100644 --- a/docs/docs/behaviors/sensor-rotate.md +++ b/docs/docs/behaviors/sensor-rotate.md @@ -12,8 +12,8 @@ two behaviors and their parameters together, or allowing binding the sensor rota The standard sensor rotation behavior allows fully binding behaviors to be invoked: -- If rotated counter-clockwise, the first bound behavior is triggered. -- If rotated clockwise, the second bound behavior is triggered. +- If rotated clockwise, the first bound behavior is triggered. +- If rotated counter-clockwise, the second bound behavior is triggered. ### Configuration @@ -26,7 +26,7 @@ Here is an example that binds the [RGB Underglow Behavior](/docs/behaviors/under compatible = "zmk,behavior-sensor-rotate"; label = "RGB_ENCODER"; #sensor-binding-cells = <0>; - bindings = <&rgb_ug RGB_BRD>, <&rgb_ug RGB_BRI>; + bindings = <&rgb_ug RGB_BRI>, <&rgb_ug RGB_BRD>; }; }; @@ -46,8 +46,8 @@ Here is an example that binds the [RGB Underglow Behavior](/docs/behaviors/under The variable sensor rotation behavior is configured with two behaviors that each expect a single parameter, allowing the sensor rotation instance to be bound with two parameters at usage time. -- If rotated counter-clockwise, the first bound behavior is triggered with the first parameter passed to the sensor rotation. -- If rotated clockwise, the second bound behavior is triggered with the second parameter passed to the sensor rotation. +- If rotated clockwise, the first bound behavior is triggered with the first parameter passed to the sensor rotation. +- If rotated counter-clockwise, the second bound behavior is triggered with the second parameter passed to the sensor rotation. ### Configuration @@ -70,7 +70,7 @@ First, defining the sensor rotation itself, binding the [Key Press Behavior](/do compatible = "zmk,keymap"; base { ... - sensor-bindings = <&rot_kp PG_DN PG_UP>; + sensor-bindings = <&rot_kp PG_UP PG_DN>; } } }; From 53dea223b73922e385ecf11883e5327a4f328eae Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 14 Jan 2023 12:01:33 -0500 Subject: [PATCH 57/64] feat(shields): Add splitkb.com Kyria Rev3. --- app/boards/shields/kyria/Kconfig.defconfig | 2 +- app/boards/shields/kyria/Kconfig.shield | 8 ++++ app/boards/shields/kyria/kyria_rev3.conf | 10 +++++ app/boards/shields/kyria/kyria_rev3.dtsi | 41 +++++++++++++++++++ app/boards/shields/kyria/kyria_rev3.keymap | 38 +++++++++++++++++ app/boards/shields/kyria/kyria_rev3.zmk.yml | 15 +++++++ .../shields/kyria/kyria_rev3_left.overlay | 29 +++++++++++++ .../shields/kyria/kyria_rev3_right.overlay | 33 +++++++++++++++ 8 files changed, 175 insertions(+), 1 deletion(-) create mode 100644 app/boards/shields/kyria/kyria_rev3.conf create mode 100644 app/boards/shields/kyria/kyria_rev3.dtsi create mode 100644 app/boards/shields/kyria/kyria_rev3.keymap create mode 100644 app/boards/shields/kyria/kyria_rev3.zmk.yml create mode 100644 app/boards/shields/kyria/kyria_rev3_left.overlay create mode 100644 app/boards/shields/kyria/kyria_rev3_right.overlay diff --git a/app/boards/shields/kyria/Kconfig.defconfig b/app/boards/shields/kyria/Kconfig.defconfig index cdb57b6b..53b441cb 100644 --- a/app/boards/shields/kyria/Kconfig.defconfig +++ b/app/boards/shields/kyria/Kconfig.defconfig @@ -1,5 +1,5 @@ -if SHIELD_KYRIA_LEFT || SHIELD_KYRIA_REV2_LEFT +if SHIELD_KYRIA_LEFT || SHIELD_KYRIA_REV2_LEFT || SHIELD_KYRIA_REV3_LEFT config ZMK_KEYBOARD_NAME default "Kyria" diff --git a/app/boards/shields/kyria/Kconfig.shield b/app/boards/shields/kyria/Kconfig.shield index 6304f5d5..52df9378 100644 --- a/app/boards/shields/kyria/Kconfig.shield +++ b/app/boards/shields/kyria/Kconfig.shield @@ -19,3 +19,11 @@ config SHIELD_KYRIA_REV2_LEFT config SHIELD_KYRIA_REV2_RIGHT def_bool $(shields_list_contains,kyria_rev2_right) select SHIELD_KYRIA + +config SHIELD_KYRIA_REV3_LEFT + def_bool $(shields_list_contains,kyria_rev3_left) + select SHIELD_KYRIA + +config SHIELD_KYRIA_REV3_RIGHT + def_bool $(shields_list_contains,kyria_rev3_right) + select SHIELD_KYRIA diff --git a/app/boards/shields/kyria/kyria_rev3.conf b/app/boards/shields/kyria/kyria_rev3.conf new file mode 100644 index 00000000..7a0b5b6c --- /dev/null +++ b/app/boards/shields/kyria/kyria_rev3.conf @@ -0,0 +1,10 @@ +# 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 Kyria OLED Display +# CONFIG_ZMK_DISPLAY=y + +# Uncomment the following lines to enable RGB underglow +# CONFIG_ZMK_RGB_UNDERGLOW=y +# CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/kyria/kyria_rev3.dtsi b/app/boards/shields/kyria/kyria_rev3.dtsi new file mode 100644 index 00000000..4a500006 --- /dev/null +++ b/app/boards/shields/kyria/kyria_rev3.dtsi @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "kyria_common.dtsi" + +/ { + chosen { + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <4>; + // | MX6 | MX5 | MX4 | MX3 | MX2 | MX1 | | MX1 | MX2 | MX3 | MX4 | MX5 | MX6 | + // | MX12 | MX11 | MX10 | MX9 | MX8 | MX7 | | MX7 | MX8 | MX9 | MX10 | MX11 | MX12 | + // | MX20 | MX19 | MX18 | MX17 | MX16 | MX15 | MX14 | MX13 | | MX13 | MX14 | MX15 | MX16 | MX17 | MX18 | MX19 | MX20 | + // | MX25 | MX24 | MX23 | MX22 | MX21 | | MX21 | MX22 | MX23 | MX24 | MX25 | + 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(3,3) RC(2,6) RC(2,7) RC(3,10) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) + RC(3,2) RC(3,4) RC(3,5) RC(3,1) RC(3,6) RC(3,7) RC(3,12) RC(3,8) RC(3,9) RC(3,11) + >; + }; +}; + +&left_encoder { + resolution = <2>; + a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; +}; + +&right_encoder { + resolution = <2>; + a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; +}; diff --git a/app/boards/shields/kyria/kyria_rev3.keymap b/app/boards/shields/kyria/kyria_rev3.keymap new file mode 100644 index 00000000..fff2e051 --- /dev/null +++ b/app/boards/shields/kyria/kyria_rev3.keymap @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +/* Uncomment this block if using RGB +&led_strip { + chain-length = <6>; + // chain-length = <31>; // Uncomment if using both per-key and underglow LEDs + // chain-length = <25>; // Uncomment if using only per-key LEDs. +}; + */ + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | 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 | + // | 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 + >; + + 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.zmk.yml b/app/boards/shields/kyria/kyria_rev3.zmk.yml new file mode 100644 index 00000000..bf84c82c --- /dev/null +++ b/app/boards/shields/kyria/kyria_rev3.zmk.yml @@ -0,0 +1,15 @@ +file_format: "1" +id: kyria_rev3 +name: Kyria Rev3 +type: shield +url: https://splitkb.com/products/kyria-pcb-kit +requires: [pro_micro] +exposes: [i2c_oled] +features: + - keys + - display + - encoder + - underglow +siblings: + - kyria_rev3_left + - kyria_rev3_right diff --git a/app/boards/shields/kyria/kyria_rev3_left.overlay b/app/boards/shields/kyria/kyria_rev3_left.overlay new file mode 100644 index 00000000..d00b9e4a --- /dev/null +++ b/app/boards/shields/kyria/kyria_rev3_left.overlay @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "kyria_rev3.dtsi" + +&kscan0 { + row-gpios + = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + 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> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + ; +}; + +&left_encoder { + status = "okay"; +}; diff --git a/app/boards/shields/kyria/kyria_rev3_right.overlay b/app/boards/shields/kyria/kyria_rev3_right.overlay new file mode 100644 index 00000000..ee69730c --- /dev/null +++ b/app/boards/shields/kyria/kyria_rev3_right.overlay @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "kyria_rev3.dtsi" + +&default_transform { + col-offset = <7>; +}; + +&kscan0 { + row-gpios + = <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + col-gpios + = <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&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 10 GPIO_ACTIVE_HIGH> + ; +}; + +&right_encoder { + status = "okay"; +}; From 9c4f1e02d14e2903d7ec377fc3042bb704cc7253 Mon Sep 17 00:00:00 2001 From: Albert Y <76888457+filterpaper@users.noreply.github.com> Date: Mon, 24 Apr 2023 16:24:36 +0800 Subject: [PATCH 58/64] fix(docs): Update references to QMK settings * Remove TAPPING_FORCE_HOLD reference * Remove IGNORE_MOD_TAP_INTERRUPT reference --- docs/docs/behaviors/hold-tap.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/docs/behaviors/hold-tap.md b/docs/docs/behaviors/hold-tap.md index 1dfb8e5d..f267e4a4 100644 --- a/docs/docs/behaviors/hold-tap.md +++ b/docs/docs/behaviors/hold-tap.md @@ -49,8 +49,6 @@ 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). -In QMK, unlike ZMK, this functionality is enabled by default, and you turn it off using `TAPPING_FORCE_HOLD`. - #### `global-quick-tap` 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. @@ -319,4 +317,4 @@ This hold-tap example implements a [momentary-layer](layers.md/#momentary-layer) ### Comparison to QMK -The hold-preferred flavor works similar to the `HOLD_ON_OTHER_KEY_PRESS` setting in QMK. The 'balanced' flavor is similar to the `PERMISSIVE_HOLD` setting, and the `tap-preferred` flavor is similar to `IGNORE_MOD_TAP_INTERRUPT`. +The `hold-preferred` flavor works similar to the `HOLD_ON_OTHER_KEY_PRESS` setting in QMK. The `balanced` flavor is similar to the `PERMISSIVE_HOLD` setting, and the `tap-preferred` flavor is the QMK default. From 32ae776c42215d7302ab47787cbfb47298ccb532 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sat, 22 Apr 2023 23:16:36 -0500 Subject: [PATCH 59/64] refactor: Add more checks to pre-commit Updated existing pre-commit hooks and added some new hooks: - Remove trailing whitespace - Ensure every non-empty file ends with a new line - Check YAML file validity - Prevent adding large files - Ensure any scripts with shebangs are executable Added a GitHub action to run pre-commit on every commit. Removed any existing actions which duplicate pre-commit. Ran pre-commit on the codebase. --- .github/pull_request_template.md | 24 +++--- .github/workflows/build-user-config.yml | 4 +- .github/workflows/build.yml | 6 +- .github/workflows/clang-format-lint.yml | 29 ------- .github/workflows/doc-checks.yml | 10 --- .../hardware-metadata-validation.yml | 11 --- .github/workflows/pre-commit.yml | 15 ++++ .pre-commit-config.yaml | 12 ++- .vscode/settings.json | 2 +- app/.prettierrc.js | 2 +- .../bluemicro840/arduino_pro_micro_pins.dtsi | 10 +-- .../arm/corneish_zen/corneish_zen_v2_left.dts | 2 +- .../corneish_zen/corneish_zen_v2_right.dts | 2 +- app/boards/arm/ferris/README.md | 1 - app/boards/arm/nice60/README.md | 2 + app/boards/arm/nice60/nice60.keymap | 4 +- app/boards/arm/pillbug/pillbug.dts | 2 +- app/boards/arm/preonic/preonic_rev3.yaml | 2 +- app/boards/arm/s40nc/README.md | 2 + app/boards/arm/s40nc/s40nc.keymap | 8 +- app/boards/shields/bfo9000/README.md | 8 +- .../boardsource5x12/boardsource5x12.keymap | 6 +- .../boardsource5x12/boardsource5x12.overlay | 2 +- app/boards/shields/chalice/chalice.keymap | 8 +- app/boards/shields/chalice/chalice.overlay | 4 +- app/boards/shields/clog/clog.dtsi | 2 +- app/boards/shields/corne/corne.dtsi | 2 +- app/boards/shields/eek/eek.keymap | 12 +-- app/boards/shields/eek/eek.overlay | 2 +- .../shields/elephant42/Kconfig.defconfig | 2 +- app/boards/shields/elephant42/elephant42.dtsi | 4 +- .../shields/elephant42/elephant42.keymap | 4 +- .../elephant42/elephant42_left.overlay | 2 +- .../elephant42/elephant42_right.overlay | 2 +- app/boards/shields/helix/helix.dtsi | 2 +- app/boards/shields/helix/helix.keymap | 4 +- app/boards/shields/helix/helix_left.overlay | 2 +- .../shields/hummingbird/hummingbird.overlay | 2 +- app/boards/shields/iris/Kconfig.defconfig | 2 +- app/boards/shields/iris/iris.dtsi | 2 +- app/boards/shields/jian/jian.dtsi | 2 +- app/boards/shields/jiran/jiran.dtsi | 2 +- app/boards/shields/jorne/Kconfig.defconfig | 2 +- app/boards/shields/jorne/jorne.dtsi | 2 +- app/boards/shields/kyria/Kconfig.defconfig | 2 +- app/boards/shields/kyria/kyria_common.dtsi | 2 +- app/boards/shields/leeloo/Kconfig.defconfig | 2 +- app/boards/shields/leeloo/README.md | 19 +++-- app/boards/shields/lily58/lily58.dtsi | 2 +- app/boards/shields/lotus58/Kconfig.defconfig | 2 +- app/boards/shields/lotus58/lotus58.dtsi | 2 +- app/boards/shields/lotus58/lotus58.keymap | 10 +-- .../shields/lotus58/lotus58_left.overlay | 2 +- app/boards/shields/microdox/Kconfig.defconfig | 2 +- app/boards/shields/microdox/microdox.dtsi | 2 +- app/boards/shields/murphpad/murphpad.keymap | 26 +++--- app/boards/shields/murphpad/murphpad.overlay | 2 +- app/boards/shields/naked60/naked60.keymap | 4 +- app/boards/shields/nibble/nibble.keymap | 2 +- app/boards/shields/nibble/nibble.overlay | 2 +- app/boards/shields/nice_view/README.md | 2 +- .../shields/nice_view_adapter/README.md | 2 +- app/boards/shields/pancake/pancake.keymap | 12 +-- app/boards/shields/pancake/pancake.overlay | 4 +- app/boards/shields/qaz/qaz.overlay | 2 +- .../shields/quefrency/Kconfig.defconfig | 4 +- app/boards/shields/quefrency/quefrency.dtsi | 10 +-- .../shields/quefrency/quefrency_right.overlay | 2 +- app/boards/shields/redox/redox.dtsi | 4 +- app/boards/shields/redox/redox.keymap | 4 +- app/boards/shields/snap/Kconfig.defconfig | 2 +- app/boards/shields/snap/snap.dtsi | 2 +- app/boards/shields/snap/snap.keymap | 2 +- app/boards/shields/snap/snap_left.overlay | 2 +- app/boards/shields/snap/snap_right.overlay | 2 +- app/boards/shields/sofle/Kconfig.defconfig | 2 +- .../splitkb_aurora_corne/Kconfig.defconfig | 2 +- .../splitkb_aurora_corne_left.overlay | 2 +- .../splitkb_aurora_corne_right.overlay | 2 +- .../splitkb_aurora_lily58/Kconfig.defconfig | 2 +- .../splitkb_aurora_lily58_left.overlay | 2 +- .../splitkb_aurora_lily58_right.overlay | 2 +- .../splitkb_aurora_sweep/Kconfig.defconfig | 2 +- .../splitkb_aurora_sweep.keymap | 52 ++++++------ .../splitkb_aurora_sweep_left.overlay | 2 +- .../splitkb_aurora_sweep_right.overlay | 2 +- .../shields/splitreus62/Kconfig.defconfig | 6 +- .../shields/splitreus62/splitreus62.dtsi | 2 +- .../splitreus62/splitreus62_right.overlay | 2 +- app/boards/shields/tg4x/README.md | 6 +- app/boards/shields/tg4x/tg4x.overlay | 2 +- app/boards/shields/tidbit/tidbit.keymap | 2 +- app/boards/shields/tidbit/tidbit_19key.keymap | 2 +- .../two_percent_milk/two_percent_milk.keymap | 4 +- .../shields/waterfowl/Kconfig.defconfig | 2 +- app/boards/shields/waterfowl/waterfowl.dtsi | 2 +- app/boards/shields/waterfowl/waterfowl.keymap | 12 +-- app/boards/shields/zmk_uno/zmk_uno.keymap | 8 +- app/boards/shields/zodiark/Kconfig.defconfig | 2 +- app/boards/shields/zodiark/zodiark.keymap | 2 +- app/core-coverage.yml | 64 +++++++-------- .../dts/bindings/gpio/maxim,max7318.yaml | 20 ++--- .../behaviors/zmk,behavior-macro.yaml | 2 +- .../behaviors/zmk,behavior-tap-dance.yaml | 2 +- .../bindings/display/gooddisplay,il0323.yaml | 82 +++++++++---------- .../macros/zmk,macro-control-mode-press.yaml | 2 +- .../zmk,macro-control-mode-release.yaml | 2 +- .../macros/zmk,macro-control-tap-time.yaml | 2 +- .../macros/zmk,macro-control-wait-time.yaml | 2 +- .../macros/zmk,macro-pause-for-release.yaml | 2 +- app/dts/bindings/zmk,combos.yaml | 2 +- app/include/linker/zmk-events.ld | 2 +- app/package.json | 4 +- app/src/activity.c | 4 +- app/src/display/widgets/Kconfig | 2 +- .../native_posix_64.keymap | 12 +-- .../native_posix_64.keymap | 10 +-- .../layer-filter-0/native_posix_64.keymap | 26 +++--- .../layer-filter-1/native_posix_64.keymap | 6 +- .../multiple-timeouts/native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 76 ++++++++--------- .../native_posix_64.keymap | 24 +++--- .../native_posix_64.keymap | 14 ++-- .../native_posix_64.keymap | 14 ++-- .../native_posix_64.keymap | 46 +++++------ .../native_posix_64.keymap | 8 +- .../press-release/native_posix_64.keymap | 26 +++--- .../press-timeout/native_posix_64.keymap | 6 +- .../native_posix_64.keymap | 12 +-- .../native_posix_64.keymap | 14 ++-- .../native_posix_64.keymap | 12 +-- .../native_posix_64.keymap | 6 +- .../native_posix_64.keymap | 6 +- .../native_posix_64.keymap | 18 ++-- .../native_posix_64.keymap | 6 +- .../balanced/1-dn-up/native_posix_64.keymap | 4 +- .../2-dn-timer-up/native_posix_64.keymap | 4 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../3c-kcdn-dn-kcup-up/native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../4c-dn-kcdn-kcup-up/native_posix_64.keymap | 2 +- .../5-quick-tap/native_posix_64.keymap | 6 +- .../6-retro-tap/native_posix_64.keymap | 8 +- .../2-dn-timer-up/native_posix_64.keymap | 4 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../1-basic/native_posix_64.keymap | 4 +- .../many-nested/native_posix_64.keymap | 16 ++-- .../1-dn-up/native_posix_64.keymap | 4 +- .../2-dn-timer-up/native_posix_64.keymap | 4 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../3c-kcdn-dn-kcup-up/native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../4c-dn-kcdn-kcup-up/native_posix_64.keymap | 2 +- .../5-quick-tap/native_posix_64.keymap | 6 +- .../6-retro-tap/native_posix_64.keymap | 8 +- .../2-dn-timer-up/native_posix_64.keymap | 4 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../1-basic/native_posix_64.keymap | 4 +- .../1-dn-up/native_posix_64.keymap | 4 +- .../2-dn-timer-up/native_posix_64.keymap | 4 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../3c-kcdn-dn-kcup-up/native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../4c-dn-kcdn-kcup-up/native_posix_64.keymap | 2 +- .../5-quick-tap/native_posix_64.keymap | 6 +- .../6-nested-timeouts/native_posix_64.keymap | 10 +-- .../2-dn-timer-up/native_posix_64.keymap | 4 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../1-basic/native_posix_64.keymap | 4 +- .../1-dn-up/native_posix_64.keymap | 4 +- .../2-dn-timer-up/native_posix_64.keymap | 4 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../3c-kcdn-dn-kcup-up/native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../4c-dn-kcdn-kcup-up/native_posix_64.keymap | 2 +- .../5-quick-tap/native_posix_64.keymap | 6 +- .../1-basic/native_posix_64.keymap | 4 +- .../kp-press-release/native_posix_64.keymap | 2 +- .../kt-alt-tab/native_posix_64.keymap | 18 ++-- .../kt-modded-alpha/native_posix_64.keymap | 10 +-- .../native_posix_64.keymap | 4 +- .../kt-press-release/native_posix_64.keymap | 4 +- app/tests/macros/basic/native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 2 +- .../press-mid-macro/native_posix_64.keymap | 2 +- .../press-release/native_posix_64.keymap | 2 +- .../native_posix_64.keymap | 8 +- .../native_posix_64.keymap | 8 +- .../kp-lctl-dn-lctl-up/native_posix_64.keymap | 4 +- .../native_posix_64.keymap | 8 +- .../native_posix_64.keymap | 8 +- .../native_posix_64.keymap | 6 +- .../pending | 4 +- .../native_posix_64.keymap | 6 +- .../native_posix_64.keymap | 6 +- .../native_posix_64.keymap | 6 +- .../1-normal/native_posix_64.keymap | 6 +- .../native_posix_64.keymap | 6 +- .../3-covered/native_posix_64.keymap | 2 +- .../1-os-dn-up/native_posix_64.keymap | 4 +- .../10-callum-mods/native_posix_64.keymap | 12 +-- .../10-sl-sl-kp/native_posix_64.keymap | 16 ++-- .../native_posix_64.keymap | 10 +-- .../native_posix_64.keymap | 8 +- .../native_posix_64.keymap | 8 +- .../native_posix_64.keymap | 4 +- .../native_posix_64.keymap | 4 +- .../native_posix_64.keymap | 4 +- .../native_posix_64.keymap | 4 +- .../native_posix_64.keymap | 4 +- .../native_posix_64.keymap | 18 ++-- .../9-sk-dn-up-dn-up/native_posix_64.keymap | 6 +- .../tap-dance/1b-tap2/native_posix_64.keymap | 4 +- .../tap-dance/1c-tap3/native_posix_64.keymap | 4 +- .../tap-dance/2a-hold1/native_posix_64.keymap | 2 +- .../tap-dance/2b-hold2/native_posix_64.keymap | 4 +- .../tap-dance/2c-hold3/native_posix_64.keymap | 4 +- .../1-single_keypress/native_posix_64.keymap | 4 +- .../native_posix_64.keymap | 6 +- docs/package-lock.json | 17 ++-- docs/package.json | 2 +- docs/src/templates/setup.ps1.mustache | 4 +- docs/src/templates/setup.sh.mustache | 2 +- schema/hardware-metadata.schema.json | 32 ++------ 247 files changed, 759 insertions(+), 797 deletions(-) delete mode 100644 .github/workflows/clang-format-lint.yml create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9c3543dd..9e523a36 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,13 +1,15 @@ + ## Board/Shield Check-list - - [ ] This board/shield is tested working on real hardware - - [ ] Definitions follow the general style of other shields/boards upstream ([Reference](https://zmk.dev/docs/development/new-shield)) - - [ ] `.zmk.yml` metadata file added - - [ ] Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited) - - [ ] General consistent formatting of DeviceTree files - - [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader)) - - [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable - - [ ] If split, no name added for the right/peripheral half - - [ ] Kconfig.defconfig file correctly wraps *all* configuration in conditional on the shield symbol - - [ ] `.conf` file has optional extra features commented out - - [ ] Keyboard/PCB is part of a shipped group buy or is generally available in stock to purchase (OSH/personal projects without general availability should create a zmk-config repo instead) + +- [ ] This board/shield is tested working on real hardware +- [ ] Definitions follow the general style of other shields/boards upstream ([Reference](https://zmk.dev/docs/development/new-shield)) +- [ ] `.zmk.yml` metadata file added +- [ ] Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited) +- [ ] General consistent formatting of DeviceTree files +- [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader)) +- [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable +- [ ] If split, no name added for the right/peripheral half +- [ ] Kconfig.defconfig file correctly wraps _all_ configuration in conditional on the shield symbol +- [ ] `.conf` file has optional extra features commented out +- [ ] Keyboard/PCB is part of a shipped group buy or is generally available in stock to purchase (OSH/personal projects without general availability should create a zmk-config repo instead) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 3d89ed7b..b1e0602d 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -19,8 +19,8 @@ on: required: false type: string archive_name: - description: 'Archive output file name' - default: 'firmware' + description: "Archive output file name" + default: "firmware" required: false type: string diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f472f755..82b156e1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -131,7 +131,7 @@ jobs: for (const configuration of combinedUnique) { if (!perBoard[configuration.board]) perBoard[configuration.board] = []; - + perBoard[configuration.board].push({ shield: configuration.shield, 'cmake-args': configuration['cmake-args'], @@ -234,7 +234,7 @@ jobs: }; } } else if (hm.exposes) { - return hm.exposes.flatMap(i => + return hm.exposes.flatMap(i => metadata.interconnects[i].shields.flatMap(s => boardAndShield(hm, s)) ); } else { @@ -243,7 +243,7 @@ jobs: break; case "shield": if (hm.features && hm.features.includes("keys")) { - return hm.requires.flatMap(i => + return hm.requires.flatMap(i => metadata.interconnects[i].boards.flatMap(b => boardAndShield(b, hm)) ); } else { diff --git a/.github/workflows/clang-format-lint.yml b/.github/workflows/clang-format-lint.yml deleted file mode 100644 index 8c2cfbcf..00000000 --- a/.github/workflows/clang-format-lint.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Clang Format - -on: - push: - paths: - - ".github/workflows/clang-format-lint.yml" - - "app/boards/**/*.c" - - "app/include/**/*.h" - - "app/src/**" - - "app/drivers/**/*.c" - - "app/drivers/**/*.h" - pull_request: - paths: - - ".github/workflows/clang-format-lint.yml" - - "app/boards/**/*.c" - - "app/include/**/*.h" - - "app/src/**" - - "app/drivers/**/*.c" - - "app/drivers/**/*.h" - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: DoozyX/clang-format-lint-action@v0.13 - with: - source: "./app" - extensions: "h,c" diff --git a/.github/workflows/doc-checks.yml b/.github/workflows/doc-checks.yml index d048a03e..91e65e6d 100644 --- a/.github/workflows/doc-checks.yml +++ b/.github/workflows/doc-checks.yml @@ -21,16 +21,6 @@ jobs: - name: ESLint run: npm run lint working-directory: docs - prettier: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: bahmutov/npm-install@v1 - with: - working-directory: docs - - name: Prettier check - run: npm run prettier:check - working-directory: docs typecheck: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/hardware-metadata-validation.yml b/.github/workflows/hardware-metadata-validation.yml index 4b10a28b..10092836 100644 --- a/.github/workflows/hardware-metadata-validation.yml +++ b/.github/workflows/hardware-metadata-validation.yml @@ -15,17 +15,6 @@ on: - "app/scripts/west_commands/metadata.py" jobs: - check-metadata-format: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/checkout@v3 - - uses: bahmutov/npm-install@v1 - with: - working-directory: app - - name: Prettier Check - run: npm run prettier:check - working-directory: app validate-metadata: runs-on: ubuntu-latest container: diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 00000000..a6583d4f --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,15 @@ +name: pre-commit + +on: + pull_request: + push: + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - uses: pre-commit/action@v3.0.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 02adf09c..7687fc6e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,20 @@ fail_fast: false repos: - repo: https://github.com/pocc/pre-commit-hooks - rev: v1.1.1 + rev: v1.3.5 hooks: - id: clang-format args: - -i - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.2.1 + rev: v2.7.1 hooks: - id: prettier + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: trailing-whitespace + - id: check-yaml + - id: check-added-large-files + - id: check-shebang-scripts-are-executable + exclude: "\\.mustache$" diff --git a/.vscode/settings.json b/.vscode/settings.json index 2730549a..aea29cf0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,4 +4,4 @@ "*.keymap": "dts" }, "python.formatting.provider": "black" -} \ No newline at end of file +} diff --git a/app/.prettierrc.js b/app/.prettierrc.js index 806328d9..2a1f0b48 100644 --- a/app/.prettierrc.js +++ b/app/.prettierrc.js @@ -1,3 +1,3 @@ module.exports = { - endOfLine: "auto", + endOfLine: "auto", }; diff --git a/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi b/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi index 237f5c45..53514d64 100644 --- a/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi +++ b/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi @@ -11,11 +11,11 @@ gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; gpio-map - = <0 0 &gpio0 8 0> /* D0 D2 */ - , <1 0 &gpio0 6 0> /* D1 D3*/ - , <2 0 &gpio0 15 0> /* D2 D1*/ - , <3 0 &gpio0 17 0> /* D3 D0*/ - , <4 0 &gpio0 20 0> /* D4/A6 D4*/ + = <0 0 &gpio0 8 0> /* D0 D2 */ + , <1 0 &gpio0 6 0> /* D1 D3*/ + , <2 0 &gpio0 15 0> /* D2 D1*/ + , <3 0 &gpio0 17 0> /* D3 D0*/ + , <4 0 &gpio0 20 0> /* D4/A6 D4*/ , <5 0 &gpio0 13 0> /* D5 C6*/ , <6 0 &gpio0 24 0> /* D6/A7 D7*/ , <7 0 &gpio0 9 0> /* D7 E6*/ diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts b/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts index 4dbdaef5..65092dc5 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts @@ -32,7 +32,7 @@ , <&gpio1 9 GPIO_ACTIVE_HIGH> , <&gpio0 7 GPIO_ACTIVE_HIGH> , <&gpio0 5 GPIO_ACTIVE_HIGH> - ; + ; }; leds { diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts b/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts index 52439e4f..980c9900 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts @@ -33,7 +33,7 @@ , <&gpio1 9 GPIO_ACTIVE_HIGH> , <&gpio0 7 GPIO_ACTIVE_HIGH> ; - + }; leds { diff --git a/app/boards/arm/ferris/README.md b/app/boards/arm/ferris/README.md index 2793c6fa..b6fdcdf2 100644 --- a/app/boards/arm/ferris/README.md +++ b/app/boards/arm/ferris/README.md @@ -1,6 +1,5 @@ # Building ZMK for the Ferris 0.2 - ## Standard Build ``` diff --git a/app/boards/arm/nice60/README.md b/app/boards/arm/nice60/README.md index 49433df8..dce230ae 100644 --- a/app/boards/arm/nice60/README.md +++ b/app/boards/arm/nice60/README.md @@ -1,9 +1,11 @@ # nice!60 + ![nice!60](https://i.imgur.com/0YWv5PE.png) The nice!60 is a hotswap 60% made by Nice Keyboards. https://nicekeyboards.com/nice-60 ## Building nice!60 ZMK firmware + ``` west build -p -b nice60 ``` diff --git a/app/boards/arm/nice60/nice60.keymap b/app/boards/arm/nice60/nice60.keymap index bdb188df..edfec32e 100644 --- a/app/boards/arm/nice60/nice60.keymap +++ b/app/boards/arm/nice60/nice60.keymap @@ -12,7 +12,7 @@ / { keymap { compatible = "zmk,keymap"; - + default_layer { // ------------------------------------------------------------------------------------------ // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | @@ -40,7 +40,7 @@ // ------------------------------------------------------------------------------------------------ bindings = < &bt BT_CLR &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &rgb_ug RGB_EFR - &bt BT_SEL 0 &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &trans &trans &trans &trans &trans &trans + &bt BT_SEL 0 &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &trans &trans &trans &trans &trans &trans &bt BT_SEL 1 &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &trans &trans &trans &trans &rgb_ug RGB_EFF &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_SEL 3 &trans &trans &rgb_ug RGB_TOG &kp PSCRN &trans &trans &kp DEL diff --git a/app/boards/arm/pillbug/pillbug.dts b/app/boards/arm/pillbug/pillbug.dts index c1330319..a2e56df3 100644 --- a/app/boards/arm/pillbug/pillbug.dts +++ b/app/boards/arm/pillbug/pillbug.dts @@ -29,7 +29,7 @@ label = "Blue LED"; }; }; - + ext-power { compatible = "zmk,ext-power-generic"; label = "EXT_POWER"; diff --git a/app/boards/arm/preonic/preonic_rev3.yaml b/app/boards/arm/preonic/preonic_rev3.yaml index 679e1464..861f1d2d 100644 --- a/app/boards/arm/preonic/preonic_rev3.yaml +++ b/app/boards/arm/preonic/preonic_rev3.yaml @@ -16,4 +16,4 @@ supported: - lsm303dlhc - nvs - can - - kscan \ No newline at end of file + - kscan diff --git a/app/boards/arm/s40nc/README.md b/app/boards/arm/s40nc/README.md index 32db57e9..96bebb33 100644 --- a/app/boards/arm/s40nc/README.md +++ b/app/boards/arm/s40nc/README.md @@ -1,9 +1,11 @@ # S40NC + ![S40NC](https://i.imgur.com/fk8587n.jpg) Shorty40NoCordy (S40NC) is a limited run 40% bluetooth keyboard originally made and sold by MechWild. ## Building S40NC ZMK firmware + ``` west build -p -b s40nc ``` diff --git a/app/boards/arm/s40nc/s40nc.keymap b/app/boards/arm/s40nc/s40nc.keymap index c43bc671..f0e60e7d 100644 --- a/app/boards/arm/s40nc/s40nc.keymap +++ b/app/boards/arm/s40nc/s40nc.keymap @@ -17,7 +17,7 @@ / { keymap { compatible = "zmk,keymap"; - + default_layer { bindings = < &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC @@ -35,7 +35,7 @@ &trans &trans &trans &kp TAB &kp TAB &kp TAB &kp HOME &kp PG_DN &kp END >; }; - + raise_layer { bindings = < &kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &trans @@ -44,7 +44,7 @@ &trans &trans &trans &kp TAB &kp TAB &kp TAB &kp HOME &kp PG_DN &kp END >; }; - + control_layer { bindings = < &bt BT_CLR &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp C_PP @@ -55,4 +55,4 @@ }; }; }; - + diff --git a/app/boards/shields/bfo9000/README.md b/app/boards/shields/bfo9000/README.md index 1e91fdcf..54893aed 100644 --- a/app/boards/shields/bfo9000/README.md +++ b/app/boards/shields/bfo9000/README.md @@ -4,10 +4,10 @@ Customizable full-size split ortholinear. ## Features -* Compatible with MX-compatible, Alps-compatible, and Kailh Low-Profile Choc switches. -* Breakoff pieces to allow for 4 to 6 rows and 7 to 9 columns. -* RGB LED connections +- Compatible with MX-compatible, Alps-compatible, and Kailh Low-Profile Choc switches. +- Breakoff pieces to allow for 4 to 6 rows and 7 to 9 columns. +- RGB LED connections ## Hardware Notes -[Included default keymap](http://www.keyboard-layout-editor.com/#/gists/51293c31afcd5f1765e8f413a46bfcf8) \ No newline at end of file +[Included default keymap](http://www.keyboard-layout-editor.com/#/gists/51293c31afcd5f1765e8f413a46bfcf8) diff --git a/app/boards/shields/boardsource5x12/boardsource5x12.keymap b/app/boards/shields/boardsource5x12/boardsource5x12.keymap index 8956ca98..cb851c35 100644 --- a/app/boards/shields/boardsource5x12/boardsource5x12.keymap +++ b/app/boards/shields/boardsource5x12/boardsource5x12.keymap @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ - + #include #include #include @@ -28,7 +28,7 @@ &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 LSHFT &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp LCTRL &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RET - &mo 3 &kp LCTRL &kp LALT &kp LGUI &mo 1 &kp SPACE &kp SPACE &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT + &mo 3 &kp LCTRL &kp LALT &kp LGUI &mo 1 &kp SPACE &kp SPACE &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT >; }; @@ -44,7 +44,7 @@ &kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &kp DEL &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp LS(NON_US_HASH) &kp LS(NON_US_BSLH) &trans &trans &trans - &trans &trans &trans &trans &trans &trans &trans &mo 3 &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PLAY_PAUSE + &trans &trans &trans &trans &trans &trans &trans &mo 3 &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PLAY_PAUSE >; }; diff --git a/app/boards/shields/boardsource5x12/boardsource5x12.overlay b/app/boards/shields/boardsource5x12/boardsource5x12.overlay index 0fafe8a1..080a2392 100644 --- a/app/boards/shields/boardsource5x12/boardsource5x12.overlay +++ b/app/boards/shields/boardsource5x12/boardsource5x12.overlay @@ -39,4 +39,4 @@ , <&pro_micro 6 GPIO_ACTIVE_HIGH> ; }; -}; \ No newline at end of file +}; \ No newline at end of file diff --git a/app/boards/shields/chalice/chalice.keymap b/app/boards/shields/chalice/chalice.keymap index cba93d03..c72e3ee1 100644 --- a/app/boards/shields/chalice/chalice.keymap +++ b/app/boards/shields/chalice/chalice.keymap @@ -19,9 +19,9 @@ bindings = < &kp ESC &kp GRAVE &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 INSERT &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 DELETE &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 ENTER + &kp DELETE &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 ENTER &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH &kp RSHFT &kp UP - &kp LCTRL &kp LALT &kp SPACE &mo 1 &kp SPACE &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT + &kp LCTRL &kp LALT &kp SPACE &mo 1 &kp SPACE &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT >; }; @@ -30,9 +30,9 @@ bindings = < &bootloader &out OUT_TOG &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &bt BT_CLR &rgb_ug RGB_TOG &rgb_ug RGB_HUD &rgb_ug RGB_HUI &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &trans &bt BT_SEL 0 &rgb_ug RGB_EFF &rgb_ug RGB_SAD &rgb_ug RGB_SAI &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &bt BT_SEL 0 &rgb_ug RGB_EFF &rgb_ug RGB_SAD &rgb_ug RGB_SAI &trans &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_SEL 1 &rgb_ug RGB_EFR &rgb_ug RGB_BRD &rgb_ug RGB_BRI &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp PG_UP - &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_DN &kp END + &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_DN &kp END >; }; }; diff --git a/app/boards/shields/chalice/chalice.overlay b/app/boards/shields/chalice/chalice.overlay index 34cbd34e..6778588b 100644 --- a/app/boards/shields/chalice/chalice.overlay +++ b/app/boards/shields/chalice/chalice.overlay @@ -21,7 +21,7 @@ map = < RC(0,0) RC(1,0) RC(0,1) RC(1,1) RC(0,2) RC(1,2) RC(0,3) RC(1,3) RC(0,4) RC(1,4) RC(0,5) RC(1,5) RC(0,6) RC(1,6) RC(4,6) RC(2,0) RC(3,0) RC(2,1) RC(3,1) RC(2,2) RC(3,2) RC(2,3) RC(3,3) RC(2,4) RC(3,4) RC(2,5) RC(3,5) RC(2,6) RC(3,6) RC(5,6) - RC(4,0) RC(5,0) RC(4,1) RC(5,1) RC(4,2) RC(5,2) RC(4,3) RC(5,3) RC(4,4) RC(5,4) RC(4,5) RC(5,5) RC(6,6) RC(7,6) + RC(4,0) RC(5,0) RC(4,1) RC(5,1) RC(4,2) RC(5,2) RC(4,3) RC(5,3) RC(4,4) RC(5,4) RC(4,5) RC(5,5) RC(6,6) RC(7,6) RC(6,0) RC(7,0) RC(6,1) RC(7,1) RC(6,2) RC(7,2) RC(6,3) RC(7,3) RC(6,4) RC(7,4) RC(6,5) RC(7,5) RC(8,6) RC(9,6) RC(8,0) RC(9,1) RC(8,2) RC(9,2) RC(8,3) RC(9,3) RC(8,4) RC(9,4) RC(8,5) RC(9,5) >; @@ -35,7 +35,7 @@ map = < RC(0,0) RC(1,0) RC(0,1) RC(1,1) RC(0,2) RC(1,2) RC(0,3) RC(1,3) RC(0,4) RC(1,4) RC(0,5) RC(1,5) RC(0,6) RC(1,6) RC(4,6) RC(8,1) RC(2,0) RC(3,0) RC(2,1) RC(3,1) RC(2,2) RC(3,2) RC(2,3) RC(3,3) RC(2,4) RC(3,4) RC(2,5) RC(3,5) RC(2,6) RC(3,6) RC(5,6) - RC(4,0) RC(5,0) RC(4,1) RC(5,1) RC(4,2) RC(5,2) RC(4,3) RC(5,3) RC(4,4) RC(5,4) RC(4,5) RC(5,5) RC(6,6) RC(7,6) + RC(4,0) RC(5,0) RC(4,1) RC(5,1) RC(4,2) RC(5,2) RC(4,3) RC(5,3) RC(4,4) RC(5,4) RC(4,5) RC(5,5) RC(6,6) RC(7,6) RC(6,0) RC(7,0) RC(6,1) RC(7,1) RC(6,2) RC(7,2) RC(6,3) RC(7,3) RC(6,4) RC(7,4) RC(6,5) RC(7,5) RC(8,6) RC(9,6) RC(8,0) RC(9,1) RC(8,2) RC(9,2) RC(8,3) RC(9,3) RC(8,4) RC(9,4) RC(8,5) RC(9,5) >; diff --git a/app/boards/shields/clog/clog.dtsi b/app/boards/shields/clog/clog.dtsi index 27943100..ccad150c 100644 --- a/app/boards/shields/clog/clog.dtsi +++ b/app/boards/shields/clog/clog.dtsi @@ -27,7 +27,7 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-direct"; label = "KSCAN"; - + input-gpios = <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> diff --git a/app/boards/shields/corne/corne.dtsi b/app/boards/shields/corne/corne.dtsi index e81afcf8..a9c1c287 100644 --- a/app/boards/shields/corne/corne.dtsi +++ b/app/boards/shields/corne/corne.dtsi @@ -56,7 +56,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 , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; - + }; // TODO: per-key RGB node(s)? diff --git a/app/boards/shields/eek/eek.keymap b/app/boards/shields/eek/eek.keymap index d250cb01..74ecc407 100644 --- a/app/boards/shields/eek/eek.keymap +++ b/app/boards/shields/eek/eek.keymap @@ -15,9 +15,9 @@ default { // -------------------------------------------------------------------------------------------------------------------------------------------------------------------- -// Q | W | E | R | T | | Y | U | I | O | P | -// A | S | D | F | G | | H | J | K | L | ; | -// Lsft/Z| X | C | V | B | | N | M | , | . |Rsft//| +// Q | W | E | R | T | | Y | U | I | O | P | +// A | S | D | F | G | | H | J | K | L | ; | +// Lsft/Z| X | C | V | B | | N | M | , | . |Rsft//| // | LCTL | Bspc/LMOD | SPC | | Del/Num | Ent | Sym | bindings = < &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P @@ -28,7 +28,7 @@ }; numbers { // -------------------------------------------------------------------------------------------------------------------------------------------------------------------- -// 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | +// 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | // TAB | BT_PRV | BT_NXT | VOL-| VOL+| | < | v | ∧ | > | ' | // Lsft| BT_SEL0| BT_CLR | MUTE| | | HOME| END | PGUP| PGDN| Rsft| // | LCTL | LMOD| LALT | | Num | | BL-reset | @@ -41,8 +41,8 @@ }; symbols { // -------------------------------------------------------------------------------------------------------------------------------------------------------------------- -// ESC | F1 | F2 | F3 | F4 | | OUT_USB | OUT_BLE | | = | - | -// CAPS| F5 | F6 | F7 | F8 | | [ | ] | | ` | \ | +// ESC | F1 | F2 | F3 | F4 | | OUT_USB | OUT_BLE | | = | - | +// CAPS| F5 | F6 | F7 | F8 | | [ | ] | | ` | \ | // LSFT| F9 | F10 | F11 | F12 | | | | | | RSFT | // | LCTL | LMOD| LALT | | RESET | | SYM | bindings = < diff --git a/app/boards/shields/eek/eek.overlay b/app/boards/shields/eek/eek.overlay index 3f830f07..f53c6b5b 100644 --- a/app/boards/shields/eek/eek.overlay +++ b/app/boards/shields/eek/eek.overlay @@ -20,7 +20,7 @@ RC(0,9) RC(0,8) RC(0,7) RC(0,6) RC(0,5) RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(1,9) RC(1,8) RC(1,7) RC(1,6) RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) RC(2,9) RC(2,8) RC(2,7) RC(2,6) RC(2,5) RC(2,4) RC(2,3) RC(2,2) RC(2,1) RC(2,0) - RC(3,7) RC(3,6) RC(3,5) RC(3,4) RC(3,3) RC(3,2) + RC(3,7) RC(3,6) RC(3,5) RC(3,4) RC(3,3) RC(3,2) >; }; diff --git a/app/boards/shields/elephant42/Kconfig.defconfig b/app/boards/shields/elephant42/Kconfig.defconfig index e507f2c6..55ee6c87 100644 --- a/app/boards/shields/elephant42/Kconfig.defconfig +++ b/app/boards/shields/elephant42/Kconfig.defconfig @@ -15,7 +15,7 @@ if SHIELD_ELEPHANT42_LEFT || SHIELD_ELEPHANT42_RIGHT config ZMK_SPLIT default y - + if ZMK_DISPLAY config I2C diff --git a/app/boards/shields/elephant42/elephant42.dtsi b/app/boards/shields/elephant42/elephant42.dtsi index e2b708ca..2d3f5166 100644 --- a/app/boards/shields/elephant42/elephant42.dtsi +++ b/app/boards/shields/elephant42/elephant42.dtsi @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ - + #include / { @@ -36,7 +36,7 @@ RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; - }; + }; }; &pro_micro_i2c { diff --git a/app/boards/shields/elephant42/elephant42.keymap b/app/boards/shields/elephant42/elephant42.keymap index 8594c117..62484728 100644 --- a/app/boards/shields/elephant42/elephant42.keymap +++ b/app/boards/shields/elephant42/elephant42.keymap @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ - + #include #include #include @@ -19,7 +19,7 @@ default_layer { bindings = < - < ADJT ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp DEL + < ADJT ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp DEL &mt LCTRL TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp LSHFT &mo LOWR &kp LGUI &kp BSPC &kp SPACE &kp ENTER &mo RAIS &kp LALT diff --git a/app/boards/shields/elephant42/elephant42_left.overlay b/app/boards/shields/elephant42/elephant42_left.overlay index 72fe2251..10473438 100644 --- a/app/boards/shields/elephant42/elephant42_left.overlay +++ b/app/boards/shields/elephant42/elephant42_left.overlay @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ - + #include "elephant42.dtsi" &kscan0 { diff --git a/app/boards/shields/elephant42/elephant42_right.overlay b/app/boards/shields/elephant42/elephant42_right.overlay index 35bd5895..c8f69a04 100644 --- a/app/boards/shields/elephant42/elephant42_right.overlay +++ b/app/boards/shields/elephant42/elephant42_right.overlay @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ - + #include "elephant42.dtsi" &default_transform { diff --git a/app/boards/shields/helix/helix.dtsi b/app/boards/shields/helix/helix.dtsi index 45457560..bbaec636 100644 --- a/app/boards/shields/helix/helix.dtsi +++ b/app/boards/shields/helix/helix.dtsi @@ -42,6 +42,6 @@ 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 , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; - + }; }; \ No newline at end of file diff --git a/app/boards/shields/helix/helix.keymap b/app/boards/shields/helix/helix.keymap index 82327c32..80678fe6 100644 --- a/app/boards/shields/helix/helix.keymap +++ b/app/boards/shields/helix/helix.keymap @@ -23,7 +23,7 @@ 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 | @@ -78,7 +78,7 @@ As such, those are in use within the default layer at this time.*/ // | | | | | | | | | | | | | | | | 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_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/helix/helix_left.overlay b/app/boards/shields/helix/helix_left.overlay index 5b0c7623..2a7ac805 100644 --- a/app/boards/shields/helix/helix_left.overlay +++ b/app/boards/shields/helix/helix_left.overlay @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ - + #include "helix.dtsi" &kscan0 { diff --git a/app/boards/shields/hummingbird/hummingbird.overlay b/app/boards/shields/hummingbird/hummingbird.overlay index 4af9cbdf..0c48c128 100644 --- a/app/boards/shields/hummingbird/hummingbird.overlay +++ b/app/boards/shields/hummingbird/hummingbird.overlay @@ -49,7 +49,7 @@ , <&xiao_d 5 GPIO_ACTIVE_HIGH> ; }; - + }; &xiao_spi { status = "disabled"; }; diff --git a/app/boards/shields/iris/Kconfig.defconfig b/app/boards/shields/iris/Kconfig.defconfig index 972884db..83331d10 100644 --- a/app/boards/shields/iris/Kconfig.defconfig +++ b/app/boards/shields/iris/Kconfig.defconfig @@ -15,5 +15,5 @@ if SHIELD_IRIS_LEFT || SHIELD_IRIS_RIGHT config ZMK_SPLIT default y - + endif \ No newline at end of file diff --git a/app/boards/shields/iris/iris.dtsi b/app/boards/shields/iris/iris.dtsi index 24099f61..0e976f86 100644 --- a/app/boards/shields/iris/iris.dtsi +++ b/app/boards/shields/iris/iris.dtsi @@ -42,6 +42,6 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,2) RC(4,9) RC(3,6) RC(3,7) , <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; - + }; }; \ No newline at end of file diff --git a/app/boards/shields/jian/jian.dtsi b/app/boards/shields/jian/jian.dtsi index 34c0298e..2b1eb391 100644 --- a/app/boards/shields/jian/jian.dtsi +++ b/app/boards/shields/jian/jian.dtsi @@ -71,6 +71,6 @@ , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; - + }; }; diff --git a/app/boards/shields/jiran/jiran.dtsi b/app/boards/shields/jiran/jiran.dtsi index 5dfaa46b..f0727dd4 100644 --- a/app/boards/shields/jiran/jiran.dtsi +++ b/app/boards/shields/jiran/jiran.dtsi @@ -77,6 +77,6 @@ , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; - + }; }; diff --git a/app/boards/shields/jorne/Kconfig.defconfig b/app/boards/shields/jorne/Kconfig.defconfig index 4664debf..775bb56a 100644 --- a/app/boards/shields/jorne/Kconfig.defconfig +++ b/app/boards/shields/jorne/Kconfig.defconfig @@ -13,7 +13,7 @@ if SHIELD_JORNE_LEFT || SHIELD_JORNE_RIGHT config ZMK_SPLIT default y - + if ZMK_DISPLAY config I2C diff --git a/app/boards/shields/jorne/jorne.dtsi b/app/boards/shields/jorne/jorne.dtsi index 6f43393d..bb862b8d 100644 --- a/app/boards/shields/jorne/jorne.dtsi +++ b/app/boards/shields/jorne/jorne.dtsi @@ -72,7 +72,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 , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; - + }; // TODO: per-key RGB node(s)? diff --git a/app/boards/shields/kyria/Kconfig.defconfig b/app/boards/shields/kyria/Kconfig.defconfig index 53b441cb..82f48b4c 100644 --- a/app/boards/shields/kyria/Kconfig.defconfig +++ b/app/boards/shields/kyria/Kconfig.defconfig @@ -13,7 +13,7 @@ if SHIELD_KYRIA config ZMK_SPLIT default y - + if ZMK_DISPLAY config I2C diff --git a/app/boards/shields/kyria/kyria_common.dtsi b/app/boards/shields/kyria/kyria_common.dtsi index c52ab05a..1e61cc6b 100644 --- a/app/boards/shields/kyria/kyria_common.dtsi +++ b/app/boards/shields/kyria/kyria_common.dtsi @@ -17,7 +17,7 @@ compatible = "zmk,kscan-gpio-matrix"; label = "KSCAN"; - diode-direction = "col2row"; + diode-direction = "col2row"; }; left_encoder: encoder_left { diff --git a/app/boards/shields/leeloo/Kconfig.defconfig b/app/boards/shields/leeloo/Kconfig.defconfig index 36306757..d5bfab3d 100644 --- a/app/boards/shields/leeloo/Kconfig.defconfig +++ b/app/boards/shields/leeloo/Kconfig.defconfig @@ -8,7 +8,7 @@ config ZMK_KEYBOARD_NAME config ZMK_SPLIT_ROLE_CENTRAL default y - + endif if SHIELD_LEELOO_LEFT || SHIELD_LEELOO_RIGHT diff --git a/app/boards/shields/leeloo/README.md b/app/boards/shields/leeloo/README.md index 35e04994..a807843f 100644 --- a/app/boards/shields/leeloo/README.md +++ b/app/boards/shields/leeloo/README.md @@ -6,20 +6,22 @@ Keyboard Designer: [clicketysplit.ca](https://clicketysplit.ca) GitHub: [ClicketySplit](https://github.com/ClicketySplit) Hardware Supported: Pro Micro, Elite-C, 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. +Albeit, there is no doubt where Leeloo's heritage is derived from—Lily58, and Corne. It is not a copy-paste-modify implementation. 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: -* 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 + +- 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 # Building Your 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) @@ -36,6 +38,7 @@ Build command for your custom keymap of Leeloo: west build -d build/left -p -b nice_nano_v2 -- -DSHIELD=leeloo_left -DZMK_CONFIG="C:/dev/zmk/[yourName]/leeloo/config" # Support + If you have any questions with regards to Leeloo, please [Contact Us](https://clicketysplit.ca/pages/contact-us). Clickety Split diff --git a/app/boards/shields/lily58/lily58.dtsi b/app/boards/shields/lily58/lily58.dtsi index 4efa1069..1a296a8c 100644 --- a/app/boards/shields/lily58/lily58.dtsi +++ b/app/boards/shields/lily58/lily58.dtsi @@ -43,7 +43,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) , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; - + }; left_encoder: encoder_left { diff --git a/app/boards/shields/lotus58/Kconfig.defconfig b/app/boards/shields/lotus58/Kconfig.defconfig index 56eef359..b6bb37d8 100644 --- a/app/boards/shields/lotus58/Kconfig.defconfig +++ b/app/boards/shields/lotus58/Kconfig.defconfig @@ -8,7 +8,7 @@ config ZMK_KEYBOARD_NAME config ZMK_SPLIT_ROLE_CENTRAL default y - + endif if SHIELD_LOTUS58_LEFT || SHIELD_LOTUS58_RIGHT diff --git a/app/boards/shields/lotus58/lotus58.dtsi b/app/boards/shields/lotus58/lotus58.dtsi index 1df0bf38..e24d75e7 100644 --- a/app/boards/shields/lotus58/lotus58.dtsi +++ b/app/boards/shields/lotus58/lotus58.dtsi @@ -27,7 +27,7 @@ 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(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(4,0) RC(4,11) 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) + RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) >; }; diff --git a/app/boards/shields/lotus58/lotus58.keymap b/app/boards/shields/lotus58/lotus58.keymap index 50249146..fae463c9 100644 --- a/app/boards/shields/lotus58/lotus58.keymap +++ b/app/boards/shields/lotus58/lotus58.keymap @@ -17,7 +17,7 @@ key-positions = <24 52>; layers = <0>; bindings = <&kp LGUI>; - }; + }; }; behaviors { @@ -59,7 +59,7 @@ &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 LSHFT &kp A &sleft &kp D &fright &kp G &sys_reset &sys_reset &kp H &kp J &kp K &kp L &kp SEMI &mt RSHFT SQT &kp LCTRL &kp Z &kp X &kp C &kp V &kp B &kp C_MUTE &kp C_PP &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mt RCTRL BSLH - < 2 RET &kp LALT &kp SPACE < 1 DEL < 2 RET &kp BSPC < 1 RBKT &kp LGUI + < 2 RET &kp LALT &kp SPACE < 1 DEL < 2 RET &kp BSPC < 1 RBKT &kp LGUI >; sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_UP PG_DN>; @@ -71,7 +71,7 @@ // | | ! | HOME| ^ | END | % | | VOL^ | PGUP | INS | ^ | PSCR | - | // | | # | <- | v | -> | $ | | | | VOLv | <- | ^ | -> | ~ | _ | // | | @ | - | ( | ) | & | | | | MUTE | PGDN | v | : | * | | | -// | F11 | | | | | | | | F12 | +// | F11 | | | | | | | | F12 | bindings = < &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp PLUS &trans &kp EXCL &kp HOME &kp UP &kp END &kp PRCNT &kp C_VOL_UP &kp PG_UP &kp INS &kp CARET &kp PSCRN &kp MINUS @@ -89,13 +89,13 @@ // | | INS | PSCR | GUI | RESET | | | PGUP | | ^ | | | | // | | ALT | CTRL | SHIFT | FLASH | CAPS | | | | PGDN | <- | v | -> | DEL | BSPC | // | | 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 &out OUT_TOG &out OUT_USB &out OUT_BLE &trans &sys_reset &bootloader &trans &kp INS &kp PSCRN &kp K_CMENU &sys_reset &trans &kp PG_UP &trans &kp UP &trans &trans &trans &trans &kp LALT &kp LCTRL &kp LSHFT &bootloader &kp CLCK &trans &trans &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 &kp C_PP &kp C_PREV &kp C_NEXT &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 &inc_dec_kp PG_UP PG_DN>; diff --git a/app/boards/shields/lotus58/lotus58_left.overlay b/app/boards/shields/lotus58/lotus58_left.overlay index 9755ae0b..a51659df 100644 --- a/app/boards/shields/lotus58/lotus58_left.overlay +++ b/app/boards/shields/lotus58/lotus58_left.overlay @@ -8,7 +8,7 @@ &kscan0 { col-gpios - = <&pro_micro 15 GPIO_ACTIVE_HIGH> + = <&pro_micro 15 GPIO_ACTIVE_HIGH> , <&pro_micro 16 GPIO_ACTIVE_HIGH> , <&pro_micro 14 GPIO_ACTIVE_HIGH> , <&pro_micro 10 GPIO_ACTIVE_HIGH> diff --git a/app/boards/shields/microdox/Kconfig.defconfig b/app/boards/shields/microdox/Kconfig.defconfig index 28f8c811..8c0b042e 100644 --- a/app/boards/shields/microdox/Kconfig.defconfig +++ b/app/boards/shields/microdox/Kconfig.defconfig @@ -15,7 +15,7 @@ if SHIELD_MICRODOX_LEFT || SHIELD_MICRODOX_RIGHT config ZMK_SPLIT default y - + if ZMK_DISPLAY config I2C diff --git a/app/boards/shields/microdox/microdox.dtsi b/app/boards/shields/microdox/microdox.dtsi index b8d47b2a..e3fabb3e 100644 --- a/app/boards/shields/microdox/microdox.dtsi +++ b/app/boards/shields/microdox/microdox.dtsi @@ -40,7 +40,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(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)? diff --git a/app/boards/shields/murphpad/murphpad.keymap b/app/boards/shields/murphpad/murphpad.keymap index 2e8c6f6e..ccdff9f7 100644 --- a/app/boards/shields/murphpad/murphpad.keymap +++ b/app/boards/shields/murphpad/murphpad.keymap @@ -44,7 +44,7 @@ bindings = <&bt BT_NXT>; }; }; - + sensors { compatible = "zmk,keymap-sensors"; sensors = <&encoder_1 &encoder_2>; @@ -57,29 +57,29 @@ default_layer { label = "default layer"; bindings = < - &bt BT_CLR &kp TAB &kp F5 &kp LC(LA(C)) &kp LG(D) - &rgb_ug RGB_TOG &kp ESC &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS - &rgb_ug RGB_EFF &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS + &bt BT_CLR &kp TAB &kp F5 &kp LC(LA(C)) &kp LG(D) + &rgb_ug RGB_TOG &kp ESC &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS + &rgb_ug RGB_EFF &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS &kp C_MUTE &kp KP_N4 &kp KP_N5 &kp KP_N6 &trans &mo 1 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER &kp BSPC &kp KP_N0 &trans &kp KP_DOT &trans >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; - }; - + }; + fn_layer { label = "fn layer"; bindings = < - &trans &trans &trans &trans &trans - &trans &kp KP_NUM &trans &trans &trans - &trans &trans &trans &trans &trans - &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &trans &trans - &kp DEL &trans &trans &trans &trans - >; + &trans &kp KP_NUM &trans &trans &trans + &trans &trans &trans &trans &trans + &bt BT_CLR &trans &trans &trans &trans + &trans &trans &trans &trans &trans + &kp DEL &trans &trans &trans &trans + >; sensor-bindings = <&inc_dec_kp PG_UP PG_DN &inc_dec_kp C_VOL_UP C_VOL_DN>; - + }; }; }; \ No newline at end of file diff --git a/app/boards/shields/murphpad/murphpad.overlay b/app/boards/shields/murphpad/murphpad.overlay index c66f2aef..b7fead60 100644 --- a/app/boards/shields/murphpad/murphpad.overlay +++ b/app/boards/shields/murphpad/murphpad.overlay @@ -42,7 +42,7 @@ resolution = <4>; status = "disabled"; }; - + encoder_2: encoder_2 { compatible = "alps,ec11"; label = "Encoder 2"; diff --git a/app/boards/shields/naked60/naked60.keymap b/app/boards/shields/naked60/naked60.keymap index d380a599..1c212cd4 100644 --- a/app/boards/shields/naked60/naked60.keymap +++ b/app/boards/shields/naked60/naked60.keymap @@ -28,7 +28,7 @@ &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 LSHFT &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp LCTRL &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RET - &mo 3 &kp LCTRL &kp LALT &kp LGUI &mo 1 &kp SPACE &kp SPACE &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT + &mo 3 &kp LCTRL &kp LALT &kp LGUI &mo 1 &kp SPACE &kp SPACE &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT >; }; @@ -44,7 +44,7 @@ &kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &kp DEL &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp LS(NON_US_HASH) &kp LS(NON_US_BSLH) &trans &trans &trans - &trans &trans &trans &trans &trans &trans &trans &mo 3 &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PLAY_PAUSE + &trans &trans &trans &trans &trans &trans &trans &mo 3 &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PLAY_PAUSE >; }; diff --git a/app/boards/shields/nibble/nibble.keymap b/app/boards/shields/nibble/nibble.keymap index 23c796ea..c02aad75 100644 --- a/app/boards/shields/nibble/nibble.keymap +++ b/app/boards/shields/nibble/nibble.keymap @@ -32,7 +32,7 @@ }; function_layer { label = "Function"; - + sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; bindings = < diff --git a/app/boards/shields/nibble/nibble.overlay b/app/boards/shields/nibble/nibble.overlay index 13f2c2fe..baf1eb10 100644 --- a/app/boards/shields/nibble/nibble.overlay +++ b/app/boards/shields/nibble/nibble.overlay @@ -51,7 +51,7 @@ 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(1,15) 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(2,15) RC(3,0) RC(3,1) RC(0,0) 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,14) RC(3,15) -RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,6) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15) +RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,6) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15) >; }; }; diff --git a/app/boards/shields/nice_view/README.md b/app/boards/shields/nice_view/README.md index 0b4ac21f..e3dffa34 100644 --- a/app/boards/shields/nice_view/README.md +++ b/app/boards/shields/nice_view/README.md @@ -2,4 +2,4 @@ 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` labelled SPI bus is provided with _at least_ MOSI, SCK, and CS pins defined. diff --git a/app/boards/shields/nice_view_adapter/README.md b/app/boards/shields/nice_view_adapter/README.md index ec4665a3..fe0a6f07 100644 --- a/app/boards/shields/nice_view_adapter/README.md +++ b/app/boards/shields/nice_view_adapter/README.md @@ -2,7 +2,7 @@ This shield is used as an adapter between the nice!view and existing shields/boards that expose an I2C OLED header. -To use this shield, you should add this shield to your list of shields *before* `nice_view`. +To use this shield, you should add this shield to your list of shields _before_ `nice_view`. The nice!view will use the SDA/SCL pins of the OLED, and then the adapter expects a final pin to be "bodged" from your microcontroller to the nice!view CS pin. This adapter assumes that the CS pin bodged is the `&pro_micro 1` pin or "D1", which is the top left pin when looking at the front of the board. If you can't use this pin, you'll need to override the `cs-gpios` for the `&nice_view_spi` bus (in your `zmk-config` keymap for example) or you will want to define your own `&nice_view_spi` bus without using this adapter. diff --git a/app/boards/shields/pancake/pancake.keymap b/app/boards/shields/pancake/pancake.keymap index 99f2aaff..e5ca4372 100644 --- a/app/boards/shields/pancake/pancake.keymap +++ b/app/boards/shields/pancake/pancake.keymap @@ -20,7 +20,7 @@ default_layer { bindings = < - &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 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 SQT &kp SEMI &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp UP &kp ENTER &kp LCTRL &kp LALT &kp LGUI &mo FNC &mo LWR &kp SPACE &kp SPACE &mo RSE &kp SLASH &kp LEFT &kp DOWN &kp RIGHT @@ -32,7 +32,7 @@ &kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &kp BSPC &trans &trans &trans &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp LBRC &kp RBRC &kp C_VOL_UP &trans - &trans &trans &trans &trans &trans &trans &trans &trans &kp QMARK &trans &kp C_VOL_DN &trans + &trans &trans &trans &trans &trans &trans &trans &trans &kp QMARK &trans &kp C_VOL_DN &trans >; }; @@ -41,8 +41,8 @@ &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &trans &kp BSLH &trans &trans &trans &trans &trans &trans &trans &trans &kp LBKT &kp RBKT &kp C_VOL_UP &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_VOL_DN &trans - >; + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_VOL_DN &trans + >; }; function_layer { @@ -50,8 +50,8 @@ &bootloader &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp F11 &kp F12 &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 - &out OUT_BLE &out OUT_USB &out OUT_TOG &trans &trans &trans &trans &trans &trans &trans &trans &trans - >; + &out OUT_BLE &out OUT_USB &out OUT_TOG &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; }; }; }; diff --git a/app/boards/shields/pancake/pancake.overlay b/app/boards/shields/pancake/pancake.overlay index 53e8c8c1..6fae463f 100644 --- a/app/boards/shields/pancake/pancake.overlay +++ b/app/boards/shields/pancake/pancake.overlay @@ -14,7 +14,7 @@ label = "KSCAN"; diode-direction = "col2row"; - col-gpios + col-gpios = <&pro_micro 21 GPIO_ACTIVE_HIGH> , <&pro_micro 20 GPIO_ACTIVE_HIGH> , <&pro_micro 19 GPIO_ACTIVE_HIGH> @@ -28,7 +28,7 @@ , <&pro_micro 3 GPIO_ACTIVE_HIGH> , <&pro_micro 2 GPIO_ACTIVE_HIGH> ; - + row-gpios = <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> diff --git a/app/boards/shields/qaz/qaz.overlay b/app/boards/shields/qaz/qaz.overlay index 098c9f02..76ee5ba7 100644 --- a/app/boards/shields/qaz/qaz.overlay +++ b/app/boards/shields/qaz/qaz.overlay @@ -49,5 +49,5 @@ , <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; - + }; \ No newline at end of file diff --git a/app/boards/shields/quefrency/Kconfig.defconfig b/app/boards/shields/quefrency/Kconfig.defconfig index 9e51c2bc..28e46a56 100644 --- a/app/boards/shields/quefrency/Kconfig.defconfig +++ b/app/boards/shields/quefrency/Kconfig.defconfig @@ -1,7 +1,7 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT - - + + if SHIELD_QUEFRENCY_LEFT config ZMK_KEYBOARD_NAME diff --git a/app/boards/shields/quefrency/quefrency.dtsi b/app/boards/shields/quefrency/quefrency.dtsi index 411d3658..c9cb7d43 100644 --- a/app/boards/shields/quefrency/quefrency.dtsi +++ b/app/boards/shields/quefrency/quefrency.dtsi @@ -13,7 +13,7 @@ zmk,matrix_transform = &default_transform; }; - /* + /* * This transform correspondsto the 60% left without macro keypad and 65% right, even this * combination of PCBs can have keys in different locations based on configuration. */ @@ -22,11 +22,11 @@ columns = <15>; rows = <6>; 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,14) RC(5,13) +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,14) RC(5,13) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) /**/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(5,14) -RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) /**/ RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,14) RC(2,13) -RC(3,0) 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,12) RC(3,13) RC(3,14) RC(3,11) -RC(4,0) RC(4,1) RC(4,2) RC(4,4) RC(4,6) /**/ RC(4,7) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) RC(4,9) +RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) /**/ RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,14) RC(2,13) +RC(3,0) 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,12) RC(3,13) RC(3,14) RC(3,11) +RC(4,0) RC(4,1) RC(4,2) RC(4,4) RC(4,6) /**/ RC(4,7) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) RC(4,9) >; }; }; diff --git a/app/boards/shields/quefrency/quefrency_right.overlay b/app/boards/shields/quefrency/quefrency_right.overlay index 8e42d555..bf97d34b 100644 --- a/app/boards/shields/quefrency/quefrency_right.overlay +++ b/app/boards/shields/quefrency/quefrency_right.overlay @@ -12,7 +12,7 @@ / { - /* This kscan is for the 65% right half the 60% right half + /* This kscan is for the 65% right half the 60% right half * may require different column and row pins */ kscan0: kscan { diff --git a/app/boards/shields/redox/redox.dtsi b/app/boards/shields/redox/redox.dtsi index 4825a39f..9c0705a6 100644 --- a/app/boards/shields/redox/redox.dtsi +++ b/app/boards/shields/redox/redox.dtsi @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ - + #include / { @@ -42,7 +42,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) RC(4,8) , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; - + }; }; diff --git a/app/boards/shields/redox/redox.keymap b/app/boards/shields/redox/redox.keymap index a45595ff..c88f703b 100644 --- a/app/boards/shields/redox/redox.keymap +++ b/app/boards/shields/redox/redox.keymap @@ -30,7 +30,7 @@ >; }; - + lower_layer { // -------------------------------------------------------------------------------------------------------------------------- // | ESC | 1 | 2 | 3 | 4 | 5 | --- | 6 | 7 | 8 | 9 | 0 | DEL | @@ -62,7 +62,7 @@ &trans &trans &trans &mo 3 &trans &mo 3 &trans &trans &trans &trans &trans &trans &trans &trans >; }; - + adjust_layer { // ----------------------------------------------------------------------------------------- // | F1 | F2 | F3 | F4 | F5 | F6 | --- | F7 | F8 | F9 | F10 | F11 | F12 | diff --git a/app/boards/shields/snap/Kconfig.defconfig b/app/boards/shields/snap/Kconfig.defconfig index fa02421a..c4a67e65 100644 --- a/app/boards/shields/snap/Kconfig.defconfig +++ b/app/boards/shields/snap/Kconfig.defconfig @@ -15,7 +15,7 @@ if SHIELD_SNAP_LEFT || SHIELD_SNAP_RIGHT config ZMK_SPLIT default y - + if ZMK_DISPLAY config I2C diff --git a/app/boards/shields/snap/snap.dtsi b/app/boards/shields/snap/snap.dtsi index 0b7f32e5..77070db9 100644 --- a/app/boards/shields/snap/snap.dtsi +++ b/app/boards/shields/snap/snap.dtsi @@ -38,7 +38,7 @@ // R3C07L | R3C06L | R3C05L | R3C04L | R3C03L | R3C02L | R3C00L | | R3C15R | R3C14R | R3C13R | R3C12R | R3C11R | R3C10R | R3C09R | R4C08R | // R4C07L | R4C06L | R4C05L | R4C04L | R4C03L | R4C02L | R4C01L | R4C00L | | R4C15R | R4C14R | R4C13R | R4C12R | R4C11R | R4C10R | R4C09R | R5C08R | // R5C07L | R5C06L | R5C05L | R5C04L | R5C02L | R5C00L | | R5C15R | R5C14R | R5C13R | R5C12R | R5C11R | R5C10R | R5C09R | - + map = < RC(0,6) RC(0,5) RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(0,15) RC(0,14) RC(0,13) RC(0,12) RC(0,11) RC(0,10) RC(0,9) RC(0,8) RC(1,7) RC(1,6) RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) RC(1,15) RC(1,14) RC(1,13) RC(1,12) RC(1,11) RC(1,10) RC(1,9) RC(1,8) RC(1,16) diff --git a/app/boards/shields/snap/snap.keymap b/app/boards/shields/snap/snap.keymap index db44eb69..cc4c5255 100644 --- a/app/boards/shields/snap/snap.keymap +++ b/app/boards/shields/snap/snap.keymap @@ -37,7 +37,7 @@ bindings = < &bootloader &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bootloader &kp C_PP &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_PP -&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 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &rgb_ug RGB_TOG &rgb_ug RGB_BRI &rgb_ug RGB_EFF &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &rgb_ug RGB_HUD &rgb_ug RGB_BRD &rgb_ug RGB_HUI diff --git a/app/boards/shields/snap/snap_left.overlay b/app/boards/shields/snap/snap_left.overlay index 90fd66d1..b5b8a841 100644 --- a/app/boards/shields/snap/snap_left.overlay +++ b/app/boards/shields/snap/snap_left.overlay @@ -24,7 +24,7 @@ &left_encoder { a-gpios = <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; status = "okay"; }; diff --git a/app/boards/shields/snap/snap_right.overlay b/app/boards/shields/snap/snap_right.overlay index 4243f518..dc71a5cf 100644 --- a/app/boards/shields/snap/snap_right.overlay +++ b/app/boards/shields/snap/snap_right.overlay @@ -46,6 +46,6 @@ kscan_direct: kscan_direct { &right_encoder { a-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; status = "okay"; }; diff --git a/app/boards/shields/sofle/Kconfig.defconfig b/app/boards/shields/sofle/Kconfig.defconfig index 1c1c5604..afa710ff 100644 --- a/app/boards/shields/sofle/Kconfig.defconfig +++ b/app/boards/shields/sofle/Kconfig.defconfig @@ -8,7 +8,7 @@ config ZMK_KEYBOARD_NAME config ZMK_SPLIT_ROLE_CENTRAL default y - + endif if SHIELD_SOFLE_LEFT || SHIELD_SOFLE_RIGHT diff --git a/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig index 29de8d7e..03078cd6 100644 --- a/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig @@ -21,7 +21,7 @@ config ZMK_RGB_UNDERGLOW select SPI config ZMK_DISPLAY - + if ZMK_DISPLAY config SSD1306 diff --git a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_left.overlay b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_left.overlay index 864321cc..82234278 100644 --- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_left.overlay +++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_left.overlay @@ -24,7 +24,7 @@ , <&pro_micro 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> ; - col-gpios + col-gpios = <&pro_micro 16 GPIO_ACTIVE_HIGH> , <&pro_micro 10 GPIO_ACTIVE_HIGH> , <&pro_micro 14 GPIO_ACTIVE_HIGH> diff --git a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_right.overlay b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_right.overlay index 34330400..c1d34ffd 100644 --- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_right.overlay +++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_right.overlay @@ -24,7 +24,7 @@ , <&pro_micro 10 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> ; - col-gpios + col-gpios = <&pro_micro 9 GPIO_ACTIVE_HIGH> , <&pro_micro 8 GPIO_ACTIVE_HIGH> , <&pro_micro 7 GPIO_ACTIVE_HIGH> diff --git a/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig index 3c8d5f58..221bf90a 100644 --- a/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig @@ -21,7 +21,7 @@ config ZMK_RGB_UNDERGLOW select SPI config ZMK_DISPLAY - + if ZMK_DISPLAY config SSD1306 diff --git a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_left.overlay b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_left.overlay index 1fa61286..10a195ff 100644 --- a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_left.overlay +++ b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_left.overlay @@ -25,7 +25,7 @@ , <&pro_micro 8 GPIO_ACTIVE_HIGH> ; - col-gpios + col-gpios = <&pro_micro 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> , <&pro_micro 18 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> , <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> diff --git a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_right.overlay b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_right.overlay index 7f281db9..eaebff36 100644 --- a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_right.overlay +++ b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_right.overlay @@ -25,7 +25,7 @@ , <&pro_micro 10 GPIO_ACTIVE_HIGH> ; - col-gpios + col-gpios = <&pro_micro 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> , <&pro_micro 8 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> , <&pro_micro 7 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> diff --git a/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig index 4a2b8973..ac07c935 100644 --- a/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig @@ -21,7 +21,7 @@ config ZMK_RGB_UNDERGLOW select SPI config ZMK_DISPLAY - + if ZMK_DISPLAY config SSD1306 diff --git a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.keymap b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.keymap index 136e6927..385d2022 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.keymap +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.keymap @@ -14,7 +14,7 @@ // tapping_term_ms = <200>; }; -/ { +/ { combos { compatible = "zmk,combos"; @@ -23,80 +23,80 @@ key-positions = <0 1>; bindings = <&kp ESC>; }; - + combo_tab { timeout-ms = <50>; key-positions = <10 11>; bindings = <&kp TAB>; }; - + combo_ralt { timeout-ms = <50>; key-positions = <17 16>; bindings = <&kp RALT>; }; - + combo_lalt { timeout-ms = <50>; key-positions = <11 12>; bindings = <&kp LALT>; }; - + combo_lgui { timeout-ms = <50>; key-positions = <12 13>; bindings = <&kp LGUI>; }; - - + + combo_rgui { timeout-ms = <50>; key-positions = <17 18>; bindings = <&kp RGUI>; }; - - + + }; keymap { compatible = "zmk,keymap"; - + default_layer { bindings = < - &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P + &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 QUOT &mt LSFT Z &kp X &kp C &kp V &kp B &kp N &kp M &kp CMMA &kp DOT &mt LSFT RET - &mo 1 &kp LCTL &kp SPC &mo 2 + &mo 1 &kp LCTL &kp SPC &mo 2 >; }; left_layer { bindings = < - &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp NUM_0 - &kp TAB &kp LC(S) &kp DQT &kp PIPE2 &kp HASH &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp DEL - &kp ESC &kp TILDE &kp NON_US_BSLH &kp NON_US_HASH &kp TILDE2 &kp MINUS &kp GRAVE &kp LBKT &kp RBKT &kp DEL - &mo 1 &kp LGUI &kp RGUI &mo 2 + &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp NUM_0 + &kp TAB &kp LC(S) &kp DQT &kp PIPE2 &kp HASH &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp DEL + &kp ESC &kp TILDE &kp NON_US_BSLH &kp NON_US_HASH &kp TILDE2 &kp MINUS &kp GRAVE &kp LBKT &kp RBKT &kp DEL + &mo 1 &kp LGUI &kp RGUI &mo 2 >; }; - + right_layer { bindings = < - &kp BANG &kp ATSN &kp HASH &kp DLLR &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN + &kp BANG &kp ATSN &kp HASH &kp DLLR &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp HASH &kp QMARK &kp FSLH &kp COLN &kp SCLN &kp MINUS &kp KP_EQUAL &kp LBRC &kp RBRC &kp BKSP &kp LSFT &kp KPLS &kp LBKT &kp RBKT &kp BSLH &kp UNDER &kp LEFT &kp DOWN &kp UP &kp RIGHT - &mo 3 &kp LCTL &kp SPC &mo 2 + &mo 3 &kp LCTL &kp SPC &mo 2 >; - }; - + }; + tri_layer { bindings = < &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &trans &trans &trans &trans &trans - &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &kp PG_UP &kp K_VOL_UP &kp K_MUTE &trans - &bt BT_CLR &bt BT_NXT &bt BT_PRV &kp F6 &kp F7 &trans &kp PG_DN &kp K_VOL_DN &trans &trans - &trans &trans &trans &trans + &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &kp PG_UP &kp K_VOL_UP &kp K_MUTE &trans + &bt BT_CLR &bt BT_NXT &bt BT_PRV &kp F6 &kp F7 &trans &kp PG_DN &kp K_VOL_DN &trans &trans + &trans &trans &trans &trans >; - }; - + }; + }; }; diff --git a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_left.overlay b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_left.overlay index 3dc954c3..1ff5ed5e 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_left.overlay +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_left.overlay @@ -24,7 +24,7 @@ , <&pro_micro 15 GPIO_ACTIVE_HIGH> ; - col-gpios + col-gpios = <&pro_micro 10 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> , <&pro_micro 4 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> , <&pro_micro 5 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> diff --git a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_right.overlay b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_right.overlay index 3811423e..81ddca40 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_right.overlay +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_right.overlay @@ -24,7 +24,7 @@ , <&pro_micro 14 GPIO_ACTIVE_HIGH> ; - col-gpios + col-gpios = <&pro_micro 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> , <&pro_micro 8 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> , <&pro_micro 7 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> diff --git a/app/boards/shields/splitreus62/Kconfig.defconfig b/app/boards/shields/splitreus62/Kconfig.defconfig index 88a53a2f..14063d3e 100644 --- a/app/boards/shields/splitreus62/Kconfig.defconfig +++ b/app/boards/shields/splitreus62/Kconfig.defconfig @@ -1,8 +1,8 @@ # Copyright (c) 2020 Derek Schmell # SPDX-License-Identifier: MIT - - + + if SHIELD_SPLITREUS62_LEFT config ZMK_KEYBOARD_NAME @@ -17,5 +17,5 @@ if SHIELD_SPLITREUS62_LEFT || SHIELD_SPLITREUS62_RIGHT config ZMK_SPLIT default y - + endif diff --git a/app/boards/shields/splitreus62/splitreus62.dtsi b/app/boards/shields/splitreus62/splitreus62.dtsi index 4b55bb8d..905605e9 100644 --- a/app/boards/shields/splitreus62/splitreus62.dtsi +++ b/app/boards/shields/splitreus62/splitreus62.dtsi @@ -45,6 +45,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) , <&pro_micro 5 GPIO_ACTIVE_HIGH> , <&pro_micro 6 GPIO_ACTIVE_HIGH> ; - + }; }; diff --git a/app/boards/shields/splitreus62/splitreus62_right.overlay b/app/boards/shields/splitreus62/splitreus62_right.overlay index f301ab99..9f76e7eb 100644 --- a/app/boards/shields/splitreus62/splitreus62_right.overlay +++ b/app/boards/shields/splitreus62/splitreus62_right.overlay @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ - + #include "splitreus62.dtsi" &default_transform { diff --git a/app/boards/shields/tg4x/README.md b/app/boards/shields/tg4x/README.md index 087ce251..12709fde 100644 --- a/app/boards/shields/tg4x/README.md +++ b/app/boards/shields/tg4x/README.md @@ -6,6 +6,6 @@ Standard setup for the [TG4x](https://github.com/MythosMann/tg4x/) 40% keyboard. This TG4x implementation is for... -* rev 2.1 of the board -* Split spacebar with 2.25U on the left and 2.75U on the right -* 2U right shift +- rev 2.1 of the board +- Split spacebar with 2.25U on the left and 2.75U on the right +- 2U right shift diff --git a/app/boards/shields/tg4x/tg4x.overlay b/app/boards/shields/tg4x/tg4x.overlay index 0df94a2b..ca6e23c3 100644 --- a/app/boards/shields/tg4x/tg4x.overlay +++ b/app/boards/shields/tg4x/tg4x.overlay @@ -10,7 +10,7 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; label = "KSCAN"; - + diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/tidbit/tidbit.keymap b/app/boards/shields/tidbit/tidbit.keymap index e8cb3789..11424dc8 100644 --- a/app/boards/shields/tidbit/tidbit.keymap +++ b/app/boards/shields/tidbit/tidbit.keymap @@ -21,7 +21,7 @@ keymap { compatible = "zmk,keymap"; - + default_layer { bindings = < &kp KP_NUMLOCK &kp KP_ASTERISK &kp KP_MINUS diff --git a/app/boards/shields/tidbit/tidbit_19key.keymap b/app/boards/shields/tidbit/tidbit_19key.keymap index 8414a012..5710aeaf 100644 --- a/app/boards/shields/tidbit/tidbit_19key.keymap +++ b/app/boards/shields/tidbit/tidbit_19key.keymap @@ -22,7 +22,7 @@ keymap { compatible = "zmk,keymap"; - + default_layer { bindings = < &tog 1 &kp KP_NUMLOCK &kp KP_SLASH diff --git a/app/boards/shields/two_percent_milk/two_percent_milk.keymap b/app/boards/shields/two_percent_milk/two_percent_milk.keymap index 04dc4c0d..132793b3 100644 --- a/app/boards/shields/two_percent_milk/two_percent_milk.keymap +++ b/app/boards/shields/two_percent_milk/two_percent_milk.keymap @@ -7,11 +7,11 @@ #include #include #include - + / { keymap { compatible = "zmk,keymap"; - + default_layer { bindings = < &kp X diff --git a/app/boards/shields/waterfowl/Kconfig.defconfig b/app/boards/shields/waterfowl/Kconfig.defconfig index 70029f0b..5a77ca11 100644 --- a/app/boards/shields/waterfowl/Kconfig.defconfig +++ b/app/boards/shields/waterfowl/Kconfig.defconfig @@ -13,7 +13,7 @@ if SHIELD_WATERFOWL_LEFT || SHIELD_WATERFOWL_RIGHT config ZMK_SPLIT default y - + if ZMK_DISPLAY config I2C diff --git a/app/boards/shields/waterfowl/waterfowl.dtsi b/app/boards/shields/waterfowl/waterfowl.dtsi index c21dcf07..a156360e 100644 --- a/app/boards/shields/waterfowl/waterfowl.dtsi +++ b/app/boards/shields/waterfowl/waterfowl.dtsi @@ -40,7 +40,7 @@ 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) , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; - + }; left_encoder: encoder_left { //roller diff --git a/app/boards/shields/waterfowl/waterfowl.keymap b/app/boards/shields/waterfowl/waterfowl.keymap index d208fe49..9583499c 100644 --- a/app/boards/shields/waterfowl/waterfowl.keymap +++ b/app/boards/shields/waterfowl/waterfowl.keymap @@ -22,8 +22,8 @@ * |------+------+------+------+------| ,-----. ,-----. |------+------+------+------+------| * | Z | X | C | V | B | | 2 | | 3 | | N | M | , | . | / | * `----------------------------------' `-----' `-----' `----------------------------------' - * ,-----. ,--------------------. ,--------------------. ,-----. - * | 1 | | DEL | SPACE | TAB | | ESC | BS | ENTER | | 4 | + * ,-----. ,--------------------. ,--------------------. ,-----. + * | 1 | | DEL | SPACE | TAB | | ESC | BS | ENTER | | 4 | * `-----' `--------------------' `--------------------' `-----' */ bindings = < @@ -46,7 +46,7 @@ * |------+------+------+------+------| ,-----. ,-----. |------+------+------+------+------| * | | | INS | | | | 2 | | 3 | | 0 | 1 | 2 | 3 | * | * `----------------------------------' `-----' `-----' `----------------------------------' - * ,-----. ,--------------------. ,--------------------. ,-----. + * ,-----. ,--------------------. ,--------------------. ,-----. * | 1 | | DEL | SPACE | MO(3)| | ESC | BS | ENTER | | 4 | * `-----' `--------------------' `--------------------' `-----' */ @@ -70,7 +70,7 @@ * |------+------+------+------+------| ,-----. ,-----. |------+------+------+------+------| * | $ | | { | } | & | | 2 | | 3 | | | | | | | * `----------------------------------' `-----' `-----' `----------------------------------' - * ,-----. ,--------------------. ,--------------------. ,-----. + * ,-----. ,--------------------. ,--------------------. ,-----. * | 1 | | DEL | SPACE | TAB | | ESC | BS | ENTER | | 4 | * `-----' `--------------------' `--------------------' `-----' */ @@ -94,7 +94,7 @@ * |------+------+------+------+------| ,-----. ,-----. |------+------+------+------+------| * | | | | | | | 2 | | 3 | | F10 | F1 | F2 | F3 | F13 | * `----------------------------------' `-----' `-----' `----------------------------------' - * ,-----. ,--------------------. ,--------------------. ,-----. + * ,-----. ,--------------------. ,--------------------. ,-----. * | 1 | | DEL | SPACE | TAB | | ESC | BS | ENTER | | 4 | * `-----' `--------------------' `--------------------' `-----' */ @@ -106,7 +106,7 @@ >; sensor-bindings = <&inc_dec_kp PAGE_UP PAGE_DOWN &inc_dec_kp TAB LS(TAB)>; - }; + }; }; }; \ No newline at end of file diff --git a/app/boards/shields/zmk_uno/zmk_uno.keymap b/app/boards/shields/zmk_uno/zmk_uno.keymap index 7ab2632a..0e0fc795 100644 --- a/app/boards/shields/zmk_uno/zmk_uno.keymap +++ b/app/boards/shields/zmk_uno/zmk_uno.keymap @@ -29,8 +29,8 @@ }; REMOVE ME: */ - - + + / { macros { ZMK_MACRO(ble_zero, @@ -47,7 +47,7 @@ REMOVE ME: */ keymap { compatible = "zmk,keymap"; - + default_layer { bindings = < &kp A &bl BL_TOG @@ -55,7 +55,7 @@ REMOVE ME: */ &out OUT_USB &ble_zero &ble_one >; - + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; }; diff --git a/app/boards/shields/zodiark/Kconfig.defconfig b/app/boards/shields/zodiark/Kconfig.defconfig index 77648afd..c6024694 100644 --- a/app/boards/shields/zodiark/Kconfig.defconfig +++ b/app/boards/shields/zodiark/Kconfig.defconfig @@ -8,7 +8,7 @@ config ZMK_KEYBOARD_NAME config ZMK_SPLIT_ROLE_CENTRAL default y - + endif if SHIELD_ZODIARK_LEFT || SHIELD_ZODIARK_RIGHT diff --git a/app/boards/shields/zodiark/zodiark.keymap b/app/boards/shields/zodiark/zodiark.keymap index 0211f818..82639edc 100644 --- a/app/boards/shields/zodiark/zodiark.keymap +++ b/app/boards/shields/zodiark/zodiark.keymap @@ -39,7 +39,7 @@ // | | 0 | . | Enter| | | | | | | | 0 | . | Enter | | bindings = < &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 -&kp KP_NUM &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp PSCRN &kp SLCK &trans &trans &kp PAUSE_BREAK &trans &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp F12 +&kp KP_NUM &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp PSCRN &kp SLCK &trans &trans &kp PAUSE_BREAK &trans &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp F12 &trans &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp INS &kp HOME &trans &trans &kp PG_UP &trans &kp KP_N4 &kp KP_N5 &kp KP_N6 &trans &trans &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp DEL &kp END &trans &trans &trans &trans &kp PG_DN &trans &kp KP_N1 &kp KP_N2 &kp KP_N3 &trans &trans &kp KP_N0 &kp KP_DOT &kp KP_ENTER &trans &trans &trans &trans &trans &trans &kp KP_N0 &kp KP_DOT &kp KP_ENTER &trans diff --git a/app/core-coverage.yml b/app/core-coverage.yml index 12c03613..4a60aad9 100644 --- a/app/core-coverage.yml +++ b/app/core-coverage.yml @@ -1,35 +1,35 @@ board: -- nice_nano_v2 -- nrfmicro_13 -- proton_c + - nice_nano_v2 + - nrfmicro_13 + - proton_c shield: -- corne_left -- corne_right -- romac -- settings_reset -- tidbit + - corne_left + - corne_right + - romac + - settings_reset + - tidbit include: -- board: bdn9_rev2 -- board: nice60 -- board: seeeduino_xiao_ble - shield: hummingbird -- board: nrf52840_m2 - shield: m60 -- board: planck_rev6 -- board: proton_c - shield: clueboard_california -- board: nice_nano_v2 - shield: kyria_left - cmake-args: "-DCONFIG_ZMK_DISPLAY=y" - nickname: "display" -- board: nice_nano_v2 - shield: kyria_right - cmake-args: "-DCONFIG_ZMK_DISPLAY=y" - nickname: "display" -- board: nice_nano - shield: romac_plus - cmake-args: "-DCONFIG_ZMK_RGB_UNDERGLOW=y -DCONFIG_WS2812_STRIP=y" - nickname: "underglow" -- board: nice_nano_v2 - shield: lily58_left nice_view_adapter nice_view - nickname: "niceview" + - board: bdn9_rev2 + - board: nice60 + - board: seeeduino_xiao_ble + shield: hummingbird + - board: nrf52840_m2 + shield: m60 + - board: planck_rev6 + - board: proton_c + shield: clueboard_california + - board: nice_nano_v2 + shield: kyria_left + cmake-args: "-DCONFIG_ZMK_DISPLAY=y" + nickname: "display" + - board: nice_nano_v2 + shield: kyria_right + cmake-args: "-DCONFIG_ZMK_DISPLAY=y" + nickname: "display" + - board: nice_nano + shield: romac_plus + cmake-args: "-DCONFIG_ZMK_RGB_UNDERGLOW=y -DCONFIG_WS2812_STRIP=y" + nickname: "underglow" + - board: nice_nano_v2 + shield: lily58_left nice_view_adapter nice_view + nickname: "niceview" diff --git a/app/drivers/zephyr/dts/bindings/gpio/maxim,max7318.yaml b/app/drivers/zephyr/dts/bindings/gpio/maxim,max7318.yaml index 2db84bcd..94952813 100644 --- a/app/drivers/zephyr/dts/bindings/gpio/maxim,max7318.yaml +++ b/app/drivers/zephyr/dts/bindings/gpio/maxim,max7318.yaml @@ -5,24 +5,24 @@ # description: > - This is a representation of the Maxim MAX7318 I2C Gpio Expander. + This is a representation of the Maxim MAX7318 I2C Gpio Expander. compatible: "maxim,max7318" include: [gpio-controller.yaml, i2c-device.yaml] properties: - label: - required: true + label: + required: true - "#gpio-cells": - const: 2 + "#gpio-cells": + const: 2 - ngpios: - type: int - required: true - const: 16 - description: Number of gpios supported + ngpios: + type: int + required: true + const: 16 + description: Number of gpios supported gpio-cells: - pin diff --git a/app/dts/bindings/behaviors/zmk,behavior-macro.yaml b/app/dts/bindings/behaviors/zmk,behavior-macro.yaml index 00947685..e6f6757d 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-macro.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-macro.yaml @@ -16,4 +16,4 @@ properties: 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 \ No newline at end of file + 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-tap-dance.yaml b/app/dts/bindings/behaviors/zmk,behavior-tap-dance.yaml index 8f01effc..82e1517d 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-tap-dance.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-tap-dance.yaml @@ -13,4 +13,4 @@ properties: required: true tapping-term-ms: type: int - default: 200 \ No newline at end of file + default: 200 diff --git a/app/dts/bindings/display/gooddisplay,il0323.yaml b/app/dts/bindings/display/gooddisplay,il0323.yaml index d4a9ac7d..46fc7326 100644 --- a/app/dts/bindings/display/gooddisplay,il0323.yaml +++ b/app/dts/bindings/display/gooddisplay,il0323.yaml @@ -8,54 +8,54 @@ compatible: "gooddisplay,il0323" include: spi-device.yaml properties: - height: - type: int - required: true - description: Height in pixel of the panel driven by the controller + height: + type: int + required: true + description: Height in pixel of the panel driven by the controller - width: - type: int - required: true - description: Width in pixel of the panel driven by the controller + width: + type: int + required: true + description: Width in pixel of the panel driven by the controller - reset-gpios: - type: phandle-array - required: true - description: RESET pin. + reset-gpios: + type: phandle-array + required: true + description: RESET pin. - The RESET pin of GD7965 is active low. - If connected directly the MCU pin should be configured - as active low. + The RESET pin of GD7965 is active low. + If connected directly the MCU pin should be configured + as active low. - dc-gpios: - type: phandle-array - required: true - description: DC pin. + dc-gpios: + type: phandle-array + required: true + description: DC pin. - The DC pin of GD7965 is active low (transmission command byte). - If connected directly the MCU pin should be configured - as active low. + The DC pin of GD7965 is active low (transmission command byte). + If connected directly the MCU pin should be configured + as active low. - busy-gpios: - type: phandle-array - required: true - description: BUSY pin. + busy-gpios: + type: phandle-array + required: true + description: BUSY pin. - The BUSY pin of GD7965 is active low. - If connected directly the MCU pin should be configured - as active low. + The BUSY pin of GD7965 is active low. + If connected directly the MCU pin should be configured + as active low. - pwr: - type: uint8-array - required: true - description: Power Setting (PWR) values + pwr: + type: uint8-array + required: true + description: Power Setting (PWR) values - cdi: - type: int - required: true - description: VCOM and data interval value + cdi: + type: int + required: true + description: VCOM and data interval value - tcon: - type: int - required: true - description: TCON setting value \ No newline at end of file + tcon: + type: int + required: true + description: TCON setting value diff --git a/app/dts/bindings/macros/zmk,macro-control-mode-press.yaml b/app/dts/bindings/macros/zmk,macro-control-mode-press.yaml index 64b3939b..57603f3a 100644 --- a/app/dts/bindings/macros/zmk,macro-control-mode-press.yaml +++ b/app/dts/bindings/macros/zmk,macro-control-mode-press.yaml @@ -5,4 +5,4 @@ description: Set Macro To Press Mode compatible: "zmk,macro-control-mode-press" -include: zero_param.yaml \ No newline at end of file +include: zero_param.yaml diff --git a/app/dts/bindings/macros/zmk,macro-control-mode-release.yaml b/app/dts/bindings/macros/zmk,macro-control-mode-release.yaml index c1c27882..cd4ee2b6 100644 --- a/app/dts/bindings/macros/zmk,macro-control-mode-release.yaml +++ b/app/dts/bindings/macros/zmk,macro-control-mode-release.yaml @@ -5,4 +5,4 @@ description: Set Macro To Release Mode compatible: "zmk,macro-control-mode-release" -include: zero_param.yaml \ No newline at end of file +include: zero_param.yaml diff --git a/app/dts/bindings/macros/zmk,macro-control-tap-time.yaml b/app/dts/bindings/macros/zmk,macro-control-tap-time.yaml index 8dacdc2a..f3bfcd5f 100644 --- a/app/dts/bindings/macros/zmk,macro-control-tap-time.yaml +++ b/app/dts/bindings/macros/zmk,macro-control-tap-time.yaml @@ -5,4 +5,4 @@ description: Set Macro Tap Duration compatible: "zmk,macro-control-tap-time" -include: one_param.yaml \ No newline at end of file +include: one_param.yaml diff --git a/app/dts/bindings/macros/zmk,macro-control-wait-time.yaml b/app/dts/bindings/macros/zmk,macro-control-wait-time.yaml index 9e9beac2..45da69fa 100644 --- a/app/dts/bindings/macros/zmk,macro-control-wait-time.yaml +++ b/app/dts/bindings/macros/zmk,macro-control-wait-time.yaml @@ -5,4 +5,4 @@ description: Set Macro Wait Duration compatible: "zmk,macro-control-wait-time" -include: one_param.yaml \ No newline at end of file +include: one_param.yaml diff --git a/app/dts/bindings/macros/zmk,macro-pause-for-release.yaml b/app/dts/bindings/macros/zmk,macro-pause-for-release.yaml index e89d8b24..929e2a29 100644 --- a/app/dts/bindings/macros/zmk,macro-pause-for-release.yaml +++ b/app/dts/bindings/macros/zmk,macro-pause-for-release.yaml @@ -5,4 +5,4 @@ description: Macro Pause Until Release Marker compatible: "zmk,macro-pause-for-release" -include: zero_param.yaml \ No newline at end of file +include: zero_param.yaml diff --git a/app/dts/bindings/zmk,combos.yaml b/app/dts/bindings/zmk,combos.yaml index 1a914a7f..d094b5c4 100644 --- a/app/dts/bindings/zmk,combos.yaml +++ b/app/dts/bindings/zmk,combos.yaml @@ -22,4 +22,4 @@ child-binding: type: boolean layers: type: array - default: [-1] \ No newline at end of file + default: [-1] diff --git a/app/include/linker/zmk-events.ld b/app/include/linker/zmk-events.ld index 66c1264a..3e307f85 100644 --- a/app/include/linker/zmk-events.ld +++ b/app/include/linker/zmk-events.ld @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ - + #include __event_type_start = .; \ diff --git a/app/package.json b/app/package.json index e75d9695..9ad28788 100644 --- a/app/package.json +++ b/app/package.json @@ -18,6 +18,6 @@ }, "homepage": "https://zmk.dev/", "devDependencies": { - "prettier": "^2.4.0" + "prettier": "^2.7.1" } -} \ No newline at end of file +} diff --git a/app/src/activity.c b/app/src/activity.c index 46af56fb..41fe2e15 100644 --- a/app/src/activity.c +++ b/app/src/activity.c @@ -74,8 +74,8 @@ void activity_work_handler(struct k_work *work) { } else #endif /* IS_ENABLED(CONFIG_ZMK_SLEEP) */ if (inactive_time > MAX_IDLE_MS) { - set_state(ZMK_ACTIVITY_IDLE); - } + set_state(ZMK_ACTIVITY_IDLE); + } } K_WORK_DEFINE(activity_work, activity_work_handler); diff --git a/app/src/display/widgets/Kconfig b/app/src/display/widgets/Kconfig index 5ef32d20..4c056cf5 100644 --- a/app/src/display/widgets/Kconfig +++ b/app/src/display/widgets/Kconfig @@ -33,7 +33,7 @@ config ZMK_WIDGET_PERIPHERAL_STATUS 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 bool "Widget for displaying typed words per minute" depends on !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL 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 d35c7277..a02f6c64 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 @@ -8,7 +8,7 @@ /* This test fails if the order of event handlers for hold-taps -and combos is wrong. Hold-taps need to process key position events +and combos is wrong. Hold-taps need to process key position events first so the decision to hold or tap can be made. */ / { @@ -37,11 +37,11 @@ first so the decision to hold or tap can be made. &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,2,10) >; }; \ No newline at end of file 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 a99c15d9..325da627 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 @@ -32,11 +32,11 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,2,10) >; }; \ No newline at end of file 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 aac330f9..33712822 100644 --- a/app/tests/combo/layer-filter-0/native_posix_64.keymap +++ b/app/tests/combo/layer-filter-0/native_posix_64.keymap @@ -52,27 +52,27 @@ &kscan { events = < /* Combo One */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + 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 Three */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(1,1,10) /* Toggle Layer */ - ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_PRESS(1,1,10) ZMK_MOCK_RELEASE(1,1,10) /* Combo Two */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + 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 Three */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(1,1,10) >; }; \ No newline at end of file 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 995f27ee..8eb5e9eb 100644 --- a/app/tests/combo/layer-filter-1/native_posix_64.keymap +++ b/app/tests/combo/layer-filter-1/native_posix_64.keymap @@ -32,9 +32,9 @@ &kscan { events = < /* Combo One */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) >; }; \ No newline at end of file diff --git a/app/tests/combo/multiple-timeouts/native_posix_64.keymap b/app/tests/combo/multiple-timeouts/native_posix_64.keymap index 91bf5235..87d21be1 100644 --- a/app/tests/combo/multiple-timeouts/native_posix_64.keymap +++ b/app/tests/combo/multiple-timeouts/native_posix_64.keymap @@ -34,7 +34,7 @@ events = < ZMK_MOCK_PRESS(0,0,100) ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) >; }; \ No newline at end of file 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 e3cbf437..8b7b4196 100644 --- a/app/tests/combo/overlapping-combos-0/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-0/native_posix_64.keymap @@ -2,7 +2,7 @@ #include #include -/* +/* combo 0 timeout inf combo 01 timeout inf combo 0123 timeout inf @@ -51,66 +51,66 @@ events = < /* all permutations of combo one press, combo triggered by release */ /* while debugging these, you may want to set the release_timer to a high number */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,2,10) - - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,2,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,2,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,2,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - + ZMK_MOCK_RELEASE(0,0,10) + /* all permutations of combo two press and release, combo triggered by release */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,2,10) ZMK_MOCK_RELEASE(0,2,10) ZMK_MOCK_RELEASE(0,0,10) >; 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 c228c475..45737882 100644 --- a/app/tests/combo/overlapping-combos-1/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-1/native_posix_64.keymap @@ -39,26 +39,26 @@ &kscan { events = < - /* if you're debugging these, remember that the timer can be triggered between + /* if you're debugging these, remember that the timer can be triggered between events while stepping through code. */ /* all permutations of combo two press and release, combo triggered by timeout */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,100) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,100) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,100) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,100) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,100) ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,0,10) >; 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 3d364213..ba547dc2 100644 --- a/app/tests/combo/overlapping-combos-2/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-2/native_posix_64.keymap @@ -2,7 +2,7 @@ #include #include -/* +/* combo 01 timeout 100 combo 0123 timeout 100 press 012, wait until timeout runs out @@ -40,13 +40,13 @@ &kscan { events = < - /* if you're debugging these, remember that the timer can be triggered between + /* if you're debugging these, remember that the timer can be triggered between events while stepping through code. */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,2,100) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,2,100) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,2,100) >; }; \ No newline at end of file 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 0622dcd0..0da394b5 100644 --- a/app/tests/combo/overlapping-combos-3/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-3/native_posix_64.keymap @@ -2,7 +2,7 @@ #include #include -/* +/* combo 12 timeout 100 combo 0123 timeout 100 press 012, release 2 @@ -41,13 +41,13 @@ &kscan { events = < - /* if you're debugging these, remember that the timer can be triggered between + /* if you're debugging these, remember that the timer can be triggered between events while stepping through code. */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,2,100) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,2,100) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,2,100) >; }; \ No newline at end of file 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 4e68105f..f9537344 100644 --- a/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap +++ b/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap @@ -10,7 +10,7 @@ key-positions = <0 1>; bindings = <&kp X>; }; - + combo_two { timeout-ms = <30>; key-positions = <0 2>; @@ -40,44 +40,44 @@ &kscan { events = < /* all permutations of combo one press and release */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,0,10) /* all permutations of combo two press and release */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,2,10) ZMK_MOCK_RELEASE(0,2,10) ZMK_MOCK_RELEASE(0,0,10) >; 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 68736d8f..c6202365 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 @@ -3,7 +3,7 @@ #include / { - combos { + combos { compatible = "zmk,combos"; combo_one { timeout-ms = <80>; @@ -27,9 +27,9 @@ &kscan { events = < - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,100) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,100) ZMK_MOCK_RELEASE(1,1,100) >; }; \ No newline at end of file diff --git a/app/tests/combo/press-release/native_posix_64.keymap b/app/tests/combo/press-release/native_posix_64.keymap index 0f45792d..8d81f35b 100644 --- a/app/tests/combo/press-release/native_posix_64.keymap +++ b/app/tests/combo/press-release/native_posix_64.keymap @@ -3,7 +3,7 @@ #include / { - combos { + combos { compatible = "zmk,combos"; combo_one { timeout-ms = <30>; @@ -28,24 +28,24 @@ &kscan { events = < /* all different combinations of press and release order */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/combo/press-timeout/native_posix_64.keymap b/app/tests/combo/press-timeout/native_posix_64.keymap index ff0b7493..497cf1aa 100644 --- a/app/tests/combo/press-timeout/native_posix_64.keymap +++ b/app/tests/combo/press-timeout/native_posix_64.keymap @@ -27,9 +27,9 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) >; }; \ No newline at end of file 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 2518bbc9..cf7e79f7 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 @@ -33,13 +33,13 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(1,1,10) >; }; \ No newline at end of file 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 4895636e..0c55eb47 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 @@ -33,14 +33,14 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(1,1,10) - - ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(1,1,10) + + ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) >; }; \ No newline at end of file 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 0c4a698c..248d6e75 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 @@ -33,14 +33,14 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(1,1,10) >; }; \ No newline at end of file diff --git a/app/tests/combo/slowrelease-disabled/native_posix_64.keymap b/app/tests/combo/slowrelease-disabled/native_posix_64.keymap index 3bacb886..5af94d45 100644 --- a/app/tests/combo/slowrelease-disabled/native_posix_64.keymap +++ b/app/tests/combo/slowrelease-disabled/native_posix_64.keymap @@ -28,11 +28,11 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,0,10) /* this should release the combo */ ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) >; }; \ No newline at end of file diff --git a/app/tests/combo/slowrelease-enabled/native_posix_64.keymap b/app/tests/combo/slowrelease-enabled/native_posix_64.keymap index 8ac8316b..88351bea 100644 --- a/app/tests/combo/slowrelease-enabled/native_posix_64.keymap +++ b/app/tests/combo/slowrelease-enabled/native_posix_64.keymap @@ -28,11 +28,11 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,0,10) /* this should not release the combo yet */ ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) >; }; \ No newline at end of file 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 7ca3d77d..4b658a73 100644 --- a/app/tests/gresc/gresc-press-release/native_posix_64.keymap +++ b/app/tests/gresc/gresc-press-release/native_posix_64.keymap @@ -19,30 +19,30 @@ &kscan { events = < /* esc */ - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) /* ~ */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(1,0,10) /* LGUI+` */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(1,1,10) /* ~ */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,10) /* LGUI+` */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(1,1,10) ZMK_MOCK_RELEASE(0,0,10) >; 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 0c38721d..78b8ebcb 100644 --- a/app/tests/gresc/gresc-two-instances/native_posix_64.keymap +++ b/app/tests/gresc/gresc-two-instances/native_posix_64.keymap @@ -27,15 +27,15 @@ The first gresc that is released releases the key. &kscan { events = < /* esc */ - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_PRESS(0,1,10) /* the second gresc is ignored */ ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) /* the second gresc is ignored */ /* ~ */ - ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) /* the second gresc is ignored */ + ZMK_MOCK_PRESS(0,0,10) /* the second gresc is ignored */ ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,0,10) /* the second gresc is ignored */ diff --git a/app/tests/hold-tap/balanced/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/1-dn-up/native_posix_64.keymap index 040cdd3e..38c8668c 100644 --- a/app/tests/hold-tap/balanced/1-dn-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/1-dn-up/native_posix_64.keymap @@ -5,7 +5,7 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/2-dn-timer-up/native_posix_64.keymap index 11d033f4..b5834e06 100644 --- a/app/tests/hold-tap/balanced/2-dn-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/2-dn-timer-up/native_posix_64.keymap @@ -5,7 +5,7 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,500) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_posix_64.keymap index abb31b4b..a540353b 100644 --- a/app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_posix_64.keymap @@ -8,6 +8,6 @@ ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_posix_64.keymap index 38575e9a..76bb2fa3 100644 --- a/app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_posix_64.keymap @@ -9,6 +9,6 @@ ZMK_MOCK_PRESS(0,0,50) /*mt f-shift */ ZMK_MOCK_RELEASE(1,1,300) /*timer*/ - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_posix_64.keymap index 21baa447..882f33aa 100644 --- a/app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_posix_64.keymap @@ -8,6 +8,6 @@ ZMK_MOCK_PRESS(1,0,10) /*d*/ ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap index cd7ff384..0fc0b848 100644 --- a/app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap @@ -8,6 +8,6 @@ ZMK_MOCK_PRESS(1,0,10) /* d */ ZMK_MOCK_PRESS(0,0,100) /* mt f-shift */ ZMK_MOCK_RELEASE(1,0,400) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_posix_64.keymap index b84aa626..5d0fcbfb 100644 --- a/app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < ZMK_MOCK_PRESS(0,0,200) ZMK_MOCK_PRESS(0,1,200) - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,0,10) >; diff --git a/app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap index bdfaf9d3..fca60ba8 100644 --- a/app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < ZMK_MOCK_PRESS(0,0,200) ZMK_MOCK_PRESS(1,0,200) - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,10) >; diff --git a/app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap index c0fd1bd1..5d0af9ca 100644 --- a/app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap @@ -8,7 +8,7 @@ ZMK_MOCK_PRESS(0,0,100) ZMK_MOCK_PRESS(1,0,100) ZMK_MOCK_RELEASE(1,0,200) - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_posix_64.keymap index 69c19676..6b138352 100644 --- a/app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_posix_64.keymap @@ -9,6 +9,6 @@ ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,10) - /* timer */ + /* timer */ >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/balanced/5-quick-tap/native_posix_64.keymap index 8f90ffad..d895df02 100644 --- a/app/tests/hold-tap/balanced/5-quick-tap/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/5-quick-tap/native_posix_64.keymap @@ -6,9 +6,9 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap b/app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap index 706ca540..832ea7ef 100644 --- a/app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap @@ -31,15 +31,15 @@ &kscan { events = < /* tap */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* retro tap */ ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* hold */ ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_posix_64.keymap index 11d033f4..b5834e06 100644 --- a/app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_posix_64.keymap @@ -5,7 +5,7 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,500) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap index d1d2b756..7560a05a 100644 --- a/app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < ZMK_MOCK_PRESS(0,0,200) ZMK_MOCK_PRESS(1,1,200) // non trigger key - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(1,1,10) ZMK_MOCK_RELEASE(0,0,10) >; diff --git a/app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap index 94d9a923..b915a6a9 100644 --- a/app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < ZMK_MOCK_PRESS(0,0,200) ZMK_MOCK_PRESS(1,0,200) // trigger key - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,10) >; diff --git a/app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap index 6ddf87f8..a6ac1507 100644 --- a/app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap @@ -8,7 +8,7 @@ ZMK_MOCK_PRESS(1,0,10) // trigger key ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_PRESS(1,1,400) // not trigger key - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(1,1,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,10) 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 93076055..9965c9b3 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 @@ -6,8 +6,8 @@ &kscan { events = < /* tap */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* normal quick tap */ ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_RELEASE(0,0,400) diff --git a/app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap b/app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap index 2698f055..6d016501 100644 --- a/app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap @@ -20,7 +20,7 @@ default_layer { bindings = < - &ht_bal LEFT_SHIFT F &ht_bal LEFT_CONTROL J + &ht_bal LEFT_SHIFT F &ht_bal LEFT_CONTROL J &ht_bal LEFT_GUI H &ht_bal LEFT_ALT L >; }; @@ -29,13 +29,13 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_PRESS(0,1,100) + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_PRESS(0,1,100) ZMK_MOCK_PRESS(1,0,100) - ZMK_MOCK_PRESS(1,1,100) - ZMK_MOCK_RELEASE(0,0,100) - ZMK_MOCK_RELEASE(0,1,100) - ZMK_MOCK_RELEASE(1,0,100) - ZMK_MOCK_RELEASE(1,1,100) + ZMK_MOCK_PRESS(1,1,100) + ZMK_MOCK_RELEASE(0,0,100) + ZMK_MOCK_RELEASE(0,1,100) + ZMK_MOCK_RELEASE(1,0,100) + ZMK_MOCK_RELEASE(1,1,100) >; }; diff --git a/app/tests/hold-tap/hold-preferred/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/1-dn-up/native_posix_64.keymap index 040cdd3e..38c8668c 100644 --- a/app/tests/hold-tap/hold-preferred/1-dn-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/1-dn-up/native_posix_64.keymap @@ -5,7 +5,7 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_posix_64.keymap index 11d033f4..b5834e06 100644 --- a/app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_posix_64.keymap @@ -5,7 +5,7 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,500) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap index abb31b4b..a540353b 100644 --- a/app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap @@ -8,6 +8,6 @@ ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap index 38575e9a..76bb2fa3 100644 --- a/app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap @@ -9,6 +9,6 @@ ZMK_MOCK_PRESS(0,0,50) /*mt f-shift */ ZMK_MOCK_RELEASE(1,1,300) /*timer*/ - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap index 21baa447..882f33aa 100644 --- a/app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap @@ -8,6 +8,6 @@ ZMK_MOCK_PRESS(1,0,10) /*d*/ ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap index cd7ff384..0fc0b848 100644 --- a/app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap @@ -8,6 +8,6 @@ ZMK_MOCK_PRESS(1,0,10) /* d */ ZMK_MOCK_PRESS(0,0,100) /* mt f-shift */ ZMK_MOCK_RELEASE(1,0,400) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap index b84aa626..5d0fcbfb 100644 --- a/app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < ZMK_MOCK_PRESS(0,0,200) ZMK_MOCK_PRESS(0,1,200) - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,0,10) >; diff --git a/app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap index bdfaf9d3..fca60ba8 100644 --- a/app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < ZMK_MOCK_PRESS(0,0,200) ZMK_MOCK_PRESS(1,0,200) - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,10) >; diff --git a/app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap index c0fd1bd1..5d0af9ca 100644 --- a/app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap @@ -8,7 +8,7 @@ ZMK_MOCK_PRESS(0,0,100) ZMK_MOCK_PRESS(1,0,100) ZMK_MOCK_RELEASE(1,0,200) - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap index 69c19676..6b138352 100644 --- a/app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap @@ -9,6 +9,6 @@ ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,10) - /* timer */ + /* timer */ >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/5-quick-tap/native_posix_64.keymap index 8f90ffad..d895df02 100644 --- a/app/tests/hold-tap/hold-preferred/5-quick-tap/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/5-quick-tap/native_posix_64.keymap @@ -6,9 +6,9 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap index 314b7334..dc96ee8b 100644 --- a/app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap @@ -31,15 +31,15 @@ &kscan { events = < /* tap */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* retro tap */ ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* hold */ ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap index 11d033f4..b5834e06 100644 --- a/app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap @@ -5,7 +5,7 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,500) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap index d1d2b756..7560a05a 100644 --- a/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < ZMK_MOCK_PRESS(0,0,200) ZMK_MOCK_PRESS(1,1,200) // non trigger key - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(1,1,10) ZMK_MOCK_RELEASE(0,0,10) >; diff --git a/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap index 94d9a923..b915a6a9 100644 --- a/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < ZMK_MOCK_PRESS(0,0,200) ZMK_MOCK_PRESS(1,0,200) // trigger key - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,10) >; diff --git a/app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap index 6ddf87f8..a6ac1507 100644 --- a/app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap @@ -8,7 +8,7 @@ ZMK_MOCK_PRESS(1,0,10) // trigger key ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_PRESS(1,1,400) // not trigger key - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(1,1,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,10) 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 ee0d5e80..13a58c3e 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 @@ -6,8 +6,8 @@ &kscan { events = < /* tap */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* normal quick tap */ ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_RELEASE(0,0,400) diff --git a/app/tests/hold-tap/tap-preferred/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/1-dn-up/native_posix_64.keymap index 040cdd3e..38c8668c 100644 --- a/app/tests/hold-tap/tap-preferred/1-dn-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/1-dn-up/native_posix_64.keymap @@ -5,7 +5,7 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_posix_64.keymap index 11d033f4..b5834e06 100644 --- a/app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_posix_64.keymap @@ -5,7 +5,7 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,500) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap index abb31b4b..a540353b 100644 --- a/app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap @@ -8,6 +8,6 @@ ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap index 38575e9a..76bb2fa3 100644 --- a/app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap @@ -9,6 +9,6 @@ ZMK_MOCK_PRESS(0,0,50) /*mt f-shift */ ZMK_MOCK_RELEASE(1,1,300) /*timer*/ - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap index 21baa447..882f33aa 100644 --- a/app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap @@ -8,6 +8,6 @@ ZMK_MOCK_PRESS(1,0,10) /*d*/ ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap index cd7ff384..0fc0b848 100644 --- a/app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap @@ -8,6 +8,6 @@ ZMK_MOCK_PRESS(1,0,10) /* d */ ZMK_MOCK_PRESS(0,0,100) /* mt f-shift */ ZMK_MOCK_RELEASE(1,0,400) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap index b84aa626..5d0fcbfb 100644 --- a/app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < ZMK_MOCK_PRESS(0,0,200) ZMK_MOCK_PRESS(0,1,200) - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,0,10) >; diff --git a/app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap index bdfaf9d3..fca60ba8 100644 --- a/app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < ZMK_MOCK_PRESS(0,0,200) ZMK_MOCK_PRESS(1,0,200) - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,10) >; diff --git a/app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap index c0fd1bd1..5d0af9ca 100644 --- a/app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap @@ -8,7 +8,7 @@ ZMK_MOCK_PRESS(0,0,100) ZMK_MOCK_PRESS(1,0,100) ZMK_MOCK_RELEASE(1,0,200) - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap index 69c19676..6b138352 100644 --- a/app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap @@ -9,6 +9,6 @@ ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,10) - /* timer */ + /* timer */ >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/5-quick-tap/native_posix_64.keymap index 8f90ffad..d895df02 100644 --- a/app/tests/hold-tap/tap-preferred/5-quick-tap/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/5-quick-tap/native_posix_64.keymap @@ -6,9 +6,9 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap index adbd648e..b733e3a2 100644 --- a/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap @@ -2,7 +2,7 @@ #include #include -/* +/* * A hold-tap with long tapping term is pressed first. * A hold-tap with short tapping term is quickly tapped. * The short tapping term hold-tap should 'tap', not 'hold'. @@ -45,9 +45,9 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,20) - ZMK_MOCK_PRESS(0,1,20) - ZMK_MOCK_RELEASE(0,1,200) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,20) + ZMK_MOCK_PRESS(0,1,20) + ZMK_MOCK_RELEASE(0,1,200) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap index 11d033f4..b5834e06 100644 --- a/app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap @@ -5,7 +5,7 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,500) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap index d1d2b756..7560a05a 100644 --- a/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < ZMK_MOCK_PRESS(0,0,200) ZMK_MOCK_PRESS(1,1,200) // non trigger key - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(1,1,10) ZMK_MOCK_RELEASE(0,0,10) >; diff --git a/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap index 94d9a923..b915a6a9 100644 --- a/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < ZMK_MOCK_PRESS(0,0,200) ZMK_MOCK_PRESS(1,0,200) // trigger key - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,10) >; diff --git a/app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap index 6ddf87f8..a6ac1507 100644 --- a/app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap @@ -8,7 +8,7 @@ ZMK_MOCK_PRESS(1,0,10) // trigger key ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_PRESS(1,1,400) // not trigger key - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(1,1,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,10) 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 93076055..9965c9b3 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 @@ -6,8 +6,8 @@ &kscan { events = < /* tap */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* 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/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/1-dn-up/native_posix_64.keymap index 040cdd3e..38c8668c 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/1-dn-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/1-dn-up/native_posix_64.keymap @@ -5,7 +5,7 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_posix_64.keymap index 11d033f4..b5834e06 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_posix_64.keymap @@ -5,7 +5,7 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,500) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_posix_64.keymap index abb31b4b..a540353b 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_posix_64.keymap @@ -8,6 +8,6 @@ ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_posix_64.keymap index 38575e9a..76bb2fa3 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_posix_64.keymap @@ -9,6 +9,6 @@ ZMK_MOCK_PRESS(0,0,50) /*mt f-shift */ ZMK_MOCK_RELEASE(1,1,300) /*timer*/ - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_posix_64.keymap index 21baa447..882f33aa 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_posix_64.keymap @@ -8,6 +8,6 @@ ZMK_MOCK_PRESS(1,0,10) /*d*/ ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap index cd7ff384..0fc0b848 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap @@ -8,6 +8,6 @@ ZMK_MOCK_PRESS(1,0,10) /* d */ ZMK_MOCK_PRESS(0,0,100) /* mt f-shift */ ZMK_MOCK_RELEASE(1,0,400) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_posix_64.keymap index b84aa626..5d0fcbfb 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < ZMK_MOCK_PRESS(0,0,200) ZMK_MOCK_PRESS(0,1,200) - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,0,10) >; diff --git a/app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap index bdfaf9d3..fca60ba8 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap @@ -7,7 +7,7 @@ events = < ZMK_MOCK_PRESS(0,0,200) ZMK_MOCK_PRESS(1,0,200) - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,10) >; diff --git a/app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap index c0fd1bd1..5d0af9ca 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap @@ -8,7 +8,7 @@ ZMK_MOCK_PRESS(0,0,100) ZMK_MOCK_PRESS(1,0,100) ZMK_MOCK_RELEASE(1,0,200) - /* timer fires */ + /* timer fires */ ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_posix_64.keymap index 69c19676..6b138352 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_posix_64.keymap @@ -9,6 +9,6 @@ ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,0,10) - /* timer */ + /* timer */ >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_posix_64.keymap index 8f90ffad..d895df02 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_posix_64.keymap @@ -6,9 +6,9 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file 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 93076055..9965c9b3 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 @@ -6,8 +6,8 @@ &kscan { events = < /* tap */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* normal quick tap */ ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_RELEASE(0,0,400) diff --git a/app/tests/keypress/kp-press-release/native_posix_64.keymap b/app/tests/keypress/kp-press-release/native_posix_64.keymap index 0ddb7ab6..c8e744ee 100644 --- a/app/tests/keypress/kp-press-release/native_posix_64.keymap +++ b/app/tests/keypress/kp-press-release/native_posix_64.keymap @@ -2,7 +2,7 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap b/app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap index f4379893..f4d03429 100644 --- a/app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap +++ b/app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap @@ -5,30 +5,30 @@ &kscan { events = < /* Toggle LALT on */ - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) /* Tap TAB twice */ - ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,1,10) /* Toggle LSHFT on */ - ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) /* Tap TAB once */ - ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,1,10) /* Toggle LALT off */ - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) /* Tap A */ - ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_PRESS(1,1,10) ZMK_MOCK_RELEASE(1,1,10) /* Toggle LSHFT off */ - ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) /* Tap A */ - ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_PRESS(1,1,10) ZMK_MOCK_RELEASE(1,1,10) >; }; diff --git a/app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap b/app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap index 3b14e416..0a4ad4ae 100644 --- a/app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap +++ b/app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap @@ -5,18 +5,18 @@ &kscan { events = < /* Toggle LS(A) on */ - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) /* Toggle LS(A) off */ - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) /* Press A */ - ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(1,0,10) /* Toggle LS(A) on */ - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) /* Toggle LS(A) off */ - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) /* Release A */ ZMK_MOCK_RELEASE(1,0,10) diff --git a/app/tests/keytoggle/kt-press-release-nkro/native_posix_64.keymap b/app/tests/keytoggle/kt-press-release-nkro/native_posix_64.keymap index 644caa26..e25d4b18 100644 --- a/app/tests/keytoggle/kt-press-release-nkro/native_posix_64.keymap +++ b/app/tests/keytoggle/kt-press-release-nkro/native_posix_64.keymap @@ -2,9 +2,9 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/keytoggle/kt-press-release/native_posix_64.keymap b/app/tests/keytoggle/kt-press-release/native_posix_64.keymap index 644caa26..e25d4b18 100644 --- a/app/tests/keytoggle/kt-press-release/native_posix_64.keymap +++ b/app/tests/keytoggle/kt-press-release/native_posix_64.keymap @@ -2,9 +2,9 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/macros/basic/native_posix_64.keymap b/app/tests/macros/basic/native_posix_64.keymap index 6a2391db..a2812792 100644 --- a/app/tests/macros/basic/native_posix_64.keymap +++ b/app/tests/macros/basic/native_posix_64.keymap @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ - + #include #include #include diff --git a/app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap b/app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap index 2f3b943a..e6ef4f49 100644 --- a/app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap +++ b/app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ - + #include #include #include diff --git a/app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap b/app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap index c264a9ab..c5cde5b4 100644 --- a/app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap +++ b/app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ - + #include #include #include diff --git a/app/tests/macros/press-mid-macro/native_posix_64.keymap b/app/tests/macros/press-mid-macro/native_posix_64.keymap index a075a443..b8ae76f1 100644 --- a/app/tests/macros/press-mid-macro/native_posix_64.keymap +++ b/app/tests/macros/press-mid-macro/native_posix_64.keymap @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ - + #include #include #include diff --git a/app/tests/macros/press-release/native_posix_64.keymap b/app/tests/macros/press-release/native_posix_64.keymap index 6814d542..25467126 100644 --- a/app/tests/macros/press-release/native_posix_64.keymap +++ b/app/tests/macros/press-release/native_posix_64.keymap @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ - + #include #include #include 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 b8142425..dbb2df5c 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 @@ -5,10 +5,10 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap index 26af5657..b01c6257 100644 --- a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap +++ b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap @@ -5,10 +5,10 @@ &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) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) >; }; diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap index 9df2c152..89930328 100644 --- a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap +++ b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap @@ -5,8 +5,8 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap index 5f9375fb..acd55e83 100644 --- a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap +++ b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap @@ -5,10 +5,10 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(1,0,10) >; }; diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap index 1b175d44..7e1865a0 100644 --- a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap +++ b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap @@ -5,10 +5,10 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; diff --git a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap index 0e9a2d6a..e175d60e 100644 --- a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap +++ b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap @@ -5,10 +5,10 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; diff --git a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/pending b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/pending index 3f49005a..f3df27ca 100644 --- a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/pending +++ b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/pending @@ -1,9 +1,9 @@ -This test fails because the hid_listener_keycode_released function +This test fails because the hid_listener_keycode_released function releases implicit modifiers always, even if they were not set by the key that's going up. Also see the comment in that function: If LC(A) is pressed, then LS(B), then LC(A) is released, the shift for B will be released prematurely. This causes if LS(B) to repeat like Bbbbbbbb when pressed for a long time. Solving this would require keeping track of which key's implicit modifiers are currently - active and only releasing modifiers at that time. + active and only releasing modifiers at that time. diff --git a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap index 10d0dbf8..8c4534f4 100644 --- a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap +++ b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap @@ -5,10 +5,10 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; diff --git a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap index 3d6494dd..e82182c4 100644 --- a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap +++ b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap @@ -5,9 +5,9 @@ &kscan { events = < - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,1,10) >; }; diff --git a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap index d5f372f1..a36b85d2 100644 --- a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap +++ b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap @@ -5,10 +5,10 @@ &kscan { events = < - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) >; }; diff --git a/app/tests/momentary-layer/1-normal/native_posix_64.keymap b/app/tests/momentary-layer/1-normal/native_posix_64.keymap index b5249f7b..ed0e8ad1 100644 --- a/app/tests/momentary-layer/1-normal/native_posix_64.keymap +++ b/app/tests/momentary-layer/1-normal/native_posix_64.keymap @@ -24,9 +24,9 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) >; }; \ No newline at end of file diff --git a/app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap b/app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap index 96e4e8d9..9311fdee 100644 --- a/app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap +++ b/app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap @@ -24,9 +24,9 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) >; }; \ No newline at end of file diff --git a/app/tests/momentary-layer/3-covered/native_posix_64.keymap b/app/tests/momentary-layer/3-covered/native_posix_64.keymap index 2dde6d88..62ae301d 100644 --- a/app/tests/momentary-layer/3-covered/native_posix_64.keymap +++ b/app/tests/momentary-layer/3-covered/native_posix_64.keymap @@ -27,7 +27,7 @@ and the original key is "covered". &kscan { events = < - ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,1,10) >; }; diff --git a/app/tests/sticky-keys/1-os-dn-up/native_posix_64.keymap b/app/tests/sticky-keys/1-os-dn-up/native_posix_64.keymap index d0f26b2f..230e9566 100644 --- a/app/tests/sticky-keys/1-os-dn-up/native_posix_64.keymap +++ b/app/tests/sticky-keys/1-os-dn-up/native_posix_64.keymap @@ -5,8 +5,8 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,1200) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,1200) ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) >; diff --git a/app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap b/app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap index 9febf08c..79567de9 100644 --- a/app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap +++ b/app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap @@ -24,7 +24,7 @@ &kscan { events = < /* press sl lower_layer */ - ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,1,10) /* tap sk LEFT_CONTROL */ ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) @@ -32,12 +32,12 @@ ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) /* release sl lower_layer */ - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) /* tap A (with left control and left shift enabled) */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) /* tap A (no sticky keys anymore) */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) >; }; \ No newline at end of file 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 e9b87f42..e89faa93 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 @@ -35,11 +35,11 @@ &kscan { events = < /* press sl 1 */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* press sl 2 */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* press 1 */ ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,1,10) @@ -49,11 +49,11 @@ /* repeat test to check if cleanup is done correctly */ /* press sl 1 */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* press sl 2 */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* press 1 */ ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,1,10) diff --git a/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_posix_64.keymap b/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_posix_64.keymap index 33115453..f52a6bec 100644 --- a/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_posix_64.keymap +++ b/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_posix_64.keymap @@ -9,17 +9,17 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(1,0,10) /* second key is pressed shortly after the first. It should not be capitalized. */ - ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_PRESS(1,1,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(1,1,10) /* repeat test to check if cleanup is done correctly */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) >; diff --git a/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_posix_64.keymap b/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_posix_64.keymap index 2d078ba5..63aca99b 100644 --- a/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_posix_64.keymap +++ b/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_posix_64.keymap @@ -5,14 +5,14 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) /* repeat test to check if cleanup is done correctly */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) >; 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 4470fb21..18d09ebc 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 @@ -29,8 +29,8 @@ &kscan { events = < /* press sl 1 */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) /* press X */ ZMK_MOCK_PRESS(0,1,10) /* press A */ @@ -40,8 +40,8 @@ /* repeat test to check if cleanup is done correctly */ /* press sl 1 */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) /* press X */ ZMK_MOCK_PRESS(0,1,10) /* press Y */ diff --git a/app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_posix_64.keymap index 438880d5..47600269 100644 --- a/app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_posix_64.keymap +++ b/app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_posix_64.keymap @@ -5,9 +5,9 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_posix_64.keymap b/app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_posix_64.keymap index 067f2379..2fb661a7 100644 --- a/app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_posix_64.keymap +++ b/app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_posix_64.keymap @@ -5,9 +5,9 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(1,0,10) >; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_posix_64.keymap b/app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_posix_64.keymap index d58641bd..92fd1e0a 100644 --- a/app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_posix_64.keymap +++ b/app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_posix_64.keymap @@ -5,8 +5,8 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,800) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,800) ZMK_MOCK_PRESS(1,0,400) ZMK_MOCK_RELEASE(1,0,10) >; diff --git a/app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_posix_64.keymap index aac6725e..1daa6c4f 100644 --- a/app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_posix_64.keymap +++ b/app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_posix_64.keymap @@ -6,8 +6,8 @@ &kscan { events = < ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,1100) + ZMK_MOCK_RELEASE(0,0,1100) >; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_posix_64.keymap b/app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_posix_64.keymap index 66bb72d8..1be65a5b 100644 --- a/app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_posix_64.keymap +++ b/app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_posix_64.keymap @@ -5,8 +5,8 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_PRESS(1,1,10) ZMK_MOCK_RELEASE(1,0,100) diff --git a/app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap b/app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap index bdcccf33..a90bb32e 100644 --- a/app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap +++ b/app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap @@ -24,24 +24,24 @@ &kscan { events = < /* tap sl lower_layer */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) /* tap sk LEFT_CONTROL */ ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) /* tap A */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + /* repeat */ /* tap sl */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) /* tap sk */ ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) /* tap A */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) >; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap b/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap index d4c30fbf..f811f7e9 100644 --- a/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap +++ b/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap @@ -18,10 +18,10 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* the sticky key is pressed again, so the previous one must be cancelled */ - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,1200) >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/1b-tap2/native_posix_64.keymap b/app/tests/tap-dance/1b-tap2/native_posix_64.keymap index c5e1c8db..5674c4ea 100644 --- a/app/tests/tap-dance/1b-tap2/native_posix_64.keymap +++ b/app/tests/tap-dance/1b-tap2/native_posix_64.keymap @@ -6,8 +6,8 @@ &kscan { events = < ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,200) + ZMK_MOCK_RELEASE(0,0,200) >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/1c-tap3/native_posix_64.keymap b/app/tests/tap-dance/1c-tap3/native_posix_64.keymap index 6813393e..142b8236 100644 --- a/app/tests/tap-dance/1c-tap3/native_posix_64.keymap +++ b/app/tests/tap-dance/1c-tap3/native_posix_64.keymap @@ -6,10 +6,10 @@ &kscan { events = < ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,200) + ZMK_MOCK_RELEASE(0,0,200) >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/2a-hold1/native_posix_64.keymap b/app/tests/tap-dance/2a-hold1/native_posix_64.keymap index f4c7a2d2..bcfc21d2 100644 --- a/app/tests/tap-dance/2a-hold1/native_posix_64.keymap +++ b/app/tests/tap-dance/2a-hold1/native_posix_64.keymap @@ -6,6 +6,6 @@ &kscan { events = < ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/2b-hold2/native_posix_64.keymap b/app/tests/tap-dance/2b-hold2/native_posix_64.keymap index 0fec2e40..6691437e 100644 --- a/app/tests/tap-dance/2b-hold2/native_posix_64.keymap +++ b/app/tests/tap-dance/2b-hold2/native_posix_64.keymap @@ -6,8 +6,8 @@ &kscan { events = < ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/2c-hold3/native_posix_64.keymap b/app/tests/tap-dance/2c-hold3/native_posix_64.keymap index 8375c6f6..942ecfc0 100644 --- a/app/tests/tap-dance/2c-hold3/native_posix_64.keymap +++ b/app/tests/tap-dance/2c-hold3/native_posix_64.keymap @@ -6,10 +6,10 @@ &kscan { events = < ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) >; }; \ No newline at end of file diff --git a/app/tests/wpm/1-single_keypress/native_posix_64.keymap b/app/tests/wpm/1-single_keypress/native_posix_64.keymap index ec12a286..2aa52c16 100644 --- a/app/tests/wpm/1-single_keypress/native_posix_64.keymap +++ b/app/tests/wpm/1-single_keypress/native_posix_64.keymap @@ -2,9 +2,9 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) /* Wait for the worker to trigger and reset after 5 seconds, followed by a 0 at 6 seconds */ - ZMK_MOCK_PRESS(0,0,6000) + ZMK_MOCK_PRESS(0,0,6000) >; }; \ No newline at end of file diff --git a/app/tests/wpm/2-multiple_keypress/native_posix_64.keymap b/app/tests/wpm/2-multiple_keypress/native_posix_64.keymap index f4ba2dfe..3cfab946 100644 --- a/app/tests/wpm/2-multiple_keypress/native_posix_64.keymap +++ b/app/tests/wpm/2-multiple_keypress/native_posix_64.keymap @@ -2,14 +2,14 @@ &kscan { events = < - ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,0,10) ZMK_MOCK_RELEASE(0,0,10) //1st WPM worker call - 12wpm - 1 key press in 1 second - ZMK_MOCK_PRESS(0,0,1000) + ZMK_MOCK_PRESS(0,0,1000) ZMK_MOCK_RELEASE(0,0,10) // 2nd WPM worker call - 12wpm - 2 key press in 2 second // note there is no event for this as WPM hasn't changed // 3rd WPM worker call - 8wpm - 2 key press in 3 seconds - ZMK_MOCK_PRESS(0,0,2000) + ZMK_MOCK_PRESS(0,0,2000) >; }; \ No newline at end of file diff --git a/docs/package-lock.json b/docs/package-lock.json index fbc859e5..c7333cb3 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -39,7 +39,7 @@ "mustache": "^4.2.0", "null-loader": "^4.0.0", "prebuild-webpack-plugin": "^1.1.1", - "prettier": "2.3.1", + "prettier": "^2.7.1", "string-replace-loader": "^3.1.0", "typescript": "^4.6.3", "webpack": "^5.72.1" @@ -12201,15 +12201,18 @@ } }, "node_modules/prettier": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.1.tgz", - "integrity": "sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "dev": true, "bin": { "prettier": "bin-prettier.js" }, "engines": { "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/pretty-error": { @@ -24675,9 +24678,9 @@ "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==" }, "prettier": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.1.tgz", - "integrity": "sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "dev": true }, "pretty-error": { diff --git a/docs/package.json b/docs/package.json index 7c933b03..95d47b9f 100644 --- a/docs/package.json +++ b/docs/package.json @@ -58,7 +58,7 @@ "mustache": "^4.2.0", "null-loader": "^4.0.0", "prebuild-webpack-plugin": "^1.1.1", - "prettier": "2.3.1", + "prettier": "^2.7.1", "string-replace-loader": "^3.1.0", "typescript": "^4.6.3", "webpack": "^5.72.1" diff --git a/docs/src/templates/setup.ps1.mustache b/docs/src/templates/setup.ps1.mustache index f90c7488..90f9cdcf 100644 --- a/docs/src/templates/setup.ps1.mustache +++ b/docs/src/templates/setup.ps1.mustache @@ -74,7 +74,7 @@ if (Test-CommandExists Get-Acl) { $permission = (Get-Acl $pwd).Access | ?{$_.IdentityReference -match $env:UserName ` -and $_.FileSystemRights -match "FullControl" ` - -or $_.FileSystemRights -match "Write" } | + -or $_.FileSystemRights -match "Write" } | Select IdentityReference,FileSystemRights If (-Not $permission){ @@ -141,7 +141,7 @@ if ($keyboard_type -eq "shield") { Write-Host "Wired split is not yet supported by ZMK." exit 1 } - + $shields = $keyboard_siblings $board = $($($boards.keys)[$choice]) $boards = ( $board ) diff --git a/docs/src/templates/setup.sh.mustache b/docs/src/templates/setup.sh.mustache index 4c3868ec..c711dbc5 100644 --- a/docs/src/templates/setup.sh.mustache +++ b/docs/src/templates/setup.sh.mustache @@ -97,7 +97,7 @@ select opt in "${options[@]}" "Quit"; do keyboard_arch=${keyboards_arch[$keyboard_index]} keyboard_basedir=${keyboards_basedir[$keyboard_index]} keyboard_title=${options[$keyboard_index]} - keyboard_sibling_var=${keyboard}_siblings[@] + keyboard_sibling_var=${keyboard}_siblings[@] keyboard_sibling_first=${keyboard}_siblings[0] if [ -n "${!keyboard_sibling_first}" ]; then keyboard_siblings=${!keyboard_sibling_var} diff --git a/schema/hardware-metadata.schema.json b/schema/hardware-metadata.schema.json index 8ca382c5..4c2bdf3b 100644 --- a/schema/hardware-metadata.schema.json +++ b/schema/hardware-metadata.schema.json @@ -31,10 +31,7 @@ }, { "type": "object", - "required": [ - "id", - "features" - ], + "required": ["id", "features"], "properties": { "id": { "$ref": "#/$defs/id" @@ -89,9 +86,7 @@ "title": "InterconnectNodeLabels", "type": "object", "additionalProperties": false, - "required": [ - "gpio" - ], + "required": ["gpio"], "properties": { "gpio": { "type": "string" }, "i2c": { "type": "string" }, @@ -104,14 +99,7 @@ "title": "Interconnect", "type": "object", "additionalProperties": false, - "required": [ - "file_format", - "id", - "name", - "description", - "url", - "type" - ], + "required": ["file_format", "id", "name", "description", "url", "type"], "properties": { "file_format": { "type": "string", @@ -200,10 +188,7 @@ "type": "array", "items": { "type": "string", - "enum": [ - "usb", - "ble" - ] + "enum": ["usb", "ble"] } }, "features": { @@ -224,14 +209,7 @@ "title": "Shield", "type": "object", "additionalProperties": false, - "required": [ - "file_format", - "id", - "name", - "url", - "type", - "requires" - ], + "required": ["file_format", "id", "name", "url", "type", "requires"], "properties": { "file_format": { "type": "string", From 94061bb91629a83cfe251e63799a9be04a1564d4 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sat, 22 Apr 2023 23:25:56 -0500 Subject: [PATCH 60/64] refactor: Replace tabs with spaces Standardized indentation to use spaces with a new pre-commit hook. --- .pre-commit-config.yaml | 5 + app/Kconfig | 380 +++++++++--------- app/boards/arm/bdn9/Kconfig.board | 4 +- app/boards/arm/bdn9/Kconfig.defconfig | 10 +- app/boards/arm/bdn9/bdn9_rev2.dts | 198 ++++----- app/boards/arm/bdn9/bdn9_rev2.keymap | 30 +- app/boards/arm/bluemicro840/Kconfig | 8 +- app/boards/arm/bluemicro840/Kconfig.board | 4 +- app/boards/arm/bluemicro840/Kconfig.defconfig | 10 +- .../bluemicro840/arduino_pro_micro_pins.dtsi | 86 ++-- .../bluemicro840/bluemicro840_v1-pinctrl.dtsi | 58 +-- .../arm/bluemicro840/bluemicro840_v1.dts | 158 ++++---- app/boards/arm/bt60/Kconfig | 8 +- app/boards/arm/bt60/Kconfig.board | 8 +- app/boards/arm/bt60/Kconfig.defconfig | 14 +- app/boards/arm/bt60/bt60.dtsi | 170 ++++---- app/boards/arm/bt60/bt60_v1.dts | 186 ++++----- app/boards/arm/bt60/bt60_v1.keymap | 328 +++++++-------- app/boards/arm/bt60/bt60_v1_hs.dts | 88 ++-- app/boards/arm/bt60/bt60_v1_hs.keymap | 60 +-- app/boards/arm/corneish_zen/Kconfig.board | 8 +- app/boards/arm/corneish_zen/Kconfig.defconfig | 46 +-- app/boards/arm/corneish_zen/corneish_zen.dtsi | 166 ++++---- .../arm/corneish_zen/corneish_zen.keymap | 4 +- .../arm/corneish_zen/corneish_zen_v2_left.dts | 144 +++---- .../corneish_zen/corneish_zen_v2_right.dts | 150 +++---- app/boards/arm/dz60rgb/Kconfig.board | 4 +- app/boards/arm/dz60rgb/Kconfig.defconfig | 4 +- app/boards/arm/dz60rgb/dz60rgb_rev1.dts | 126 +++--- app/boards/arm/dz60rgb/dz60rgb_rev1.keymap | 24 +- app/boards/arm/ferris/Kconfig.board | 4 +- app/boards/arm/ferris/Kconfig.defconfig | 8 +- app/boards/arm/ferris/ferris_rev02.dts | 226 +++++------ app/boards/arm/mikoto/Kconfig | 10 +- app/boards/arm/mikoto/Kconfig.board | 4 +- app/boards/arm/mikoto/Kconfig.defconfig | 14 +- .../arm/mikoto/arduino_pro_micro_pins.dtsi | 86 ++-- app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi | 58 +-- app/boards/arm/mikoto/mikoto_520.dts | 160 ++++---- app/boards/arm/nice60/Kconfig | 8 +- app/boards/arm/nice60/Kconfig.board | 4 +- app/boards/arm/nice60/Kconfig.defconfig | 10 +- app/boards/arm/nice60/nice60-pinctrl.dtsi | 10 +- app/boards/arm/nice60/nice60.dts | 248 ++++++------ app/boards/arm/nice60/nice60.keymap | 42 +- app/boards/arm/nice_nano/Kconfig | 8 +- app/boards/arm/nice_nano/Kconfig.board | 8 +- app/boards/arm/nice_nano/Kconfig.defconfig | 10 +- .../arm/nice_nano/arduino_pro_micro_pins.dtsi | 86 ++-- .../arm/nice_nano/nice_nano-pinctrl.dtsi | 58 +-- app/boards/arm/nice_nano/nice_nano.dts | 30 +- app/boards/arm/nice_nano/nice_nano.dtsi | 132 +++--- app/boards/arm/nice_nano/nice_nano_v2.dts | 26 +- app/boards/arm/nrf52840_m2/Kconfig | 8 +- app/boards/arm/nrf52840_m2/Kconfig.board | 4 +- app/boards/arm/nrf52840_m2/Kconfig.defconfig | 10 +- app/boards/arm/nrf52840_m2/nrf52840_m2.dts | 148 +++---- app/boards/arm/nrfmicro/Kconfig | 14 +- app/boards/arm/nrfmicro/Kconfig.board | 16 +- app/boards/arm/nrfmicro/Kconfig.defconfig | 16 +- .../arm/nrfmicro/arduino_pro_micro_pins.dtsi | 86 ++-- .../arduino_pro_micro_pins_52833.dtsi | 86 ++-- .../arduino_pro_micro_pins_flipped.dtsi | 86 ++-- .../nrfmicro/nrfmicro-flipped-pinctrl.dtsi | 58 +-- app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi | 58 +-- app/boards/arm/nrfmicro/nrfmicro_11.dts | 138 +++---- .../arm/nrfmicro/nrfmicro_11_flipped.dts | 138 +++---- app/boards/arm/nrfmicro/nrfmicro_13.dts | 156 +++---- app/boards/arm/nrfmicro/nrfmicro_13_52833.dts | 156 +++---- app/boards/arm/pillbug/pillbug-pinctrl.dtsi | 88 ++-- app/boards/arm/planck/Kconfig.board | 4 +- app/boards/arm/planck/Kconfig.defconfig | 4 +- app/boards/arm/planck/planck_rev6.dts | 192 ++++----- app/boards/arm/planck/planck_rev6.keymap | 64 +-- app/boards/arm/preonic/Kconfig.board | 4 +- app/boards/arm/proton_c/Kconfig.board | 4 +- app/boards/arm/proton_c/Kconfig.defconfig | 4 +- .../arm/proton_c/arduino_pro_micro_pins.dtsi | 86 ++-- app/boards/arm/proton_c/proton_c.dts | 112 +++--- app/boards/arm/puchi_ble/Kconfig.board | 4 +- app/boards/arm/puchi_ble/Kconfig.defconfig | 12 +- .../arm/puchi_ble/arduino_pro_micro_pins.dtsi | 86 ++-- .../arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi | 58 +-- app/boards/arm/puchi_ble/puchi_ble_v1.dts | 156 +++---- app/boards/arm/s40nc/Kconfig.board | 4 +- app/boards/arm/s40nc/Kconfig.defconfig | 12 +- app/boards/arm/s40nc/s40nc.dts | 198 ++++----- app/boards/arm/s40nc/s40nc.keymap | 34 +- app/boards/native_posix.overlay | 20 +- app/boards/native_posix_64.overlay | 20 +- app/boards/seeeduino_xiao.overlay | 14 +- app/boards/seeeduino_xiao_ble.overlay | 34 +- app/boards/shields/Kconfig.defconfig | 4 +- app/boards/shields/Kconfig.shield | 2 +- app/boards/shields/a_dux/Kconfig.defconfig | 6 +- app/boards/shields/a_dux/Kconfig.shield | 4 +- app/boards/shields/a_dux/a_dux.dtsi | 76 ++-- app/boards/shields/a_dux/a_dux.keymap | 24 +- app/boards/shields/a_dux/a_dux_right.overlay | 2 +- app/boards/shields/bfo9000/Kconfig.defconfig | 6 +- app/boards/shields/bfo9000/Kconfig.shield | 4 +- app/boards/shields/bfo9000/bfo9000.dtsi | 60 +-- app/boards/shields/bfo9000/bfo9000.keymap | 70 ++-- .../shields/bfo9000/bfo9000_left.overlay | 22 +- .../shields/bfo9000/bfo9000_right.overlay | 24 +- .../shields/boardsource3x4/Kconfig.shield | 2 +- .../shields/chalice/boards/nice_nano.overlay | 62 +-- .../chalice/boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/clog/Kconfig.defconfig | 6 +- app/boards/shields/clog/Kconfig.shield | 4 +- app/boards/shields/clog/clog.dtsi | 64 +-- app/boards/shields/clog/clog_right.overlay | 2 +- .../clueboard_california/Kconfig.defconfig | 4 +- .../clueboard_california/Kconfig.shield | 2 +- .../clueboard_california.keymap | 26 +- .../clueboard_california.overlay | 40 +- app/boards/shields/contra/Kconfig.shield | 2 +- app/boards/shields/corne/Kconfig.defconfig | 20 +- app/boards/shields/corne/Kconfig.shield | 4 +- .../shields/corne/boards/nice_nano.overlay | 62 +-- .../shields/corne/boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/corne/corne.dtsi | 94 ++--- app/boards/shields/corne/corne.keymap | 4 +- app/boards/shields/corne/corne_left.overlay | 16 +- app/boards/shields/corne/corne_right.overlay | 20 +- app/boards/shields/cradio/Kconfig.defconfig | 6 +- app/boards/shields/cradio/Kconfig.shield | 4 +- app/boards/shields/cradio/README.md | 38 +- app/boards/shields/cradio/cradio.dtsi | 76 ++-- .../shields/cradio/cradio_right.overlay | 2 +- app/boards/shields/crbn/Kconfig.defconfig | 2 +- app/boards/shields/crbn/Kconfig.shield | 2 +- app/boards/shields/crbn/crbn.keymap | 86 ++-- app/boards/shields/crbn/crbn.overlay | 80 ++-- .../shields/elephant42/Kconfig.defconfig | 16 +- .../elephant42/boards/nice_nano.overlay | 62 +-- .../elephant42/boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/elephant42/elephant42.dtsi | 32 +- app/boards/shields/ergodash/Kconfig.defconfig | 6 +- app/boards/shields/ergodash/Kconfig.shield | 4 +- app/boards/shields/ergodash/ergodash.dtsi | 62 +-- .../shields/ergodash/ergodash_right.overlay | 2 +- .../shields/eternal_keypad/Kconfig.defconfig | 2 +- .../shields/eternal_keypad/Kconfig.shield | 4 +- .../eternal_keypad/boards/nice_nano.overlay | 62 +-- .../boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/fourier/Kconfig.defconfig | 6 +- app/boards/shields/fourier/Kconfig.shield | 4 +- app/boards/shields/fourier/fourier.dtsi | 52 +-- .../shields/helix/boards/nice_nano.overlay | 62 +-- .../shields/helix/boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/helix/helix_right.overlay | 2 +- .../shields/hummingbird/hummingbird.overlay | 4 +- app/boards/shields/iris/Kconfig.defconfig | 6 +- app/boards/shields/iris/Kconfig.shield | 4 +- app/boards/shields/iris/iris.dtsi | 48 +-- app/boards/shields/iris/iris.keymap | 38 +- app/boards/shields/iris/iris_left.overlay | 16 +- app/boards/shields/iris/iris_right.overlay | 18 +- app/boards/shields/jian/Kconfig.defconfig | 6 +- app/boards/shields/jian/Kconfig.shield | 4 +- app/boards/shields/jian/jian.dtsi | 76 ++-- app/boards/shields/jian/jian_left.overlay | 16 +- app/boards/shields/jian/jian_right.overlay | 22 +- app/boards/shields/jiran/Kconfig.defconfig | 6 +- app/boards/shields/jiran/Kconfig.shield | 4 +- app/boards/shields/jiran/jiran.dtsi | 74 ++-- app/boards/shields/jiran/jiran_left.overlay | 16 +- app/boards/shields/jiran/jiran_right.overlay | 22 +- app/boards/shields/jorne/Kconfig.defconfig | 20 +- app/boards/shields/jorne/Kconfig.shield | 4 +- .../shields/jorne/boards/nice_nano.overlay | 62 +-- .../shields/jorne/boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/jorne/jorne.dtsi | 108 ++--- app/boards/shields/jorne/jorne_left.overlay | 16 +- app/boards/shields/jorne/jorne_right.overlay | 22 +- app/boards/shields/kyria/Kconfig.defconfig | 20 +- app/boards/shields/kyria/Kconfig.shield | 24 +- .../shields/kyria/boards/nice_nano.overlay | 62 +-- .../shields/kyria/boards/nice_nano_v2.overlay | 62 +-- .../shields/kyria/boards/nrfmicro_11.overlay | 62 +-- .../kyria/boards/nrfmicro_11_flipped.overlay | 62 +-- .../shields/kyria/boards/nrfmicro_13.overlay | 62 +-- app/boards/shields/kyria/kyria.dtsi | 54 +-- app/boards/shields/kyria/kyria.keymap | 24 +- app/boards/shields/kyria/kyria_common.dtsi | 80 ++-- app/boards/shields/kyria/kyria_left.overlay | 22 +- app/boards/shields/kyria/kyria_rev2.dtsi | 42 +- app/boards/shields/kyria/kyria_rev2.keymap | 24 +- .../shields/kyria/kyria_rev2_left.overlay | 34 +- .../shields/kyria/kyria_rev2_right.overlay | 38 +- app/boards/shields/kyria/kyria_rev3.dtsi | 48 +-- app/boards/shields/kyria/kyria_rev3.keymap | 40 +- .../shields/kyria/kyria_rev3_left.overlay | 32 +- .../shields/kyria/kyria_rev3_right.overlay | 34 +- app/boards/shields/kyria/kyria_right.overlay | 26 +- app/boards/shields/leeloo/Kconfig.defconfig | 20 +- app/boards/shields/leeloo/Kconfig.shield | 4 +- app/boards/shields/leeloo/leeloo.dtsi | 32 +- app/boards/shields/leeloo/leeloo_left.overlay | 18 +- .../shields/leeloo/leeloo_right.overlay | 20 +- app/boards/shields/lily58/Kconfig.defconfig | 20 +- app/boards/shields/lily58/Kconfig.shield | 4 +- .../shields/lily58/boards/nice_nano.overlay | 62 +-- .../lily58/boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/lily58/lily58.dtsi | 102 ++--- app/boards/shields/lily58/lily58.keymap | 36 +- app/boards/shields/lily58/lily58_left.overlay | 18 +- .../shields/lily58/lily58_right.overlay | 18 +- app/boards/shields/lotus58/Kconfig.defconfig | 20 +- app/boards/shields/lotus58/Kconfig.shield | 4 +- .../shields/lotus58/lotus58_left.overlay | 18 +- .../shields/lotus58/lotus58_right.overlay | 20 +- app/boards/shields/m60/Kconfig.defconfig | 2 +- app/boards/shields/m60/Kconfig.shield | 2 +- app/boards/shields/m60/m60.keymap | 32 +- app/boards/shields/m60/m60.overlay | 68 ++-- app/boards/shields/microdox/Kconfig.defconfig | 20 +- app/boards/shields/microdox/Kconfig.shield | 4 +- .../shields/microdox/boards/nice_nano.overlay | 62 +-- .../microdox/boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/microdox/microdox.dtsi | 76 ++-- .../shields/microdox/microdox_left.overlay | 14 +- .../shields/microdox/microdox_right.overlay | 20 +- app/boards/shields/murphpad/Kconfig.defconfig | 16 +- app/boards/shields/murphpad/Kconfig.shield | 2 +- .../shields/murphpad/boards/nice_nano.overlay | 62 +-- .../murphpad/boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/murphpad/murphpad.overlay | 110 ++--- app/boards/shields/nibble/Kconfig.defconfig | 18 +- app/boards/shields/nibble/Kconfig.shield | 2 +- .../shields/nibble/boards/nice_nano.overlay | 62 +-- .../nibble/boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/nibble/nibble.keymap | 38 +- app/boards/shields/nibble/nibble.overlay | 106 ++--- .../shields/nice_view/Kconfig.defconfig | 12 +- app/boards/shields/nice_view/Kconfig.shield | 2 +- .../shields/nice_view/nice_view.overlay | 24 +- .../shields/nice_view_adapter/Kconfig.shield | 2 +- .../boards/bluemicro840_v1.overlay | 42 +- .../boards/mikoto_520.overlay | 42 +- .../boards/nice_nano.overlay | 42 +- .../boards/nice_nano_v2.overlay | 42 +- .../boards/nrfmicro_11.overlay | 42 +- .../boards/nrfmicro_11_flipped.overlay | 42 +- .../boards/nrfmicro_13.overlay | 42 +- .../boards/puchi_ble_v1.overlay | 42 +- app/boards/shields/pancake/Kconfig.shield | 2 +- .../shields/quefrency/Kconfig.defconfig | 6 +- app/boards/shields/quefrency/Kconfig.shield | 4 +- app/boards/shields/quefrency/quefrency.dtsi | 30 +- app/boards/shields/redox/Kconfig.defconfig | 6 +- app/boards/shields/redox/Kconfig.shield | 4 +- .../shields/redox/boards/nice_nano.overlay | 62 +-- .../shields/redox/boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/redox/redox.dtsi | 46 +-- app/boards/shields/redox/redox_left.overlay | 18 +- app/boards/shields/redox/redox_right.overlay | 20 +- .../reviung41/boards/nice_nano.overlay | 62 +-- .../reviung41/boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/romac/Kconfig.defconfig | 2 +- app/boards/shields/romac/Kconfig.shield | 2 +- app/boards/shields/romac/romac.overlay | 38 +- .../shields/romac_plus/Kconfig.defconfig | 2 +- app/boards/shields/romac_plus/Kconfig.shield | 2 +- .../romac_plus/boards/nice_nano.overlay | 62 +-- .../romac_plus/boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/romac_plus/romac_plus.dtsi | 70 ++-- .../shields/romac_plus/romac_plus.overlay | 26 +- .../shields/settings_reset/Kconfig.defconfig | 2 +- .../shields/settings_reset/Kconfig.shield | 2 +- .../settings_reset/settings_reset.overlay | 20 +- app/boards/shields/snap/Kconfig.defconfig | 20 +- app/boards/shields/snap/Kconfig.shield | 4 +- .../shields/snap/boards/nice_nano.overlay | 62 +-- .../shields/snap/boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/snap/snap.dtsi | 106 ++--- app/boards/shields/snap/snap.keymap | 38 +- app/boards/shields/snap/snap_left.overlay | 36 +- app/boards/shields/snap/snap_right.overlay | 56 +-- app/boards/shields/sofle/Kconfig.defconfig | 20 +- app/boards/shields/sofle/Kconfig.shield | 4 +- app/boards/shields/sofle/sofle_left.overlay | 18 +- app/boards/shields/sofle/sofle_right.overlay | 20 +- .../splitkb_aurora_corne/Kconfig.defconfig | 24 +- .../splitkb_aurora_corne/Kconfig.shield | 4 +- .../boards/nice_nano.overlay | 62 +-- .../boards/nice_nano_v2.overlay | 62 +-- .../splitkb_aurora_corne.dtsi | 108 ++--- .../splitkb_aurora_corne.keymap | 4 +- .../splitkb_aurora_corne_left.overlay | 46 +-- .../splitkb_aurora_corne_right.overlay | 50 +-- .../splitkb_aurora_lily58/Kconfig.defconfig | 24 +- .../splitkb_aurora_lily58/Kconfig.shield | 4 +- .../boards/nice_nano.overlay | 62 +-- .../boards/nice_nano_v2.overlay | 62 +-- .../splitkb_aurora_lily58.dtsi | 94 ++--- .../splitkb_aurora_lily58.keymap | 36 +- .../splitkb_aurora_lily58_left.overlay | 48 +-- .../splitkb_aurora_lily58_right.overlay | 50 +-- .../splitkb_aurora_sweep/Kconfig.defconfig | 24 +- .../splitkb_aurora_sweep/Kconfig.shield | 4 +- .../boards/nice_nano.overlay | 62 +-- .../boards/nice_nano_v2.overlay | 62 +-- .../splitkb_aurora_sweep.dtsi | 118 +++--- .../splitkb_aurora_sweep.keymap | 66 +-- .../splitkb_aurora_sweep_left.overlay | 54 +-- .../splitkb_aurora_sweep_right.overlay | 56 +-- .../shields/splitreus62/Kconfig.defconfig | 6 +- app/boards/shields/splitreus62/Kconfig.shield | 4 +- .../shields/splitreus62/splitreus62.dtsi | 56 +-- .../shields/splitreus62/splitreus62.keymap | 14 +- .../splitreus62/splitreus62_left.overlay | 16 +- .../splitreus62/splitreus62_right.overlay | 18 +- app/boards/shields/tg4x/Kconfig.shield | 2 +- .../shields/tg4x/boards/nice_nano.overlay | 62 +-- .../shields/tg4x/boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/tg4x/tg4x.keymap | 50 +-- app/boards/shields/tg4x/tg4x.overlay | 70 ++-- app/boards/shields/tidbit/Kconfig.defconfig | 16 +- app/boards/shields/tidbit/Kconfig.shield | 2 +- .../shields/tidbit/boards/nice_nano.overlay | 62 +-- .../tidbit/boards/nice_nano_v2.overlay | 62 +-- app/boards/shields/tidbit/tidbit.dtsi | 182 ++++----- app/boards/shields/tidbit/tidbit.keymap | 56 +-- app/boards/shields/tidbit/tidbit_19key.keymap | 56 +-- .../shields/two_percent_milk/Kconfig.shield | 2 +- .../two_percent_milk/boards/nice_nano.overlay | 62 +-- .../boards/nice_nano_v2.overlay | 62 +-- .../boards/nrfmicro_11.overlay | 62 +-- .../boards/nrfmicro_11_flipped.overlay | 62 +-- .../boards/nrfmicro_13.overlay | 62 +-- .../two_percent_milk/two_percent_milk.overlay | 22 +- .../shields/waterfowl/Kconfig.defconfig | 20 +- app/boards/shields/waterfowl/Kconfig.shield | 4 +- app/boards/shields/waterfowl/waterfowl.dtsi | 126 +++--- app/boards/shields/waterfowl/waterfowl.keymap | 78 ++-- .../shields/waterfowl/waterfowl_left.overlay | 16 +- .../shields/waterfowl/waterfowl_right.overlay | 18 +- app/boards/shields/zmk_uno/Kconfig.shield | 2 +- app/boards/shields/zmk_uno/zmk_uno.overlay | 256 ++++++------ app/boards/shields/zodiark/Kconfig.defconfig | 20 +- app/boards/shields/zodiark/Kconfig.shield | 4 +- .../shields/zodiark/zodiark_left.overlay | 20 +- .../shields/zodiark/zodiark_right.overlay | 22 +- app/boards/usb_console.dtsi | 14 +- app/cmake/ZephyrBuildConfig.cmake | 250 ++++++------ app/drivers/display/CMakeLists.txt | 2 +- app/drivers/display/Kconfig.il0323 | 10 +- app/drivers/gpio/Kconfig.595 | 22 +- app/drivers/gpio/Kconfig.max7318 | 22 +- app/drivers/kscan/Kconfig | 102 ++--- app/drivers/sensor/battery/Kconfig | 30 +- app/drivers/sensor/ec11/Kconfig | 52 +-- app/dts/behaviors/backlight.dtsi | 14 +- app/dts/behaviors/bluetooth.dtsi | 14 +- app/dts/behaviors/caps_word.dtsi | 16 +- app/dts/behaviors/ext_power.dtsi | 14 +- app/dts/behaviors/gresc.dtsi | 16 +- app/dts/behaviors/key_press.dtsi | 16 +- app/dts/behaviors/key_repeat.dtsi | 16 +- app/dts/behaviors/key_toggle.dtsi | 14 +- app/dts/behaviors/layer_tap.dtsi | 20 +- app/dts/behaviors/macros.dtsi | 76 ++-- app/dts/behaviors/mod_tap.dtsi | 20 +- app/dts/behaviors/momentary_layer.dtsi | 14 +- app/dts/behaviors/none.dtsi | 14 +- app/dts/behaviors/reset.dtsi | 26 +- app/dts/behaviors/rgb_underglow.dtsi | 14 +- .../behaviors/sensor_rotate_key_press.dtsi | 18 +- app/dts/behaviors/sticky_key.dtsi | 36 +- app/dts/behaviors/to_layer.dtsi | 14 +- app/dts/behaviors/toggle_layer.dtsi | 14 +- app/dts/behaviors/transparent.dtsi | 14 +- app/dts/common/arduino_uno_pro_micro_map.dtsi | 68 ++-- app/include/linker/zmk-events.ld | 12 +- app/run-test.sh | 32 +- app/src/split/Kconfig | 14 +- app/src/split/bluetooth/Kconfig | 50 +-- .../backlight/basic/native_posix_64.keymap | 52 +-- app/tests/backlight/behavior_keymap.dtsi | 48 +-- .../config-brt/native_posix_64.keymap | 16 +- .../config-on/native_posix_64.keymap | 16 +- .../config-step/native_posix_64.keymap | 64 +-- .../backlight/cycle/native_posix_64.keymap | 130 +++--- .../low-brightness/native_posix_64.keymap | 70 ++-- app/tests/caps-word/behavior_keymap.dtsi | 20 +- .../native_posix_64.keymap | 44 +- .../native_posix_64.keymap | 22 +- .../native_posix_64.keymap | 22 +- .../native_posix_64.keymap | 20 +- .../native_posix.keymap | 20 +- .../native_posix_64.keymap | 20 +- .../native_posix_64.keymap | 54 +-- .../native_posix_64.keymap | 54 +-- .../native_posix_64.keymap | 56 +-- .../native_posix_64.keymap | 52 +-- .../native_posix_64.keymap | 54 +-- .../layer-filter-0/native_posix_64.keymap | 122 +++--- .../layer-filter-1/native_posix_64.keymap | 52 +-- .../multiple-timeouts/native_posix_64.keymap | 58 +-- .../native_posix_64.keymap | 172 ++++---- .../native_posix_64.keymap | 88 ++-- .../native_posix_64.keymap | 66 +-- .../native_posix_64.keymap | 66 +-- .../native_posix_64.keymap | 128 +++--- .../native_posix_64.keymap | 56 +-- .../native_posix_64.keymap | 48 +-- .../native_posix_64.keymap | 52 +-- .../press-release/native_posix_64.keymap | 74 ++-- .../press-timeout/native_posix_64.keymap | 48 +-- .../native_posix_64.keymap | 66 +-- .../native_posix_64.keymap | 66 +-- .../native_posix_64.keymap | 66 +-- .../native_posix_64.keymap | 54 +-- .../native_posix_64.keymap | 54 +-- .../native_posix_64.keymap | 70 ++-- .../native_posix_64.keymap | 48 +-- .../balanced/1-dn-up/native_posix_64.keymap | 8 +- .../2-dn-timer-up/native_posix_64.keymap | 8 +- .../native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 14 +- .../3c-kcdn-dn-kcup-up/native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 14 +- .../native_posix_64.keymap | 14 +- .../native_posix_64.keymap | 14 +- .../4c-dn-kcdn-kcup-up/native_posix_64.keymap | 14 +- .../native_posix_64.keymap | 14 +- .../5-quick-tap/native_posix_64.keymap | 12 +- .../6-retro-tap/native_posix_64.keymap | 66 +-- .../2-dn-timer-up/native_posix_64.keymap | 8 +- .../native_posix_64.keymap | 14 +- .../native_posix_64.keymap | 14 +- .../7-positional/behavior_keymap.dtsi | 40 +- .../native_posix_64.keymap | 16 +- .../on-release-trigger/native_posix_64.keymap | 16 +- .../native_posix_64.keymap | 18 +- .../1-basic/native_posix_64.keymap | 36 +- .../2-double-hold/native_posix_64.keymap | 24 +- .../8-global-quick-tap/behavior_keymap.dtsi | 42 +- .../hold-tap/balanced/behavior_keymap.dtsi | 40 +- .../many-nested/native_posix_64.keymap | 60 +-- .../1-dn-up/native_posix_64.keymap | 8 +- .../2-dn-timer-up/native_posix_64.keymap | 8 +- .../native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 14 +- .../3c-kcdn-dn-kcup-up/native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 14 +- .../native_posix_64.keymap | 14 +- .../native_posix_64.keymap | 14 +- .../4c-dn-kcdn-kcup-up/native_posix_64.keymap | 14 +- .../native_posix_64.keymap | 14 +- .../5-quick-tap/native_posix_64.keymap | 12 +- .../6-retro-tap/native_posix_64.keymap | 66 +-- .../2-dn-timer-up/native_posix_64.keymap | 8 +- .../native_posix_64.keymap | 14 +- .../native_posix_64.keymap | 14 +- .../7-positional/behavior_keymap.dtsi | 40 +- .../native_posix_64.keymap | 16 +- .../on-release-trigger/native_posix_64.keymap | 16 +- .../native_posix_64.keymap | 18 +- .../1-basic/native_posix_64.keymap | 36 +- .../2-double-hold/native_posix_64.keymap | 24 +- .../8-global-quick-tap/behavior_keymap.dtsi | 42 +- .../hold-preferred/behavior_keymap.dtsi | 40 +- .../1-dn-up/native_posix_64.keymap | 8 +- .../2-dn-timer-up/native_posix_64.keymap | 8 +- .../native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 14 +- .../3c-kcdn-dn-kcup-up/native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 14 +- .../native_posix_64.keymap | 14 +- .../native_posix_64.keymap | 14 +- .../4c-dn-kcdn-kcup-up/native_posix_64.keymap | 14 +- .../native_posix_64.keymap | 14 +- .../5-quick-tap/native_posix_64.keymap | 12 +- .../6-nested-timeouts/native_posix_64.keymap | 70 ++-- .../2-dn-timer-up/native_posix_64.keymap | 8 +- .../native_posix_64.keymap | 14 +- .../native_posix_64.keymap | 14 +- .../7-positional/behavior_keymap.dtsi | 40 +- .../native_posix_64.keymap | 16 +- .../on-release-trigger/native_posix_64.keymap | 16 +- .../native_posix_64.keymap | 18 +- .../1-basic/native_posix_64.keymap | 36 +- .../2-double-hold/native_posix_64.keymap | 24 +- .../8-global-quick-tap/behavior_keymap.dtsi | 42 +- .../tap-preferred/behavior_keymap.dtsi | 40 +- .../1-dn-up/native_posix_64.keymap | 8 +- .../2-dn-timer-up/native_posix_64.keymap | 8 +- .../native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 14 +- .../3c-kcdn-dn-kcup-up/native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 14 +- .../native_posix_64.keymap | 14 +- .../native_posix_64.keymap | 14 +- .../4c-dn-kcdn-kcup-up/native_posix_64.keymap | 14 +- .../native_posix_64.keymap | 14 +- .../5-quick-tap/native_posix_64.keymap | 12 +- .../1-basic/native_posix_64.keymap | 36 +- .../2-double-hold/native_posix_64.keymap | 24 +- .../6-global-quick-tap/behavior_keymap.dtsi | 42 +- .../behavior_keymap.dtsi | 40 +- app/tests/key-repeat/behavior_keymap.dtsi | 20 +- .../native_posix_64.keymap | 16 +- .../native_posix.keymap | 12 +- .../native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 16 +- .../native_posix_64.keymap | 8 +- app/tests/keypress/behavior_keymap.dtsi | 20 +- .../kp-press-release/native_posix_64.keymap | 8 +- app/tests/keytoggle/behavior_keymap.dtsi | 20 +- .../kt-alt-tab/native_posix_64.keymap | 60 +-- .../kt-modded-alpha/native_posix_64.keymap | 44 +- .../native_posix_64.keymap | 12 +- .../kt-press-release/native_posix_64.keymap | 12 +- app/tests/macros/basic/native_posix_64.keymap | 2 +- app/tests/macros/behavior_keymap.dtsi | 96 ++--- .../native_posix_64.keymap | 56 +-- .../native_posix_64.keymap | 52 +-- .../press-mid-macro/native_posix_64.keymap | 2 +- .../press-release/native_posix_64.keymap | 2 +- .../timing-override/native_posix_64.keymap | 2 +- .../wait-macro-release/native_posix_64.keymap | 2 +- .../1-no-morph/native_posix_64.keymap | 8 +- .../2a-masked-morph/native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 32 +- .../native_posix_64.keymap | 16 +- .../native_posix_64.keymap | 42 +- .../native_posix_64.keymap | 46 +-- .../3-unmasked-morph/native_posix_64.keymap | 32 +- app/tests/mod-morph/behavior_keymap.dtsi | 20 +- .../native_posix_64.keymap | 32 +- .../native_posix_64.keymap | 32 +- .../kp-lctl-dn-lctl-up/native_posix_64.keymap | 28 +- .../native_posix_64.keymap | 32 +- .../native_posix_64.keymap | 32 +- .../native_posix_64.keymap | 32 +- .../native_posix_64.keymap | 32 +- .../native_posix_64.keymap | 32 +- .../native_posix_64.keymap | 32 +- .../1-normal/native_posix_64.keymap | 40 +- .../native_posix_64.keymap | 40 +- .../3-covered/native_posix_64.keymap | 36 +- .../4-nested/native_posix_64.keymap | 54 +-- .../native_posix_64.keymap | 54 +-- .../momentary-layer/behavior_keymap.dtsi | 28 +- app/tests/none/behavior_keymap.dtsi | 28 +- app/tests/none/layered/native_posix_64.keymap | 2 +- app/tests/none/normal/native_posix.keymap | 2 +- app/tests/none/normal/native_posix_64.keymap | 2 +- .../1-os-dn-up/native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 54 +-- .../10-callum-mods/native_posix_64.keymap | 64 +-- .../10-sl-sl-kp/native_posix_64.keymap | 92 ++--- .../native_posix_64.keymap | 30 +- .../native_posix_64.keymap | 22 +- .../native_posix_64.keymap | 70 ++-- .../native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 16 +- .../native_posix_64.keymap | 82 ++-- .../native_posix_64.keymap | 70 ++-- .../9-sk-dn-up-dn-up/native_posix_64.keymap | 34 +- app/tests/sticky-keys/behavior_keymap.dtsi | 28 +- .../tap-dance/1a-tap1/native_posix_64.keymap | 8 +- .../tap-dance/1b-tap2/native_posix_64.keymap | 10 +- .../tap-dance/1c-tap3/native_posix_64.keymap | 12 +- .../tap-dance/2a-hold1/native_posix_64.keymap | 8 +- .../tap-dance/2b-hold2/native_posix_64.keymap | 10 +- .../tap-dance/2c-hold3/native_posix_64.keymap | 12 +- .../3a-tap-int-mid/native_posix_64.keymap | 6 +- .../3b-tap-int-seq/native_posix_64.keymap | 6 +- .../3c-tap-int-after/native_posix_64.keymap | 6 +- .../3d-hold-int-mid/native_posix_64.keymap | 6 +- .../3e-hold-int-seq/native_posix_64.keymap | 6 +- .../3f-hold-int-after/native_posix_64.keymap | 6 +- .../4a-single/native_posix_64.keymap | 8 +- .../5a-tdint-mid/native_posix_64.keymap | 6 +- .../5b-tdint-seq/native_posix_64.keymap | 6 +- .../5c-tdint-after/native_posix_64.keymap | 6 +- .../5d-tdint-multiple/native_posix_64.keymap | 6 +- .../6-combo-tap2/native_posix_64.keymap | 20 +- app/tests/to-layer/behavior_keymap.dtsi | 28 +- .../to-layer/normal/native_posix_64.keymap | 30 +- app/tests/toggle-layer/behavior_keymap.dtsi | 38 +- .../early-key-release/native_posix_64.keymap | 4 +- .../normal/native_posix_64.keymap | 2 +- app/tests/transparent/behavior_keymap.dtsi | 28 +- .../layered/native_posix_64.keymap | 2 +- .../transparent/normal/native_posix_64.keymap | 2 +- .../1-single_keypress/native_posix_64.keymap | 12 +- .../native_posix_64.keymap | 22 +- app/tests/wpm/behavior_keymap.dtsi | 20 +- docs/blog/2020-10-03-bootloader-fix.md | 22 +- docs/docs/behaviors/hold-tap.md | 212 +++++----- docs/docs/behaviors/layers.md | 20 +- docs/docs/behaviors/tap-dance.md | 44 +- docs/docs/config/index.md | 22 +- docs/docs/development/new-behavior.md | 16 +- docs/docs/development/new-shield.md | 162 ++++---- docs/docs/features/backlight.md | 26 +- docs/docs/features/combos.md | 16 +- docs/docs/features/keymaps.md | 4 +- docs/docs/features/underglow.md | 28 +- docs/docs/keymap-example-file.md | 16 +- docs/docs/keymap-example.md | 16 +- 613 files changed, 11572 insertions(+), 11567 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7687fc6e..1375a6ae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,10 @@ fail_fast: false repos: + - repo: https://github.com/Lucas-C/pre-commit-hooks + rev: v1.5.1 + hooks: + - id: remove-tabs + exclude: "vendor-prefixes\\.txt$" - repo: https://github.com/pocc/pre-commit-hooks rev: v1.3.5 hooks: diff --git a/app/Kconfig b/app/Kconfig index ccc5f42d..25a99b55 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -8,167 +8,167 @@ menu "ZMK" menu "Basic Keyboard Setup" config ZMK_KEYBOARD_NAME - string "Keyboard Name" + string "Keyboard Name" config USB_DEVICE_PRODUCT - default ZMK_KEYBOARD_NAME + default ZMK_KEYBOARD_NAME config BT_DEVICE_NAME - default ZMK_KEYBOARD_NAME + default ZMK_KEYBOARD_NAME config USB_DEVICE_VID - default 0x1D50 + default 0x1D50 config USB_DEVICE_PID - default 0x615E + default 0x615E config USB_DEVICE_MANUFACTURER - default "ZMK Project" + default "ZMK Project" config BT_DIS_PNP_VID - default 0x1D50 + default 0x1D50 config BT_DIS_PNP_PID - default 0x615E + default 0x615E config BT_DIS_MODEL - default ZMK_KEYBOARD_NAME + default ZMK_KEYBOARD_NAME config BT_DIS_MANUF - default "ZMK Project" + default "ZMK Project" menu "HID" choice ZMK_HID_REPORT_TYPE - prompt "HID Report Type" + prompt "HID Report Type" config ZMK_HID_REPORT_TYPE_HKRO - bool "#-Key Roll Over (HKRO) HID Report" - help - Enable # key roll over for HID report. This selection is "boot keyboard" compatible - but limits the total number of possible keys to report as held to #. + bool "#-Key Roll Over (HKRO) HID Report" + help + Enable # key roll over for HID report. This selection is "boot keyboard" compatible + but limits the total number of possible keys to report as held to #. config ZMK_HID_REPORT_TYPE_NKRO - bool "Full N-Key Roll Over (NKRO) HID Report" - help - Enable full N-Key Roll Over for HID output. This selection will prevent the keyboard - from working with some BIOS/UEFI versions that only support "boot keyboard" support. - This option also prevents using some infrequently used higher range HID usages. + bool "Full N-Key Roll Over (NKRO) HID Report" + help + Enable full N-Key Roll Over for HID output. This selection will prevent the keyboard + from working with some BIOS/UEFI versions that only support "boot keyboard" support. + This option also prevents using some infrequently used higher range HID usages. endchoice if ZMK_HID_REPORT_TYPE_HKRO config ZMK_HID_KEYBOARD_REPORT_SIZE - int "# Keyboard Keys Reportable" - default 6 + int "# Keyboard Keys Reportable" + default 6 endif config ZMK_HID_CONSUMER_REPORT_SIZE - int "# Consumer Keys Reportable" - default 6 + int "# Consumer Keys Reportable" + default 6 choice ZMK_HID_CONSUMER_REPORT_USAGES - prompt "HID Report Type" + prompt "HID Report Type" config ZMK_HID_CONSUMER_REPORT_USAGES_FULL - bool "Full Consumer HID Usage Support" - help - Enable full Consumer usage ID values to be sent to hosts. Allows for less - frequently used usages, but has compatibability issues with some host OSes. + bool "Full Consumer HID Usage Support" + help + Enable full Consumer usage ID values to be sent to hosts. Allows for less + frequently used usages, but has compatibability issues with some host OSes. config ZMK_HID_CONSUMER_REPORT_USAGES_BASIC - bool "Basic Consumer HID Usage Support" - help - Enable Consumer usage ID values up to "Playback Speed - Slow" to be sent to - hosts. Allows for broader compatibability with more host OSes. + bool "Basic Consumer HID Usage Support" + help + Enable Consumer usage ID values up to "Playback Speed - Slow" to be sent to + hosts. Allows for broader compatibability with more host OSes. endchoice menu "Output Types" config ZMK_USB - bool "USB" - select USB - select USB_DEVICE_STACK - select USB_DEVICE_HID + bool "USB" + select USB + select USB_DEVICE_STACK + select USB_DEVICE_HID if ZMK_USB config USB_NUMOF_EP_WRITE_RETRIES - default 10 + default 10 config USB_HID_POLL_INTERVAL_MS - default 1 + default 1 #ZMK_USB endif menuconfig ZMK_BLE - bool "BLE (HID over GATT)" - select BT - select BT_SMP - select BT_SMP_SC_PAIR_ONLY - select BT_SMP_APP_PAIRING_ACCEPT - select BT_PERIPHERAL - select BT_DIS - select BT_BAS - select BT_SETTINGS - select SETTINGS + bool "BLE (HID over GATT)" + select BT + select BT_SMP + select BT_SMP_SC_PAIR_ONLY + select BT_SMP_APP_PAIRING_ACCEPT + select BT_PERIPHERAL + select BT_DIS + select BT_BAS + select BT_SETTINGS + select SETTINGS if ZMK_BLE config SYSTEM_WORKQUEUE_STACK_SIZE - default 4096 if SOC_RP2040 - default 2048 + default 4096 if SOC_RP2040 + default 2048 config ZMK_BLE_THREAD_STACK_SIZE - int "BLE notify thread stack size" - default 512 + int "BLE notify thread stack size" + default 512 config ZMK_BLE_THREAD_PRIORITY - int "BLE notify thread priority" - default 5 + int "BLE notify thread priority" + default 5 config ZMK_BLE_KEYBOARD_REPORT_QUEUE_SIZE - int "Max number of keyboard HID reports to queue for sending over BLE" - default 20 + int "Max number of keyboard HID reports to queue for sending over BLE" + default 20 config ZMK_BLE_CONSUMER_REPORT_QUEUE_SIZE - int "Max number of consumer HID reports to queue for sending over BLE" - default 5 + int "Max number of consumer HID reports to queue for sending over BLE" + default 5 config ZMK_BLE_CLEAR_BONDS_ON_START - bool "Configuration that clears all bond information from the keyboard on startup." - default n + bool "Configuration that clears all bond information from the keyboard on startup." + default n # HID GATT notifications sent this way are *not* picked up by Linux, and possibly others. config BT_GATT_NOTIFY_MULTIPLE - default n + default n config BT_GATT_AUTO_SEC_REQ - default n + default n config BT_DEVICE_APPEARANCE - default 961 + default 961 config ZMK_BLE_PASSKEY_ENTRY - bool "Experimental: Requiring typing passkey from host to pair BLE connection" - default n + bool "Experimental: Requiring typing passkey from host to pair BLE connection" + default n config BT_PERIPHERAL_PREF_MIN_INT - default 6 + default 6 config BT_PERIPHERAL_PREF_MAX_INT - default 12 + default 12 config BT_PERIPHERAL_PREF_LATENCY - default 30 + default 30 config BT_PERIPHERAL_PREF_TIMEOUT - default 400 + default 400 #ZMK_BLE endif @@ -189,108 +189,108 @@ menu "Display/LED Options" rsource "src/display/Kconfig" menuconfig ZMK_RGB_UNDERGLOW - bool "RGB Adressable LED Underglow" - select LED_STRIP + bool "RGB Adressable LED Underglow" + select LED_STRIP if ZMK_RGB_UNDERGLOW # This default value cuts down on tons of excess .conf files, if you're using GPIO, manually disable this config SPI - default y + default y config ZMK_RGB_UNDERGLOW_EXT_POWER - bool "RGB underglow toggling also controls external power" - default y + bool "RGB underglow toggling also controls external power" + default y config ZMK_RGB_UNDERGLOW_BRT_MIN - int "RGB underglow minimum brightness in percent" - range 0 100 - default 0 + int "RGB underglow minimum brightness in percent" + range 0 100 + default 0 config ZMK_RGB_UNDERGLOW_BRT_MAX - int "RGB underglow maximum brightness in percent" - range ZMK_RGB_UNDERGLOW_BRT_MIN 100 - default 100 + int "RGB underglow maximum brightness in percent" + range ZMK_RGB_UNDERGLOW_BRT_MIN 100 + default 100 config ZMK_RGB_UNDERGLOW_HUE_STEP - int "RGB underglow hue step in degrees" - range 0 359 - default 10 + int "RGB underglow hue step in degrees" + range 0 359 + default 10 config ZMK_RGB_UNDERGLOW_SAT_STEP - int "RGB underglow saturation step in percent" - range 0 100 - default 10 + int "RGB underglow saturation step in percent" + range 0 100 + default 10 config ZMK_RGB_UNDERGLOW_BRT_STEP - int "RGB underglow brightness step in percent" - range 0 100 - default 10 + int "RGB underglow brightness step in percent" + range 0 100 + default 10 config ZMK_RGB_UNDERGLOW_HUE_START - int "RGB underglow start hue value in degrees" - range 0 359 - default 0 + int "RGB underglow start hue value in degrees" + range 0 359 + default 0 config ZMK_RGB_UNDERGLOW_SAT_START - int "RGB underglow start saturations value in percent" - range 0 100 - default 100 + int "RGB underglow start saturations value in percent" + range 0 100 + default 100 config ZMK_RGB_UNDERGLOW_BRT_START - int "RGB underglow start brightness value in percent" - range ZMK_RGB_UNDERGLOW_BRT_MIN ZMK_RGB_UNDERGLOW_BRT_MAX - default ZMK_RGB_UNDERGLOW_BRT_MAX + int "RGB underglow start brightness value in percent" + range ZMK_RGB_UNDERGLOW_BRT_MIN ZMK_RGB_UNDERGLOW_BRT_MAX + default ZMK_RGB_UNDERGLOW_BRT_MAX config ZMK_RGB_UNDERGLOW_SPD_START - int "RGB underglow start animation speed value" - range 1 5 - default 3 + int "RGB underglow start animation speed value" + range 1 5 + default 3 config ZMK_RGB_UNDERGLOW_EFF_START - int "RGB underglow start effect int value related to the effect enum list" - range 0 3 - default 0 + int "RGB underglow start effect int value related to the effect enum list" + range 0 3 + default 0 config ZMK_RGB_UNDERGLOW_ON_START - bool "RGB underglow starts on by default" - default y + bool "RGB underglow starts on by default" + default y config ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE - bool "Turn off RGB underglow when keyboard goes into idle state" + bool "Turn off RGB underglow when keyboard goes into idle state" config ZMK_RGB_UNDERGLOW_AUTO_OFF_USB - bool "Turn off RGB underglow when USB is disconnected" - depends on USB_DEVICE_STACK + bool "Turn off RGB underglow when USB is disconnected" + depends on USB_DEVICE_STACK #ZMK_RGB_UNDERGLOW endif menuconfig ZMK_BACKLIGHT - bool "LED backlight" - select LED + bool "LED backlight" + select LED if ZMK_BACKLIGHT config ZMK_BACKLIGHT_BRT_STEP - int "Brightness step in percent" - range 1 100 - default 20 + int "Brightness step in percent" + range 1 100 + default 20 config ZMK_BACKLIGHT_BRT_START - int "Default brightness in percent" - range 1 100 - default 40 + int "Default brightness in percent" + range 1 100 + default 40 config ZMK_BACKLIGHT_ON_START - bool "Default backlight state" - default y + bool "Default backlight state" + default y config ZMK_BACKLIGHT_AUTO_OFF_IDLE - bool "Turn off backlight when keyboard goes into idle state" + bool "Turn off backlight when keyboard goes into idle state" config ZMK_BACKLIGHT_AUTO_OFF_USB - bool "Turn off backlight when USB is disconnected" + bool "Turn off backlight when USB is disconnected" #ZMK_BACKLIGHT endif @@ -301,28 +301,28 @@ endmenu menu "Power Management" config ZMK_IDLE_TIMEOUT - int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)" - default 30000 + int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)" + default 30000 config ZMK_SLEEP - bool "Enable deep sleep support" - imply USB + bool "Enable deep sleep support" + imply USB if ZMK_SLEEP config PM_DEVICE - default y + default y config ZMK_IDLE_SLEEP_TIMEOUT - int "Milliseconds of inactivity before entering deep sleep" - default 900000 + int "Milliseconds of inactivity before entering deep sleep" + default 900000 #ZMK_SLEEP endif config ZMK_EXT_POWER - bool "Enable support to control external power output" - default y + bool "Enable support to control external power output" + default y #Power Management endmenu @@ -330,16 +330,16 @@ endmenu menu "Combo options" config ZMK_COMBO_MAX_PRESSED_COMBOS - int "Maximum number of currently pressed combos" - default 4 + int "Maximum number of currently pressed combos" + default 4 config ZMK_COMBO_MAX_COMBOS_PER_KEY - int "Maximum number of combos per key" - default 5 + int "Maximum number of combos per key" + default 5 config ZMK_COMBO_MAX_KEYS_PER_COMBO - int "Maximum number of keys per combo" - default 4 + int "Maximum number of keys per combo" + default 4 #Combo options endmenu @@ -347,18 +347,18 @@ endmenu menu "Behavior Options" config ZMK_BEHAVIORS_QUEUE_SIZE - int "Maximum number of behaviors to allow queueing from a macro or other complex behavior" - default 64 + int "Maximum number of behaviors to allow queueing from a macro or other complex behavior" + default 64 rsource "Kconfig.behaviors" config ZMK_MACRO_DEFAULT_WAIT_MS - int "Default time to wait (in milliseconds) before triggering the next behavior in macros" - default 15 + int "Default time to wait (in milliseconds) before triggering the next behavior in macros" + default 15 config ZMK_MACRO_DEFAULT_TAP_MS - int "Default time to wait (in milliseconds) between the press and release events of a tapped behavior in macros" - default 30 + int "Default time to wait (in milliseconds) between the press and release events of a tapped behavior in macros" + default 30 endmenu @@ -369,8 +369,8 @@ menu "Initialization Priorities" if USB_DEVICE_STACK config ZMK_USB_INIT_PRIORITY - int "USB Init Priority" - default 50 + int "USB Init Priority" + default 50 #USB endif @@ -378,8 +378,8 @@ endif if ZMK_BLE || ZMK_SPLIT_BLE config ZMK_BLE_INIT_PRIORITY - int "BLE Init Priority" - default 50 + int "BLE Init Priority" + default 50 #ZMK_BLE || ZMK_SPLIT_BLE endif @@ -390,8 +390,8 @@ endmenu menu "KSCAN Settings" config ZMK_KSCAN_EVENT_QUEUE_SIZE - int "Size of the event queue for KSCAN events to buffer events" - default 4 + int "Size of the event queue for KSCAN events to buffer events" + default 4 #KSCAN Settings endmenu @@ -399,63 +399,63 @@ endmenu menu "Logging" config ZMK_LOGGING_MINIMAL - bool "Suppress all ZMK debug log messages" - default false + bool "Suppress all ZMK debug log messages" + default false if !ZMK_LOGGING_MINIMAL config ZMK_LOG_LEVEL - default 4 + default 4 endif config ZMK_USB_LOGGING - bool "Enable USB CDC ACM logging to help debug" - select LOG - select USB - select USB_DEVICE_STACK - select USB_CDC_ACM - select SERIAL - select CONSOLE - select UART_INTERRUPT_DRIVEN - select UART_LINE_CTRL - select UART_CONSOLE - select USB_UART_CONSOLE + bool "Enable USB CDC ACM logging to help debug" + select LOG + select USB + select USB_DEVICE_STACK + select USB_CDC_ACM + select SERIAL + select CONSOLE + select UART_INTERRUPT_DRIVEN + select UART_LINE_CTRL + select UART_CONSOLE + select USB_UART_CONSOLE if ZMK_USB_LOGGING choice USB_CDC_ACM_LOG_LEVEL_CHOICE - default USB_CDC_ACM_LOG_LEVEL_OFF + default USB_CDC_ACM_LOG_LEVEL_OFF endchoice choice USB_DRIVER_LOG_LEVEL_CHOICE - default USB_DRIVER_LOG_LEVEL_OFF + default USB_DRIVER_LOG_LEVEL_OFF endchoice # We do this to avoid log loop where logging to USB generates more log messages. config USB_CDC_ACM_RINGBUF_SIZE - default 1024 + default 1024 config LOG_PROCESS_THREAD_STARTUP_DELAY_MS - default 1000 + default 1000 #ZMK_USB_LOGGING endif config ZMK_RTT_LOGGING - bool "Enable RTT logging to help debug" - select LOG - select DEBUG - select ASSERT - select USE_SEGGER_RTT - select CONSOLE - select RTT_CONSOLE + bool "Enable RTT logging to help debug" + select LOG + select DEBUG + select ASSERT + select USE_SEGGER_RTT + select CONSOLE + select RTT_CONSOLE if ZMK_RTT_LOGGING config SEGGER_RTT_BUFFER_SIZE_UP - default 8192 + default 8192 #ZMK_RTT_LOGGING endif @@ -463,10 +463,10 @@ endif if ZMK_USB_LOGGING || ZMK_RTT_LOGGING config LOG_BUFFER_SIZE - default 8192 + default 8192 config LOG_PROCESS_THREAD_SLEEP_MS - default 100 + default 100 #ZMK_USB_LOGGING || ZMK_RTT_LOGGING endif @@ -477,16 +477,16 @@ endmenu if SETTINGS config ZMK_SETTINGS_SAVE_DEBOUNCE - int "Milliseconds to debounce settings saves" - default 60000 + int "Milliseconds to debounce settings saves" + default 60000 #SETTINGS endif config ZMK_BATTERY_REPORT_INTERVAL - depends on ZMK_BLE - int "Battery level report interval in seconds" - default 60 + depends on ZMK_BLE + int "Battery level report interval in seconds" + default 60 #Advanced endmenu @@ -495,26 +495,26 @@ endmenu endmenu config HEAP_MEM_POOL_SIZE - default 8192 + default 8192 config KERNEL_BIN_NAME - default "zmk" + default "zmk" config REBOOT - default y + default y config USB_DEVICE_STACK - default y if HAS_HW_NRF_USBD + default y if HAS_HW_NRF_USBD config ZMK_WPM - bool "Calculate WPM" - default n + bool "Calculate WPM" + default n config SENSOR - default y + default y choice CBPRINTF_IMPLEMENTATION - default CBPRINTF_NANO + default CBPRINTF_NANO endchoice diff --git a/app/boards/arm/bdn9/Kconfig.board b/app/boards/arm/bdn9/Kconfig.board index a67e9a51..76a204cc 100644 --- a/app/boards/arm/bdn9/Kconfig.board +++ b/app/boards/arm/bdn9/Kconfig.board @@ -4,5 +4,5 @@ # SPDX-License-Identifier: MIT config BOARD_BDN9 - bool "BDN9 rev2" - depends on SOC_STM32F072XB + bool "BDN9 rev2" + depends on SOC_STM32F072XB diff --git a/app/boards/arm/bdn9/Kconfig.defconfig b/app/boards/arm/bdn9/Kconfig.defconfig index 17695185..d1c82811 100644 --- a/app/boards/arm/bdn9/Kconfig.defconfig +++ b/app/boards/arm/bdn9/Kconfig.defconfig @@ -6,16 +6,16 @@ if BOARD_BDN9 config BOARD - default "bdn9_rev2" + default "bdn9_rev2" config ZMK_KEYBOARD_NAME - default "BDN9 Rev2" + default "BDN9 Rev2" config ZMK_USB - default y + default y config ZMK_RGB_UNDERGLOW - select SPI - select WS2812_STRIP + select SPI + select WS2812_STRIP endif # BOARD_BDN9 diff --git a/app/boards/arm/bdn9/bdn9_rev2.dts b/app/boards/arm/bdn9/bdn9_rev2.dts index e75893d6..d2d1c65c 100644 --- a/app/boards/arm/bdn9/bdn9_rev2.dts +++ b/app/boards/arm/bdn9/bdn9_rev2.dts @@ -10,134 +10,134 @@ #include / { - model = "Keeb.io BDN9 rev2"; - compatible = "keebio,bdn9", "st,stm32f072"; + model = "Keeb.io BDN9 rev2"; + compatible = "keebio,bdn9", "st,stm32f072"; - chosen { - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - zmk,kscan = &kscan; - zmk,underglow = &led_strip; - }; + chosen { + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zmk,kscan = &kscan; + zmk,underglow = &led_strip; + }; - kscan: kscan { - compatible = "zmk,kscan-gpio-direct"; - label = "KSCAN"; + kscan: kscan { + compatible = "zmk,kscan-gpio-direct"; + label = "KSCAN"; - input-gpios - = <&gpiob 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpiob 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpiob 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpiob 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpioa 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpiof 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpiof 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; - }; + input-gpios + = <&gpiob 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiob 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiob 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiob 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpioa 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiof 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiof 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; - left_encoder: encoder_left { - compatible = "alps,ec11"; - 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>; - status = "disabled"; - }; - mid_encoder: encoder_mid { - compatible = "alps,ec11"; - 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>; - status = "disabled"; - }; - right_encoder: encoder_right { - compatible = "alps,ec11"; - 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>; - status = "disabled"; - }; + left_encoder: encoder_left { + compatible = "alps,ec11"; + 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>; + status = "disabled"; + }; + mid_encoder: encoder_mid { + compatible = "alps,ec11"; + 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>; + status = "disabled"; + }; + right_encoder: encoder_right { + compatible = "alps,ec11"; + 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>; + status = "disabled"; + }; - sensors: sensors { - compatible = "zmk,keymap-sensors"; - status = "disabled"; - sensors = <>; - }; + sensors: sensors { + compatible = "zmk,keymap-sensors"; + status = "disabled"; + sensors = <>; + }; }; &spi2 { - status = "okay"; - pinctrl-0 = <&spi2_sck_pb13 &spi2_mosi_pb15>; - pinctrl-names = "default"; + status = "okay"; + pinctrl-0 = <&spi2_sck_pb13 &spi2_mosi_pb15>; + pinctrl-names = "default"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <9>; - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <9>; + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; &clk_hsi { - status = "okay"; + status = "okay"; }; &pll { - status = "okay"; - prediv = <1>; - mul = <6>; - clocks = <&clk_hsi>; + status = "okay"; + prediv = <1>; + mul = <6>; + clocks = <&clk_hsi>; }; &rcc { - clocks = <&pll>; - clock-frequency = ; - ahb-prescaler = <1>; - apb1-prescaler = <1>; + clocks = <&pll>; + clock-frequency = ; + ahb-prescaler = <1>; + apb1-prescaler = <1>; }; &usb { - status = "okay"; - pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; - pinctrl-names = "default"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + status = "okay"; + pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; + pinctrl-names = "default"; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; }; &rtc { - status = "okay"; + status = "okay"; }; &flash0 { - /* - * For more information, see: - * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions - */ - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; + /* + * For more information, see: + * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; - /* Set 6Kb of storage at the end of the 128Kb of flash */ - storage_partition: partition@1e800 { - label = "storage"; - reg = <0x0001e800 0x00001800>; - }; - }; + /* Set 6Kb of storage at the end of the 128Kb of flash */ + storage_partition: partition@1e800 { + label = "storage"; + reg = <0x0001e800 0x00001800>; + }; + }; }; diff --git a/app/boards/arm/bdn9/bdn9_rev2.keymap b/app/boards/arm/bdn9/bdn9_rev2.keymap index 50c273c7..1e2c192d 100644 --- a/app/boards/arm/bdn9/bdn9_rev2.keymap +++ b/app/boards/arm/bdn9/bdn9_rev2.keymap @@ -9,8 +9,8 @@ /* Uncomment and keep whatever encoders are on your BDN9 &sensors { - status = "okay"; - sensors = <&left_encoder &mid_encoder &right_encoder>; + status = "okay"; + sensors = <&left_encoder &mid_encoder &right_encoder>; }; */ @@ -20,19 +20,19 @@ // &right_encoder { status = "okay"; }; / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - bindings = < - &kp HOME &kp K_PP &kp END - &kp PG_UP &kp UP &kp PG_DN - &kp LEFT &kp DOWN &kp RIGHT - >; - /* Uncomment and add necessary bindings. This examples is for one encoder - sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; - */ - }; - }; + default_layer { + bindings = < + &kp HOME &kp K_PP &kp END + &kp PG_UP &kp UP &kp PG_DN + &kp LEFT &kp DOWN &kp RIGHT + >; + /* Uncomment and add necessary bindings. This examples is for one encoder + sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; + */ + }; + }; }; diff --git a/app/boards/arm/bluemicro840/Kconfig b/app/boards/arm/bluemicro840/Kconfig index 0e6743d3..ca060885 100644 --- a/app/boards/arm/bluemicro840/Kconfig +++ b/app/boards/arm/bluemicro840/Kconfig @@ -1,8 +1,8 @@ # SPDX-License-Identifier: MIT config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on BOARD_BLUEMICRO840_V1 + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on BOARD_BLUEMICRO840_V1 diff --git a/app/boards/arm/bluemicro840/Kconfig.board b/app/boards/arm/bluemicro840/Kconfig.board index bc271af3..e2794015 100644 --- a/app/boards/arm/bluemicro840/Kconfig.board +++ b/app/boards/arm/bluemicro840/Kconfig.board @@ -4,5 +4,5 @@ # SPDX-License-Identifier: MIT config BOARD_BLUEMICRO840_V1 - bool "BlueMicro840_V1" - depends on SOC_NRF52840_QIAA + bool "BlueMicro840_V1" + depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/bluemicro840/Kconfig.defconfig b/app/boards/arm/bluemicro840/Kconfig.defconfig index 5d911ec6..732805ae 100644 --- a/app/boards/arm/bluemicro840/Kconfig.defconfig +++ b/app/boards/arm/bluemicro840/Kconfig.defconfig @@ -6,22 +6,22 @@ if BOARD_BLUEMICRO840_V1 config BOARD - default "bluemicro840_v1" + default "bluemicro840_v1" if USB_DEVICE_STACK config USB_NRFX - default y + default y endif # USB_DEVICE_STACK config BT_CTLR - default BT + default BT config ZMK_BLE - default y + default y config ZMK_USB - default y + default y endif # BOARD_BLUEMICRO840_V1 diff --git a/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi b/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi index 53514d64..cdb8fcdd 100644 --- a/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi +++ b/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi @@ -5,50 +5,50 @@ */ / { - pro_micro: connector { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio0 8 0> /* D0 D2 */ - , <1 0 &gpio0 6 0> /* D1 D3*/ - , <2 0 &gpio0 15 0> /* D2 D1*/ - , <3 0 &gpio0 17 0> /* D3 D0*/ - , <4 0 &gpio0 20 0> /* D4/A6 D4*/ - , <5 0 &gpio0 13 0> /* D5 C6*/ - , <6 0 &gpio0 24 0> /* D6/A7 D7*/ - , <7 0 &gpio0 9 0> /* D7 E6*/ - , <8 0 &gpio0 10 0> /* D8/A8 B4*/ - , <9 0 &gpio1 6 0> /* D9/A9 B5*/ - , <10 0 &gpio1 11 0> /* D10/A10 B6*/ - , <16 0 &gpio0 28 0> /* D16 B2*/ - , <14 0 &gpio0 3 0> /* D14 B3*/ - , <15 0 &gpio1 13 0> /* D15 B1*/ - , <18 0 &gpio0 2 0> /* D18/A0 F7*/ - , <19 0 &gpio0 29 0> /* D19/A1 F6*/ - , <20 0 &gpio0 26 0> /* D20/A2 F5*/ - , <21 0 &gpio0 30 0> /* D21/A3 F4*/ - ; - }; + pro_micro: connector { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 8 0> /* D0 D2 */ + , <1 0 &gpio0 6 0> /* D1 D3*/ + , <2 0 &gpio0 15 0> /* D2 D1*/ + , <3 0 &gpio0 17 0> /* D3 D0*/ + , <4 0 &gpio0 20 0> /* D4/A6 D4*/ + , <5 0 &gpio0 13 0> /* D5 C6*/ + , <6 0 &gpio0 24 0> /* D6/A7 D7*/ + , <7 0 &gpio0 9 0> /* D7 E6*/ + , <8 0 &gpio0 10 0> /* D8/A8 B4*/ + , <9 0 &gpio1 6 0> /* D9/A9 B5*/ + , <10 0 &gpio1 11 0> /* D10/A10 B6*/ + , <16 0 &gpio0 28 0> /* D16 B2*/ + , <14 0 &gpio0 3 0> /* D14 B3*/ + , <15 0 &gpio1 13 0> /* D15 B1*/ + , <18 0 &gpio0 2 0> /* D18/A0 F7*/ + , <19 0 &gpio0 29 0> /* D19/A1 F6*/ + , <20 0 &gpio0 26 0> /* D20/A2 F5*/ + , <21 0 &gpio0 30 0> /* D21/A3 F4*/ + ; + }; - pro_micro_a: connector_a { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio0 2 0> /* D18/A0 F7*/ - , <1 0 &gpio0 29 0> /* D19/A1 F6*/ - , <2 0 &gpio0 26 0> /* D20/A2 F5*/ - , <3 0 &gpio0 30 0> /* D21/A3 F4*/ - , <6 0 &gpio0 20 0> /* D4/A6 D4*/ - , <7 0 &gpio0 24 0> /* D6/A7 D7*/ - , <8 0 &gpio0 10 0> /* D8/A8 B4*/ - , <9 0 &gpio1 6 0> /* D9/A9 B5*/ - , <10 0 &gpio1 11 0> /* D10/A10 B6*/ - ; - }; + pro_micro_a: connector_a { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 2 0> /* D18/A0 F7*/ + , <1 0 &gpio0 29 0> /* D19/A1 F6*/ + , <2 0 &gpio0 26 0> /* D20/A2 F5*/ + , <3 0 &gpio0 30 0> /* D21/A3 F4*/ + , <6 0 &gpio0 20 0> /* D4/A6 D4*/ + , <7 0 &gpio0 24 0> /* D6/A7 D7*/ + , <8 0 &gpio0 10 0> /* D8/A8 B4*/ + , <9 0 &gpio1 6 0> /* D9/A9 B5*/ + , <10 0 &gpio1 11 0> /* D10/A10 B6*/ + ; + }; }; pro_micro_d: &pro_micro {}; diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi b/app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi index 18b90f21..15c48509 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi +++ b/app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi @@ -4,36 +4,36 @@ */ &pinctrl { - uart0_default: uart0_default { - group1 { - psels = ; - bias-pull-up; - }; - group2 { - psels = ; - }; - }; + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; - uart0_sleep: uart0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; - i2c0_default: i2c0_default { - group1 { - psels = , - ; - }; - }; + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; - i2c0_sleep: i2c0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; }; diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.dts b/app/boards/arm/bluemicro840/bluemicro840_v1.dts index c636ca31..f1952601 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1.dts +++ b/app/boards/arm/bluemicro840/bluemicro840_v1.dts @@ -10,117 +10,117 @@ #include "bluemicro840_v1-pinctrl.dtsi" / { - model = "BlueMicro840_V1"; - compatible = "bluemicro840,v1"; + model = "BlueMicro840_V1"; + compatible = "bluemicro840,v1"; - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - zmk,battery = &vbatt; - }; + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zmk,battery = &vbatt; + }; - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; - ext-power { - compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; - init-delay-ms = <20>; - control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; - }; + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + init-delay-ms = <20>; + control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + }; - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; - io-channels = <&adc 7>; - output-ohms = <2000000>; - full-ohms = <(2000000 + 806000)>; - }; + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 7>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 806000)>; + }; }; &adc { - status = "okay"; + status = "okay"; }; &gpiote { - status = "okay"; + status = "okay"; }; &gpio0 { - status = "okay"; + status = "okay"; }; &gpio1 { - status = "okay"; + status = "okay"; }; &i2c0 { - compatible = "nordic,nrf-twim"; - pinctrl-0 = <&i2c0_default>; - pinctrl-1 = <&i2c0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-twim"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { - compatible = "nordic,nrf-uarte"; - pinctrl-0 = <&uart0_default>; - pinctrl-1 = <&uart0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-uarte"; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + 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>; + /* + * 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>; - }; + 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. - */ + /* + * 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>; - }; + /* + * 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>; - }; - }; + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; }; diff --git a/app/boards/arm/bt60/Kconfig b/app/boards/arm/bt60/Kconfig index 359e237d..d57a6b7e 100644 --- a/app/boards/arm/bt60/Kconfig +++ b/app/boards/arm/bt60/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: MIT config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on (BOARD_BT60_V1_HS || BOARD_BT60_V1) + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on (BOARD_BT60_V1_HS || BOARD_BT60_V1) diff --git a/app/boards/arm/bt60/Kconfig.board b/app/boards/arm/bt60/Kconfig.board index 0f0a9c6e..24c0a8b5 100644 --- a/app/boards/arm/bt60/Kconfig.board +++ b/app/boards/arm/bt60/Kconfig.board @@ -4,9 +4,9 @@ # SPDX-License-Identifier: MIT config BOARD_BT60_V1 - bool "bt60" - depends on SOC_NRF52840_QIAA + bool "bt60" + depends on SOC_NRF52840_QIAA config BOARD_BT60_V1_HS - bool "bt60 hotswap" - depends on SOC_NRF52840_QIAA + bool "bt60 hotswap" + depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/bt60/Kconfig.defconfig b/app/boards/arm/bt60/Kconfig.defconfig index bad1e7cd..e7cf1a48 100644 --- a/app/boards/arm/bt60/Kconfig.defconfig +++ b/app/boards/arm/bt60/Kconfig.defconfig @@ -4,28 +4,28 @@ if BOARD_BT60_V1_HS || BOARD_BT60_V1 config BOARD - default "bt60" + default "bt60" if USB config USB_NRFX - default y + default y config USB_DEVICE_STACK - default y + default y endif # USB config BT_CTLR - default BT + default BT config ZMK_BLE - default y + default y config ZMK_USB - default y + default y config ZMK_KEYBOARD_NAME - default "BT60" + default "BT60" endif # BOARD_BT60 diff --git a/app/boards/arm/bt60/bt60.dtsi b/app/boards/arm/bt60/bt60.dtsi index 3858ba46..6e4900af 100644 --- a/app/boards/arm/bt60/bt60.dtsi +++ b/app/boards/arm/bt60/bt60.dtsi @@ -9,126 +9,126 @@ #include / { - model = "BT60"; - compatible = "polarityworks,bt60"; + model = "BT60"; + compatible = "polarityworks,bt60"; - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - zmk,battery = &vbatt; - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zmk,battery = &vbatt; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder>; - }; + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder>; + }; - left_encoder: encoder_left { - compatible = "alps,ec11"; - 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>; - status = "okay"; - }; + left_encoder: encoder_left { + compatible = "alps,ec11"; + 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>; + status = "okay"; + }; - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; - io-channels = <&adc 2>; - output-ohms = <2000000>; - full-ohms = <(2000000 + 806000)>; - }; + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 2>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 806000)>; + }; }; &adc { - status = "okay"; + status = "okay"; }; &gpiote { - status = "okay"; + status = "okay"; }; &gpio0 { - status = "okay"; + status = "okay"; }; &gpio1 { - status = "okay"; + status = "okay"; }; &i2c0 { - compatible = "nordic,nrf-twi"; - sda-pin = <17>; - scl-pin = <20>; + compatible = "nordic,nrf-twi"; + sda-pin = <17>; + scl-pin = <20>; }; &uart0 { - compatible = "nordic,nrf-uarte"; - tx-pin = <6>; - rx-pin = <8>; + compatible = "nordic,nrf-uarte"; + tx-pin = <6>; + rx-pin = <8>; }; &usbd { - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + 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>; + /* + * 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>; - }; + 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. - */ + /* + * 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>; - }; + /* + * 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>; - }; - }; + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; }; diff --git a/app/boards/arm/bt60/bt60_v1.dts b/app/boards/arm/bt60/bt60_v1.dts index 8b2f0cb4..0cfe184a 100644 --- a/app/boards/arm/bt60/bt60_v1.dts +++ b/app/boards/arm/bt60/bt60_v1.dts @@ -9,105 +9,105 @@ / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &ansi_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &ansi_transform; + }; - ansi_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <15>; - rows = <5>; - 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(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(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,13) - RC(3,0) 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(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) - >; - }; + ansi_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <15>; + rows = <5>; + 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(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(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,13) + RC(3,0) 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(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) + >; + }; - hhkb_transform: keymap_transform_1 { - compatible = "zmk,matrix-transform"; - columns = <15>; - rows = <5>; - 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(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,13) - RC(3,0) 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,14) - RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) - >; - }; + hhkb_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <15>; + rows = <5>; + 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(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,13) + RC(3,0) 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,14) + RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) + >; + }; - iso_transform: keymap_transform_2 { - compatible = "zmk,matrix-transform"; - columns = <15>; - rows = <5>; - 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(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(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,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(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) - >; - }; + iso_transform: keymap_transform_2 { + compatible = "zmk,matrix-transform"; + columns = <15>; + rows = <5>; + 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(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(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,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(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) + >; + }; - all_1u_transform: keymap_transform_3 { - compatible = "zmk,matrix-transform"; - columns = <15>; - rows = <5>; - 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(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(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,13) - RC(3,0) 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(3,14) - RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) - >; - }; + all_1u_transform: keymap_transform_3 { + compatible = "zmk,matrix-transform"; + columns = <15>; + rows = <5>; + 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(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(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,13) + RC(3,0) 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(3,14) + RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) + >; + }; - split_transform: keymap_transform_4 { - compatible = "zmk,matrix-transform"; - columns = <15>; - rows = <5>; - 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(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,13) - RC(3,0) 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,14) - RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) - >; - }; + split_transform: keymap_transform_4 { + compatible = "zmk,matrix-transform"; + columns = <15>; + rows = <5>; + 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(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,13) + RC(3,0) 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,14) + RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) + >; + }; - kscan0: kscan_0 { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; - diode-direction = "col2row"; + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; - col-gpios - = <&gpio1 13 GPIO_ACTIVE_HIGH> - , <&gpio1 10 GPIO_ACTIVE_HIGH> - , <&gpio1 11 GPIO_ACTIVE_HIGH> - , <&gpio1 15 GPIO_ACTIVE_HIGH> - , <&gpio0 3 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> - , <&gpio0 5 GPIO_ACTIVE_HIGH> - , <&gpio0 7 GPIO_ACTIVE_HIGH> - , <&gpio1 9 GPIO_ACTIVE_HIGH> - , <&gpio0 12 GPIO_ACTIVE_HIGH> - , <&gpio0 23 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&gpio1 13 GPIO_ACTIVE_HIGH> + , <&gpio1 10 GPIO_ACTIVE_HIGH> + , <&gpio1 11 GPIO_ACTIVE_HIGH> + , <&gpio1 15 GPIO_ACTIVE_HIGH> + , <&gpio0 3 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> + , <&gpio0 5 GPIO_ACTIVE_HIGH> + , <&gpio0 7 GPIO_ACTIVE_HIGH> + , <&gpio1 9 GPIO_ACTIVE_HIGH> + , <&gpio0 12 GPIO_ACTIVE_HIGH> + , <&gpio0 23 GPIO_ACTIVE_HIGH> + ; - row-gpios - = <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - }; + row-gpios + = <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; }; diff --git a/app/boards/arm/bt60/bt60_v1.keymap b/app/boards/arm/bt60/bt60_v1.keymap index b42f3f3d..25ae269d 100644 --- a/app/boards/arm/bt60/bt60_v1.keymap +++ b/app/boards/arm/bt60/bt60_v1.keymap @@ -11,170 +11,170 @@ / { - chosen { - #ifdef ANSI - zmk,matrix_transform = &ansi_transform; - #elif defined(HHKB) - zmk,matrix_transform = &hhkb_transform; - #elif defined(ISO) - zmk,matrix_transform = &iso_transform; - #elif defined(ALL_1U) - zmk,matrix_transform = &all_1u_transform; - #else - zmk,matrix_transform = &split_transform; - #endif - }; + chosen { + #ifdef ANSI + zmk,matrix_transform = &ansi_transform; + #elif defined(HHKB) + zmk,matrix_transform = &hhkb_transform; + #elif defined(ISO) + zmk,matrix_transform = &iso_transform; + #elif defined(ALL_1U) + zmk,matrix_transform = &all_1u_transform; + #else + zmk,matrix_transform = &split_transform; + #endif + }; - keymap { - compatible = "zmk,keymap"; - #ifdef ANSI - default_layer { - // ------------------------------------------------------------------------------------------ - // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | - // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | | - // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | - // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | - // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL | - // ------------------------------------------------------------------------------------------ - 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 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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET - &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 LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL &bt BT_CLR - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - raise { - // ------------------------------------------------------------------------------------------ - // |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | - // | TAB | Q | UP | E | R | T | Y | U | INS | O |PSCRN|SLCK |PSEBRK| RESET | - // | CAPS |LEFT |DOWN |RIGHT| F | G | H | J | K | L |HOME |PGUP | BOOTLOADER | - // | PREV |VOLUP |VOLDN|MUTE | V | B | N | M | , | END | PGDN | NEXT | - // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | BT_CLR | - // ------------------------------------------------------------------------------------------ - 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 &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset - &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader - &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT - &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR &trans - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - #elif defined(HHKB) - default_layer { - // ------------------------------------------------------------------------------------------ - // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | - // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | BSPC | - // | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | - // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | 1 | - // | CAPS | ALT | WIN | SPACE | WIN | ALT | CTRL | - // ------------------------------------------------------------------------------------------ - 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 BSLH &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 LBKT &kp RBKT &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 RET - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &mo 1 - &kp LCTRL &kp LALT &kp LGUI &kp SPACE &kp RGUI &kp RALT &kp RCTRL - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - raise { - bindings = < - &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 INS &kp DEL - &kp CLCK &bt BT_PRV &bt BT_NXT &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &kp UP &trans &sys_reset - &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp LEFT &kp RIGHT &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp DOWN &trans &trans - &trans &trans &trans &bootloader &trans &trans &trans - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - #elif defined(ISO) - default_layer { - // ------------------------------------------------------------------------------------------ - // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | - // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | - // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER | - // | SHIFT | | | Z | X | C | V | B | N | M | , | . | / | SHIFT | - // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL | - // ------------------------------------------------------------------------------------------ - 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 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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp NON_US_HASH &kp RET - &kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT - &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - raise { - 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 - &sys_reset &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK - &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &trans &bootloader - &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT - &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - #elif defined(ALL_1U) - default_layer { - // ------------------------------------------------------------------------------------------ - // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | - // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" | - // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | - // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHFT | UP | 1 | - // | CTL | WIN | ALT | SPACE | ALT | CTRL | LEFT | DOWN | RIGHT | - // ------------------------------------------------------------------------------------------ - 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 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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET - &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 &mo 1 - &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - raise { - 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 F1 - &trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset - &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader - &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT - &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &bt BT_CLR - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - #else - default_layer { - // ------------------------------------------------------------------------------------------ - // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BKSP| DEL | - // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | - // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | - // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | 1 | - // | CTL | WIN | ALT | SPACE | ALT | 1 | CTRL | - // ------------------------------------------------------------------------------------------ - 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 DEL - &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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &mo 1 - &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RGUI &kp C_MENU &kp RCTRL - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - raise { - 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 &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset - &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader - &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &trans - &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - #endif - }; + keymap { + compatible = "zmk,keymap"; + #ifdef ANSI + default_layer { + // ------------------------------------------------------------------------------------------ + // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | + // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | | + // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | + // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | + // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL | + // ------------------------------------------------------------------------------------------ + 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 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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET + &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 LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL &bt BT_CLR + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + raise { + // ------------------------------------------------------------------------------------------ + // |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + // | TAB | Q | UP | E | R | T | Y | U | INS | O |PSCRN|SLCK |PSEBRK| RESET | + // | CAPS |LEFT |DOWN |RIGHT| F | G | H | J | K | L |HOME |PGUP | BOOTLOADER | + // | PREV |VOLUP |VOLDN|MUTE | V | B | N | M | , | END | PGDN | NEXT | + // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | BT_CLR | + // ------------------------------------------------------------------------------------------ + 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 &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset + &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader + &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT + &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR &trans + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + #elif defined(HHKB) + default_layer { + // ------------------------------------------------------------------------------------------ + // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | BSPC | + // | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | + // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | 1 | + // | CAPS | ALT | WIN | SPACE | WIN | ALT | CTRL | + // ------------------------------------------------------------------------------------------ + 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 BSLH &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 LBKT &kp RBKT &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 RET + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &mo 1 + &kp LCTRL &kp LALT &kp LGUI &kp SPACE &kp RGUI &kp RALT &kp RCTRL + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + raise { + bindings = < + &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 INS &kp DEL + &kp CLCK &bt BT_PRV &bt BT_NXT &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &kp UP &trans &sys_reset + &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp LEFT &kp RIGHT &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp DOWN &trans &trans + &trans &trans &trans &bootloader &trans &trans &trans + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + #elif defined(ISO) + default_layer { + // ------------------------------------------------------------------------------------------ + // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | + // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | + // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER | + // | SHIFT | | | Z | X | C | V | B | N | M | , | . | / | SHIFT | + // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL | + // ------------------------------------------------------------------------------------------ + 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 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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp NON_US_HASH &kp RET + &kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT + &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + raise { + 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 + &sys_reset &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK + &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &trans &bootloader + &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT + &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + #elif defined(ALL_1U) + default_layer { + // ------------------------------------------------------------------------------------------ + // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | + // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" | + // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | + // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHFT | UP | 1 | + // | CTL | WIN | ALT | SPACE | ALT | CTRL | LEFT | DOWN | RIGHT | + // ------------------------------------------------------------------------------------------ + 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 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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET + &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 &mo 1 + &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + raise { + 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 F1 + &trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset + &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader + &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT + &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &bt BT_CLR + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + #else + default_layer { + // ------------------------------------------------------------------------------------------ + // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BKSP| DEL | + // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | + // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | 1 | + // | CTL | WIN | ALT | SPACE | ALT | 1 | CTRL | + // ------------------------------------------------------------------------------------------ + 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 DEL + &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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &mo 1 + &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RGUI &kp C_MENU &kp RCTRL + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + raise { + 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 &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset + &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader + &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &trans + &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + #endif + }; }; diff --git a/app/boards/arm/bt60/bt60_v1_hs.dts b/app/boards/arm/bt60/bt60_v1_hs.dts index 0e686fd9..b24dee1e 100644 --- a/app/boards/arm/bt60/bt60_v1_hs.dts +++ b/app/boards/arm/bt60/bt60_v1_hs.dts @@ -9,53 +9,53 @@ / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <15>; - rows = <5>; - 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(2,13) - 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(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(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,0) RC(4,1) RC(4,2) RC(4,5) RC(4,8) RC(4,9) RC(4,10) RC(4,11) - >; - }; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <15>; + rows = <5>; + 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(2,13) + 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(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(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,0) RC(4,1) RC(4,2) RC(4,5) RC(4,8) RC(4,9) RC(4,10) RC(4,11) + >; + }; - kscan0: kscan_0 { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; - diode-direction = "col2row"; + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; - col-gpios - = <&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> - , <&gpio0 29 GPIO_ACTIVE_HIGH> - , <&gpio0 30 GPIO_ACTIVE_HIGH> - , <&gpio0 31 GPIO_ACTIVE_HIGH> - , <&gpio0 5 GPIO_ACTIVE_HIGH> - , <&gpio0 7 GPIO_ACTIVE_HIGH> - , <&gpio1 9 GPIO_ACTIVE_HIGH> - , <&gpio0 12 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&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> + , <&gpio0 29 GPIO_ACTIVE_HIGH> + , <&gpio0 30 GPIO_ACTIVE_HIGH> + , <&gpio0 31 GPIO_ACTIVE_HIGH> + , <&gpio0 5 GPIO_ACTIVE_HIGH> + , <&gpio0 7 GPIO_ACTIVE_HIGH> + , <&gpio1 9 GPIO_ACTIVE_HIGH> + , <&gpio0 12 GPIO_ACTIVE_HIGH> + ; - row-gpios - = <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 23 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - }; + row-gpios + = <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 23 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; }; diff --git a/app/boards/arm/bt60/bt60_v1_hs.keymap b/app/boards/arm/bt60/bt60_v1_hs.keymap index 167460c6..6c26756e 100644 --- a/app/boards/arm/bt60/bt60_v1_hs.keymap +++ b/app/boards/arm/bt60/bt60_v1_hs.keymap @@ -3,35 +3,35 @@ #include / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - // ------------------------------------------------------------------------------------------ - // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | DEL - // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | | - // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | - // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | - // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL | - // ------------------------------------------------------------------------------------------ - 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 &bt BT_CLR - &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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET - &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 LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - raise { - 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 &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset - &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader - &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT - &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR - >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - }; + default_layer { + // ------------------------------------------------------------------------------------------ + // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | DEL + // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | | + // | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | + // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | + // | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL | + // ------------------------------------------------------------------------------------------ + 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 &bt BT_CLR + &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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET + &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 LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + raise { + 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 &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset + &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader + &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT + &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + }; }; diff --git a/app/boards/arm/corneish_zen/Kconfig.board b/app/boards/arm/corneish_zen/Kconfig.board index 33baa110..ca82e330 100644 --- a/app/boards/arm/corneish_zen/Kconfig.board +++ b/app/boards/arm/corneish_zen/Kconfig.board @@ -4,9 +4,9 @@ # config BOARD_CORNEISH_ZEN_V2_LEFT - bool "corneish zen left v2" - depends on SOC_NRF52840_QIAA + bool "corneish zen left v2" + depends on SOC_NRF52840_QIAA config BOARD_CORNEISH_ZEN_V2_RIGHT - bool "corneish zen right v2" - depends on SOC_NRF52840_QIAA \ No newline at end of file + bool "corneish zen right v2" + depends on SOC_NRF52840_QIAA \ 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 33ce1256..a161230c 100644 --- a/app/boards/arm/corneish_zen/Kconfig.defconfig +++ b/app/boards/arm/corneish_zen/Kconfig.defconfig @@ -6,10 +6,10 @@ if BOARD_CORNEISH_ZEN_V2_LEFT config ZMK_KEYBOARD_NAME - default "Corne-ish Zen" + default "Corne-ish Zen" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif # BOARD_CORNEISH_ZEN_V2_LEFT @@ -17,65 +17,65 @@ endif # BOARD_CORNEISH_ZEN_V2_LEFT if BOARD_CORNEISH_ZEN_V2_LEFT || BOARD_CORNEISH_ZEN_V2_RIGHT config BOARD - default "corneish_zen" + default "corneish_zen" config ZMK_SPLIT - default y + default y config BT_CTLR - default BT + default BT config ZMK_BLE - default y + default y config ZMK_USB - default y + default y if USB config USB_NRFX - default y + default y config USB_DEVICE_STACK - default y + default y endif # USB config ZMK_DISPLAY - select LV_USE_CONT - select LV_FONT_MONTSERRAT_26 - select LV_FONT_MONTSERRAT_20 - select LV_FONT_MONTSERRAT_16 - select LV_USE_LABEL - select LV_USE_IMG + select LV_USE_CONT + select LV_FONT_MONTSERRAT_26 + select LV_FONT_MONTSERRAT_20 + select LV_FONT_MONTSERRAT_16 + select LV_USE_LABEL + select LV_USE_IMG choice ZMK_DISPLAY_STATUS_SCREEN - default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM + default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM endchoice if ZMK_DISPLAY config SPI - default y + default y config IL0323 - default y + default y config ZMK_DISPLAY_BLANK_ON_IDLE - default n + default n endif # ZMK_DISPLAY menuconfig CUSTOM_WIDGET_BATTERY_STATUS - bool "custom battery status widget" + bool "custom battery status widget" menuconfig CUSTOM_WIDGET_OUTPUT_STATUS - bool "custom output status widget" + bool "custom output status widget" menuconfig CUSTOM_WIDGET_LAYER_STATUS - bool "custom layer status widget" + bool "custom layer status widget" menuconfig CUSTOM_WIDGET_PERIPHERAL_STATUS - bool "custom peripheral status widget" + bool "custom peripheral status widget" endif # BOARD_CORNEISH_ZEN_V2_LEFT || BOARD_CORNEISH_ZEN_V2_RIGHT diff --git a/app/boards/arm/corneish_zen/corneish_zen.dtsi b/app/boards/arm/corneish_zen/corneish_zen.dtsi index f203c9f8..10be54cc 100644 --- a/app/boards/arm/corneish_zen/corneish_zen.dtsi +++ b/app/boards/arm/corneish_zen/corneish_zen.dtsi @@ -11,116 +11,116 @@ #include / { - model = "corneish_zen_v2"; - compatible = "corneish_zen_v2"; + model = "corneish_zen_v2"; + compatible = "corneish_zen_v2"; - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zmk,kscan = &kscan0; - zmk,display = &epd; - zmk,battery = &vbatt; - zephyr,console = &cdc_acm_uart; - }; + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zmk,kscan = &kscan0; + zmk,display = &epd; + zmk,battery = &vbatt; + zephyr,console = &cdc_acm_uart; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <4>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <4>; - // | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | - // | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | - // | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | - // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - map = < - RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) - RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) - RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) - RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) - >; - }; + // | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | + // | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | + // | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | + // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) + RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) + >; + }; - five_column_transform: keymap_transform_1 { - compatible = "zmk,matrix-transform"; - columns = <10>; - rows = <4>; + five_column_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; - // | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | - // | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | - // | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | - // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - map = < - RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) - RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) - RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) - RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) - >; - }; + // | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | + // | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | + // | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | + // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | + map = < + RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) + RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) + RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) + RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) + >; + }; }; &adc { - status = "okay"; + status = "okay"; }; &gpiote { - status = "okay"; + status = "okay"; }; &gpio0 { - status = "okay"; + status = "okay"; }; &gpio1 { - status = "okay"; + status = "okay"; }; &usbd { - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + 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>; + /* + * 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>; - }; + 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. - */ + /* + * 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>; - }; + /* + * 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>; - }; - }; + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; }; \ No newline at end of file diff --git a/app/boards/arm/corneish_zen/corneish_zen.keymap b/app/boards/arm/corneish_zen/corneish_zen.keymap index 72d0b8f1..2b9eeb14 100644 --- a/app/boards/arm/corneish_zen/corneish_zen.keymap +++ b/app/boards/arm/corneish_zen/corneish_zen.keymap @@ -45,7 +45,7 @@ &kp TAB &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans &kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT + &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT >; }; @@ -60,7 +60,7 @@ &kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC &kp LCTRL &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE &kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE - &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT + &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT >; }; }; diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts b/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts index 65092dc5..9f3dd73a 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts @@ -8,90 +8,90 @@ #include "corneish_zen.dtsi" /{ - chosen { - zephyr,display = &epd; - zmk,battery = &vbatt; - }; + chosen { + zephyr,display = &epd; + zmk,battery = &vbatt; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + diode-direction = "col2row"; + row-gpios + = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; - col-gpios - = <&gpio0 21 GPIO_ACTIVE_HIGH> - , <&gpio0 23 GPIO_ACTIVE_HIGH> - , <&gpio0 12 GPIO_ACTIVE_HIGH> - , <&gpio1 9 GPIO_ACTIVE_HIGH> - , <&gpio0 7 GPIO_ACTIVE_HIGH> - , <&gpio0 5 GPIO_ACTIVE_HIGH> - ; - }; + col-gpios + = <&gpio0 21 GPIO_ACTIVE_HIGH> + , <&gpio0 23 GPIO_ACTIVE_HIGH> + , <&gpio0 12 GPIO_ACTIVE_HIGH> + , <&gpio1 9 GPIO_ACTIVE_HIGH> + , <&gpio0 7 GPIO_ACTIVE_HIGH> + , <&gpio0 5 GPIO_ACTIVE_HIGH> + ; + }; - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; - io-channels = <&adc 0>; - output-ohms = <1960000>; - full-ohms = <(1960000 + 810000)>; - }; + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 0>; + output-ohms = <1960000>; + full-ohms = <(1960000 + 810000)>; + }; }; &pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; - spi0_sleep: spi0_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; &spi0 { - status = "okay"; - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; - cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; + status = "okay"; + compatible = "nordic,nrf-spim"; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; + cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; - epd: il0323@0 { - compatible = "gooddisplay,il0323"; - reg = <0>; - label = "DISPLAY"; - width = <80>; - height = <128>; - spi-max-frequency = <4000000>; - dc-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; - busy-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; - reset-gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; - pwr = [03 00 26 26]; - cdi = <0xd2>; - tcon = <0x22>; - }; + epd: il0323@0 { + compatible = "gooddisplay,il0323"; + reg = <0>; + label = "DISPLAY"; + width = <80>; + height = <128>; + spi-max-frequency = <4000000>; + dc-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + busy-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; + reset-gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; + pwr = [03 00 26 26]; + cdi = <0xd2>; + tcon = <0x22>; + }; }; diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts b/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts index 980c9900..3cb7556f 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts @@ -8,98 +8,98 @@ #include "corneish_zen.dtsi" /{ - chosen { - zephyr,display = &epd; - zmk,battery = &vbatt; - }; + chosen { + zephyr,display = &epd; + zmk,battery = &vbatt; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + diode-direction = "col2row"; + row-gpios + = <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; - col-gpios - = <&gpio0 19 GPIO_ACTIVE_HIGH> - , <&gpio0 21 GPIO_ACTIVE_HIGH> - , <&gpio0 23 GPIO_ACTIVE_HIGH> - , <&gpio0 12 GPIO_ACTIVE_HIGH> - , <&gpio1 9 GPIO_ACTIVE_HIGH> - , <&gpio0 7 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&gpio0 19 GPIO_ACTIVE_HIGH> + , <&gpio0 21 GPIO_ACTIVE_HIGH> + , <&gpio0 23 GPIO_ACTIVE_HIGH> + , <&gpio0 12 GPIO_ACTIVE_HIGH> + , <&gpio1 9 GPIO_ACTIVE_HIGH> + , <&gpio0 7 GPIO_ACTIVE_HIGH> + ; - }; + }; - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; - io-channels = <&adc 0>; - output-ohms = <1960000>; - full-ohms = <(1960000 + 810000)>; - }; + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 0>; + output-ohms = <1960000>; + full-ohms = <(1960000 + 810000)>; + }; }; &default_transform { - col-offset = <6>; + col-offset = <6>; }; &five_column_transform { - col-offset = <6>; + col-offset = <6>; }; &pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; - spi0_sleep: spi0_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; &spi0 { - status = "okay"; - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; - cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; + status = "okay"; + compatible = "nordic,nrf-spim"; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; + cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; - epd: il0323@0 { - compatible = "gooddisplay,il0323"; - reg = <0>; - label = "DISPLAY"; - width = <80>; - height = <128>; - spi-max-frequency = <4000000>; - dc-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; - busy-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; - reset-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; - pwr = [03 00 26 26]; - //softstart = [17 17 17 17]; - cdi = <0xd2>; - tcon = <0x22>; - }; + epd: il0323@0 { + compatible = "gooddisplay,il0323"; + reg = <0>; + label = "DISPLAY"; + width = <80>; + height = <128>; + spi-max-frequency = <4000000>; + dc-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; + busy-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + reset-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; + pwr = [03 00 26 26]; + //softstart = [17 17 17 17]; + cdi = <0xd2>; + tcon = <0x22>; + }; }; diff --git a/app/boards/arm/dz60rgb/Kconfig.board b/app/boards/arm/dz60rgb/Kconfig.board index ec8dad68..ba09e2dd 100644 --- a/app/boards/arm/dz60rgb/Kconfig.board +++ b/app/boards/arm/dz60rgb/Kconfig.board @@ -2,5 +2,5 @@ # SPDX-License-Identifier: MIT config BOARD_DZ60RGB_REV1 - bool "DZ60RGB Keyboard" - depends on SOC_STM32F303XC + bool "DZ60RGB Keyboard" + depends on SOC_STM32F303XC diff --git a/app/boards/arm/dz60rgb/Kconfig.defconfig b/app/boards/arm/dz60rgb/Kconfig.defconfig index 779d3123..2e30e3d0 100644 --- a/app/boards/arm/dz60rgb/Kconfig.defconfig +++ b/app/boards/arm/dz60rgb/Kconfig.defconfig @@ -6,9 +6,9 @@ if BOARD_DZ60RGB_REV1 config ZMK_KEYBOARD_NAME - default "DZ60RGB Rev 1" + default "DZ60RGB Rev 1" config ZMK_USB - default y + default y endif # BOARD_DZ60RGB_REV1 diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1.dts b/app/boards/arm/dz60rgb/dz60rgb_rev1.dts index e2730d21..14be837d 100644 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1.dts +++ b/app/boards/arm/dz60rgb/dz60rgb_rev1.dts @@ -10,84 +10,84 @@ #include / { - model = "DZ60RGB, Rev 1"; - compatible = "dz60rgb,rev1", "st,stm32f303"; + model = "DZ60RGB, Rev 1"; + compatible = "dz60rgb,rev1", "st,stm32f303"; - chosen { - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <14>; - rows = <5>; - map = < + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <5>; + 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(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(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,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,13) RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,13) - >; - }; + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpiob 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpiob 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpiob 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpiob 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - col-gpios - = <&gpioa 6 GPIO_ACTIVE_HIGH> - , <&gpioa 7 GPIO_ACTIVE_HIGH> - , <&gpiob 0 GPIO_ACTIVE_HIGH> - , <&gpiob 13 GPIO_ACTIVE_HIGH> - , <&gpiob 15 GPIO_ACTIVE_HIGH> - , <&gpioa 8 GPIO_ACTIVE_HIGH> - , <&gpioa 15 GPIO_ACTIVE_HIGH> - , <&gpiob 3 GPIO_ACTIVE_HIGH> - , <&gpiob 4 GPIO_ACTIVE_HIGH> - , <&gpiob 5 GPIO_ACTIVE_HIGH> - , <&gpiob 8 GPIO_ACTIVE_HIGH> - , <&gpiob 9 GPIO_ACTIVE_HIGH> - , <&gpioc 13 GPIO_ACTIVE_HIGH> - , <&gpioc 14 GPIO_ACTIVE_HIGH> - ; - }; + diode-direction = "col2row"; + row-gpios + = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpiob 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpiob 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpiob 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpiob 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + col-gpios + = <&gpioa 6 GPIO_ACTIVE_HIGH> + , <&gpioa 7 GPIO_ACTIVE_HIGH> + , <&gpiob 0 GPIO_ACTIVE_HIGH> + , <&gpiob 13 GPIO_ACTIVE_HIGH> + , <&gpiob 15 GPIO_ACTIVE_HIGH> + , <&gpioa 8 GPIO_ACTIVE_HIGH> + , <&gpioa 15 GPIO_ACTIVE_HIGH> + , <&gpiob 3 GPIO_ACTIVE_HIGH> + , <&gpiob 4 GPIO_ACTIVE_HIGH> + , <&gpiob 5 GPIO_ACTIVE_HIGH> + , <&gpiob 8 GPIO_ACTIVE_HIGH> + , <&gpiob 9 GPIO_ACTIVE_HIGH> + , <&gpioc 13 GPIO_ACTIVE_HIGH> + , <&gpioc 14 GPIO_ACTIVE_HIGH> + ; + }; }; &usb { - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + 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/guides/dts/index.html#flash-partitions - */ - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; + /* + * For more information, see: + * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; - /* Set 6Kb of storage at the end of the 256Kb of flash */ - storage_partition: partition@3e800 { - label = "storage"; - reg = <0x0003e800 0x00001800>; - }; - }; + /* Set 6Kb of storage at the end of the 256Kb of flash */ + storage_partition: partition@3e800 { + label = "storage"; + reg = <0x0003e800 0x00001800>; + }; + }; }; diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1.keymap b/app/boards/arm/dz60rgb/dz60rgb_rev1.keymap index f95fce0e..e8cc6a7a 100644 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1.keymap +++ b/app/boards/arm/dz60rgb/dz60rgb_rev1.keymap @@ -2,10 +2,10 @@ #include / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { + default_layer { // ------------------------------------------------------------------------------------------ // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" | @@ -13,13 +13,13 @@ // | SHIFT | Z | X | C | V | B | N | M | , | . | SHIFT(/) | ^ | DEL | // | CTL | WIN | ALT | SPACE | ALT | MO(1) | <- | v | -> | // ------------------------------------------------------------------------------------------ - 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 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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &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 UP &kp DEL - &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp LEFT &kp DOWN &kp RIGHT - >; - }; - }; + 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 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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &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 UP &kp DEL + &kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp LEFT &kp DOWN &kp RIGHT + >; + }; + }; }; \ No newline at end of file diff --git a/app/boards/arm/ferris/Kconfig.board b/app/boards/arm/ferris/Kconfig.board index ad96271a..70ee895d 100644 --- a/app/boards/arm/ferris/Kconfig.board +++ b/app/boards/arm/ferris/Kconfig.board @@ -4,5 +4,5 @@ # SPDX-License-Identifier: MIT config BOARD_FERRIS - bool "Ferris rev 0.2" - depends on SOC_STM32F072XB + bool "Ferris rev 0.2" + depends on SOC_STM32F072XB diff --git a/app/boards/arm/ferris/Kconfig.defconfig b/app/boards/arm/ferris/Kconfig.defconfig index c59cb902..7cf43bcb 100644 --- a/app/boards/arm/ferris/Kconfig.defconfig +++ b/app/boards/arm/ferris/Kconfig.defconfig @@ -6,15 +6,15 @@ if BOARD_FERRIS config BOARD - default "ferris_rev02" + default "ferris_rev02" config ZMK_KEYBOARD_NAME - default "Ferris rev 0.2" + default "Ferris rev 0.2" config ZMK_USB - default y + default y config ZMK_KSCAN_MATRIX_POLLING - default y + default y endif # BOARD_FERRIS diff --git a/app/boards/arm/ferris/ferris_rev02.dts b/app/boards/arm/ferris/ferris_rev02.dts index 55055e9a..618a5591 100644 --- a/app/boards/arm/ferris/ferris_rev02.dts +++ b/app/boards/arm/ferris/ferris_rev02.dts @@ -11,153 +11,153 @@ #include / { - model = "Ferris rev0.2"; - compatible = "ferris,rev02", "st,stm32f072"; + model = "Ferris rev0.2"; + compatible = "ferris,rev02", "st,stm32f072"; - chosen { - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - zmk,kscan = &kscan; - zmk,matrix_transform = &transform; - /* TODO: Enable once we support the IC for underglow - zmk,underglow = &led_strip; - */ - }; + chosen { + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zmk,kscan = &kscan; + zmk,matrix_transform = &transform; + /* TODO: Enable once we support the IC for underglow + zmk,underglow = &led_strip; + */ + }; - transform: transform { - compatible = "zmk,matrix-transform"; - rows = <4>; - columns = <10>; + transform: transform { + compatible = "zmk,matrix-transform"; + rows = <4>; + columns = <10>; - 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,3) RC(3,4) RC(3,5) RC(3,6) - >; - }; + 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,3) RC(3,4) RC(3,5) RC(3,6) + >; + }; - kscan: kscan { - compatible = "zmk,kscan-composite"; - label = "KSCAN"; - rows = <4>; - columns = <10>; + kscan: kscan { + compatible = "zmk,kscan-composite"; + label = "KSCAN"; + rows = <4>; + columns = <10>; - left { - kscan = <&kscan_left>; - }; + left { + kscan = <&kscan_left>; + }; - right { - kscan = <&kscan_right>; - column-offset = <5>; - }; - }; + right { + kscan = <&kscan_right>; + column-offset = <5>; + }; + }; - kscan_left: kscan_left { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN_LEFT"; + kscan_left: kscan_left { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN_LEFT"; - diode-direction = "col2row"; + diode-direction = "col2row"; - col-gpios - = <&gpiob 8 (GPIO_ACTIVE_HIGH)> - , <&gpiob 4 (GPIO_ACTIVE_HIGH)> - , <&gpiob 3 (GPIO_ACTIVE_HIGH)> - , <&gpioa 15 (GPIO_ACTIVE_HIGH)> - , <&gpioa 14 (GPIO_ACTIVE_HIGH)> - ; - row-gpios - = <&gpiob 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpiob 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpiob 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpioa 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - }; + col-gpios + = <&gpiob 8 (GPIO_ACTIVE_HIGH)> + , <&gpiob 4 (GPIO_ACTIVE_HIGH)> + , <&gpiob 3 (GPIO_ACTIVE_HIGH)> + , <&gpioa 15 (GPIO_ACTIVE_HIGH)> + , <&gpioa 14 (GPIO_ACTIVE_HIGH)> + ; + row-gpios + = <&gpiob 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpiob 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpiob 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpioa 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; - kscan_right: kscan_right { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN_RIGHT"; + kscan_right: kscan_right { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN_RIGHT"; - diode-direction = "row2col"; + diode-direction = "row2col"; - col-gpios - = <&right_io 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&right_io 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&right_io 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&right_io 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&right_io 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; - row-gpios - = <&right_io 8 (GPIO_ACTIVE_LOW)> - , <&right_io 9 (GPIO_ACTIVE_LOW)> - , <&right_io 10 (GPIO_ACTIVE_LOW)> - , <&right_io 11 (GPIO_ACTIVE_LOW)> - ; - }; + col-gpios + = <&right_io 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&right_io 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&right_io 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&right_io 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&right_io 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + row-gpios + = <&right_io 8 (GPIO_ACTIVE_LOW)> + , <&right_io 9 (GPIO_ACTIVE_LOW)> + , <&right_io 10 (GPIO_ACTIVE_LOW)> + , <&right_io 11 (GPIO_ACTIVE_LOW)> + ; + }; }; &i2c2 { - pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; - pinctrl-names = "default"; - status = "okay"; - clock-frequency = ; + pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; + pinctrl-names = "default"; + status = "okay"; + clock-frequency = ; - right_io: mcp23017@20 { - compatible = "microchip,mcp230xx"; - status = "okay"; - gpio-controller; - reg = <0x20>; - #gpio-cells = <2>; - ngpios = <16>; - }; + right_io: mcp23017@20 { + compatible = "microchip,mcp230xx"; + status = "okay"; + gpio-controller; + reg = <0x20>; + #gpio-cells = <2>; + ngpios = <16>; + }; }; &usb { - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + status = "okay"; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; }; &clk_hsi { - status = "okay"; + status = "okay"; }; &pll { - prediv = <1>; - mul = <6>; - clocks = <&clk_hsi>; - status = "okay"; + prediv = <1>; + mul = <6>; + clocks = <&clk_hsi>; + status = "okay"; }; &rcc { - clocks = <&pll>; - clock-frequency = ; - ahb-prescaler = <1>; - apb1-prescaler = <1>; + clocks = <&pll>; + clock-frequency = ; + ahb-prescaler = <1>; + apb1-prescaler = <1>; }; &rtc { - status = "okay"; + status = "okay"; }; &flash0 { - /* - * For more information, see: - * http: //docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions - */ - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; + /* + * For more information, see: + * http: //docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; - /* Set 6Kb of storage at the end of the 128Kb of flash */ - storage_partition: partition@3e800 { - label = "storage"; - reg = <0x0001e800 0x00001800>; - }; - }; + /* Set 6Kb of storage at the end of the 128Kb of flash */ + storage_partition: partition@3e800 { + label = "storage"; + reg = <0x0001e800 0x00001800>; + }; + }; }; diff --git a/app/boards/arm/mikoto/Kconfig b/app/boards/arm/mikoto/Kconfig index 646d119c..71ec9411 100644 --- a/app/boards/arm/mikoto/Kconfig +++ b/app/boards/arm/mikoto/Kconfig @@ -1,12 +1,12 @@ config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on (BOARD_MIKOTO_520) + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on (BOARD_MIKOTO_520) choice BOARD_MIKOTO_CHARGER_CURRENT prompt "Charge current to supply to attached batteries" - depends on (BOARD_MIKOTO_520) + depends on (BOARD_MIKOTO_520) config BOARD_MIKOTO_CHARGER_CURRENT_40MA bool "40mA charge current, for battery capacity 40mAh or higher" diff --git a/app/boards/arm/mikoto/Kconfig.board b/app/boards/arm/mikoto/Kconfig.board index 067c2fbe..a872fa1f 100644 --- a/app/boards/arm/mikoto/Kconfig.board +++ b/app/boards/arm/mikoto/Kconfig.board @@ -4,5 +4,5 @@ # SPDX-License-Identifier: MIT config BOARD_MIKOTO_520 - bool "mikoto_520" - depends on SOC_NRF52840_QIAA + bool "mikoto_520" + depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/mikoto/Kconfig.defconfig b/app/boards/arm/mikoto/Kconfig.defconfig index 6aafc613..8c7746db 100644 --- a/app/boards/arm/mikoto/Kconfig.defconfig +++ b/app/boards/arm/mikoto/Kconfig.defconfig @@ -6,29 +6,29 @@ if BOARD_MIKOTO_520 config BOARD - default "mikoto" + default "mikoto" if USB config USB_NRFX - default y + default y config USB_DEVICE_STACK - default y + default y endif # USB config BT_CTLR - default BT + default BT config ZMK_BLE - default y + default y config ZMK_USB - default y + default y config PINMUX - default y + default y choice BOARD_MIKOTO_CHARGER_CURRENT default BOARD_MIKOTO_CHARGER_CURRENT_100MA diff --git a/app/boards/arm/mikoto/arduino_pro_micro_pins.dtsi b/app/boards/arm/mikoto/arduino_pro_micro_pins.dtsi index 7c5cd12f..ed6097ec 100644 --- a/app/boards/arm/mikoto/arduino_pro_micro_pins.dtsi +++ b/app/boards/arm/mikoto/arduino_pro_micro_pins.dtsi @@ -6,50 +6,50 @@ / { - pro_micro: connector { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio0 4 0> /* D0 */ - , <1 0 &gpio0 8 0> /* D1 */ - , <2 0 &gpio0 17 0> /* D2 */ - , <3 0 &gpio0 20 0> /* D3 */ - , <4 0 &gpio0 22 0> /* D4/A6 */ - , <5 0 &gpio0 24 0> /* D5 */ - , <6 0 &gpio1 0 0> /* D6/A7 */ - , <7 0 &gpio1 2 0> /* D7 */ - , <8 0 &gpio1 4 0> /* D8/A8 */ - , <9 0 &gpio1 6 0> /* D9/A9 */ - , <10 0 &gpio0 9 0> /* D10/A10 */ - , <16 0 &gpio0 10 0> /* D16 */ - , <14 0 &gpio1 13 0> /* D14 */ - , <15 0 &gpio0 2 0> /* D15 */ - , <18 0 &gpio0 29 0> /* D18/A0 */ - , <19 0 &gpio0 31 0> /* D19/A1 */ - , <20 0 &gpio0 25 0> /* D20/A2 */ - , <21 0 &gpio0 11 0> /* D21/A3 */ - ; - }; + pro_micro: connector { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 4 0> /* D0 */ + , <1 0 &gpio0 8 0> /* D1 */ + , <2 0 &gpio0 17 0> /* D2 */ + , <3 0 &gpio0 20 0> /* D3 */ + , <4 0 &gpio0 22 0> /* D4/A6 */ + , <5 0 &gpio0 24 0> /* D5 */ + , <6 0 &gpio1 0 0> /* D6/A7 */ + , <7 0 &gpio1 2 0> /* D7 */ + , <8 0 &gpio1 4 0> /* D8/A8 */ + , <9 0 &gpio1 6 0> /* D9/A9 */ + , <10 0 &gpio0 9 0> /* D10/A10 */ + , <16 0 &gpio0 10 0> /* D16 */ + , <14 0 &gpio1 13 0> /* D14 */ + , <15 0 &gpio0 2 0> /* D15 */ + , <18 0 &gpio0 29 0> /* D18/A0 */ + , <19 0 &gpio0 31 0> /* D19/A1 */ + , <20 0 &gpio0 25 0> /* D20/A2 */ + , <21 0 &gpio0 11 0> /* D21/A3 */ + ; + }; - pro_micro_a: connector_a { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio0 29 0> /* D18/A0 */ - , <1 0 &gpio0 31 0> /* D19/A1 */ - , <2 0 &gpio0 25 0> /* D20/A2 */ - , <3 0 &gpio0 11 0> /* D21/A3 */ - , <6 0 &gpio0 22 0> /* D4/A6 */ - , <7 0 &gpio1 0 0> /* D6/A7 */ - , <8 0 &gpio1 4 0> /* D8/A8 */ - , <9 0 &gpio1 6 0> /* D9/A9 */ - , <10 0 &gpio0 9 0> /* D10/A10 */ - ; - }; + pro_micro_a: connector_a { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 29 0> /* D18/A0 */ + , <1 0 &gpio0 31 0> /* D19/A1 */ + , <2 0 &gpio0 25 0> /* D20/A2 */ + , <3 0 &gpio0 11 0> /* D21/A3 */ + , <6 0 &gpio0 22 0> /* D4/A6 */ + , <7 0 &gpio1 0 0> /* D6/A7 */ + , <8 0 &gpio1 4 0> /* D8/A8 */ + , <9 0 &gpio1 6 0> /* D9/A9 */ + , <10 0 &gpio0 9 0> /* D10/A10 */ + ; + }; }; diff --git a/app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi b/app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi index 4a8ff82c..df43c407 100644 --- a/app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi +++ b/app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi @@ -4,36 +4,36 @@ */ &pinctrl { - uart0_default: uart0_default { - group1 { - psels = ; - bias-pull-up; - }; - group2 { - psels = ; - }; - }; + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; - uart0_sleep: uart0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; - i2c0_default: i2c0_default { - group1 { - psels = , - ; - }; - }; + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; - i2c0_sleep: i2c0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; }; diff --git a/app/boards/arm/mikoto/mikoto_520.dts b/app/boards/arm/mikoto/mikoto_520.dts index 3fff0835..f8007033 100644 --- a/app/boards/arm/mikoto/mikoto_520.dts +++ b/app/boards/arm/mikoto/mikoto_520.dts @@ -10,117 +10,117 @@ #include "mikoto_520-pinctrl.dtsi" / { - model = "mikoto"; - compatible = "zhiayang,mikoto"; + model = "mikoto"; + compatible = "zhiayang,mikoto"; - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - zmk,battery = &vbatt; - }; + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zmk,battery = &vbatt; + }; - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; - ext-power { - compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; - control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; - init-delay-ms = <50>; - }; + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + init-delay-ms = <50>; + }; - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; - io-channels = <&adc 1>; - output-ohms = <10000000>; - full-ohms = <(10000000 + 4000000)>; - }; + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 1>; + output-ohms = <10000000>; + full-ohms = <(10000000 + 4000000)>; + }; }; &adc { - status = "okay"; + status = "okay"; }; &gpiote { - status = "okay"; + status = "okay"; }; &gpio0 { - status = "okay"; + status = "okay"; }; &gpio1 { - status = "okay"; + status = "okay"; }; &i2c0 { - compatible = "nordic,nrf-twi"; - pinctrl-0 = <&i2c0_default>; - pinctrl-1 = <&i2c0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-twi"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { - compatible = "nordic,nrf-uarte"; - current-speed = <115200>; - pinctrl-0 = <&uart0_default>; - pinctrl-1 = <&uart0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-uarte"; + current-speed = <115200>; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + 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>; + /* + * 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>; - }; + 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. - */ + /* + * 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>; - }; + /* + * 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>; - }; - }; + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; }; diff --git a/app/boards/arm/nice60/Kconfig b/app/boards/arm/nice60/Kconfig index db7cf398..dfca4f1b 100644 --- a/app/boards/arm/nice60/Kconfig +++ b/app/boards/arm/nice60/Kconfig @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on BOARD_NICE60 + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on BOARD_NICE60 diff --git a/app/boards/arm/nice60/Kconfig.board b/app/boards/arm/nice60/Kconfig.board index 778f79eb..88db9ee8 100644 --- a/app/boards/arm/nice60/Kconfig.board +++ b/app/boards/arm/nice60/Kconfig.board @@ -2,5 +2,5 @@ # SPDX-License-Identifier: MIT config BOARD_NICE60 - bool "nice!60" - depends on SOC_NRF52840_QIAA + bool "nice!60" + depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/nice60/Kconfig.defconfig b/app/boards/arm/nice60/Kconfig.defconfig index 39cf1540..f3347df9 100644 --- a/app/boards/arm/nice60/Kconfig.defconfig +++ b/app/boards/arm/nice60/Kconfig.defconfig @@ -4,22 +4,22 @@ if BOARD_NICE60 config ZMK_KEYBOARD_NAME - default "nice!60" + default "nice!60" if USB_DEVICE_STACK config USB_NRFX - default y + default y endif # USB_DEVICE_STACK config BT_CTLR - default BT + default BT config ZMK_BLE - default y + default y config ZMK_USB - default y + default y endif # BOARD_NICE60 diff --git a/app/boards/arm/nice60/nice60-pinctrl.dtsi b/app/boards/arm/nice60/nice60-pinctrl.dtsi index ace80f10..9b0e198d 100644 --- a/app/boards/arm/nice60/nice60-pinctrl.dtsi +++ b/app/boards/arm/nice60/nice60-pinctrl.dtsi @@ -4,9 +4,9 @@ */ &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; }; diff --git a/app/boards/arm/nice60/nice60.dts b/app/boards/arm/nice60/nice60.dts index fdc65d6b..651dd555 100644 --- a/app/boards/arm/nice60/nice60.dts +++ b/app/boards/arm/nice60/nice60.dts @@ -13,170 +13,170 @@ #include "nice60-pinctrl.dtsi" / { - model = "nice!60"; - compatible = "nice,60"; + model = "nice!60"; + compatible = "nice,60"; - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - zmk,battery = &vbatt; - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - zmk,underglow = &led_strip; - }; + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zmk,battery = &vbatt; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + zmk,underglow = &led_strip; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <14>; - rows = <5>; - map = < + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <5>; + 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(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(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,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,13) RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(4,9) RC(4,10) RC(4,11) RC(4,13) - >; - }; + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio1 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - col-gpios - = <&gpio1 15 GPIO_ACTIVE_HIGH> - , <&gpio0 29 GPIO_ACTIVE_HIGH> - , <&gpio0 31 GPIO_ACTIVE_HIGH> - , <&gpio0 30 GPIO_ACTIVE_HIGH> - , <&gpio0 28 GPIO_ACTIVE_HIGH> - , <&gpio0 2 GPIO_ACTIVE_HIGH> - , <&gpio0 3 GPIO_ACTIVE_HIGH> - , <&gpio1 3 GPIO_ACTIVE_HIGH> - , <&gpio1 7 GPIO_ACTIVE_HIGH> - , <&gpio1 4 GPIO_ACTIVE_HIGH> - , <&gpio1 6 GPIO_ACTIVE_HIGH> - , <&gpio1 5 GPIO_ACTIVE_HIGH> - , <&gpio1 1 GPIO_ACTIVE_HIGH> - , <&gpio1 2 GPIO_ACTIVE_HIGH> - ; - }; + diode-direction = "col2row"; + row-gpios + = <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + col-gpios + = <&gpio1 15 GPIO_ACTIVE_HIGH> + , <&gpio0 29 GPIO_ACTIVE_HIGH> + , <&gpio0 31 GPIO_ACTIVE_HIGH> + , <&gpio0 30 GPIO_ACTIVE_HIGH> + , <&gpio0 28 GPIO_ACTIVE_HIGH> + , <&gpio0 2 GPIO_ACTIVE_HIGH> + , <&gpio0 3 GPIO_ACTIVE_HIGH> + , <&gpio1 3 GPIO_ACTIVE_HIGH> + , <&gpio1 7 GPIO_ACTIVE_HIGH> + , <&gpio1 4 GPIO_ACTIVE_HIGH> + , <&gpio1 6 GPIO_ACTIVE_HIGH> + , <&gpio1 5 GPIO_ACTIVE_HIGH> + , <&gpio1 1 GPIO_ACTIVE_HIGH> + , <&gpio1 2 GPIO_ACTIVE_HIGH> + ; + }; - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; - ext-power { - compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; - control-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; - }; + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + control-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; + }; - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; - io-channels = <&adc 2>; - output-ohms = <2000000>; - full-ohms = <(2000000 + 806000)>; - }; + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 2>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 806000)>; + }; }; &adc { - status = "okay"; + status = "okay"; }; &gpiote { - status = "okay"; + status = "okay"; }; &gpio0 { - status = "okay"; + status = "okay"; }; &gpio1 { - status = "okay"; + status = "okay"; }; &spi3 { - compatible = "nordic,nrf-spim"; + compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi3_default>; - pinctrl-names = "default"; - status = "okay"; + pinctrl-0 = <&spi3_default>; + pinctrl-names = "default"; + status = "okay"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <12>; /* LED strip length */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - color-mapping = ; - }; + /* WS2812 */ + chain-length = <12>; /* LED strip length */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; }; &usbd { - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + 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>; + /* + * 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 = "mbr"; - reg = <0x00000000 0x00001000>; - }; + sd_partition: partition@0 { + label = "mbr"; + reg = <0x00000000 0x00001000>; + }; - code_partition: partition@1000 { - label = "code_partition"; - reg = <0x00001000 0x000d3000>; - }; + code_partition: partition@1000 { + label = "code_partition"; + reg = <0x00001000 0x000d3000>; + }; - /* - * The flash starting at 0x000d4000 and ending at - * 0x000f3fff is reserved for use by the application. - */ + /* + * The flash starting at 0x000d4000 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@d4000 { - label = "storage"; - reg = <0x000d4000 0x00020000>; - }; + /* + * Storage partition will be used by FCB/LittleFS/NVS + * if enabled. + */ + storage_partition: partition@d4000 { + label = "storage"; + reg = <0x000d4000 0x00020000>; + }; - boot_partition: partition@f4000 { - label = "adafruit_boot"; - reg = <0x000f4000 0x0000c000>; - }; - }; + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; }; diff --git a/app/boards/arm/nice60/nice60.keymap b/app/boards/arm/nice60/nice60.keymap index edfec32e..3a357163 100644 --- a/app/boards/arm/nice60/nice60.keymap +++ b/app/boards/arm/nice60/nice60.keymap @@ -10,10 +10,10 @@ #include / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { + default_layer { // ------------------------------------------------------------------------------------------ // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" | @@ -21,16 +21,16 @@ // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | // | CTL | WIN | ALT | SPACE | ALT | WIN | MO(1) | CTL | // ------------------------------------------------------------------------------------------ - bindings = < - &gresc &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 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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET - &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 LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RGUI &mo 1 &kp RCTRL - >; - }; + bindings = < + &gresc &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 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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET + &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 LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RGUI &mo 1 &kp RCTRL + >; + }; - rgb_layer { + rgb_layer { // ------------------------------------------------------------------------------------------------ // | BT CLR | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | EFFECT REV | // | BT 1 | | UP | | HUEUP | SATUP | BRIUP | SPDUP | | | | | | | @@ -38,13 +38,13 @@ // | BT 3 | | | | | | | | | | | | // | BT 4 | | | TOG RGB | PRT SCR | | | DEL | // ------------------------------------------------------------------------------------------------ - bindings = < - &bt BT_CLR &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &rgb_ug RGB_EFR - &bt BT_SEL 0 &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &trans &trans &trans &trans &trans &trans - &bt BT_SEL 1 &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &trans &trans &trans &trans &rgb_ug RGB_EFF - &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &bt BT_SEL 3 &trans &trans &rgb_ug RGB_TOG &kp PSCRN &trans &trans &kp DEL - >; - }; - }; + bindings = < + &bt BT_CLR &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &rgb_ug RGB_EFR + &bt BT_SEL 0 &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &trans &trans &trans &trans &trans &trans + &bt BT_SEL 1 &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &trans &trans &trans &trans &rgb_ug RGB_EFF + &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &bt BT_SEL 3 &trans &trans &rgb_ug RGB_TOG &kp PSCRN &trans &trans &kp DEL + >; + }; + }; }; diff --git a/app/boards/arm/nice_nano/Kconfig b/app/boards/arm/nice_nano/Kconfig index 0c9fbc79..ac6828a4 100644 --- a/app/boards/arm/nice_nano/Kconfig +++ b/app/boards/arm/nice_nano/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: MIT config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on (BOARD_NICE_NANO || BOARD_NICE_NANO_V2) + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on (BOARD_NICE_NANO || BOARD_NICE_NANO_V2) diff --git a/app/boards/arm/nice_nano/Kconfig.board b/app/boards/arm/nice_nano/Kconfig.board index 4a80b448..8dd16512 100644 --- a/app/boards/arm/nice_nano/Kconfig.board +++ b/app/boards/arm/nice_nano/Kconfig.board @@ -4,10 +4,10 @@ # SPDX-License-Identifier: MIT config BOARD_NICE_NANO - bool "nice!nano" - depends on SOC_NRF52840_QIAA + bool "nice!nano" + depends on SOC_NRF52840_QIAA config BOARD_NICE_NANO_V2 - bool "nice!nano v2" - depends on SOC_NRF52840_QIAA + bool "nice!nano v2" + depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/nice_nano/Kconfig.defconfig b/app/boards/arm/nice_nano/Kconfig.defconfig index ad3fefef..ada59dd9 100644 --- a/app/boards/arm/nice_nano/Kconfig.defconfig +++ b/app/boards/arm/nice_nano/Kconfig.defconfig @@ -4,22 +4,22 @@ if BOARD_NICE_NANO || BOARD_NICE_NANO_V2 config BOARD - default "nice_nano" + default "nice_nano" if USB_DEVICE_STACK config USB_NRFX - default y + default y endif # USB_DEVICE_STACK config BT_CTLR - default BT + default BT config ZMK_BLE - default y + default y config ZMK_USB - default y + default y endif # BOARD_NICE_NANO || BOARD_NICE_NANO_V2 diff --git a/app/boards/arm/nice_nano/arduino_pro_micro_pins.dtsi b/app/boards/arm/nice_nano/arduino_pro_micro_pins.dtsi index b972451b..f1b569c0 100644 --- a/app/boards/arm/nice_nano/arduino_pro_micro_pins.dtsi +++ b/app/boards/arm/nice_nano/arduino_pro_micro_pins.dtsi @@ -5,50 +5,50 @@ */ / { - pro_micro: connector { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio0 8 0> /* D0 */ - , <1 0 &gpio0 6 0> /* D1 */ - , <2 0 &gpio0 17 0> /* D2 */ - , <3 0 &gpio0 20 0> /* D3 */ - , <4 0 &gpio0 22 0> /* D4/A6 */ - , <5 0 &gpio0 24 0> /* D5 */ - , <6 0 &gpio1 0 0> /* D6/A7 */ - , <7 0 &gpio0 11 0> /* D7 */ - , <8 0 &gpio1 4 0> /* D8/A8 */ - , <9 0 &gpio1 6 0> /* D9/A9 */ - , <10 0 &gpio0 9 0> /* D10/A10 */ - , <16 0 &gpio0 10 0> /* D16 */ - , <14 0 &gpio1 11 0> /* D14 */ - , <15 0 &gpio1 13 0> /* D15 */ - , <18 0 &gpio1 15 0> /* D18/A0 */ - , <19 0 &gpio0 2 0> /* D19/A1 */ - , <20 0 &gpio0 29 0> /* D20/A2 */ - , <21 0 &gpio0 31 0> /* D21/A3 */ - ; - }; + pro_micro: connector { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 8 0> /* D0 */ + , <1 0 &gpio0 6 0> /* D1 */ + , <2 0 &gpio0 17 0> /* D2 */ + , <3 0 &gpio0 20 0> /* D3 */ + , <4 0 &gpio0 22 0> /* D4/A6 */ + , <5 0 &gpio0 24 0> /* D5 */ + , <6 0 &gpio1 0 0> /* D6/A7 */ + , <7 0 &gpio0 11 0> /* D7 */ + , <8 0 &gpio1 4 0> /* D8/A8 */ + , <9 0 &gpio1 6 0> /* D9/A9 */ + , <10 0 &gpio0 9 0> /* D10/A10 */ + , <16 0 &gpio0 10 0> /* D16 */ + , <14 0 &gpio1 11 0> /* D14 */ + , <15 0 &gpio1 13 0> /* D15 */ + , <18 0 &gpio1 15 0> /* D18/A0 */ + , <19 0 &gpio0 2 0> /* D19/A1 */ + , <20 0 &gpio0 29 0> /* D20/A2 */ + , <21 0 &gpio0 31 0> /* D21/A3 */ + ; + }; - pro_micro_a: connector_a { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio1 15 0> /* D18/A0 */ - , <1 0 &gpio0 2 0> /* D19/A1 */ - , <2 0 &gpio0 29 0> /* D20/A2 */ - , <3 0 &gpio0 31 0> /* D21/A3 */ - , <6 0 &gpio0 22 0> /* D4/A6 */ - , <7 0 &gpio1 0 0> /* D6/A7 */ - , <8 0 &gpio1 4 0> /* D8/A8 */ - , <9 0 &gpio1 6 0> /* D9/A9 */ - , <10 0 &gpio0 9 0> /* D10/A10 */ - ; - }; + pro_micro_a: connector_a { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio1 15 0> /* D18/A0 */ + , <1 0 &gpio0 2 0> /* D19/A1 */ + , <2 0 &gpio0 29 0> /* D20/A2 */ + , <3 0 &gpio0 31 0> /* D21/A3 */ + , <6 0 &gpio0 22 0> /* D4/A6 */ + , <7 0 &gpio1 0 0> /* D6/A7 */ + , <8 0 &gpio1 4 0> /* D8/A8 */ + , <9 0 &gpio1 6 0> /* D9/A9 */ + , <10 0 &gpio0 9 0> /* D10/A10 */ + ; + }; }; pro_micro_d: &pro_micro {}; diff --git a/app/boards/arm/nice_nano/nice_nano-pinctrl.dtsi b/app/boards/arm/nice_nano/nice_nano-pinctrl.dtsi index 18b90f21..15c48509 100644 --- a/app/boards/arm/nice_nano/nice_nano-pinctrl.dtsi +++ b/app/boards/arm/nice_nano/nice_nano-pinctrl.dtsi @@ -4,36 +4,36 @@ */ &pinctrl { - uart0_default: uart0_default { - group1 { - psels = ; - bias-pull-up; - }; - group2 { - psels = ; - }; - }; + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; - uart0_sleep: uart0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; - i2c0_default: i2c0_default { - group1 { - psels = , - ; - }; - }; + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; - i2c0_sleep: i2c0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; }; diff --git a/app/boards/arm/nice_nano/nice_nano.dts b/app/boards/arm/nice_nano/nice_nano.dts index e29df205..4ee0df7f 100644 --- a/app/boards/arm/nice_nano/nice_nano.dts +++ b/app/boards/arm/nice_nano/nice_nano.dts @@ -8,21 +8,21 @@ #include "nice_nano.dtsi" / { - chosen { - zmk,battery = &vbatt; - }; + chosen { + zmk,battery = &vbatt; + }; - ext-power { - compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; - control-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; - }; + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + control-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + }; - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; - io-channels = <&adc 2>; - output-ohms = <2000000>; - full-ohms = <(2000000 + 806000)>; - }; + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 2>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 806000)>; + }; }; diff --git a/app/boards/arm/nice_nano/nice_nano.dtsi b/app/boards/arm/nice_nano/nice_nano.dtsi index ad5ef278..0c0a3823 100644 --- a/app/boards/arm/nice_nano/nice_nano.dtsi +++ b/app/boards/arm/nice_nano/nice_nano.dtsi @@ -9,101 +9,101 @@ #include "arduino_pro_micro_pins.dtsi" / { - model = "nice!nano"; - compatible = "nice,nano"; + model = "nice!nano"; + compatible = "nice,nano"; - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - }; + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + }; - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; }; &adc { - status = "okay"; + status = "okay"; }; &gpiote { - status = "okay"; + status = "okay"; }; &gpio0 { - status = "okay"; + status = "okay"; }; &gpio1 { - status = "okay"; + status = "okay"; }; &i2c0 { - compatible = "nordic,nrf-twi"; - pinctrl-0 = <&i2c0_default>; - pinctrl-1 = <&i2c0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-twi"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { - compatible = "nordic,nrf-uarte"; - current-speed = <115200>; - pinctrl-0 = <&uart0_default>; - pinctrl-1 = <&uart0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-uarte"; + current-speed = <115200>; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + 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>; + /* + * 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>; - }; + 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. - */ + /* + * 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>; - }; + /* + * 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>; - }; - }; + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; }; diff --git a/app/boards/arm/nice_nano/nice_nano_v2.dts b/app/boards/arm/nice_nano/nice_nano_v2.dts index ed2b35f4..b2fbcc81 100644 --- a/app/boards/arm/nice_nano/nice_nano_v2.dts +++ b/app/boards/arm/nice_nano/nice_nano_v2.dts @@ -8,19 +8,19 @@ #include "nice_nano.dtsi" / { - chosen { - zmk,battery = &vbatt; - }; + chosen { + zmk,battery = &vbatt; + }; - ext-power { - compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; - control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; - init-delay-ms = <50>; - }; + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + init-delay-ms = <50>; + }; - vbatt: vbatt { - compatible = "zmk,battery-nrf-vddh"; - label = "BATTERY"; - }; + vbatt: vbatt { + compatible = "zmk,battery-nrf-vddh"; + label = "BATTERY"; + }; }; diff --git a/app/boards/arm/nrf52840_m2/Kconfig b/app/boards/arm/nrf52840_m2/Kconfig index c7edeb8d..c9cb6523 100644 --- a/app/boards/arm/nrf52840_m2/Kconfig +++ b/app/boards/arm/nrf52840_m2/Kconfig @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on BOARD_NRF52840_M2 + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on BOARD_NRF52840_M2 diff --git a/app/boards/arm/nrf52840_m2/Kconfig.board b/app/boards/arm/nrf52840_m2/Kconfig.board index 49901039..b2927ff2 100644 --- a/app/boards/arm/nrf52840_m2/Kconfig.board +++ b/app/boards/arm/nrf52840_m2/Kconfig.board @@ -4,6 +4,6 @@ # SPDX-License-Identifier: MIT config BOARD_NRF52840_M2 - bool "nrf52480_m2" - depends on SOC_NRF52840_QIAA + bool "nrf52480_m2" + depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/nrf52840_m2/Kconfig.defconfig b/app/boards/arm/nrf52840_m2/Kconfig.defconfig index 4e1679ba..50a049bb 100644 --- a/app/boards/arm/nrf52840_m2/Kconfig.defconfig +++ b/app/boards/arm/nrf52840_m2/Kconfig.defconfig @@ -4,22 +4,22 @@ if BOARD_NRF52840_M2 config BOARD - default "nrf52480_m2" + default "nrf52480_m2" if USB_DEVICE_STACK config USB_NRFX - default y + default y endif # USB_DEVICE_STACK config BT_CTLR - default BT + default BT config ZMK_BLE - default y + default y config ZMK_USB - default y + default y endif # BOARD_NRF52840_M2 diff --git a/app/boards/arm/nrf52840_m2/nrf52840_m2.dts b/app/boards/arm/nrf52840_m2/nrf52840_m2.dts index dc22c40b..253e6b77 100644 --- a/app/boards/arm/nrf52840_m2/nrf52840_m2.dts +++ b/app/boards/arm/nrf52840_m2/nrf52840_m2.dts @@ -8,105 +8,105 @@ #include / { - model = "Makerdiary nRF52840 M.2 module"; - compatible = "makerdiary,nrf52840_m2"; + model = "Makerdiary nRF52840 M.2 module"; + compatible = "makerdiary,nrf52840_m2"; - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - zmk,battery = &vbatt; - }; + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zmk,battery = &vbatt; + }; - leds { - compatible = "gpio-leds"; - red_led: led_0 { - gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>; - label = "Red LED"; - }; - green_led: led_1 { - gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; - label = "Green LED"; - }; - blue_led: led_2 { - gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; + leds { + compatible = "gpio-leds"; + red_led: led_0 { + gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>; + label = "Red LED"; + }; + green_led: led_1 { + gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; + label = "Green LED"; + }; + blue_led: led_2 { + gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; - io-channels = <&adc 0>; - output-ohms = <1000000>; - full-ohms = <(1000000 + 1000000)>; - }; + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 0>; + output-ohms = <1000000>; + full-ohms = <(1000000 + 1000000)>; + }; }; &adc { - status = "okay"; + status = "okay"; }; &gpiote { - status = "okay"; + status = "okay"; }; &gpio0 { - status = "okay"; + status = "okay"; }; &gpio1 { - status = "okay"; + status = "okay"; }; &usbd { - compatible = "nordic,nrf-usbd"; - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + compatible = "nordic,nrf-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>; + /* + * 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>; - }; + 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. - */ + /* + * 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>; - }; + /* + * 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>; - }; - }; + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; }; diff --git a/app/boards/arm/nrfmicro/Kconfig b/app/boards/arm/nrfmicro/Kconfig index 12b06621..233ddbad 100644 --- a/app/boards/arm/nrfmicro/Kconfig +++ b/app/boards/arm/nrfmicro/Kconfig @@ -1,10 +1,10 @@ config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on (BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833) + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on (BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833) config BOARD_NRFMICRO_CHARGER - bool "Enable battery charger" - default y - depends on (BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833) + bool "Enable battery charger" + default y + depends on (BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833) diff --git a/app/boards/arm/nrfmicro/Kconfig.board b/app/boards/arm/nrfmicro/Kconfig.board index 244242a9..441de5cf 100644 --- a/app/boards/arm/nrfmicro/Kconfig.board +++ b/app/boards/arm/nrfmicro/Kconfig.board @@ -4,17 +4,17 @@ # SPDX-License-Identifier: MIT config BOARD_NRFMICRO_11 - bool "nrfmicro_11" - depends on SOC_NRF52840_QIAA + bool "nrfmicro_11" + depends on SOC_NRF52840_QIAA config BOARD_NRFMICRO_11_FLIPPED - bool "nrfmicro_11_flipped" - depends on SOC_NRF52840_QIAA + bool "nrfmicro_11_flipped" + depends on SOC_NRF52840_QIAA config BOARD_NRFMICRO_13 - bool "nrfmicro_13" - depends on SOC_NRF52840_QIAA + bool "nrfmicro_13" + depends on SOC_NRF52840_QIAA config BOARD_NRFMICRO_13_52833 - bool "nrfmicro_13_52833" - depends on SOC_NRF52833_QIAA + bool "nrfmicro_13_52833" + depends on SOC_NRF52833_QIAA diff --git a/app/boards/arm/nrfmicro/Kconfig.defconfig b/app/boards/arm/nrfmicro/Kconfig.defconfig index 751d592b..7d752ac6 100644 --- a/app/boards/arm/nrfmicro/Kconfig.defconfig +++ b/app/boards/arm/nrfmicro/Kconfig.defconfig @@ -6,31 +6,31 @@ if BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833 config BOARD - default "nrfmicro" + default "nrfmicro" if USB_DEVICE_STACK config USB_NRFX - default y + default y endif # USB_DEVICE_STACK config BT_CTLR - default BT + default BT config ZMK_BLE - default y + default y config ZMK_USB - default y + default y config PINMUX - default y + default y -if BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833 +if BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833 config BOARD_NRFMICRO_CHARGER - default y + default y endif # BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833 diff --git a/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi b/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi index 537aaed3..01e342c0 100644 --- a/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi +++ b/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi @@ -6,50 +6,50 @@ / { - pro_micro: connector { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio0 8 0> /* D0 */ - , <1 0 &gpio0 6 0> /* D1 */ - , <2 0 &gpio0 15 0> /* D2 */ - , <3 0 &gpio0 17 0> /* D3 */ - , <4 0 &gpio0 20 0> /* D4/A6 */ - , <5 0 &gpio0 13 0> /* D5 */ - , <6 0 &gpio0 24 0> /* D6/A7 */ - , <7 0 &gpio0 9 0> /* D7 */ - , <8 0 &gpio0 10 0> /* D8/A8 */ - , <9 0 &gpio1 6 0> /* D9/A9 */ - , <10 0 &gpio1 11 0> /* D10/A10 */ - , <16 0 &gpio0 28 0> /* D16 */ - , <14 0 &gpio0 3 0> /* D14 */ - , <15 0 &gpio1 13 0> /* D15 */ - , <18 0 &gpio0 2 0> /* D18/A0 */ - , <19 0 &gpio0 29 0> /* D19/A1 */ - , <20 0 &gpio0 31 0> /* D20/A2 */ - , <21 0 &gpio0 30 0> /* D21/A3 */ - ; - }; + pro_micro: connector { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 8 0> /* D0 */ + , <1 0 &gpio0 6 0> /* D1 */ + , <2 0 &gpio0 15 0> /* D2 */ + , <3 0 &gpio0 17 0> /* D3 */ + , <4 0 &gpio0 20 0> /* D4/A6 */ + , <5 0 &gpio0 13 0> /* D5 */ + , <6 0 &gpio0 24 0> /* D6/A7 */ + , <7 0 &gpio0 9 0> /* D7 */ + , <8 0 &gpio0 10 0> /* D8/A8 */ + , <9 0 &gpio1 6 0> /* D9/A9 */ + , <10 0 &gpio1 11 0> /* D10/A10 */ + , <16 0 &gpio0 28 0> /* D16 */ + , <14 0 &gpio0 3 0> /* D14 */ + , <15 0 &gpio1 13 0> /* D15 */ + , <18 0 &gpio0 2 0> /* D18/A0 */ + , <19 0 &gpio0 29 0> /* D19/A1 */ + , <20 0 &gpio0 31 0> /* D20/A2 */ + , <21 0 &gpio0 30 0> /* D21/A3 */ + ; + }; - pro_micro_a: connector_a { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio0 2 0> /* D18/A0 */ - , <1 0 &gpio0 29 0> /* D19/A1 */ - , <2 0 &gpio0 31 0> /* D20/A2 */ - , <3 0 &gpio0 30 0> /* D21/A3 */ - , <6 0 &gpio0 20 0> /* D4/A6 */ - , <7 0 &gpio0 24 0> /* D6/A7 */ - , <8 0 &gpio0 10 0> /* D8/A8 */ - , <9 0 &gpio1 6 0> /* D9/A9 */ - , <10 0 &gpio1 11 0> /* D10/A10 */ - ; - }; + pro_micro_a: connector_a { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 2 0> /* D18/A0 */ + , <1 0 &gpio0 29 0> /* D19/A1 */ + , <2 0 &gpio0 31 0> /* D20/A2 */ + , <3 0 &gpio0 30 0> /* D21/A3 */ + , <6 0 &gpio0 20 0> /* D4/A6 */ + , <7 0 &gpio0 24 0> /* D6/A7 */ + , <8 0 &gpio0 10 0> /* D8/A8 */ + , <9 0 &gpio1 6 0> /* D9/A9 */ + , <10 0 &gpio1 11 0> /* D10/A10 */ + ; + }; }; diff --git a/app/boards/arm/nrfmicro/arduino_pro_micro_pins_52833.dtsi b/app/boards/arm/nrfmicro/arduino_pro_micro_pins_52833.dtsi index 651edb94..76ece25f 100644 --- a/app/boards/arm/nrfmicro/arduino_pro_micro_pins_52833.dtsi +++ b/app/boards/arm/nrfmicro/arduino_pro_micro_pins_52833.dtsi @@ -6,50 +6,50 @@ / { - pro_micro: connector { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio0 8 0> /* D0 */ - , <1 0 &gpio0 6 0> /* D1 */ - , <2 0 &gpio0 15 0> /* D2 */ - , <3 0 &gpio0 17 0> /* D3 */ - , <4 0 &gpio0 20 0> /* D4/A6 */ - , <5 0 &gpio0 13 0> /* D5 */ - , <6 0 &gpio0 24 0> /* D6/A7 */ - , <7 0 &gpio0 9 0> /* D7 */ - , <8 0 &gpio0 10 0> /* D8/A8 */ - , <9 0 &gpio1 6 0> /* D9/A9 */ - , <10 0 &gpio1 4 0> /* D10/A10 */ - , <16 0 &gpio0 28 0> /* D16 */ - , <14 0 &gpio0 3 0> /* D14 */ - , <15 0 &gpio1 5 0> /* D15 */ - , <18 0 &gpio0 2 0> /* D18/A0 */ - , <19 0 &gpio0 29 0> /* D19/A1 */ - , <20 0 &gpio0 31 0> /* D20/A2 */ - , <21 0 &gpio0 30 0> /* D21/A3 */ - ; - }; + pro_micro: connector { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 8 0> /* D0 */ + , <1 0 &gpio0 6 0> /* D1 */ + , <2 0 &gpio0 15 0> /* D2 */ + , <3 0 &gpio0 17 0> /* D3 */ + , <4 0 &gpio0 20 0> /* D4/A6 */ + , <5 0 &gpio0 13 0> /* D5 */ + , <6 0 &gpio0 24 0> /* D6/A7 */ + , <7 0 &gpio0 9 0> /* D7 */ + , <8 0 &gpio0 10 0> /* D8/A8 */ + , <9 0 &gpio1 6 0> /* D9/A9 */ + , <10 0 &gpio1 4 0> /* D10/A10 */ + , <16 0 &gpio0 28 0> /* D16 */ + , <14 0 &gpio0 3 0> /* D14 */ + , <15 0 &gpio1 5 0> /* D15 */ + , <18 0 &gpio0 2 0> /* D18/A0 */ + , <19 0 &gpio0 29 0> /* D19/A1 */ + , <20 0 &gpio0 31 0> /* D20/A2 */ + , <21 0 &gpio0 30 0> /* D21/A3 */ + ; + }; - pro_micro_a: connector_a { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio0 2 0> /* D18/A0 */ - , <1 0 &gpio0 29 0> /* D19/A1 */ - , <2 0 &gpio0 31 0> /* D20/A2 */ - , <3 0 &gpio0 30 0> /* D21/A3 */ - , <6 0 &gpio0 20 0> /* D4/A6 */ - , <7 0 &gpio0 24 0> /* D6/A7 */ - , <8 0 &gpio0 10 0> /* D8/A8 */ - , <9 0 &gpio1 6 0> /* D9/A9 */ - , <10 0 &gpio1 11 0> /* D10/A10 */ - ; - }; + pro_micro_a: connector_a { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 2 0> /* D18/A0 */ + , <1 0 &gpio0 29 0> /* D19/A1 */ + , <2 0 &gpio0 31 0> /* D20/A2 */ + , <3 0 &gpio0 30 0> /* D21/A3 */ + , <6 0 &gpio0 20 0> /* D4/A6 */ + , <7 0 &gpio0 24 0> /* D6/A7 */ + , <8 0 &gpio0 10 0> /* D8/A8 */ + , <9 0 &gpio1 6 0> /* D9/A9 */ + , <10 0 &gpio1 11 0> /* D10/A10 */ + ; + }; }; diff --git a/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi b/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi index 887a3144..923efbbf 100644 --- a/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi +++ b/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi @@ -5,50 +5,50 @@ */ / { - pro_micro: connector { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio0 8 0> /* D0 */ - , <1 0 &gpio0 6 0> /* D1 */ - , <2 0 &gpio0 30 0> /* D2 */ - , <3 0 &gpio0 31 0> /* D3 */ - , <4 0 &gpio0 29 0> /* D4/A6 */ - , <5 0 &gpio0 2 0> /* D5 */ - , <6 0 &gpio1 13 0> /* D6/A7 */ - , <7 0 &gpio0 3 0> /* D7 */ - , <8 0 &gpio0 28 0> /* D8/A8 */ - , <9 0 &gpio1 11 0> /* D9/A9 */ - , <10 0 &gpio1 6 0> /* D10/A10 */ - , <16 0 &gpio0 10 0> /* D16 */ - , <14 0 &gpio0 9 0> /* D14 */ - , <15 0 &gpio0 24 0> /* D15 */ - , <18 0 &gpio0 13 0> /* D18/A0 */ - , <19 0 &gpio0 20 0> /* D19/A1 */ - , <20 0 &gpio0 17 0> /* D20/A2 */ - , <21 0 &gpio0 15 0> /* D21/A3 */ - ; - }; + pro_micro: connector { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 8 0> /* D0 */ + , <1 0 &gpio0 6 0> /* D1 */ + , <2 0 &gpio0 30 0> /* D2 */ + , <3 0 &gpio0 31 0> /* D3 */ + , <4 0 &gpio0 29 0> /* D4/A6 */ + , <5 0 &gpio0 2 0> /* D5 */ + , <6 0 &gpio1 13 0> /* D6/A7 */ + , <7 0 &gpio0 3 0> /* D7 */ + , <8 0 &gpio0 28 0> /* D8/A8 */ + , <9 0 &gpio1 11 0> /* D9/A9 */ + , <10 0 &gpio1 6 0> /* D10/A10 */ + , <16 0 &gpio0 10 0> /* D16 */ + , <14 0 &gpio0 9 0> /* D14 */ + , <15 0 &gpio0 24 0> /* D15 */ + , <18 0 &gpio0 13 0> /* D18/A0 */ + , <19 0 &gpio0 20 0> /* D19/A1 */ + , <20 0 &gpio0 17 0> /* D20/A2 */ + , <21 0 &gpio0 15 0> /* D21/A3 */ + ; + }; - pro_micro_a: connector_a { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio0 13 0> /* D18/A0 */ - , <1 0 &gpio0 20 0> /* D19/A1 */ - , <2 0 &gpio0 17 0> /* D20/A2 */ - , <3 0 &gpio0 15 0> /* D21/A3 */ - , <6 0 &gpio0 29 0> /* D4/A6 */ - , <7 0 &gpio1 13 0> /* D6/A7 */ - , <8 0 &gpio0 28 0> /* D8/A8 */ - , <9 0 &gpio1 11 0> /* D9/A9 */ - , <10 0 &gpio1 6 0> /* D10/A10 */ - ; - }; + pro_micro_a: connector_a { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 13 0> /* D18/A0 */ + , <1 0 &gpio0 20 0> /* D19/A1 */ + , <2 0 &gpio0 17 0> /* D20/A2 */ + , <3 0 &gpio0 15 0> /* D21/A3 */ + , <6 0 &gpio0 29 0> /* D4/A6 */ + , <7 0 &gpio1 13 0> /* D6/A7 */ + , <8 0 &gpio0 28 0> /* D8/A8 */ + , <9 0 &gpio1 11 0> /* D9/A9 */ + , <10 0 &gpio1 6 0> /* D10/A10 */ + ; + }; }; pro_micro_d: &pro_micro {}; diff --git a/app/boards/arm/nrfmicro/nrfmicro-flipped-pinctrl.dtsi b/app/boards/arm/nrfmicro/nrfmicro-flipped-pinctrl.dtsi index a54c2598..22bc11d4 100644 --- a/app/boards/arm/nrfmicro/nrfmicro-flipped-pinctrl.dtsi +++ b/app/boards/arm/nrfmicro/nrfmicro-flipped-pinctrl.dtsi @@ -4,36 +4,36 @@ */ &pinctrl { - uart0_default: uart0_default { - group1 { - psels = ; - bias-pull-up; - }; - group2 { - psels = ; - }; - }; + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; - uart0_sleep: uart0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; - i2c0_default: i2c0_default { - group1 { - psels = , - ; - }; - }; + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; - i2c0_sleep: i2c0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi b/app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi index a5385690..35a46e5a 100644 --- a/app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi +++ b/app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi @@ -4,36 +4,36 @@ */ &pinctrl { - uart0_default: uart0_default { - group1 { - psels = ; - bias-pull-up; - }; - group2 { - psels = ; - }; - }; + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; - uart0_sleep: uart0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; - i2c0_default: i2c0_default { - group1 { - psels = , - ; - }; - }; + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; - i2c0_sleep: i2c0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro_11.dts b/app/boards/arm/nrfmicro/nrfmicro_11.dts index 48186ac9..68331edc 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_11.dts @@ -10,102 +10,102 @@ #include "nrfmicro-pinctrl.dtsi" / { - model = "nrfmicro"; - compatible = "joric,nrfmicro"; + model = "nrfmicro"; + compatible = "joric,nrfmicro"; - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - }; + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + }; - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; - ext-power { - compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; - control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; - }; + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; + }; }; &gpiote { - status = "okay"; + status = "okay"; }; &gpio0 { - status = "okay"; + status = "okay"; }; &gpio1 { - status = "okay"; + status = "okay"; }; &i2c0 { - compatible = "nordic,nrf-twim"; - pinctrl-0 = <&i2c0_default>; - pinctrl-1 = <&i2c0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-twim"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { - compatible = "nordic,nrf-uarte"; - pinctrl-0 = <&uart0_default>; - pinctrl-1 = <&uart0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-uarte"; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + 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>; + /* + * 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>; - }; + 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. - */ + /* + * 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>; - }; + /* + * 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>; - }; - }; + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts index 656873a0..9977617c 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts @@ -10,102 +10,102 @@ #include "nrfmicro-flipped-pinctrl.dtsi" / { - model = "nrfmicro"; - compatible = "joric,nrfmicro"; + model = "nrfmicro"; + compatible = "joric,nrfmicro"; - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - }; + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + }; - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; - ext-power { - compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; - control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; - }; + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; + }; }; &gpiote { - status = "okay"; + status = "okay"; }; &gpio0 { - status = "okay"; + status = "okay"; }; &gpio1 { - status = "okay"; + status = "okay"; }; &i2c0 { - compatible = "nordic,nrf-twim"; - pinctrl-0 = <&i2c0_default>; - pinctrl-1 = <&i2c0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-twim"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { - compatible = "nordic,nrf-uarte"; - pinctrl-0 = <&uart0_default>; - pinctrl-1 = <&uart0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-uarte"; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + 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>; + /* + * 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>; - }; + 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. - */ + /* + * 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>; - }; + /* + * 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>; - }; - }; + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro_13.dts b/app/boards/arm/nrfmicro/nrfmicro_13.dts index 9fb68562..300838ff 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_13.dts @@ -10,115 +10,115 @@ #include "nrfmicro-pinctrl.dtsi" / { - model = "nrfmicro"; - compatible = "joric,nrfmicro"; + model = "nrfmicro"; + compatible = "joric,nrfmicro"; - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - zmk,battery = &vbatt; - }; + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zmk,battery = &vbatt; + }; - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; - ext-power { - compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; - control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; - }; + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; + }; - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; - io-channels = <&adc 2>; - output-ohms = <2000000>; - full-ohms = <(2000000 + 820000)>; - }; + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 2>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 820000)>; + }; }; &adc { - status = "okay"; + status = "okay"; }; &gpiote { - status = "okay"; + status = "okay"; }; &gpio0 { - status = "okay"; + status = "okay"; }; &gpio1 { - status = "okay"; + status = "okay"; }; &i2c0 { - compatible = "nordic,nrf-twim"; - pinctrl-0 = <&i2c0_default>; - pinctrl-1 = <&i2c0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-twim"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { - compatible = "nordic,nrf-uarte"; - pinctrl-0 = <&uart0_default>; - pinctrl-1 = <&uart0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-uarte"; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + 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>; + /* + * 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>; - }; + 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. - */ + /* + * 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>; - }; + /* + * 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>; - }; - }; + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts b/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts index 9ade364d..86bcb5e5 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts @@ -10,115 +10,115 @@ #include "nrfmicro-pinctrl.dtsi" / { - model = "nrfmicro"; - compatible = "joric,nrfmicro"; + model = "nrfmicro"; + compatible = "joric,nrfmicro"; - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - zmk,battery = &vbatt; - }; + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zmk,battery = &vbatt; + }; - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; - ext-power { - compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; - control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; - }; + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; + }; - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; - io-channels = <&adc 2>; - output-ohms = <2000000>; - full-ohms = <(2000000 + 820000)>; - }; + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 2>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 820000)>; + }; }; &adc { - status = "okay"; + status = "okay"; }; &gpiote { - status = "okay"; + status = "okay"; }; &gpio0 { - status = "okay"; + status = "okay"; }; &gpio1 { - status = "okay"; + status = "okay"; }; &i2c0 { - compatible = "nordic,nrf-twim"; - pinctrl-0 = <&i2c0_default>; - pinctrl-1 = <&i2c0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-twim"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { - compatible = "nordic,nrf-uarte"; - pinctrl-0 = <&uart0_default>; - pinctrl-1 = <&uart0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-uarte"; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + 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>; + /* + * 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 0x00046000>; - }; + sd_partition: partition@0 { + label = "softdevice"; + reg = <0x00000000 0x00026000>; + }; + code_partition: partition@26000 { + label = "code_partition"; + reg = <0x00026000 0x00046000>; + }; - /* - * The flash starting at 0x0006c000 and ending at - * 0x00073fff is reserved for use by the application. - */ + /* + * The flash starting at 0x0006c000 and ending at + * 0x00073fff is reserved for use by the application. + */ - /* - * Storage partition will be used by FCB/LittleFS/NVS - * if enabled. - */ - storage_partition: partition@6c000 { - label = "storage"; - reg = <0x0006c000 0x00008000>; - }; + /* + * Storage partition will be used by FCB/LittleFS/NVS + * if enabled. + */ + storage_partition: partition@6c000 { + label = "storage"; + reg = <0x0006c000 0x00008000>; + }; - boot_partition: partition@74000 { - label = "adafruit_boot"; - reg = <0x00074000 0x0000c000>; - }; - }; + boot_partition: partition@74000 { + label = "adafruit_boot"; + reg = <0x00074000 0x0000c000>; + }; + }; }; diff --git a/app/boards/arm/pillbug/pillbug-pinctrl.dtsi b/app/boards/arm/pillbug/pillbug-pinctrl.dtsi index 8751bc4b..8a9e9fc2 100644 --- a/app/boards/arm/pillbug/pillbug-pinctrl.dtsi +++ b/app/boards/arm/pillbug/pillbug-pinctrl.dtsi @@ -4,53 +4,53 @@ */ &pinctrl { - uart0_default: uart0_default { - group1 { - psels = ; - bias-pull-up; - }; - group2 { - psels = ; - }; - }; + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; - uart0_sleep: uart0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; - i2c0_default: i2c0_default { - group1 { - psels = , - ; - }; - }; + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; - i2c0_sleep: i2c0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; - spi1_default: spi1_default { - group1 { - psels = , - , - ; - }; - }; + spi1_default: spi1_default { + group1 { + psels = , + , + ; + }; + }; - spi1_sleep: spi1_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; + spi1_sleep: spi1_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; diff --git a/app/boards/arm/planck/Kconfig.board b/app/boards/arm/planck/Kconfig.board index fe15e1a9..28b7381f 100644 --- a/app/boards/arm/planck/Kconfig.board +++ b/app/boards/arm/planck/Kconfig.board @@ -4,5 +4,5 @@ # SPDX-License-Identifier: MIT config BOARD_PLANCK_REV6 - bool "Planck V6 Keyboard" - depends on SOC_STM32F303XC + bool "Planck V6 Keyboard" + depends on SOC_STM32F303XC diff --git a/app/boards/arm/planck/Kconfig.defconfig b/app/boards/arm/planck/Kconfig.defconfig index 913c1c13..d1304da0 100644 --- a/app/boards/arm/planck/Kconfig.defconfig +++ b/app/boards/arm/planck/Kconfig.defconfig @@ -6,10 +6,10 @@ if BOARD_PLANCK_REV6 config ZMK_KEYBOARD_NAME - default "Planck V6" + default "Planck V6" config ZMK_USB - default y + default y config ZMK_KSCAN_MATRIX_POLLING default y diff --git a/app/boards/arm/planck/planck_rev6.dts b/app/boards/arm/planck/planck_rev6.dts index 97239595..5fdd2c21 100644 --- a/app/boards/arm/planck/planck_rev6.dts +++ b/app/boards/arm/planck/planck_rev6.dts @@ -10,123 +10,123 @@ #include / { - model = "Plack PCD, rev6"; - compatible = "planck,rev6", "st,stm32f303"; + model = "Plack PCD, rev6"; + compatible = "planck,rev6", "st,stm32f303"; - chosen { - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - zmk,kscan = &kscan0; - zmk,matrix_transform = &layout_grid_transform; - }; + chosen { + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zmk,kscan = &kscan0; + zmk,matrix_transform = &layout_grid_transform; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; diode-direction = "col2row"; - row-gpios - = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpiob 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpioc 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpioc 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpioc 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpioa 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - col-gpios - = <&gpiob 11 GPIO_ACTIVE_HIGH> - , <&gpiob 10 GPIO_ACTIVE_HIGH> - , <&gpiob 2 GPIO_ACTIVE_HIGH> - , <&gpiob 1 GPIO_ACTIVE_HIGH> - , <&gpioa 7 GPIO_ACTIVE_HIGH> - , <&gpiob 0 GPIO_ACTIVE_HIGH> - ; - }; + row-gpios + = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpiob 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpioc 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpioc 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpioc 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpioa 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + col-gpios + = <&gpiob 11 GPIO_ACTIVE_HIGH> + , <&gpiob 10 GPIO_ACTIVE_HIGH> + , <&gpiob 2 GPIO_ACTIVE_HIGH> + , <&gpiob 1 GPIO_ACTIVE_HIGH> + , <&gpioa 7 GPIO_ACTIVE_HIGH> + , <&gpiob 0 GPIO_ACTIVE_HIGH> + ; + }; layout_grid_transform: - keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <6>; - rows = <8>; - map = < - RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) - RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5) - RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5) - RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,4) RC(7,5) RC(7,0) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5) - >; - }; + keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <6>; + rows = <8>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5) + RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,4) RC(7,5) RC(7,0) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5) + >; + }; layout_mit_transform: - keymap_transform_1 { - compatible = "zmk,matrix-transform"; - columns = <6>; - rows = <8>; - map = < - RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) - RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5) - RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5) - RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,4) RC(7,0) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5) - >; - }; + keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <6>; + rows = <8>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5) + RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,4) RC(7,0) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5) + >; + }; layout_2x2u_transform: - keymap_transform_2 { - compatible = "zmk,matrix-transform"; - columns = <6>; - rows = <8>; - map = < - RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) - RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5) - RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5) - RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,5) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5) - >; - }; + keymap_transform_2 { + compatible = "zmk,matrix-transform"; + columns = <6>; + rows = <8>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5) + RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,5) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5) + >; + }; }; &usb { - pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; - pinctrl-names = "default"; - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; + pinctrl-names = "default"; + status = "okay"; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; }; &clk_hse { - status = "okay"; - clock-frequency = ; + status = "okay"; + clock-frequency = ; }; &pll { - prediv = <1>; - mul = <9>; - clocks = <&clk_hse>; - status = "okay"; + prediv = <1>; + mul = <9>; + clocks = <&clk_hse>; + status = "okay"; }; &rcc { - clocks = <&pll>; - clock-frequency = ; - ahb-prescaler = <1>; - apb1-prescaler = <2>; - apb2-prescaler = <1>; + clocks = <&pll>; + clock-frequency = ; + ahb-prescaler = <1>; + apb1-prescaler = <2>; + apb2-prescaler = <1>; }; &flash0 { - /* - * For more information, see: - * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions - */ - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; + /* + * For more information, see: + * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; - /* Set 6Kb of storage at the end of the 256Kb of flash */ - storage_partition: partition@3e800 { - label = "storage"; - reg = <0x0003e800 0x00001800>; - }; - }; + /* Set 6Kb of storage at the end of the 256Kb of flash */ + storage_partition: partition@3e800 { + label = "storage"; + reg = <0x0003e800 0x00001800>; + }; + }; }; diff --git a/app/boards/arm/planck/planck_rev6.keymap b/app/boards/arm/planck/planck_rev6.keymap index 7e4f6732..65138057 100644 --- a/app/boards/arm/planck/planck_rev6.keymap +++ b/app/boards/arm/planck/planck_rev6.keymap @@ -8,39 +8,39 @@ #include / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - // ----------------------------------------------------------------------------------------- - // | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC | - // | ESC | A | S | D | F | G | H | J | K | L | ; | ' | - // | SHIFT | Z | X | C | V | B | N | M | , | . | / | RET | - // | | LCTL | LALT | LGUI | LOWR | SPACE | RAIS | LARW | DARW | UARW | RARW | - bindings = < - &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 ESC &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 SLASH &kp RET - &trans &kp LCTL &kp LALT &kp LGUI &mo 1 &trans &kp SPACE &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT - >; - }; + default_layer { + // ----------------------------------------------------------------------------------------- + // | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC | + // | ESC | A | S | D | F | G | H | J | K | L | ; | ' | + // | SHIFT | Z | X | C | V | B | N | M | , | . | / | RET | + // | | LCTL | LALT | LGUI | LOWR | SPACE | RAIS | LARW | DARW | UARW | RARW | + bindings = < + &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 ESC &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 SLASH &kp RET + &trans &kp LCTL &kp LALT &kp LGUI &mo 1 &trans &kp SPACE &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT + >; + }; - lower { - bindings = < - &kp LS(GRAVE) &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp LS(N0) &kp DEL - &kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE - &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp LS(HASH) &kp LS(BSLH) &kp HOME &kp END &trans - &trans &trans &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP - >; - }; + lower { + bindings = < + &kp LS(GRAVE) &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp LS(N0) &kp DEL + &kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE + &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp LS(HASH) &kp LS(BSLH) &kp HOME &kp END &trans + &trans &trans &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP + >; + }; - raise { - bindings = < - &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC - &kp DEL &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 &kp F12 &kp HASH &kp BSLH &kp PG_UP &kp PG_DN &trans - &sys_reset &bootloader &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP - >; - }; - }; + raise { + bindings = < + &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC + &kp DEL &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 &kp F12 &kp HASH &kp BSLH &kp PG_UP &kp PG_DN &trans + &sys_reset &bootloader &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP + >; + }; + }; }; diff --git a/app/boards/arm/preonic/Kconfig.board b/app/boards/arm/preonic/Kconfig.board index a930b90f..39f35db6 100644 --- a/app/boards/arm/preonic/Kconfig.board +++ b/app/boards/arm/preonic/Kconfig.board @@ -4,5 +4,5 @@ # SPDX-License-Identifier: MIT config BOARD_PREONIC_REV3 - bool "Preonic V3 Keyboard" - depends on SOC_STM32F303XC + bool "Preonic V3 Keyboard" + depends on SOC_STM32F303XC diff --git a/app/boards/arm/proton_c/Kconfig.board b/app/boards/arm/proton_c/Kconfig.board index ffa7ffd6..1596077f 100644 --- a/app/boards/arm/proton_c/Kconfig.board +++ b/app/boards/arm/proton_c/Kconfig.board @@ -4,5 +4,5 @@ # SPDX-License-Identifier: MIT config BOARD_QMK_PROTON_C - bool "QMK Proton-C" - depends on SOC_STM32F303XC + bool "QMK Proton-C" + depends on SOC_STM32F303XC diff --git a/app/boards/arm/proton_c/Kconfig.defconfig b/app/boards/arm/proton_c/Kconfig.defconfig index 78ccbabd..f5089119 100644 --- a/app/boards/arm/proton_c/Kconfig.defconfig +++ b/app/boards/arm/proton_c/Kconfig.defconfig @@ -6,9 +6,9 @@ if BOARD_QMK_PROTON_C config BOARD - default "proton_c" + default "proton_c" config ZMK_USB - default y + default y endif # BOARD_QMK_PROTON_C diff --git a/app/boards/arm/proton_c/arduino_pro_micro_pins.dtsi b/app/boards/arm/proton_c/arduino_pro_micro_pins.dtsi index 9a026adf..18311942 100644 --- a/app/boards/arm/proton_c/arduino_pro_micro_pins.dtsi +++ b/app/boards/arm/proton_c/arduino_pro_micro_pins.dtsi @@ -5,50 +5,50 @@ */ / { - pro_micro: connector { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpioa 10 0> /* D0 */ - , <1 0 &gpioa 9 0> /* D1 */ - , <2 0 &gpiob 7 0> /* D2 */ - , <3 0 &gpiob 6 0> /* D3 */ - , <4 0 &gpiob 5 0> /* D4/A6 */ - , <5 0 &gpiob 4 0> /* D5 */ - , <6 0 &gpiob 3 0> /* D6/A7 */ - , <7 0 &gpiob 2 0> /* D7 */ - , <8 0 &gpiob 1 0> /* D8/A8 */ - , <9 0 &gpiob 0 0> /* D9/A9 */ - , <10 0 &gpiob 9 0> /* D10/A10 */ - , <16 0 &gpiob 15 0> /* D16 */ - , <14 0 &gpiob 14 0> /* D14 */ - , <15 0 &gpiob 13 0> /* D15 */ - , <18 0 &gpiob 8 0> /* D18/A0 */ - , <19 0 &gpioa 0 0> /* D19/A1 */ - , <20 0 &gpioa 1 0> /* D20/A2 */ - , <21 0 &gpioa 2 0> /* D21/A3 */ - ; - }; + pro_micro: connector { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpioa 10 0> /* D0 */ + , <1 0 &gpioa 9 0> /* D1 */ + , <2 0 &gpiob 7 0> /* D2 */ + , <3 0 &gpiob 6 0> /* D3 */ + , <4 0 &gpiob 5 0> /* D4/A6 */ + , <5 0 &gpiob 4 0> /* D5 */ + , <6 0 &gpiob 3 0> /* D6/A7 */ + , <7 0 &gpiob 2 0> /* D7 */ + , <8 0 &gpiob 1 0> /* D8/A8 */ + , <9 0 &gpiob 0 0> /* D9/A9 */ + , <10 0 &gpiob 9 0> /* D10/A10 */ + , <16 0 &gpiob 15 0> /* D16 */ + , <14 0 &gpiob 14 0> /* D14 */ + , <15 0 &gpiob 13 0> /* D15 */ + , <18 0 &gpiob 8 0> /* D18/A0 */ + , <19 0 &gpioa 0 0> /* D19/A1 */ + , <20 0 &gpioa 1 0> /* D20/A2 */ + , <21 0 &gpioa 2 0> /* D21/A3 */ + ; + }; - pro_micro_a: connector_a { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpiob 8 0> /* D18/A0 */ - , <1 0 &gpioa 0 0> /* D19/A1 */ - , <2 0 &gpioa 1 0> /* D20/A2 */ - , <3 0 &gpioa 2 0> /* D21/A3 */ - , <6 0 &gpiob 5 0> /* D4/A6 */ - , <7 0 &gpiob 3 0> /* D6/A7 */ - , <8 0 &gpiob 1 0> /* D8/A8 */ - , <9 0 &gpiob 0 0> /* D9/A9 */ - , <10 0 &gpiob 9 0> /* D10/A10 */ - ; - }; + pro_micro_a: connector_a { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpiob 8 0> /* D18/A0 */ + , <1 0 &gpioa 0 0> /* D19/A1 */ + , <2 0 &gpioa 1 0> /* D20/A2 */ + , <3 0 &gpioa 2 0> /* D21/A3 */ + , <6 0 &gpiob 5 0> /* D4/A6 */ + , <7 0 &gpiob 3 0> /* D6/A7 */ + , <8 0 &gpiob 1 0> /* D8/A8 */ + , <9 0 &gpiob 0 0> /* D9/A9 */ + , <10 0 &gpiob 9 0> /* D10/A10 */ + ; + }; }; pro_micro_d: &pro_micro {}; diff --git a/app/boards/arm/proton_c/proton_c.dts b/app/boards/arm/proton_c/proton_c.dts index df63427f..b5a490ee 100644 --- a/app/boards/arm/proton_c/proton_c.dts +++ b/app/boards/arm/proton_c/proton_c.dts @@ -10,91 +10,91 @@ #include "arduino_pro_micro_pins.dtsi" / { - model = "QMK Proton C"; - compatible = "qmk,proton_c", "st,stm32f303"; + model = "QMK Proton C"; + compatible = "qmk,proton_c", "st,stm32f303"; - chosen { - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart0; - }; + chosen { + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart0; + }; - aliases { - led0 = &led; - }; + aliases { + led0 = &led; + }; - leds { - compatible = "gpio-leds"; - led: led_0 { - gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; - label = "User LED"; - }; - }; + leds { + compatible = "gpio-leds"; + led: led_0 { + gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; + label = "User LED"; + }; + }; }; &usart1 { - pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; - pinctrl-names = "default"; + pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; }; &spi2 { - pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; - pinctrl-names = "default"; + pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; }; &i2c1 { - pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; - pinctrl-names = "default"; + pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; }; &clk_hse { - status = "okay"; - clock-frequency = ; + status = "okay"; + clock-frequency = ; }; &pll { - prediv = <1>; - mul = <9>; - clocks = <&clk_hse>; - status = "okay"; + prediv = <1>; + mul = <9>; + clocks = <&clk_hse>; + status = "okay"; }; &rcc { - clocks = <&pll>; - clock-frequency = ; - ahb-prescaler = <1>; - apb1-prescaler = <2>; - apb2-prescaler = <1>; + clocks = <&pll>; + clock-frequency = ; + ahb-prescaler = <1>; + apb1-prescaler = <2>; + apb2-prescaler = <1>; }; &usb { - pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; - pinctrl-names = "default"; - status = "okay"; - cdc_acm_uart0: cdc_acm_uart0 { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; + pinctrl-names = "default"; + status = "okay"; + cdc_acm_uart0: cdc_acm_uart0 { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; }; &rtc { - status = "okay"; + status = "okay"; }; &flash0 { - /* - * For more information, see: - * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions - */ - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; + /* + * For more information, see: + * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; - /* Set 6Kb of storage at the end of the 256Kb of flash */ - storage_partition: partition@3e800 { - label = "storage"; - reg = <0x0003e800 0x00001800>; - }; - }; + /* Set 6Kb of storage at the end of the 256Kb of flash */ + storage_partition: partition@3e800 { + label = "storage"; + reg = <0x0003e800 0x00001800>; + }; + }; }; diff --git a/app/boards/arm/puchi_ble/Kconfig.board b/app/boards/arm/puchi_ble/Kconfig.board index 07638885..0f5b7f96 100644 --- a/app/boards/arm/puchi_ble/Kconfig.board +++ b/app/boards/arm/puchi_ble/Kconfig.board @@ -4,5 +4,5 @@ # SPDX-License-Identifier: MIT config BOARD_PUCHI_BLE_v1 - bool "puchi_ble_v1" - depends on SOC_NRF52840_QIAA + bool "puchi_ble_v1" + depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/puchi_ble/Kconfig.defconfig b/app/boards/arm/puchi_ble/Kconfig.defconfig index 94d12c17..c4fca8e1 100644 --- a/app/boards/arm/puchi_ble/Kconfig.defconfig +++ b/app/boards/arm/puchi_ble/Kconfig.defconfig @@ -4,25 +4,25 @@ if BOARD_PUCHI_BLE_v1 config BOARD - default "puchi_ble" + default "puchi_ble" if USB_DEVICE_STACK config USB_NRFX - default y + default y endif # USB_DEVICE_STACK config BT_CTLR - default BT + default BT config ZMK_BLE - default y + default y config ZMK_USB - default y + default y config PINMUX - default y + default y endif # BOARD_PUCHI_BLE_v1 diff --git a/app/boards/arm/puchi_ble/arduino_pro_micro_pins.dtsi b/app/boards/arm/puchi_ble/arduino_pro_micro_pins.dtsi index ed3317f1..3037ea3e 100644 --- a/app/boards/arm/puchi_ble/arduino_pro_micro_pins.dtsi +++ b/app/boards/arm/puchi_ble/arduino_pro_micro_pins.dtsi @@ -6,50 +6,50 @@ / { - pro_micro: connector { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio0 8 0> /* D0 */ - , <1 0 &gpio0 6 0> /* D1 */ - , <2 0 &gpio0 15 0> /* D2 */ - , <3 0 &gpio0 17 0> /* D3 */ - , <4 0 &gpio0 20 0> /* D4/A6 */ - , <5 0 &gpio0 13 0> /* D5 */ - , <6 0 &gpio0 24 0> /* D6/A7 */ - , <7 0 &gpio0 9 0> /* D7 */ - , <8 0 &gpio0 10 0> /* D8/A8 */ - , <9 0 &gpio1 6 0> /* D9/A9 */ - , <10 0 &gpio1 11 0> /* D10/A10 */ - , <16 0 &gpio0 28 0> /* D16 */ - , <14 0 &gpio0 3 0> /* D14 */ - , <15 0 &gpio1 13 0> /* D15 */ - , <18 0 &gpio0 2 0> /* D18/A0 */ - , <19 0 &gpio0 29 0> /* D19/A1 */ - , <20 0 &gpio0 31 0> /* D20/A2 */ - , <21 0 &gpio0 30 0> /* D21/A3 */ - ; - }; + pro_micro: connector { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 8 0> /* D0 */ + , <1 0 &gpio0 6 0> /* D1 */ + , <2 0 &gpio0 15 0> /* D2 */ + , <3 0 &gpio0 17 0> /* D3 */ + , <4 0 &gpio0 20 0> /* D4/A6 */ + , <5 0 &gpio0 13 0> /* D5 */ + , <6 0 &gpio0 24 0> /* D6/A7 */ + , <7 0 &gpio0 9 0> /* D7 */ + , <8 0 &gpio0 10 0> /* D8/A8 */ + , <9 0 &gpio1 6 0> /* D9/A9 */ + , <10 0 &gpio1 11 0> /* D10/A10 */ + , <16 0 &gpio0 28 0> /* D16 */ + , <14 0 &gpio0 3 0> /* D14 */ + , <15 0 &gpio1 13 0> /* D15 */ + , <18 0 &gpio0 2 0> /* D18/A0 */ + , <19 0 &gpio0 29 0> /* D19/A1 */ + , <20 0 &gpio0 31 0> /* D20/A2 */ + , <21 0 &gpio0 30 0> /* D21/A3 */ + ; + }; - pro_micro_a: connector_a { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &gpio0 2 0> /* D18/A0 */ - , <1 0 &gpio0 29 0> /* D19/A1 */ - , <2 0 &gpio0 31 0> /* D20/A2 */ - , <3 0 &gpio0 30 0> /* D21/A3 */ - , <6 0 &gpio0 20 0> /* D4/A6 */ - , <7 0 &gpio0 24 0> /* D6/A7 */ - , <8 0 &gpio0 10 0> /* D8/A8 */ - , <9 0 &gpio1 6 0> /* D9/A9 */ - , <10 0 &gpio1 11 0> /* D10/A10 */ - ; - }; + pro_micro_a: connector_a { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 2 0> /* D18/A0 */ + , <1 0 &gpio0 29 0> /* D19/A1 */ + , <2 0 &gpio0 31 0> /* D20/A2 */ + , <3 0 &gpio0 30 0> /* D21/A3 */ + , <6 0 &gpio0 20 0> /* D4/A6 */ + , <7 0 &gpio0 24 0> /* D6/A7 */ + , <8 0 &gpio0 10 0> /* D8/A8 */ + , <9 0 &gpio1 6 0> /* D9/A9 */ + , <10 0 &gpio1 11 0> /* D10/A10 */ + ; + }; }; diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi b/app/boards/arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi index a5385690..35a46e5a 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi +++ b/app/boards/arm/puchi_ble/puchi_ble_v1-pinctrl.dtsi @@ -4,36 +4,36 @@ */ &pinctrl { - uart0_default: uart0_default { - group1 { - psels = ; - bias-pull-up; - }; - group2 { - psels = ; - }; - }; + uart0_default: uart0_default { + group1 { + psels = ; + bias-pull-up; + }; + group2 { + psels = ; + }; + }; - uart0_sleep: uart0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; - i2c0_default: i2c0_default { - group1 { - psels = , - ; - }; - }; + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; - i2c0_sleep: i2c0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; }; diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1.dts b/app/boards/arm/puchi_ble/puchi_ble_v1.dts index a8f25c37..b056f711 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1.dts +++ b/app/boards/arm/puchi_ble/puchi_ble_v1.dts @@ -10,115 +10,115 @@ #include "puchi_ble_v1-pinctrl.dtsi" / { - model = "puchi_ble"; - compatible = "puchi_ble"; + model = "puchi_ble"; + compatible = "puchi_ble"; - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - zmk,battery = &vbatt; - }; + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zmk,battery = &vbatt; + }; - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; - ext-power { - compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; - control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; - }; + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; + }; - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; - io-channels = <&adc 2>; - output-ohms = <2000000>; - full-ohms = <(2000000 + 820000)>; - }; + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 2>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 820000)>; + }; }; &adc { - status = "okay"; + status = "okay"; }; &gpiote { - status = "okay"; + status = "okay"; }; &gpio0 { - status = "okay"; + status = "okay"; }; &gpio1 { - status = "okay"; + status = "okay"; }; &i2c0 { - compatible = "nordic,nrf-twi"; - pinctrl-0 = <&i2c0_default>; - pinctrl-1 = <&i2c0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-twi"; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; }; &uart0 { - compatible = "nordic,nrf-uarte"; - pinctrl-0 = <&uart0_default>; - pinctrl-1 = <&uart0_sleep>; - pinctrl-names = "default", "sleep"; + compatible = "nordic,nrf-uarte"; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; }; &usbd { - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + 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>; + /* + * 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>; - }; + 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. - */ + /* + * 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>; - }; + /* + * 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>; - }; - }; + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; }; diff --git a/app/boards/arm/s40nc/Kconfig.board b/app/boards/arm/s40nc/Kconfig.board index 673e3b24..e703d726 100644 --- a/app/boards/arm/s40nc/Kconfig.board +++ b/app/boards/arm/s40nc/Kconfig.board @@ -2,5 +2,5 @@ # SPDX-License-Identifier: MIT config BOARD_S40NC - bool "S40NC" - depends on SOC_NRF52840_QIAA + bool "S40NC" + depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/s40nc/Kconfig.defconfig b/app/boards/arm/s40nc/Kconfig.defconfig index 266f8443..11e62cf5 100644 --- a/app/boards/arm/s40nc/Kconfig.defconfig +++ b/app/boards/arm/s40nc/Kconfig.defconfig @@ -4,25 +4,25 @@ if BOARD_S40NC config ZMK_KEYBOARD_NAME - default "S40NC" + default "S40NC" if USB config USB_NRFX - default y + default y config USB_DEVICE_STACK - default y + default y endif # USB config BT_CTLR - default BT + default BT config ZMK_BLE - default y + default y config ZMK_USB - default y + default y endif # BOARD_S40NC diff --git a/app/boards/arm/s40nc/s40nc.dts b/app/boards/arm/s40nc/s40nc.dts index 5b588b45..6eb9e2a5 100644 --- a/app/boards/arm/s40nc/s40nc.dts +++ b/app/boards/arm/s40nc/s40nc.dts @@ -9,137 +9,137 @@ #include / { - model = "S40NC"; - compatible = "s40nc"; + model = "S40NC"; + compatible = "s40nc"; - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - zmk,battery = &vbatt; - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zmk,battery = &vbatt; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <4>; - map = < + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + 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(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,11) RC(2,0) 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,4) RC(3,6) RC(3,8) RC(3,9) RC(3,10) RC(3,11) - >; - }; + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - col-gpios - = <&gpio1 2 GPIO_ACTIVE_HIGH> - , <&gpio1 1 GPIO_ACTIVE_HIGH> - , <&gpio1 3 GPIO_ACTIVE_HIGH> - , <&gpio1 0 GPIO_ACTIVE_HIGH> - , <&gpio0 22 GPIO_ACTIVE_HIGH> - , <&gpio1 15 GPIO_ACTIVE_HIGH> - , <&gpio0 3 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> - ; - }; + diode-direction = "col2row"; + row-gpios + = <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + col-gpios + = <&gpio1 2 GPIO_ACTIVE_HIGH> + , <&gpio1 1 GPIO_ACTIVE_HIGH> + , <&gpio1 3 GPIO_ACTIVE_HIGH> + , <&gpio1 0 GPIO_ACTIVE_HIGH> + , <&gpio0 22 GPIO_ACTIVE_HIGH> + , <&gpio1 15 GPIO_ACTIVE_HIGH> + , <&gpio0 3 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> + ; + }; - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; - io-channels = <&adc 2>; - output-ohms = <2000000>; - full-ohms = <(2000000 + 820000)>; - }; + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 2>; + output-ohms = <2000000>; + full-ohms = <(2000000 + 820000)>; + }; }; &adc { - status = "okay"; + status = "okay"; }; &gpiote { - status = "okay"; + status = "okay"; }; &gpio0 { - status = "okay"; + status = "okay"; }; &gpio1 { - status = "okay"; + status = "okay"; }; &usbd { - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + 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>; + /* + * 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 = "mbr"; - reg = <0x00000000 0x00001000>; - }; + sd_partition: partition@0 { + label = "mbr"; + reg = <0x00000000 0x00001000>; + }; - code_partition: partition@1000 { - label = "code_partition"; - reg = <0x00001000 0x000d3000>; - }; + code_partition: partition@1000 { + label = "code_partition"; + reg = <0x00001000 0x000d3000>; + }; - /* - * The flash starting at 0x000d4000 and ending at - * 0x000f3fff is reserved for use by the application. - */ + /* + * The flash starting at 0x000d4000 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@d4000 { - label = "storage"; - reg = <0x000d4000 0x00020000>; - }; + /* + * Storage partition will be used by FCB/LittleFS/NVS + * if enabled. + */ + storage_partition: partition@d4000 { + label = "storage"; + reg = <0x000d4000 0x00020000>; + }; - boot_partition: partition@f4000 { - label = "adafruit_boot"; - reg = <0x000f4000 0x0000c000>; - }; - }; + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; }; diff --git a/app/boards/arm/s40nc/s40nc.keymap b/app/boards/arm/s40nc/s40nc.keymap index f0e60e7d..dfc352d7 100644 --- a/app/boards/arm/s40nc/s40nc.keymap +++ b/app/boards/arm/s40nc/s40nc.keymap @@ -15,44 +15,44 @@ #define CONTROL 3 / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - bindings = < + default_layer { + bindings = < &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC &mo LOWER &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp ENTER &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp FSLH &kp UP &kp RSHFT &kp LCTRL &kp LGUI &kp LALT < LOWER SPACE < CONTROL SPACE < RAISE SPACE &kp LEFT &kp DOWN &kp RIGHT - >; - }; + >; + }; - lower_layer { - bindings = < + lower_layer { + 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 PSCRN &kp MINUS &kp EQUAL &trans &trans &trans &trans &kp LBKT &kp RBKT &kp SEMI &kp APOS &trans &trans &trans &trans &trans &trans &trans &kp COMMA &kp DOT &kp PG_UP &kp BSLH &trans &trans &trans &kp TAB &kp TAB &kp TAB &kp HOME &kp PG_DN &kp END - >; - }; + >; + }; raise_layer { - bindings = < + bindings = < &kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &trans &kp PSCRN &kp UNDER &kp PLUS &trans &trans &trans &trans &kp LBRC &kp RBRC &kp COLON &kp DQT &trans &trans &trans &trans &trans &trans &trans &kp LT &kp GT &kp PG_UP &kp PIPE &trans &trans &trans &kp TAB &kp TAB &kp TAB &kp HOME &kp PG_DN &kp END - >; - }; + >; + }; control_layer { - bindings = < + bindings = < &bt BT_CLR &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp C_PP &bt BT_SEL 0 &kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &trans &kp K_LOCK &bt BT_SEL 1 &out OUT_USB &kp CAPS &kp KP_NUM &kp SLCK &trans &trans &kp COMMA &kp DOT &kp K_VOL_UP &kp K_MUTE &bt BT_SEL 2 &out OUT_BLE &kp PAUSE_BREAK &sys_reset &trans &bootloader &kp C_BRI_DN &kp K_VOL_DN &kp C_BRI_UP - >; - }; - }; + >; + }; + }; }; diff --git a/app/boards/native_posix.overlay b/app/boards/native_posix.overlay index 2c1ed79d..f8a8f700 100644 --- a/app/boards/native_posix.overlay +++ b/app/boards/native_posix.overlay @@ -3,16 +3,16 @@ #include / { - chosen { - zmk,kscan = &kscan; - }; + chosen { + zmk,kscan = &kscan; + }; - kscan: kscan { - compatible = "zmk,kscan-mock"; - label = "KSCAN_MOCK"; + kscan: kscan { + compatible = "zmk,kscan-mock"; + label = "KSCAN_MOCK"; - rows = <2>; - columns = <2>; - exit-after; - }; + rows = <2>; + columns = <2>; + exit-after; + }; }; diff --git a/app/boards/native_posix_64.overlay b/app/boards/native_posix_64.overlay index 2c1ed79d..f8a8f700 100644 --- a/app/boards/native_posix_64.overlay +++ b/app/boards/native_posix_64.overlay @@ -3,16 +3,16 @@ #include / { - chosen { - zmk,kscan = &kscan; - }; + chosen { + zmk,kscan = &kscan; + }; - kscan: kscan { - compatible = "zmk,kscan-mock"; - label = "KSCAN_MOCK"; + kscan: kscan { + compatible = "zmk,kscan-mock"; + label = "KSCAN_MOCK"; - rows = <2>; - columns = <2>; - exit-after; - }; + rows = <2>; + columns = <2>; + exit-after; + }; }; diff --git a/app/boards/seeeduino_xiao.overlay b/app/boards/seeeduino_xiao.overlay index 70080286..a2ddaea4 100644 --- a/app/boards/seeeduino_xiao.overlay +++ b/app/boards/seeeduino_xiao.overlay @@ -5,15 +5,15 @@ */ / { - chosen { - zephyr,console = &cdc_acm_uart; - }; + chosen { + zephyr,console = &cdc_acm_uart; + }; }; &usb0 { - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; }; diff --git a/app/boards/seeeduino_xiao_ble.overlay b/app/boards/seeeduino_xiao_ble.overlay index 452786d1..51671a80 100644 --- a/app/boards/seeeduino_xiao_ble.overlay +++ b/app/boards/seeeduino_xiao_ble.overlay @@ -6,29 +6,29 @@ / { - chosen { - zephyr,console = &cdc_acm_uart; - zmk,battery = &vbatt; - }; + chosen { + zephyr,console = &cdc_acm_uart; + zmk,battery = &vbatt; + }; - vbatt: vbatt { - compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; - io-channels = <&adc 7>; - power-gpios = <&gpio0 14 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>; - output-ohms = <510000>; - full-ohms = <(1000000 + 510000)>; - }; + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 7>; + power-gpios = <&gpio0 14 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>; + output-ohms = <510000>; + full-ohms = <(1000000 + 510000)>; + }; }; &adc { - status = "okay"; + status = "okay"; }; &usbd { - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; }; diff --git a/app/boards/shields/Kconfig.defconfig b/app/boards/shields/Kconfig.defconfig index 5b9ca9a1..58dd45d6 100644 --- a/app/boards/shields/Kconfig.defconfig +++ b/app/boards/shields/Kconfig.defconfig @@ -2,13 +2,13 @@ config ZMK_KEYBOARD_NAME - default "cradios" + default "cradios" # Unable to use interrupts as the same pin number is used # across A & B controllers, and STM32F303CCT6 can't enable # interrutps for multiple controllers for the same "line" # for the external interrupts. config ZMK_KSCAN_GPIO_POLLING - default y + default y diff --git a/app/boards/shields/Kconfig.shield b/app/boards/shields/Kconfig.shield index 844d4332..cab78898 100644 --- a/app/boards/shields/Kconfig.shield +++ b/app/boards/shields/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_CRADIOS - def_bool $(shields_list_contains,cradios) + def_bool $(shields_list_contains,cradios) diff --git a/app/boards/shields/a_dux/Kconfig.defconfig b/app/boards/shields/a_dux/Kconfig.defconfig index 53cd1986..2dc40dbe 100644 --- a/app/boards/shields/a_dux/Kconfig.defconfig +++ b/app/boards/shields/a_dux/Kconfig.defconfig @@ -4,16 +4,16 @@ if SHIELD_A_DUX_LEFT config ZMK_KEYBOARD_NAME - default "A. Dux" + default "A. Dux" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_A_DUX_LEFT || SHIELD_A_DUX_RIGHT config ZMK_SPLIT - default y + default y endif diff --git a/app/boards/shields/a_dux/Kconfig.shield b/app/boards/shields/a_dux/Kconfig.shield index 6058f290..928f432c 100644 --- a/app/boards/shields/a_dux/Kconfig.shield +++ b/app/boards/shields/a_dux/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_A_DUX_LEFT - def_bool $(shields_list_contains,a_dux_left) + def_bool $(shields_list_contains,a_dux_left) config SHIELD_A_DUX_RIGHT - def_bool $(shields_list_contains,a_dux_right) + def_bool $(shields_list_contains,a_dux_right) diff --git a/app/boards/shields/a_dux/a_dux.dtsi b/app/boards/shields/a_dux/a_dux.dtsi index 4840227c..28156f42 100644 --- a/app/boards/shields/a_dux/a_dux.dtsi +++ b/app/boards/shields/a_dux/a_dux.dtsi @@ -8,45 +8,45 @@ / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <34>; - rows = <1>; - map = < - RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,21) RC(0,20) RC(0,19) RC(0,18) RC(0,17) - RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,26) RC(0,25) RC(0,24) RC(0,23) RC(0,22) - RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,31) RC(0,30) RC(0,29) RC(0,28) RC(0,27) - RC(0,15) RC(0,16) RC(0,33) RC(0,32) - >; - }; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <34>; + rows = <1>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,21) RC(0,20) RC(0,19) RC(0,18) RC(0,17) + RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,26) RC(0,25) RC(0,24) RC(0,23) RC(0,22) + RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,31) RC(0,30) RC(0,29) RC(0,28) RC(0,27) + RC(0,15) RC(0,16) RC(0,33) RC(0,32) + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-direct"; - label = "KSCAN"; - input-gpios = - <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, - <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; - }; + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + label = "KSCAN"; + input-gpios = + <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; }; diff --git a/app/boards/shields/a_dux/a_dux.keymap b/app/boards/shields/a_dux/a_dux.keymap index eda03ff9..0f162a33 100644 --- a/app/boards/shields/a_dux/a_dux.keymap +++ b/app/boards/shields/a_dux/a_dux.keymap @@ -9,18 +9,18 @@ / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - // This is a sample keymap intended to be replaced with your own - base_layer { - 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 - &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH - &kp TAB &kp BSPC &kp SPACE &kp ENTER - >; - }; + // This is a sample keymap intended to be replaced with your own + base_layer { + 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 + &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH + &kp TAB &kp BSPC &kp SPACE &kp ENTER + >; + }; - }; + }; }; diff --git a/app/boards/shields/a_dux/a_dux_right.overlay b/app/boards/shields/a_dux/a_dux_right.overlay index 0034317e..d4aed65c 100644 --- a/app/boards/shields/a_dux/a_dux_right.overlay +++ b/app/boards/shields/a_dux/a_dux_right.overlay @@ -7,5 +7,5 @@ #include "a_dux.dtsi" &default_transform { - col-offset = <17>; + col-offset = <17>; }; diff --git a/app/boards/shields/bfo9000/Kconfig.defconfig b/app/boards/shields/bfo9000/Kconfig.defconfig index 7e9ccf9c..7e41b04a 100644 --- a/app/boards/shields/bfo9000/Kconfig.defconfig +++ b/app/boards/shields/bfo9000/Kconfig.defconfig @@ -4,16 +4,16 @@ if SHIELD_BFO9000_LEFT config ZMK_KEYBOARD_NAME - default "BFO-9000" + default "BFO-9000" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_BFO9000_LEFT || SHIELD_BFO9000_RIGHT config ZMK_SPLIT - default y + default y endif \ No newline at end of file diff --git a/app/boards/shields/bfo9000/Kconfig.shield b/app/boards/shields/bfo9000/Kconfig.shield index 4750e43a..5746abbe 100644 --- a/app/boards/shields/bfo9000/Kconfig.shield +++ b/app/boards/shields/bfo9000/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_BFO9000_LEFT - def_bool $(shields_list_contains,bfo9000_left) + def_bool $(shields_list_contains,bfo9000_left) config SHIELD_BFO9000_RIGHT - def_bool $(shields_list_contains,bfo9000_right) + def_bool $(shields_list_contains,bfo9000_right) diff --git a/app/boards/shields/bfo9000/bfo9000.dtsi b/app/boards/shields/bfo9000/bfo9000.dtsi index 0ceb9127..c5547920 100644 --- a/app/boards/shields/bfo9000/bfo9000.dtsi +++ b/app/boards/shields/bfo9000/bfo9000.dtsi @@ -7,38 +7,38 @@ #include / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <18>; - rows = <6>; - 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(0,15) RC(0,16) RC(0,17) - 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(1,15) RC(1,16) RC(1,17) - 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,13) RC(2,14) RC(2,15) RC(2,16) RC(2,17) - 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(3,14) RC(3,15) RC(3,16) RC(3,17) - 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) RC(4,14) RC(4,15) RC(4,16) RC(4,17) - RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5) RC(5,6) RC(5,7) RC(5,8) RC(5,9) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15) RC(5,16) RC(5,17) - >; - }; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <18>; + rows = <6>; + 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(0,15) RC(0,16) RC(0,17) + 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(1,15) RC(1,16) RC(1,17) + 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,13) RC(2,14) RC(2,15) RC(2,16) RC(2,17) + 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(3,14) RC(3,15) RC(3,16) RC(3,17) + 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) RC(4,14) RC(4,15) RC(4,16) RC(4,17) + RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5) RC(5,6) RC(5,7) RC(5,8) RC(5,9) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15) RC(5,16) RC(5,17) + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&pro_micro 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 0 (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)> - ; + diode-direction = "col2row"; + row-gpios + = <&pro_micro 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 0 (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)> + ; - }; + }; }; \ No newline at end of file diff --git a/app/boards/shields/bfo9000/bfo9000.keymap b/app/boards/shields/bfo9000/bfo9000.keymap index 22186a1d..18a2085c 100644 --- a/app/boards/shields/bfo9000/bfo9000.keymap +++ b/app/boards/shields/bfo9000/bfo9000.keymap @@ -15,41 +15,41 @@ #define LOWER 1 / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - // | Esc | Vol Up | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del | - // | Home | Vol Dn | ` | 1 | 2 | 3 | 4 | 5 | 6 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bk Spc | - // | End | Tab | Tab | Q | W | E | R | T | Y | T | Y | U | I | O | P | [ | ] | \ | - // | Pg Up | Caps | Ctrl | A | S | D | F | G | H | G | H | J | K | L | ; | ' | Enter | Enter | - // | Pg Dn | Up | Shift | Z | X | C | V | B | N | B | N | M | , | . | / | Shift | Up | | - // | Left | Dn | Right | Ctrl | Alt | Win | Spc | Spc | Enter | Bk Spc | Spc | Spc | Win | Alt | Ctrl | Left | Dn | Right | - bindings = < - &kp ESC &kp C_VOL_UP &kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL - &kp HOME &kp C_VOL_DN &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC - &kp END &kp TAB &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH - &kp PG_UP &kp CAPS &kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp APOS &kp ENTER &kp ENTER - &kp PG_DN &kp UP &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH &kp RSHFT &kp UP &mo LOWER - &kp LEFT &kp DOWN &kp RIGHT &kp LCTRL &kp LALT &kp LMETA &kp SPACE &kp SPACE &kp ENTER &kp BSPC &kp SPACE &kp SPACE &kp RMETA &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT - >; - }; + default_layer { + // | Esc | Vol Up | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del | + // | Home | Vol Dn | ` | 1 | 2 | 3 | 4 | 5 | 6 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bk Spc | + // | End | Tab | Tab | Q | W | E | R | T | Y | T | Y | U | I | O | P | [ | ] | \ | + // | Pg Up | Caps | Ctrl | A | S | D | F | G | H | G | H | J | K | L | ; | ' | Enter | Enter | + // | Pg Dn | Up | Shift | Z | X | C | V | B | N | B | N | M | , | . | / | Shift | Up | | + // | Left | Dn | Right | Ctrl | Alt | Win | Spc | Spc | Enter | Bk Spc | Spc | Spc | Win | Alt | Ctrl | Left | Dn | Right | + bindings = < + &kp ESC &kp C_VOL_UP &kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL + &kp HOME &kp C_VOL_DN &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC + &kp END &kp TAB &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH + &kp PG_UP &kp CAPS &kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp APOS &kp ENTER &kp ENTER + &kp PG_DN &kp UP &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH &kp RSHFT &kp UP &mo LOWER + &kp LEFT &kp DOWN &kp RIGHT &kp LCTRL &kp LALT &kp LMETA &kp SPACE &kp SPACE &kp ENTER &kp BSPC &kp SPACE &kp SPACE &kp RMETA &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT + >; + }; - lower_layer { - // | | | | | | | | | | | | | | | | | | | - // | | | | | | | | | | | | | | | | | | | - // | | | | | | | | | | | | | | | | | | | - // | | | | | | | | | | | | | | | | | | | - // | | | | | | | | | | | | | | | | | | | - // | | | | | | | | | | | | | | | | | | | - bindings = < - &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 &bt BT_SEL 7 &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 &bt BT_SEL 7 - &out OUT_USB &out OUT_BLE &trans &trans &trans &trans &trans &trans &trans &out OUT_USB &out OUT_BLE &trans &trans &trans &trans &trans &trans &trans - &ext_power EP_ON &ext_power EP_OFF &trans &trans &trans &trans &trans &trans &trans &ext_power EP_ON &ext_power EP_OFF &trans &trans &trans &trans &trans &trans &trans - &sys_reset &bootloader &trans &trans &trans &trans &trans &trans &trans &sys_reset &bootloader &trans &trans &trans &trans &trans &trans &trans - &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &trans &trans &trans &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &trans &trans &trans - &trans &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans &trans &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans - >; - }; - }; + lower_layer { + // | | | | | | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | | | | | | + bindings = < + &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 &bt BT_SEL 7 &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 &bt BT_SEL 7 + &out OUT_USB &out OUT_BLE &trans &trans &trans &trans &trans &trans &trans &out OUT_USB &out OUT_BLE &trans &trans &trans &trans &trans &trans &trans + &ext_power EP_ON &ext_power EP_OFF &trans &trans &trans &trans &trans &trans &trans &ext_power EP_ON &ext_power EP_OFF &trans &trans &trans &trans &trans &trans &trans + &sys_reset &bootloader &trans &trans &trans &trans &trans &trans &trans &sys_reset &bootloader &trans &trans &trans &trans &trans &trans &trans + &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &trans &trans &trans &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &trans &trans &trans + &trans &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans &trans &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans + >; + }; + }; }; diff --git a/app/boards/shields/bfo9000/bfo9000_left.overlay b/app/boards/shields/bfo9000/bfo9000_left.overlay index 3f034d95..9e921053 100644 --- a/app/boards/shields/bfo9000/bfo9000_left.overlay +++ b/app/boards/shields/bfo9000/bfo9000_left.overlay @@ -7,15 +7,15 @@ #include "bfo9000.dtsi" &kscan0 { - col-gpios - = <&pro_micro 9 GPIO_ACTIVE_HIGH> - , <&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> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - , <&pro_micro 21 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&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> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> + ; }; diff --git a/app/boards/shields/bfo9000/bfo9000_right.overlay b/app/boards/shields/bfo9000/bfo9000_right.overlay index 30bd35e2..897c6b0b 100644 --- a/app/boards/shields/bfo9000/bfo9000_right.overlay +++ b/app/boards/shields/bfo9000/bfo9000_right.overlay @@ -7,19 +7,19 @@ #include "bfo9000.dtsi" &default_transform { - col-offset = <9>; + col-offset = <9>; }; &kscan0 { - col-gpios - = <&pro_micro 9 GPIO_ACTIVE_HIGH> - , <&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> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - , <&pro_micro 21 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&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> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> + ; }; diff --git a/app/boards/shields/boardsource3x4/Kconfig.shield b/app/boards/shields/boardsource3x4/Kconfig.shield index cda55d07..7f574cea 100644 --- a/app/boards/shields/boardsource3x4/Kconfig.shield +++ b/app/boards/shields/boardsource3x4/Kconfig.shield @@ -2,5 +2,5 @@ # SPDX-License-Identifier: MIT config SHIELD_BOARDSOURCE3X4 - def_bool $(shields_list_contains,boardsource3x4) + def_bool $(shields_list_contains,boardsource3x4) diff --git a/app/boards/shields/chalice/boards/nice_nano.overlay b/app/boards/shields/chalice/boards/nice_nano.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/chalice/boards/nice_nano.overlay +++ b/app/boards/shields/chalice/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/chalice/boards/nice_nano_v2.overlay b/app/boards/shields/chalice/boards/nice_nano_v2.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/chalice/boards/nice_nano_v2.overlay +++ b/app/boards/shields/chalice/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/clog/Kconfig.defconfig b/app/boards/shields/clog/Kconfig.defconfig index 1ca779f3..53ded4d7 100644 --- a/app/boards/shields/clog/Kconfig.defconfig +++ b/app/boards/shields/clog/Kconfig.defconfig @@ -4,16 +4,16 @@ if SHIELD_CLOG_LEFT config ZMK_KEYBOARD_NAME - default "Clog" + default "Clog" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_CLOG_LEFT || SHIELD_CLOG_RIGHT config ZMK_SPLIT - default y + default y endif diff --git a/app/boards/shields/clog/Kconfig.shield b/app/boards/shields/clog/Kconfig.shield index 2301af94..69ecef8d 100644 --- a/app/boards/shields/clog/Kconfig.shield +++ b/app/boards/shields/clog/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_CLOG_LEFT - def_bool $(shields_list_contains,clog_left) + def_bool $(shields_list_contains,clog_left) config SHIELD_CLOG_RIGHT - def_bool $(shields_list_contains,clog_right) + def_bool $(shields_list_contains,clog_right) diff --git a/app/boards/shields/clog/clog.dtsi b/app/boards/shields/clog/clog.dtsi index ccad150c..40e9a39f 100644 --- a/app/boards/shields/clog/clog.dtsi +++ b/app/boards/shields/clog/clog.dtsi @@ -8,44 +8,44 @@ / { chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; }; default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <34>; - rows = <1>; - map = < - RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,20) RC(0,19) RC(0,18) RC(0,17) - RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,26) RC(0,25) RC(0,24) RC(0,23) RC(0,22) RC(0,21) - RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,31) RC(0,30) RC(0,29) RC(0,28) RC(0,27) - RC(0,15) RC(0,16) RC(0,33) RC(0,32) - >; + compatible = "zmk,matrix-transform"; + columns = <34>; + rows = <1>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,20) RC(0,19) RC(0,18) RC(0,17) + RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,26) RC(0,25) RC(0,24) RC(0,23) RC(0,22) RC(0,21) + RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,31) RC(0,30) RC(0,29) RC(0,28) RC(0,27) + RC(0,15) RC(0,16) RC(0,33) RC(0,32) + >; }; kscan0: kscan { - compatible = "zmk,kscan-gpio-direct"; - label = "KSCAN"; + compatible = "zmk,kscan-gpio-direct"; + label = "KSCAN"; - input-gpios - = <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; + input-gpios + = <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; }; }; diff --git a/app/boards/shields/clog/clog_right.overlay b/app/boards/shields/clog/clog_right.overlay index 0dc5d64f..8b0efb3d 100644 --- a/app/boards/shields/clog/clog_right.overlay +++ b/app/boards/shields/clog/clog_right.overlay @@ -7,5 +7,5 @@ #include "clog.dtsi" &default_transform { - col-offset = <17>; + col-offset = <17>; }; diff --git a/app/boards/shields/clueboard_california/Kconfig.defconfig b/app/boards/shields/clueboard_california/Kconfig.defconfig index e101ea76..278aaa44 100644 --- a/app/boards/shields/clueboard_california/Kconfig.defconfig +++ b/app/boards/shields/clueboard_california/Kconfig.defconfig @@ -2,13 +2,13 @@ if SHIELD_CLUEBOARD_CALIFORNIA config ZMK_KEYBOARD_NAME - default "Clueboard California Macropad" + default "Clueboard California Macropad" # Unable to use interrupts as the same pin number is used # across A & B controllers, and STM32F303CCT6 can't enable # interrutps for multiple controllers for the same "line" # for the external interrupts. config ZMK_KSCAN_DIRECT_POLLING - default y + default y endif diff --git a/app/boards/shields/clueboard_california/Kconfig.shield b/app/boards/shields/clueboard_california/Kconfig.shield index eca025d1..e987d29a 100644 --- a/app/boards/shields/clueboard_california/Kconfig.shield +++ b/app/boards/shields/clueboard_california/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_CLUEBOARD_CALIFORNIA - def_bool $(shields_list_contains,clueboard_california) + def_bool $(shields_list_contains,clueboard_california) diff --git a/app/boards/shields/clueboard_california/clueboard_california.keymap b/app/boards/shields/clueboard_california/clueboard_california.keymap index b9041c37..9af22fa1 100644 --- a/app/boards/shields/clueboard_california/clueboard_california.keymap +++ b/app/boards/shields/clueboard_california/clueboard_california.keymap @@ -8,18 +8,18 @@ #include / { - keymap0: keymap { - compatible = "zmk,keymap"; + keymap0: keymap { + compatible = "zmk,keymap"; - default_layer { - bindings = < - &kp N9 &kp N8 - &kp N7 &kp N6 - &kp N5 - &kp N4 &kp N3 - &kp N2 &kp N1 - &kp N0 - >; - }; - }; + default_layer { + bindings = < + &kp N9 &kp N8 + &kp N7 &kp N6 + &kp N5 + &kp N4 &kp N3 + &kp N2 &kp N1 + &kp N0 + >; + }; + }; }; \ No newline at end of file diff --git a/app/boards/shields/clueboard_california/clueboard_california.overlay b/app/boards/shields/clueboard_california/clueboard_california.overlay index 9f52d0d3..dfa5d9cf 100644 --- a/app/boards/shields/clueboard_california/clueboard_california.overlay +++ b/app/boards/shields/clueboard_california/clueboard_california.overlay @@ -5,30 +5,30 @@ */ / { - chosen { - zmk,kscan = &kscan0; - }; + chosen { + zmk,kscan = &kscan0; + }; - kscan0: kscan_0 { - compatible = "zmk,kscan-gpio-direct"; + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-direct"; - label = "KSCAN"; + label = "KSCAN"; - input-gpios - = <&gpioa 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpioa 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpioa 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpiob 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpiob 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpiob 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpioa 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpioa 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpiob 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&gpiob 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; + input-gpios + = <&gpioa 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpioa 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpioa 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiob 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiob 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiob 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpioa 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpioa 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiob 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiob 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; - }; + }; - // TODO: Per-key LED node(s) + // TODO: Per-key LED node(s) }; diff --git a/app/boards/shields/contra/Kconfig.shield b/app/boards/shields/contra/Kconfig.shield index 59412ff5..e9f8e804 100644 --- a/app/boards/shields/contra/Kconfig.shield +++ b/app/boards/shields/contra/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_CONTRA - def_bool $(shields_list_contains,contra) \ No newline at end of file + def_bool $(shields_list_contains,contra) \ No newline at end of file diff --git a/app/boards/shields/corne/Kconfig.defconfig b/app/boards/shields/corne/Kconfig.defconfig index acf542d7..07dd07e9 100644 --- a/app/boards/shields/corne/Kconfig.defconfig +++ b/app/boards/shields/corne/Kconfig.defconfig @@ -1,44 +1,44 @@ if SHIELD_CORNE_LEFT config ZMK_KEYBOARD_NAME - default "Corne" + default "Corne" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT config ZMK_SPLIT - default y + default y if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/corne/Kconfig.shield b/app/boards/shields/corne/Kconfig.shield index 3cac86fe..099680b9 100644 --- a/app/boards/shields/corne/Kconfig.shield +++ b/app/boards/shields/corne/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_CORNE_LEFT - def_bool $(shields_list_contains,corne_left) + def_bool $(shields_list_contains,corne_left) config SHIELD_CORNE_RIGHT - def_bool $(shields_list_contains,corne_right) + def_bool $(shields_list_contains,corne_right) diff --git a/app/boards/shields/corne/boards/nice_nano.overlay b/app/boards/shields/corne/boards/nice_nano.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/corne/boards/nice_nano.overlay +++ b/app/boards/shields/corne/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/corne/boards/nice_nano_v2.overlay b/app/boards/shields/corne/boards/nice_nano_v2.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/corne/boards/nice_nano_v2.overlay +++ b/app/boards/shields/corne/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/corne/corne.dtsi b/app/boards/shields/corne/corne.dtsi index a9c1c287..0e9eddf9 100644 --- a/app/boards/shields/corne/corne.dtsi +++ b/app/boards/shields/corne/corne.dtsi @@ -7,77 +7,77 @@ #include / { - chosen { - zephyr,display = &oled; - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zephyr,display = &oled; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <4>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <4>; // | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | // | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | // | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - map = < + map = < RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) - >; - }; + >; + }; - five_column_transform: keymap_transform_1 { - compatible = "zmk,matrix-transform"; - columns = <10>; - rows = <4>; + five_column_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; // | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | // | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | // | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - map = < + map = < RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) - >; - }; + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + diode-direction = "col2row"; + row-gpios + = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; - }; + }; - // TODO: per-key RGB node(s)? + // TODO: per-key RGB node(s)? }; &pro_micro_i2c { - status = "okay"; + 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>; - }; + 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/corne/corne.keymap b/app/boards/shields/corne/corne.keymap index 53218a86..0555cf41 100644 --- a/app/boards/shields/corne/corne.keymap +++ b/app/boards/shields/corne/corne.keymap @@ -35,7 +35,7 @@ &kp TAB &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans &kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT + &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT >; }; @@ -49,7 +49,7 @@ &kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC &kp LCTRL &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE &kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE - &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT + &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT >; }; }; diff --git a/app/boards/shields/corne/corne_left.overlay b/app/boards/shields/corne/corne_left.overlay index fe7e3c78..117cb19e 100644 --- a/app/boards/shields/corne/corne_left.overlay +++ b/app/boards/shields/corne/corne_left.overlay @@ -7,12 +7,12 @@ #include "corne.dtsi" &kscan0 { - 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> - ; + 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> + ; }; diff --git a/app/boards/shields/corne/corne_right.overlay b/app/boards/shields/corne/corne_right.overlay index 1d7ed9ec..a8a0cfe7 100644 --- a/app/boards/shields/corne/corne_right.overlay +++ b/app/boards/shields/corne/corne_right.overlay @@ -7,20 +7,20 @@ #include "corne.dtsi" &default_transform { - col-offset = <6>; + col-offset = <6>; }; &five_column_transform { - col-offset = <6>; + col-offset = <6>; }; &kscan0 { - col-gpios - = <&pro_micro 14 GPIO_ACTIVE_HIGH> - , <&pro_micro 15 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - , <&pro_micro 21 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> + ; }; diff --git a/app/boards/shields/cradio/Kconfig.defconfig b/app/boards/shields/cradio/Kconfig.defconfig index b600383a..c5d03f4e 100644 --- a/app/boards/shields/cradio/Kconfig.defconfig +++ b/app/boards/shields/cradio/Kconfig.defconfig @@ -4,16 +4,16 @@ if SHIELD_CRADIO_LEFT config ZMK_KEYBOARD_NAME - default "Cradio" + default "Cradio" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_CRADIO_LEFT || SHIELD_CRADIO_RIGHT config ZMK_SPLIT - default y + default y endif diff --git a/app/boards/shields/cradio/Kconfig.shield b/app/boards/shields/cradio/Kconfig.shield index bb5f0735..affb1c53 100644 --- a/app/boards/shields/cradio/Kconfig.shield +++ b/app/boards/shields/cradio/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_CRADIO_LEFT - def_bool $(shields_list_contains,cradio_left) + def_bool $(shields_list_contains,cradio_left) config SHIELD_CRADIO_RIGHT - def_bool $(shields_list_contains,cradio_right) + def_bool $(shields_list_contains,cradio_right) diff --git a/app/boards/shields/cradio/README.md b/app/boards/shields/cradio/README.md index ee1cab0e..2c4e2e60 100644 --- a/app/boards/shields/cradio/README.md +++ b/app/boards/shields/cradio/README.md @@ -10,25 +10,25 @@ Some revisions of the aforementioned PCBs have slightly different pin arrangemen /* Adjusted Cradio pin arrangement */ /* The position of Q and B keys have been swapped */ &kscan0 { - input-gpios - = <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; + input-gpios + = <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; }; ``` diff --git a/app/boards/shields/cradio/cradio.dtsi b/app/boards/shields/cradio/cradio.dtsi index ca464c95..57dcfd4b 100644 --- a/app/boards/shields/cradio/cradio.dtsi +++ b/app/boards/shields/cradio/cradio.dtsi @@ -8,45 +8,45 @@ / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <34>; - rows = <1>; - map = < - RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,21) RC(0,20) RC(0,19) RC(0,18) RC(0,17) - RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,26) RC(0,25) RC(0,24) RC(0,23) RC(0,22) - RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,31) RC(0,30) RC(0,29) RC(0,28) RC(0,27) - RC(0,15) RC(0,16) RC(0,33) RC(0,32) - >; - }; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <34>; + rows = <1>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,21) RC(0,20) RC(0,19) RC(0,18) RC(0,17) + RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,26) RC(0,25) RC(0,24) RC(0,23) RC(0,22) + RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,31) RC(0,30) RC(0,29) RC(0,28) RC(0,27) + RC(0,15) RC(0,16) RC(0,33) RC(0,32) + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-direct"; - label = "KSCAN"; - input-gpios - = <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; - }; + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + label = "KSCAN"; + input-gpios + = <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; }; diff --git a/app/boards/shields/cradio/cradio_right.overlay b/app/boards/shields/cradio/cradio_right.overlay index 41436e97..fea9ae1c 100644 --- a/app/boards/shields/cradio/cradio_right.overlay +++ b/app/boards/shields/cradio/cradio_right.overlay @@ -7,5 +7,5 @@ #include "cradio.dtsi" &default_transform { - col-offset = <17>; + col-offset = <17>; }; diff --git a/app/boards/shields/crbn/Kconfig.defconfig b/app/boards/shields/crbn/Kconfig.defconfig index 2a5c8e39..c00e97a4 100644 --- a/app/boards/shields/crbn/Kconfig.defconfig +++ b/app/boards/shields/crbn/Kconfig.defconfig @@ -4,6 +4,6 @@ if SHIELD_CRBN config ZMK_KEYBOARD_NAME - default "CRBN" + default "CRBN" endif diff --git a/app/boards/shields/crbn/Kconfig.shield b/app/boards/shields/crbn/Kconfig.shield index ceeb5f63..bf92dbf1 100644 --- a/app/boards/shields/crbn/Kconfig.shield +++ b/app/boards/shields/crbn/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_CRBN - def_bool $(shields_list_contains,crbn) + def_bool $(shields_list_contains,crbn) diff --git a/app/boards/shields/crbn/crbn.keymap b/app/boards/shields/crbn/crbn.keymap index b967e5e2..f963ba84 100644 --- a/app/boards/shields/crbn/crbn.keymap +++ b/app/boards/shields/crbn/crbn.keymap @@ -9,54 +9,54 @@ #include / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - // ----------------------------------------------------------------------------------------- - // | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC | - // | ESC | A | S | D | F | G | H | J | K | L | ; | ' | - // | SHIFT | Z | X | C | V | B | N | M | , | . | / | RET | - // | | LCTL | LALT | LGUI | LOWR | SPACE | RAIS | LARW | DARW | UARW | RARW | - bindings = < - &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 ESC &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 SLASH &kp RET - &trans &kp LCTL &kp LALT &kp LGUI &mo 1 &kp SPACE &trans &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT - >; + default_layer { + // ----------------------------------------------------------------------------------------- + // | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC | + // | ESC | A | S | D | F | G | H | J | K | L | ; | ' | + // | SHIFT | Z | X | C | V | B | N | M | , | . | / | RET | + // | | LCTL | LALT | LGUI | LOWR | SPACE | RAIS | LARW | DARW | UARW | RARW | + bindings = < + &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 ESC &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 SLASH &kp RET + &trans &kp LCTL &kp LALT &kp LGUI &mo 1 &kp SPACE &trans &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT + >; - sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; - }; + sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; + }; - lower { - bindings = < - &kp LS(GRAVE) &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp LS(N0) &kp DEL - &kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE - &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp LS(HASH) &kp LS(BSLH) &kp HOME &kp END &trans - &trans &trans &trans &trans &trans &trans &trans &mo 3 &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP - >; + lower { + bindings = < + &kp LS(GRAVE) &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp LS(N0) &kp DEL + &kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE + &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp LS(HASH) &kp LS(BSLH) &kp HOME &kp END &trans + &trans &trans &trans &trans &trans &trans &trans &mo 3 &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP + >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; - raise { - bindings = < - &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC - &kp DEL &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 &kp F12 &kp HASH &kp BSLH &kp PG_UP &kp PG_DN &trans - &trans &trans &trans &trans &mo 3 &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP - >; + raise { + bindings = < + &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC + &kp DEL &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 &kp F12 &kp HASH &kp BSLH &kp PG_UP &kp PG_DN &trans + &trans &trans &trans &trans &mo 3 &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP + >; - sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; - }; + sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; + }; - control { - bindings = < - &sys_reset &bootloader &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans - &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &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 - >; - }; - }; + control { + bindings = < + &sys_reset &bootloader &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans + &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &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 + >; + }; + }; }; diff --git a/app/boards/shields/crbn/crbn.overlay b/app/boards/shields/crbn/crbn.overlay index 18382cce..817a83d0 100644 --- a/app/boards/shields/crbn/crbn.overlay +++ b/app/boards/shields/crbn/crbn.overlay @@ -7,49 +7,49 @@ #include / { - chosen { - zmk,kscan = &kscan0; - }; + chosen { + zmk,kscan = &kscan0; + }; - kscan0: kscan_0 { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; - diode-direction = "col2row"; + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; - col-gpios - = <&pro_micro 1 GPIO_ACTIVE_HIGH> - , <&pro_micro 0 GPIO_ACTIVE_HIGH> - , <&pro_micro 2 GPIO_ACTIVE_HIGH> - , <&pro_micro 3 GPIO_ACTIVE_HIGH> - , <&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 9 GPIO_ACTIVE_HIGH> - , <&pro_micro 10 GPIO_ACTIVE_HIGH> - , <&pro_micro 16 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&pro_micro 1 GPIO_ACTIVE_HIGH> + , <&pro_micro 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 2 GPIO_ACTIVE_HIGH> + , <&pro_micro 3 GPIO_ACTIVE_HIGH> + , <&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 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + ; - row-gpios - = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - }; + row-gpios + = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; - encoder: encoder { - compatible = "alps,ec11"; - label = "ENCODER"; - a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - resolution = <2>; - status = "okay"; - }; + encoder: encoder { + compatible = "alps,ec11"; + label = "ENCODER"; + a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <2>; + status = "okay"; + }; - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&encoder>; - }; + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&encoder>; + }; }; diff --git a/app/boards/shields/elephant42/Kconfig.defconfig b/app/boards/shields/elephant42/Kconfig.defconfig index 55ee6c87..70a312c1 100644 --- a/app/boards/shields/elephant42/Kconfig.defconfig +++ b/app/boards/shields/elephant42/Kconfig.defconfig @@ -14,34 +14,34 @@ endif if SHIELD_ELEPHANT42_LEFT || SHIELD_ELEPHANT42_RIGHT config ZMK_SPLIT - default y + default y if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/elephant42/boards/nice_nano.overlay b/app/boards/shields/elephant42/boards/nice_nano.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/elephant42/boards/nice_nano.overlay +++ b/app/boards/shields/elephant42/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/elephant42/boards/nice_nano_v2.overlay b/app/boards/shields/elephant42/boards/nice_nano_v2.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/elephant42/boards/nice_nano_v2.overlay +++ b/app/boards/shields/elephant42/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/elephant42/elephant42.dtsi b/app/boards/shields/elephant42/elephant42.dtsi index 2d3f5166..b0e9a32e 100644 --- a/app/boards/shields/elephant42/elephant42.dtsi +++ b/app/boards/shields/elephant42/elephant42.dtsi @@ -40,21 +40,21 @@ RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) }; &pro_micro_i2c { - status = "okay"; + 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>; - }; + 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/ergodash/Kconfig.defconfig b/app/boards/shields/ergodash/Kconfig.defconfig index 43cab0b1..34a87e8e 100644 --- a/app/boards/shields/ergodash/Kconfig.defconfig +++ b/app/boards/shields/ergodash/Kconfig.defconfig @@ -4,16 +4,16 @@ if SHIELD_ERGODASH_LEFT config ZMK_KEYBOARD_NAME - default "Ergodash" + default "Ergodash" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_ERGODASH_LEFT || SHIELD_ERGODASH_RIGHT config ZMK_SPLIT - default y + default y endif diff --git a/app/boards/shields/ergodash/Kconfig.shield b/app/boards/shields/ergodash/Kconfig.shield index b3cca293..5814e21e 100644 --- a/app/boards/shields/ergodash/Kconfig.shield +++ b/app/boards/shields/ergodash/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_ERGODASH_LEFT - def_bool $(shields_list_contains,ergodash_left) + def_bool $(shields_list_contains,ergodash_left) config SHIELD_ERGODASH_RIGHT - def_bool $(shields_list_contains,ergodash_right) + def_bool $(shields_list_contains,ergodash_right) diff --git a/app/boards/shields/ergodash/ergodash.dtsi b/app/boards/shields/ergodash/ergodash.dtsi index a2b76075..d109fa66 100644 --- a/app/boards/shields/ergodash/ergodash.dtsi +++ b/app/boards/shields/ergodash/ergodash.dtsi @@ -7,15 +7,15 @@ #include / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <14>; - rows = <5>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <5>; // Numbering based on rev 1.2 schema // * keys that can be in different positions are denoted as MW // * MW40 can be broken off @@ -24,38 +24,38 @@ // | SW3 | SW7 | SW11 | SW15 | SW19 | SW23 | SW27 | | | | SW27 | SW23 | SW19 | SW15 | SW11 | SW7 | SW3 | // | SW4 | SW8 | SW12 | SW16 | SW20 | SW24 | | MW28 | | MW28 | | SW24 | SW20 | SW16 | SW12 | SW8 | SW4 | // | SW30 | SW31 | SW32 | MW33 | SW34 | | MW35 | MW40 | | MW40 | MW35 | | SW34 | MW33 | SW32 | SW31 | SW30 | - map = < + map = < RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,13) RC(0,12) RC(0,11) RC(0,10) RC(0,9) RC(0,8) RC(0,7) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,13) RC(1,12) RC(1,11) RC(1,10) RC(1,9) RC(1,8) RC(1,7) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,13) RC(2,12) RC(2,11) RC(2,10) RC(2,9) RC(2,8) RC(2,7) 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,12) RC(3,11) RC(3,10) RC(3,9) RC(3,8) RC(3,7) 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,12) RC(4,11) RC(4,10) RC(4,9) RC(4,8) RC(4,7) - >; + >; }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; + diode-direction = "col2row"; - row-gpios - = <&pro_micro 4 (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)> - ; + row-gpios + = <&pro_micro 4 (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)> + ; - col-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)> - , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - }; + col-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)> + , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; }; diff --git a/app/boards/shields/ergodash/ergodash_right.overlay b/app/boards/shields/ergodash/ergodash_right.overlay index 464b3f5d..07fbbb70 100644 --- a/app/boards/shields/ergodash/ergodash_right.overlay +++ b/app/boards/shields/ergodash/ergodash_right.overlay @@ -7,5 +7,5 @@ #include "ergodash.dtsi" &default_transform { - col-offset = <7>; + col-offset = <7>; }; diff --git a/app/boards/shields/eternal_keypad/Kconfig.defconfig b/app/boards/shields/eternal_keypad/Kconfig.defconfig index 4d4195ef..72514192 100644 --- a/app/boards/shields/eternal_keypad/Kconfig.defconfig +++ b/app/boards/shields/eternal_keypad/Kconfig.defconfig @@ -4,6 +4,6 @@ if SHIELD_ETERNAL_KEYPAD || SHIELD_ETERNAL_KEYPAD_LEFTY config ZMK_KEYBOARD_NAME - default "Eternal Keypad" + default "Eternal Keypad" endif diff --git a/app/boards/shields/eternal_keypad/Kconfig.shield b/app/boards/shields/eternal_keypad/Kconfig.shield index 4a59379e..23015153 100644 --- a/app/boards/shields/eternal_keypad/Kconfig.shield +++ b/app/boards/shields/eternal_keypad/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_ETERNAL_KEYPAD - def_bool $(shields_list_contains,eternal_keypad) + def_bool $(shields_list_contains,eternal_keypad) config SHIELD_ETERNAL_KEYPAD_LEFTY - def_bool $(shields_list_contains,eternal_keypad_lefty) + def_bool $(shields_list_contains,eternal_keypad_lefty) diff --git a/app/boards/shields/eternal_keypad/boards/nice_nano.overlay b/app/boards/shields/eternal_keypad/boards/nice_nano.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/eternal_keypad/boards/nice_nano.overlay +++ b/app/boards/shields/eternal_keypad/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay b/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay +++ b/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/fourier/Kconfig.defconfig b/app/boards/shields/fourier/Kconfig.defconfig index b887870c..a07ca714 100644 --- a/app/boards/shields/fourier/Kconfig.defconfig +++ b/app/boards/shields/fourier/Kconfig.defconfig @@ -5,16 +5,16 @@ if SHIELD_FOURIER_LEFT config ZMK_KEYBOARD_NAME - default "Fourier" + default "Fourier" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_FOURIER_LEFT || SHIELD_FOURIER_RIGHT config ZMK_SPLIT - default y + default y endif diff --git a/app/boards/shields/fourier/Kconfig.shield b/app/boards/shields/fourier/Kconfig.shield index 2e337410..ee28c7ac 100644 --- a/app/boards/shields/fourier/Kconfig.shield +++ b/app/boards/shields/fourier/Kconfig.shield @@ -3,7 +3,7 @@ config SHIELD_FOURIER_LEFT - def_bool $(shields_list_contains,fourier_left) + def_bool $(shields_list_contains,fourier_left) config SHIELD_FOURIER_RIGHT - def_bool $(shields_list_contains,fourier_right) + def_bool $(shields_list_contains,fourier_right) diff --git a/app/boards/shields/fourier/fourier.dtsi b/app/boards/shields/fourier/fourier.dtsi index 99027ea9..0902d687 100644 --- a/app/boards/shields/fourier/fourier.dtsi +++ b/app/boards/shields/fourier/fourier.dtsi @@ -7,37 +7,37 @@ #include / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - /* - * This transform correspondsto the 60% left without macro keypad and 65% right, even this - * combination of PCBs can have keys in different locations based on configuration. - */ - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <13>; - rows = <4>; - map = < + /* + * This transform correspondsto the 60% left without macro keypad and 65% right, even this + * combination of PCBs can have keys in different locations based on configuration. + */ + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <13>; + 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(0,9) RC(0,10) RC(0, 11) RC(0,12) 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,12) 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,12) RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) /**/ RC(3,6) RC(3,9) RC(3,10) RC(3,11) RC(3,12) - >; - }; + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row A - , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row B - , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row C - , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row D - ; - }; + diode-direction = "col2row"; + row-gpios + = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row A + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row B + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row C + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row D + ; + }; }; diff --git a/app/boards/shields/helix/boards/nice_nano.overlay b/app/boards/shields/helix/boards/nice_nano.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/helix/boards/nice_nano.overlay +++ b/app/boards/shields/helix/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/helix/boards/nice_nano_v2.overlay b/app/boards/shields/helix/boards/nice_nano_v2.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/helix/boards/nice_nano_v2.overlay +++ b/app/boards/shields/helix/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/helix/helix_right.overlay b/app/boards/shields/helix/helix_right.overlay index 42dd0f52..0d3cc63d 100644 --- a/app/boards/shields/helix/helix_right.overlay +++ b/app/boards/shields/helix/helix_right.overlay @@ -7,7 +7,7 @@ #include "helix.dtsi" &default_transform { - col-offset = <7>; + col-offset = <7>; }; &kscan0 { diff --git a/app/boards/shields/hummingbird/hummingbird.overlay b/app/boards/shields/hummingbird/hummingbird.overlay index 0c48c128..1b40acba 100644 --- a/app/boards/shields/hummingbird/hummingbird.overlay +++ b/app/boards/shields/hummingbird/hummingbird.overlay @@ -10,8 +10,8 @@ chosen { zmk,kscan = &kscan0; zmk,matrix_transform = &default_transform; - /delete-property/ zephyr,console; - /delete-property/ zephyr,shell-uart; + /delete-property/ zephyr,console; + /delete-property/ zephyr,shell-uart; }; default_transform: keymap_transform_0 { diff --git a/app/boards/shields/iris/Kconfig.defconfig b/app/boards/shields/iris/Kconfig.defconfig index 83331d10..b68bc999 100644 --- a/app/boards/shields/iris/Kconfig.defconfig +++ b/app/boards/shields/iris/Kconfig.defconfig @@ -4,16 +4,16 @@ if SHIELD_IRIS_LEFT config ZMK_KEYBOARD_NAME - default "Iris" + default "Iris" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_IRIS_LEFT || SHIELD_IRIS_RIGHT config ZMK_SPLIT - default y + default y endif \ No newline at end of file diff --git a/app/boards/shields/iris/Kconfig.shield b/app/boards/shields/iris/Kconfig.shield index 370bd222..764d8101 100644 --- a/app/boards/shields/iris/Kconfig.shield +++ b/app/boards/shields/iris/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_IRIS_LEFT - def_bool $(shields_list_contains,iris_left) + def_bool $(shields_list_contains,iris_left) config SHIELD_IRIS_RIGHT - def_bool $(shields_list_contains,iris_right) + def_bool $(shields_list_contains,iris_right) diff --git a/app/boards/shields/iris/iris.dtsi b/app/boards/shields/iris/iris.dtsi index 0e976f86..a0caf1ad 100644 --- a/app/boards/shields/iris/iris.dtsi +++ b/app/boards/shields/iris/iris.dtsi @@ -7,41 +7,41 @@ #include / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <16>; - rows = <4>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <16>; + rows = <4>; // | 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 | // | SW29 | SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | SW29 | - map = < + 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,2) RC(4,9) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) - RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) - >; - }; + RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&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 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + diode-direction = "col2row"; + row-gpios + = <&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 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; - }; + }; }; \ No newline at end of file diff --git a/app/boards/shields/iris/iris.keymap b/app/boards/shields/iris/iris.keymap index 7c00d0a5..209c2277 100644 --- a/app/boards/shields/iris/iris.keymap +++ b/app/boards/shields/iris/iris.keymap @@ -9,55 +9,55 @@ #include / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { + 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 | -// | GUI | LOWER| SPACE | | ENTER | RAISE| ALT | - bindings = < +// | GUI | LOWER| SPACE | | ENTER | RAISE| ALT | + 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 LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp RALT - >; - }; + &kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp RALT + >; + }; - lower_layer { + lower_layer { // ------------------------------------------------------------------------------------------------------------ // | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | // | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | // | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ | // | | | | | | | | | | | _ | + | { | } | "|" | // | | | | | | | | - bindings = < + 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 KP_MULTIPLY &kp LPAR &kp RPAR &kp TILDE &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &kp PIPE - &trans &trans &trans &trans &trans &trans - >; - }; + &trans &trans &trans &trans &trans &trans + >; + }; - raise_layer { + 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 = < + 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 &trans &trans + >; + }; + }; }; diff --git a/app/boards/shields/iris/iris_left.overlay b/app/boards/shields/iris/iris_left.overlay index 2c52fca8..eb330d31 100644 --- a/app/boards/shields/iris/iris_left.overlay +++ b/app/boards/shields/iris/iris_left.overlay @@ -7,12 +7,12 @@ #include "iris.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> - ; + 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> + ; }; diff --git a/app/boards/shields/iris/iris_right.overlay b/app/boards/shields/iris/iris_right.overlay index 2ed712a2..d2375b18 100644 --- a/app/boards/shields/iris/iris_right.overlay +++ b/app/boards/shields/iris/iris_right.overlay @@ -7,16 +7,16 @@ #include "iris.dtsi" &default_transform { - col-offset = <6>; + 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> - ; + 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> + ; }; diff --git a/app/boards/shields/jian/Kconfig.defconfig b/app/boards/shields/jian/Kconfig.defconfig index bbdafbae..2f3d0a17 100644 --- a/app/boards/shields/jian/Kconfig.defconfig +++ b/app/boards/shields/jian/Kconfig.defconfig @@ -2,16 +2,16 @@ if SHIELD_JIAN_LEFT config ZMK_KEYBOARD_NAME - default "Jian" + default "Jian" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_JIAN_LEFT || SHIELD_JIAN_RIGHT config ZMK_SPLIT - default y + default y endif diff --git a/app/boards/shields/jian/Kconfig.shield b/app/boards/shields/jian/Kconfig.shield index 5b874f03..efcfa214 100644 --- a/app/boards/shields/jian/Kconfig.shield +++ b/app/boards/shields/jian/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_JIAN_LEFT - def_bool $(shields_list_contains,jian_left) + def_bool $(shields_list_contains,jian_left) config SHIELD_JIAN_RIGHT - def_bool $(shields_list_contains,jian_right) + def_bool $(shields_list_contains,jian_right) diff --git a/app/boards/shields/jian/jian.dtsi b/app/boards/shields/jian/jian.dtsi index 2b1eb391..8e772791 100644 --- a/app/boards/shields/jian/jian.dtsi +++ b/app/boards/shields/jian/jian.dtsi @@ -7,70 +7,70 @@ #include / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <4>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <4>; // | SW0 | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | SW0 | // | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | // | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - map = < + map = < RC(2,0) RC(0,0) RC(0,1) RC(1,2) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(1,9) RC(0,10) RC(0,11) RC(2,11) RC(1,0) RC(1,1) RC(2,2) RC(1,3) RC(1,4) RC(0,5) RC(0,6) RC(1,7) RC(1,8) RC(2,9) RC(1,10) RC(1,11) RC(2,1) RC(3,2) RC(3,3) RC(2,3) RC(2,4) RC(1,5) RC(1,6) RC(2,7) RC(2,8) RC(3,8) RC(3,9) RC(2,10) RC(3,4) RC(2,5) RC(3,5) RC(3,6) RC(2,6) RC(3,7) - >; - }; + >; + }; - crkbd_transform: keymap_transform_1 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <4>; + crkbd_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <4>; // | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | // | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | // | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - map = < - RC(0,0) RC(0,1) RC(1,2) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(1,9) RC(0,10) RC(0,11) + map = < + RC(0,0) RC(0,1) RC(1,2) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(1,9) RC(0,10) RC(0,11) RC(1,0) RC(1,1) RC(2,2) RC(1,3) RC(1,4) RC(0,5) RC(0,6) RC(1,7) RC(1,8) RC(2,9) RC(1,10) RC(1,11) RC(2,1) RC(3,2) RC(3,3) RC(2,3) RC(2,4) RC(1,5) RC(1,6) RC(2,7) RC(2,8) RC(3,8) RC(3,9) RC(2,10) RC(3,4) RC(2,5) RC(3,5) RC(3,6) RC(2,6) RC(3,7) - >; - }; + >; + }; - five_column_transform: keymap_transform_2 { - compatible = "zmk,matrix-transform"; - columns = <10>; - rows = <4>; + five_column_transform: keymap_transform_2 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; // | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | // | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | // | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - map = < - RC(0,1) RC(1,2) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(1,9) RC(0,10) + map = < + RC(0,1) RC(1,2) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(1,9) RC(0,10) RC(1,1) RC(2,2) RC(1,3) RC(1,4) RC(0,5) RC(0,6) RC(1,7) RC(1,8) RC(2,9) RC(1,10) RC(3,2) RC(3,3) RC(2,3) RC(2,4) RC(1,5) RC(1,6) RC(2,7) RC(2,8) RC(3,8) RC(3,9) RC(3,4) RC(2,5) RC(3,5) RC(3,6) RC(2,6) RC(3,7) - >; - }; + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + diode-direction = "col2row"; + row-gpios + = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; - }; + }; }; diff --git a/app/boards/shields/jian/jian_left.overlay b/app/boards/shields/jian/jian_left.overlay index e7f9d5b5..e402f03b 100644 --- a/app/boards/shields/jian/jian_left.overlay +++ b/app/boards/shields/jian/jian_left.overlay @@ -7,12 +7,12 @@ #include "jian.dtsi" &kscan0 { - col-gpios - = <&pro_micro 1 GPIO_ACTIVE_HIGH> - , <&pro_micro 0 GPIO_ACTIVE_HIGH> - , <&pro_micro 8 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 16 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&pro_micro 1 GPIO_ACTIVE_HIGH> + , <&pro_micro 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + ; }; diff --git a/app/boards/shields/jian/jian_right.overlay b/app/boards/shields/jian/jian_right.overlay index cac83fd3..f646741b 100644 --- a/app/boards/shields/jian/jian_right.overlay +++ b/app/boards/shields/jian/jian_right.overlay @@ -7,24 +7,24 @@ #include "jian.dtsi" &default_transform { - col-offset = <6>; + col-offset = <6>; }; &crkbd_transform { - col-offset = <6>; + col-offset = <6>; }; &five_column_transform { - col-offset = <6>; + col-offset = <6>; }; &kscan0 { - col-gpios - = <&pro_micro 16 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 8 GPIO_ACTIVE_HIGH> - , <&pro_micro 0 GPIO_ACTIVE_HIGH> - , <&pro_micro 1 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 1 GPIO_ACTIVE_HIGH> + ; }; diff --git a/app/boards/shields/jiran/Kconfig.defconfig b/app/boards/shields/jiran/Kconfig.defconfig index b5b1f97b..0c6683f4 100644 --- a/app/boards/shields/jiran/Kconfig.defconfig +++ b/app/boards/shields/jiran/Kconfig.defconfig @@ -4,16 +4,16 @@ if SHIELD_JIRAN_LEFT config ZMK_KEYBOARD_NAME - default "Jiran" + default "Jiran" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_JIRAN_LEFT || SHIELD_JIRAN_RIGHT config ZMK_SPLIT - default y + default y endif diff --git a/app/boards/shields/jiran/Kconfig.shield b/app/boards/shields/jiran/Kconfig.shield index 8a24ace0..8f480723 100644 --- a/app/boards/shields/jiran/Kconfig.shield +++ b/app/boards/shields/jiran/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_JIRAN_LEFT - def_bool $(shields_list_contains,jiran_left) + def_bool $(shields_list_contains,jiran_left) config SHIELD_JIRAN_RIGHT - def_bool $(shields_list_contains,jiran_right) + def_bool $(shields_list_contains,jiran_right) diff --git a/app/boards/shields/jiran/jiran.dtsi b/app/boards/shields/jiran/jiran.dtsi index f0727dd4..b7e74c27 100644 --- a/app/boards/shields/jiran/jiran.dtsi +++ b/app/boards/shields/jiran/jiran.dtsi @@ -7,76 +7,76 @@ #include / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <5>; + 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 | // | SW0 | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | SW0 | // | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | // | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | // | SW25 | SW26 | SW27 | | SW27 | SW26 | SW25 | - map = < + 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(4,0) 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(4,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,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) - >; - }; + >; + }; - jian_transform: keymap_transform_1 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <5>; + jian_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <5>; // | SW0 | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | SW0 | // | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | // | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | // | SW25 | SW26 | SW27 | | SW27 | SW26 | SW25 | - map = < + map = < RC(4,0) 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(4,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,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) - >; - }; + >; + }; - crkbd_transform: keymap_transform_2 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <5>; + crkbd_transform: keymap_transform_2 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <5>; // | 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 | | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | // | SW25 | SW26 | SW27 | | SW27 | SW26 | SW25 | - map = < + map = < 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,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) - >; - }; + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&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)> - ; + diode-direction = "col2row"; + row-gpios + = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&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)> + ; - }; + }; }; diff --git a/app/boards/shields/jiran/jiran_left.overlay b/app/boards/shields/jiran/jiran_left.overlay index 4466202c..3b7f5e55 100644 --- a/app/boards/shields/jiran/jiran_left.overlay +++ b/app/boards/shields/jiran/jiran_left.overlay @@ -7,12 +7,12 @@ #include "jiran.dtsi" &kscan0 { - col-gpios - = <&pro_micro 1 GPIO_ACTIVE_HIGH> - , <&pro_micro 0 GPIO_ACTIVE_HIGH> - , <&pro_micro 4 GPIO_ACTIVE_HIGH> - , <&pro_micro 5 GPIO_ACTIVE_HIGH> - , <&pro_micro 6 GPIO_ACTIVE_HIGH> - , <&pro_micro 7 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&pro_micro 1 GPIO_ACTIVE_HIGH> + , <&pro_micro 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 7 GPIO_ACTIVE_HIGH> + ; }; diff --git a/app/boards/shields/jiran/jiran_right.overlay b/app/boards/shields/jiran/jiran_right.overlay index c3648797..668c5513 100644 --- a/app/boards/shields/jiran/jiran_right.overlay +++ b/app/boards/shields/jiran/jiran_right.overlay @@ -7,24 +7,24 @@ #include "jiran.dtsi" &default_transform { - col-offset = <6>; + col-offset = <6>; }; &jian_transform { - col-offset = <6>; + col-offset = <6>; }; &crkbd_transform { - col-offset = <6>; + col-offset = <6>; }; &kscan0 { - col-gpios - = <&pro_micro 7 GPIO_ACTIVE_HIGH> - , <&pro_micro 6 GPIO_ACTIVE_HIGH> - , <&pro_micro 5 GPIO_ACTIVE_HIGH> - , <&pro_micro 4 GPIO_ACTIVE_HIGH> - , <&pro_micro 0 GPIO_ACTIVE_HIGH> - , <&pro_micro 1 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&pro_micro 7 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 1 GPIO_ACTIVE_HIGH> + ; }; diff --git a/app/boards/shields/jorne/Kconfig.defconfig b/app/boards/shields/jorne/Kconfig.defconfig index 775bb56a..04beb792 100644 --- a/app/boards/shields/jorne/Kconfig.defconfig +++ b/app/boards/shields/jorne/Kconfig.defconfig @@ -2,44 +2,44 @@ if SHIELD_JORNE_LEFT config ZMK_KEYBOARD_NAME - default "Jorne" + default "Jorne" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_JORNE_LEFT || SHIELD_JORNE_RIGHT config ZMK_SPLIT - default y + default y if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/jorne/Kconfig.shield b/app/boards/shields/jorne/Kconfig.shield index 88fd4e5a..37a3cab5 100644 --- a/app/boards/shields/jorne/Kconfig.shield +++ b/app/boards/shields/jorne/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_JORNE_LEFT - def_bool $(shields_list_contains,jorne_left) + def_bool $(shields_list_contains,jorne_left) config SHIELD_JORNE_RIGHT - def_bool $(shields_list_contains,jorne_right) + def_bool $(shields_list_contains,jorne_right) diff --git a/app/boards/shields/jorne/boards/nice_nano.overlay b/app/boards/shields/jorne/boards/nice_nano.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/jorne/boards/nice_nano.overlay +++ b/app/boards/shields/jorne/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/jorne/boards/nice_nano_v2.overlay b/app/boards/shields/jorne/boards/nice_nano_v2.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/jorne/boards/nice_nano_v2.overlay +++ b/app/boards/shields/jorne/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/jorne/jorne.dtsi b/app/boards/shields/jorne/jorne.dtsi index bb862b8d..1d12b85c 100644 --- a/app/boards/shields/jorne/jorne.dtsi +++ b/app/boards/shields/jorne/jorne.dtsi @@ -7,93 +7,93 @@ #include / { - chosen { - zephyr,display = &oled; - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zephyr,display = &oled; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <4>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <4>; // | SW0 | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | SW0 | // | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | // | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - map = < + map = < RC(3,0) 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(3,11) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) - >; - }; + >; + }; - crkbd_transform: keymap_transform_1 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <4>; + crkbd_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <4>; // | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | // | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | // | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - map = < + map = < RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) - >; - }; + >; + }; - five_column_transform: keymap_transform_2 { - compatible = "zmk,matrix-transform"; - columns = <10>; - rows = <4>; + five_column_transform: keymap_transform_2 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; // | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | // | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | // | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - map = < + map = < RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) - >; - }; + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + diode-direction = "col2row"; + row-gpios + = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; - }; + }; - // TODO: per-key RGB node(s)? + // TODO: per-key RGB node(s)? }; &pro_micro_i2c { - status = "okay"; + 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>; - }; + 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/jorne/jorne_left.overlay b/app/boards/shields/jorne/jorne_left.overlay index 7e132cd9..f0476b41 100644 --- a/app/boards/shields/jorne/jorne_left.overlay +++ b/app/boards/shields/jorne/jorne_left.overlay @@ -7,12 +7,12 @@ #include "jorne.dtsi" &kscan0 { - 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> - ; + 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> + ; }; diff --git a/app/boards/shields/jorne/jorne_right.overlay b/app/boards/shields/jorne/jorne_right.overlay index 698bf9dd..604f4816 100644 --- a/app/boards/shields/jorne/jorne_right.overlay +++ b/app/boards/shields/jorne/jorne_right.overlay @@ -7,24 +7,24 @@ #include "jorne.dtsi" &default_transform { - col-offset = <6>; + col-offset = <6>; }; &crkbd_transform { - col-offset = <6>; + col-offset = <6>; }; &five_column_transform { - col-offset = <6>; + col-offset = <6>; }; &kscan0 { - col-gpios - = <&pro_micro 14 GPIO_ACTIVE_HIGH> - , <&pro_micro 15 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - , <&pro_micro 21 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> + ; }; diff --git a/app/boards/shields/kyria/Kconfig.defconfig b/app/boards/shields/kyria/Kconfig.defconfig index 82f48b4c..2d162736 100644 --- a/app/boards/shields/kyria/Kconfig.defconfig +++ b/app/boards/shields/kyria/Kconfig.defconfig @@ -2,44 +2,44 @@ if SHIELD_KYRIA_LEFT || SHIELD_KYRIA_REV2_LEFT || SHIELD_KYRIA_REV3_LEFT config ZMK_KEYBOARD_NAME - default "Kyria" + default "Kyria" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_KYRIA config ZMK_SPLIT - default y + default y if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/kyria/Kconfig.shield b/app/boards/shields/kyria/Kconfig.shield index 52df9378..a9d5ac4f 100644 --- a/app/boards/shields/kyria/Kconfig.shield +++ b/app/boards/shields/kyria/Kconfig.shield @@ -5,25 +5,25 @@ config SHIELD_KYRIA bool config SHIELD_KYRIA_LEFT - def_bool $(shields_list_contains,kyria_left) - select SHIELD_KYRIA + def_bool $(shields_list_contains,kyria_left) + select SHIELD_KYRIA config SHIELD_KYRIA_RIGHT - def_bool $(shields_list_contains,kyria_right) - select SHIELD_KYRIA + def_bool $(shields_list_contains,kyria_right) + select SHIELD_KYRIA config SHIELD_KYRIA_REV2_LEFT - def_bool $(shields_list_contains,kyria_rev2_left) - select SHIELD_KYRIA + def_bool $(shields_list_contains,kyria_rev2_left) + select SHIELD_KYRIA config SHIELD_KYRIA_REV2_RIGHT - def_bool $(shields_list_contains,kyria_rev2_right) - select SHIELD_KYRIA + def_bool $(shields_list_contains,kyria_rev2_right) + select SHIELD_KYRIA config SHIELD_KYRIA_REV3_LEFT - def_bool $(shields_list_contains,kyria_rev3_left) - select SHIELD_KYRIA + def_bool $(shields_list_contains,kyria_rev3_left) + select SHIELD_KYRIA config SHIELD_KYRIA_REV3_RIGHT - def_bool $(shields_list_contains,kyria_rev3_right) - select SHIELD_KYRIA + def_bool $(shields_list_contains,kyria_rev3_right) + select SHIELD_KYRIA diff --git a/app/boards/shields/kyria/boards/nice_nano.overlay b/app/boards/shields/kyria/boards/nice_nano.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/kyria/boards/nice_nano.overlay +++ b/app/boards/shields/kyria/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/kyria/boards/nice_nano_v2.overlay b/app/boards/shields/kyria/boards/nice_nano_v2.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/kyria/boards/nice_nano_v2.overlay +++ b/app/boards/shields/kyria/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/kyria/boards/nrfmicro_11.overlay b/app/boards/shields/kyria/boards/nrfmicro_11.overlay index 172859ae..8754dec6 100644 --- a/app/boards/shields/kyria/boards/nrfmicro_11.overlay +++ b/app/boards/shields/kyria/boards/nrfmicro_11.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi1_default: spi1_default { - group1 { - psels = ; - }; - }; + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; - spi1_sleep: spi1_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi1 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay b/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay index 172859ae..8754dec6 100644 --- a/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay +++ b/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi1_default: spi1_default { - group1 { - psels = ; - }; - }; + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; - spi1_sleep: spi1_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi1 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/kyria/boards/nrfmicro_13.overlay b/app/boards/shields/kyria/boards/nrfmicro_13.overlay index 172859ae..8754dec6 100644 --- a/app/boards/shields/kyria/boards/nrfmicro_13.overlay +++ b/app/boards/shields/kyria/boards/nrfmicro_13.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi1_default: spi1_default { - group1 { - psels = ; - }; - }; + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; - spi1_sleep: spi1_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi1 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/kyria/kyria.dtsi b/app/boards/shields/kyria/kyria.dtsi index cffe23b0..b98240e4 100644 --- a/app/boards/shields/kyria/kyria.dtsi +++ b/app/boards/shields/kyria/kyria.dtsi @@ -7,58 +7,58 @@ #include "kyria_common.dtsi" / { - chosen { - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <16>; - rows = <4>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <16>; + rows = <4>; // | MX6 | MX5 | MX4 | MX3 | MX2 | MX1 | | MX1 | MX2 | MX3 | MX4 | MX5 | MX6 | // | MX12 | MX11 | MX10 | MX9 | MX8 | MX7 | | MX7 | MX8 | MX9 | MX10 | MX11 | MX12 | // | MX20 | MX19 | MX18 | MX17 | MX16 | MX15 | MX14 | MX13 | | MX13 | MX14 | MX15 | MX16 | MX17 | MX18 | MX19 | MX20 | // | MX25 | MX24 | MX23 | MX22 | MX21 | | MX21 | MX22 | MX23 | MX24 | MX25 | - map = < + map = < RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14) RC(1,15) 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,13) RC(2,14) RC(2,15) 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) - >; - }; + >; + }; // | MX5 | MX4 | MX3 | MX2 | MX1 | | MX1 | MX2 | MX3 | MX4 | MX5 | // | MX11 | MX10 | MX9 | MX8 | MX7 | | MX7 | MX8 | MX9 | MX10 | MX11 | // | MX19 | MX18 | MX17 | MX16 | MX15 | MX14 | MX13 | | MX13 | MX14 | MX15 | MX16 | MX17 | MX18 | MX19 | // | MX25 | MX24 | MX23 | MX22 | MX21 | | MX21 | MX22 | MX23 | MX24 | MX25 | - five_column_transform: keymap_transform_1 { - compatible = "zmk,matrix-transform"; - columns = <14>; - rows = <4>; - map = < + five_column_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <4>; + map = < RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14) 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,13) RC(2,14) 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) - >; - }; + >; + }; }; &kscan0 { - row-gpios - = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + row-gpios + = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; }; &left_encoder { - a-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; }; &right_encoder { - a-gpios = <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; }; diff --git a/app/boards/shields/kyria/kyria.keymap b/app/boards/shields/kyria/kyria.keymap index a8804dd9..9a2163db 100644 --- a/app/boards/shields/kyria/kyria.keymap +++ b/app/boards/shields/kyria/kyria.keymap @@ -8,23 +8,23 @@ #include / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { + default_layer { // --------------------------------------------------------------------------------------------------------------------------------- // | 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 | // | 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 - >; + 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 + >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; - }; - }; + 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_common.dtsi b/app/boards/shields/kyria/kyria_common.dtsi index 1e61cc6b..2e10cd37 100644 --- a/app/boards/shields/kyria/kyria_common.dtsi +++ b/app/boards/shields/kyria/kyria_common.dtsi @@ -7,54 +7,54 @@ #include / { - chosen { - zephyr,display = &oled; - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zephyr,display = &oled; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - }; + diode-direction = "col2row"; + }; - left_encoder: encoder_left { - compatible = "alps,ec11"; - label = "LEFT_ENCODER"; - resolution = <4>; - status = "disabled"; - }; + left_encoder: encoder_left { + compatible = "alps,ec11"; + label = "LEFT_ENCODER"; + resolution = <4>; + status = "disabled"; + }; - right_encoder: encoder_right { - compatible = "alps,ec11"; - label = "RIGHT_ENCODER"; - resolution = <4>; - status = "disabled"; - }; + right_encoder: encoder_right { + compatible = "alps,ec11"; + label = "RIGHT_ENCODER"; + resolution = <4>; + status = "disabled"; + }; - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder &right_encoder>; - }; + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + }; - // TODO: RGB node(s) + // TODO: RGB node(s) }; &pro_micro_i2c { - status = "okay"; + status = "okay"; - oled: ssd1306@3c { - compatible = "solomon,ssd1306fb"; - reg = <0x3c>; - label = "DISPLAY"; - width = <128>; - height = <64>; - segment-offset = <0>; - page-offset = <0>; - display-offset = <0>; - multiplex-ratio = <63>; - prechargep = <0x22>; - }; + oled: ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <64>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <63>; + prechargep = <0x22>; + }; }; diff --git a/app/boards/shields/kyria/kyria_left.overlay b/app/boards/shields/kyria/kyria_left.overlay index 20ced548..d89a0775 100644 --- a/app/boards/shields/kyria/kyria_left.overlay +++ b/app/boards/shields/kyria/kyria_left.overlay @@ -7,18 +7,18 @@ #include "kyria.dtsi" &kscan0 { - 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> - ; + 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> + ; }; &left_encoder { - status = "okay"; + status = "okay"; }; diff --git a/app/boards/shields/kyria/kyria_rev2.dtsi b/app/boards/shields/kyria/kyria_rev2.dtsi index b40af365..e61131bf 100644 --- a/app/boards/shields/kyria/kyria_rev2.dtsi +++ b/app/boards/shields/kyria/kyria_rev2.dtsi @@ -7,49 +7,49 @@ #include "kyria_common.dtsi" / { - chosen { - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <16>; - rows = <4>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <16>; + rows = <4>; // | MX6 | MX5 | MX4 | MX3 | MX2 | MX1 | | MX1 | MX2 | MX3 | MX4 | MX5 | MX6 | // | MX12 | MX11 | MX10 | MX9 | MX8 | MX7 | | MX7 | MX8 | MX9 | MX10 | MX11 | MX12 | // | MX20 | MX19 | MX18 | MX17 | MX16 | MX15 | MX14 | MX13 | | MX13 | MX14 | MX15 | MX16 | MX17 | MX18 | MX19 | MX20 | // | MX25 | MX24 | MX23 | MX22 | MX21 | | MX21 | MX22 | MX23 | MX24 | MX25 | - map = < + map = < RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14) RC(1,15) 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,13) RC(2,14) RC(2,15) RC(3,2) 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) - >; - }; + >; + }; // | MX5 | MX4 | MX3 | MX2 | MX1 | | MX1 | MX2 | MX3 | MX4 | MX5 | // | MX11 | MX10 | MX9 | MX8 | MX7 | | MX7 | MX8 | MX9 | MX10 | MX11 | // | MX19 | MX18 | MX17 | MX16 | MX15 | MX14 | MX13 | | MX13 | MX14 | MX15 | MX16 | MX17 | MX18 | MX19 | // | MX25 | MX24 | MX23 | MX22 | MX21 | | MX21 | MX22 | MX23 | MX24 | MX25 | - five_column_transform: keymap_transform_1 { - compatible = "zmk,matrix-transform"; - columns = <14>; - rows = <4>; - map = < + five_column_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <4>; + map = < RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14) 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,13) RC(2,14) RC(3,2) 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) - >; - }; + >; + }; }; &left_encoder { - a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; }; &right_encoder { - a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; }; diff --git a/app/boards/shields/kyria/kyria_rev2.keymap b/app/boards/shields/kyria/kyria_rev2.keymap index a8804dd9..9a2163db 100644 --- a/app/boards/shields/kyria/kyria_rev2.keymap +++ b/app/boards/shields/kyria/kyria_rev2.keymap @@ -8,23 +8,23 @@ #include / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { + default_layer { // --------------------------------------------------------------------------------------------------------------------------------- // | 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 | // | 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 - >; + 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 + >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; - }; - }; + 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_left.overlay b/app/boards/shields/kyria/kyria_rev2_left.overlay index cee2e2a8..67eaeac2 100644 --- a/app/boards/shields/kyria/kyria_rev2_left.overlay +++ b/app/boards/shields/kyria/kyria_rev2_left.overlay @@ -7,24 +7,24 @@ #include "kyria_rev2.dtsi" &kscan0 { - row-gpios - = <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - 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 9 GPIO_ACTIVE_HIGH> - , <&pro_micro 10 GPIO_ACTIVE_HIGH> - , <&pro_micro 16 GPIO_ACTIVE_HIGH> - ; + row-gpios + = <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + 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 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + ; }; &left_encoder { - status = "okay"; + status = "okay"; }; diff --git a/app/boards/shields/kyria/kyria_rev2_right.overlay b/app/boards/shields/kyria/kyria_rev2_right.overlay index 9e29c6f7..acc806cf 100644 --- a/app/boards/shields/kyria/kyria_rev2_right.overlay +++ b/app/boards/shields/kyria/kyria_rev2_right.overlay @@ -7,32 +7,32 @@ #include "kyria_rev2.dtsi" &default_transform { - col-offset = <8>; + col-offset = <8>; }; &five_column_transform { - col-offset = <8>; + col-offset = <8>; }; &kscan0 { - row-gpios - = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - col-gpios - = <&pro_micro 8 GPIO_ACTIVE_HIGH> - , <&pro_micro 9 GPIO_ACTIVE_HIGH> - , <&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> - ; + row-gpios + = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + col-gpios + = <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&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"; + status = "okay"; }; diff --git a/app/boards/shields/kyria/kyria_rev3.dtsi b/app/boards/shields/kyria/kyria_rev3.dtsi index 4a500006..0cf91c60 100644 --- a/app/boards/shields/kyria/kyria_rev3.dtsi +++ b/app/boards/shields/kyria/kyria_rev3.dtsi @@ -7,35 +7,35 @@ #include "kyria_common.dtsi" / { - chosen { - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <14>; - rows = <4>; - // | MX6 | MX5 | MX4 | MX3 | MX2 | MX1 | | MX1 | MX2 | MX3 | MX4 | MX5 | MX6 | - // | MX12 | MX11 | MX10 | MX9 | MX8 | MX7 | | MX7 | MX8 | MX9 | MX10 | MX11 | MX12 | - // | MX20 | MX19 | MX18 | MX17 | MX16 | MX15 | MX14 | MX13 | | MX13 | MX14 | MX15 | MX16 | MX17 | MX18 | MX19 | MX20 | - // | MX25 | MX24 | MX23 | MX22 | MX21 | | MX21 | MX22 | MX23 | MX24 | MX25 | - 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(3,3) RC(2,6) RC(2,7) RC(3,10) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) - RC(3,2) RC(3,4) RC(3,5) RC(3,1) RC(3,6) RC(3,7) RC(3,12) RC(3,8) RC(3,9) RC(3,11) - >; - }; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <4>; + // | MX6 | MX5 | MX4 | MX3 | MX2 | MX1 | | MX1 | MX2 | MX3 | MX4 | MX5 | MX6 | + // | MX12 | MX11 | MX10 | MX9 | MX8 | MX7 | | MX7 | MX8 | MX9 | MX10 | MX11 | MX12 | + // | MX20 | MX19 | MX18 | MX17 | MX16 | MX15 | MX14 | MX13 | | MX13 | MX14 | MX15 | MX16 | MX17 | MX18 | MX19 | MX20 | + // | MX25 | MX24 | MX23 | MX22 | MX21 | | MX21 | MX22 | MX23 | MX24 | MX25 | + 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(3,3) RC(2,6) RC(2,7) RC(3,10) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) + RC(3,2) RC(3,4) RC(3,5) RC(3,1) RC(3,6) RC(3,7) RC(3,12) RC(3,8) RC(3,9) RC(3,11) + >; + }; }; &left_encoder { - resolution = <2>; - a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <2>; + a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; }; &right_encoder { - resolution = <2>; - a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <2>; + a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; }; diff --git a/app/boards/shields/kyria/kyria_rev3.keymap b/app/boards/shields/kyria/kyria_rev3.keymap index fff2e051..d74757ca 100644 --- a/app/boards/shields/kyria/kyria_rev3.keymap +++ b/app/boards/shields/kyria/kyria_rev3.keymap @@ -9,30 +9,30 @@ /* Uncomment this block if using RGB &led_strip { - chain-length = <6>; - // chain-length = <31>; // Uncomment if using both per-key and underglow LEDs - // chain-length = <25>; // Uncomment if using only per-key LEDs. + chain-length = <6>; + // chain-length = <31>; // Uncomment if using both per-key and underglow LEDs + // chain-length = <25>; // Uncomment if using only per-key LEDs. }; */ / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - // --------------------------------------------------------------------------------------------------------------------------------- - // | 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 | - // | 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 - >; + default_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | 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 | + // | 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 + >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; - }; - }; + 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_left.overlay b/app/boards/shields/kyria/kyria_rev3_left.overlay index d00b9e4a..577b89dc 100644 --- a/app/boards/shields/kyria/kyria_rev3_left.overlay +++ b/app/boards/shields/kyria/kyria_rev3_left.overlay @@ -7,23 +7,23 @@ #include "kyria_rev3.dtsi" &kscan0 { - row-gpios - = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - 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> - , <&pro_micro 8 GPIO_ACTIVE_HIGH> - ; + row-gpios + = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + 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> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + ; }; &left_encoder { - status = "okay"; + status = "okay"; }; diff --git a/app/boards/shields/kyria/kyria_rev3_right.overlay b/app/boards/shields/kyria/kyria_rev3_right.overlay index ee69730c..88ed6589 100644 --- a/app/boards/shields/kyria/kyria_rev3_right.overlay +++ b/app/boards/shields/kyria/kyria_rev3_right.overlay @@ -7,27 +7,27 @@ #include "kyria_rev3.dtsi" &default_transform { - col-offset = <7>; + col-offset = <7>; }; &kscan0 { - row-gpios - = <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - col-gpios - = <&pro_micro 16 GPIO_ACTIVE_HIGH> - , <&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 10 GPIO_ACTIVE_HIGH> - ; + row-gpios + = <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + col-gpios + = <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&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 10 GPIO_ACTIVE_HIGH> + ; }; &right_encoder { - status = "okay"; + status = "okay"; }; diff --git a/app/boards/shields/kyria/kyria_right.overlay b/app/boards/shields/kyria/kyria_right.overlay index 00ba5b2f..72d97027 100644 --- a/app/boards/shields/kyria/kyria_right.overlay +++ b/app/boards/shields/kyria/kyria_right.overlay @@ -7,27 +7,27 @@ #include "kyria.dtsi" &default_transform { - col-offset = <8>; + col-offset = <8>; }; &five_column_transform { - col-offset = <8>; + col-offset = <8>; }; &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> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - , <&pro_micro 21 GPIO_ACTIVE_HIGH> - ; + 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> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> + ; }; &right_encoder { - status = "okay"; + status = "okay"; }; diff --git a/app/boards/shields/leeloo/Kconfig.defconfig b/app/boards/shields/leeloo/Kconfig.defconfig index d5bfab3d..7388a4b9 100644 --- a/app/boards/shields/leeloo/Kconfig.defconfig +++ b/app/boards/shields/leeloo/Kconfig.defconfig @@ -4,28 +4,28 @@ if SHIELD_LEELOO_LEFT config ZMK_KEYBOARD_NAME - default "Leeloo" + default "Leeloo" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_LEELOO_LEFT || SHIELD_LEELOO_RIGHT config ZMK_SPLIT - default y + default y if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY @@ -33,16 +33,16 @@ if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/leeloo/Kconfig.shield b/app/boards/shields/leeloo/Kconfig.shield index 1736c6eb..46ea9640 100644 --- a/app/boards/shields/leeloo/Kconfig.shield +++ b/app/boards/shields/leeloo/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_LEELOO_LEFT - def_bool $(shields_list_contains,leeloo_left) + def_bool $(shields_list_contains,leeloo_left) config SHIELD_LEELOO_RIGHT - def_bool $(shields_list_contains,leeloo_right) + def_bool $(shields_list_contains,leeloo_right) diff --git a/app/boards/shields/leeloo/leeloo.dtsi b/app/boards/shields/leeloo/leeloo.dtsi index 5f2cbeac..438f9a9d 100644 --- a/app/boards/shields/leeloo/leeloo.dtsi +++ b/app/boards/shields/leeloo/leeloo.dtsi @@ -67,21 +67,21 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) }; &pro_micro_i2c { - status = "okay"; + 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>; - }; + 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/leeloo/leeloo_left.overlay b/app/boards/shields/leeloo/leeloo_left.overlay index 1d6424fd..59fce1b0 100644 --- a/app/boards/shields/leeloo/leeloo_left.overlay +++ b/app/boards/shields/leeloo/leeloo_left.overlay @@ -6,16 +6,16 @@ #include "leeloo.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> - ; + 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"; + status = "okay"; }; diff --git a/app/boards/shields/leeloo/leeloo_right.overlay b/app/boards/shields/leeloo/leeloo_right.overlay index 2f3fbf5c..80e89529 100644 --- a/app/boards/shields/leeloo/leeloo_right.overlay +++ b/app/boards/shields/leeloo/leeloo_right.overlay @@ -6,20 +6,20 @@ #include "leeloo.dtsi" &default_transform { - col-offset = <6>; + 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> - ; + 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"; + status = "okay"; }; diff --git a/app/boards/shields/lily58/Kconfig.defconfig b/app/boards/shields/lily58/Kconfig.defconfig index 97cecce1..e77a9c22 100644 --- a/app/boards/shields/lily58/Kconfig.defconfig +++ b/app/boards/shields/lily58/Kconfig.defconfig @@ -2,44 +2,44 @@ if SHIELD_LILY58_LEFT config ZMK_KEYBOARD_NAME - default "Lily58" + default "Lily58" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_LILY58_LEFT || SHIELD_LILY58_RIGHT config ZMK_SPLIT - default y + default y if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/lily58/Kconfig.shield b/app/boards/shields/lily58/Kconfig.shield index 932e33b3..1b3bb6ba 100644 --- a/app/boards/shields/lily58/Kconfig.shield +++ b/app/boards/shields/lily58/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_LILY58_LEFT - def_bool $(shields_list_contains,lily58_left) + def_bool $(shields_list_contains,lily58_left) config SHIELD_LILY58_RIGHT - def_bool $(shields_list_contains,lily58_right) + def_bool $(shields_list_contains,lily58_right) diff --git a/app/boards/shields/lily58/boards/nice_nano.overlay b/app/boards/shields/lily58/boards/nice_nano.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/lily58/boards/nice_nano.overlay +++ b/app/boards/shields/lily58/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/lily58/boards/nice_nano_v2.overlay b/app/boards/shields/lily58/boards/nice_nano_v2.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/lily58/boards/nice_nano_v2.overlay +++ b/app/boards/shields/lily58/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/lily58/lily58.dtsi b/app/boards/shields/lily58/lily58.dtsi index 1a296a8c..ec520f6b 100644 --- a/app/boards/shields/lily58/lily58.dtsi +++ b/app/boards/shields/lily58/lily58.dtsi @@ -7,75 +7,75 @@ #include / { - chosen { - zephyr,display = &oled; - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zephyr,display = &oled; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <16>; - rows = <5>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <16>; + 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 | // | SW29 | SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | SW29 | - map = < + 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"; + 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)> - ; + 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>; - }; + 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>; + }; - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder>; - }; + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder>; + }; }; &pro_micro_i2c { - status = "okay"; + 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>; - }; + 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/lily58/lily58.keymap b/app/boards/shields/lily58/lily58.keymap index dd935c7a..7df3277f 100644 --- a/app/boards/shields/lily58/lily58.keymap +++ b/app/boards/shields/lily58/lily58.keymap @@ -10,61 +10,61 @@ #include / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { + 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 | // | ALT | GUI | LOWER| SPACE | | ENTER | RAISE| BSPC | GUI | - bindings = < + 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 LALT &kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp BSPC &kp RGUI - >; + >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; - lower_layer { + lower_layer { // ------------------------------------------------------------------------------------------------------------ // | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | // | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | // | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ | // | | | | | | | | | | | _ | + | { | } | "|" | // | | | | | | | | | | - bindings = < + 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 KP_MULTIPLY &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 KP_PLUS &kp LBRC &kp RBRC &kp PIPE &trans &trans &trans &trans &trans &trans &trans &trans - >; + >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; - raise_layer { + 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 = < + 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 - >; + >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - }; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + }; }; diff --git a/app/boards/shields/lily58/lily58_left.overlay b/app/boards/shields/lily58/lily58_left.overlay index daa53651..b95332d9 100644 --- a/app/boards/shields/lily58/lily58_left.overlay +++ b/app/boards/shields/lily58/lily58_left.overlay @@ -7,16 +7,16 @@ #include "lily58.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> - ; + 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"; + status = "okay"; }; diff --git a/app/boards/shields/lily58/lily58_right.overlay b/app/boards/shields/lily58/lily58_right.overlay index 18ec806b..15820ad2 100644 --- a/app/boards/shields/lily58/lily58_right.overlay +++ b/app/boards/shields/lily58/lily58_right.overlay @@ -7,16 +7,16 @@ #include "lily58.dtsi" &default_transform { - col-offset = <6>; + 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> - ; + 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> + ; }; diff --git a/app/boards/shields/lotus58/Kconfig.defconfig b/app/boards/shields/lotus58/Kconfig.defconfig index b6bb37d8..62695c20 100644 --- a/app/boards/shields/lotus58/Kconfig.defconfig +++ b/app/boards/shields/lotus58/Kconfig.defconfig @@ -4,44 +4,44 @@ if SHIELD_LOTUS58_LEFT config ZMK_KEYBOARD_NAME - default "Lotus58" + default "Lotus58" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_LOTUS58_LEFT || SHIELD_LOTUS58_RIGHT config ZMK_SPLIT - default y + default y if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/lotus58/Kconfig.shield b/app/boards/shields/lotus58/Kconfig.shield index dbf7ba01..2d91c58c 100644 --- a/app/boards/shields/lotus58/Kconfig.shield +++ b/app/boards/shields/lotus58/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_LOTUS58_LEFT - def_bool $(shields_list_contains,lotus58_left) + def_bool $(shields_list_contains,lotus58_left) config SHIELD_LOTUS58_RIGHT - def_bool $(shields_list_contains,lotus58_right) + def_bool $(shields_list_contains,lotus58_right) diff --git a/app/boards/shields/lotus58/lotus58_left.overlay b/app/boards/shields/lotus58/lotus58_left.overlay index a51659df..a1fc1e28 100644 --- a/app/boards/shields/lotus58/lotus58_left.overlay +++ b/app/boards/shields/lotus58/lotus58_left.overlay @@ -7,16 +7,16 @@ #include "lotus58.dtsi" &kscan0 { - col-gpios - = <&pro_micro 15 GPIO_ACTIVE_HIGH> - , <&pro_micro 16 GPIO_ACTIVE_HIGH> - , <&pro_micro 14 GPIO_ACTIVE_HIGH> - , <&pro_micro 10 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + ; }; &left_encoder { - status = "okay"; + status = "okay"; }; diff --git a/app/boards/shields/lotus58/lotus58_right.overlay b/app/boards/shields/lotus58/lotus58_right.overlay index dffcaeb1..5bdfe710 100644 --- a/app/boards/shields/lotus58/lotus58_right.overlay +++ b/app/boards/shields/lotus58/lotus58_right.overlay @@ -7,20 +7,20 @@ #include "lotus58.dtsi" &default_transform { - col-offset = <6>; + col-offset = <6>; }; &kscan0 { - col-gpios - = <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 10 GPIO_ACTIVE_HIGH> - , <&pro_micro 14 GPIO_ACTIVE_HIGH> - , <&pro_micro 16 GPIO_ACTIVE_HIGH> - , <&pro_micro 15 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + ; }; &right_encoder { - status = "okay"; + status = "okay"; }; diff --git a/app/boards/shields/m60/Kconfig.defconfig b/app/boards/shields/m60/Kconfig.defconfig index ad105ed9..a4696954 100644 --- a/app/boards/shields/m60/Kconfig.defconfig +++ b/app/boards/shields/m60/Kconfig.defconfig @@ -4,6 +4,6 @@ if SHIELD_M60 config ZMK_KEYBOARD_NAME - default "m60" + default "m60" endif diff --git a/app/boards/shields/m60/Kconfig.shield b/app/boards/shields/m60/Kconfig.shield index 4ed58c49..b1414b96 100644 --- a/app/boards/shields/m60/Kconfig.shield +++ b/app/boards/shields/m60/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_M60 - def_bool $(shields_list_contains,m60) + def_bool $(shields_list_contains,m60) diff --git a/app/boards/shields/m60/m60.keymap b/app/boards/shields/m60/m60.keymap index aa656929..8daa6b7c 100644 --- a/app/boards/shields/m60/m60.keymap +++ b/app/boards/shields/m60/m60.keymap @@ -9,10 +9,10 @@ #include / { - keymap0: keymap { - compatible = "zmk,keymap"; + keymap0: keymap { + compatible = "zmk,keymap"; - default_layer { + default_layer { // ------------------------------------------------------------------------------------------ // | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | // | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | @@ -20,23 +20,23 @@ // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | // | CTL | WIN | ALT | SPACE | ALT | MO(1) | WIN | CTRL | // ------------------------------------------------------------------------------------------ - 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 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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET - &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 LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RGUI &kp RCTRL - >; - }; + 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 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 CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET + &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 LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RGUI &kp RCTRL + >; + }; - fn_layer { - bindings = < + fn_layer { + 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 &bootloader &trans &bt BT_CLR &none &none &none &none &none &none &none &none &none &none &none &sys_reset &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &none &none &trans &trans &none &none &none &none &none &none &none &none &none &none &trans &trans &trans &trans &trans &trans &trans &trans &trans - >; - }; - }; + >; + }; + }; }; diff --git a/app/boards/shields/m60/m60.overlay b/app/boards/shields/m60/m60.overlay index 18d06511..a2ab2593 100644 --- a/app/boards/shields/m60/m60.overlay +++ b/app/boards/shields/m60/m60.overlay @@ -7,42 +7,42 @@ #include / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio1 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio1 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - col-gpios - = <&gpio0 19 GPIO_ACTIVE_HIGH> - , <&gpio0 20 GPIO_ACTIVE_HIGH> - , <&gpio0 21 GPIO_ACTIVE_HIGH> - , <&gpio0 22 GPIO_ACTIVE_HIGH> - , <&gpio0 23 GPIO_ACTIVE_HIGH> - , <&gpio0 24 GPIO_ACTIVE_HIGH> - , <&gpio0 25 GPIO_ACTIVE_HIGH> - , <&gpio0 26 GPIO_ACTIVE_HIGH> - ; - }; + diode-direction = "col2row"; + row-gpios + = <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + col-gpios + = <&gpio0 19 GPIO_ACTIVE_HIGH> + , <&gpio0 20 GPIO_ACTIVE_HIGH> + , <&gpio0 21 GPIO_ACTIVE_HIGH> + , <&gpio0 22 GPIO_ACTIVE_HIGH> + , <&gpio0 23 GPIO_ACTIVE_HIGH> + , <&gpio0 24 GPIO_ACTIVE_HIGH> + , <&gpio0 25 GPIO_ACTIVE_HIGH> + , <&gpio0 26 GPIO_ACTIVE_HIGH> + ; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <8>; - rows = <8>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <8>; + rows = <8>; // | MX1 | MX2 | MX3 | MX4 | MX5 | MX6 | MX7 | MX8 | MX9 | MX10 | MX11 | MX12 | MX13 | MX14 | // | MX15 | MX16 | MX17 | MX18 | MX19 | MX20 | MX21 | MX22 | MX23 | MX24 | MX25 | MX26 | MX27 | MX28 | // | MX29 | MX30 | MX31 | MX32 | MX33 | MX34 | MX35 | MX36 | MX37 | MX38 | MX39 | MX40 | MX41 | @@ -55,6 +55,6 @@ RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4 RC(6,4) RC(6,3) RC(6,2) RC(6,1) RC(6,0) RC(5,7) RC(5,6) RC(5,5) RC(5,4) RC(5,3) RC(5,2) RC(5,1) RC(6,5) RC(6,6) RC(6,7) RC(7,0) RC(7,1) RC(7,2) RC(7,3) RC(7,4) >; - }; + }; }; diff --git a/app/boards/shields/microdox/Kconfig.defconfig b/app/boards/shields/microdox/Kconfig.defconfig index 8c0b042e..d05ae045 100644 --- a/app/boards/shields/microdox/Kconfig.defconfig +++ b/app/boards/shields/microdox/Kconfig.defconfig @@ -4,44 +4,44 @@ if SHIELD_MICRODOX_LEFT config ZMK_KEYBOARD_NAME - default "Microdox" + default "Microdox" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_MICRODOX_LEFT || SHIELD_MICRODOX_RIGHT config ZMK_SPLIT - default y + default y if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/microdox/Kconfig.shield b/app/boards/shields/microdox/Kconfig.shield index ac79eab6..47543760 100644 --- a/app/boards/shields/microdox/Kconfig.shield +++ b/app/boards/shields/microdox/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_MICRODOX_LEFT - def_bool $(shields_list_contains,microdox_left) + def_bool $(shields_list_contains,microdox_left) config SHIELD_MICRODOX_RIGHT - def_bool $(shields_list_contains,microdox_right) + def_bool $(shields_list_contains,microdox_right) diff --git a/app/boards/shields/microdox/boards/nice_nano.overlay b/app/boards/shields/microdox/boards/nice_nano.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/microdox/boards/nice_nano.overlay +++ b/app/boards/shields/microdox/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/microdox/boards/nice_nano_v2.overlay b/app/boards/shields/microdox/boards/nice_nano_v2.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/microdox/boards/nice_nano_v2.overlay +++ b/app/boards/shields/microdox/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/microdox/microdox.dtsi b/app/boards/shields/microdox/microdox.dtsi index e3fabb3e..e02aa554 100644 --- a/app/boards/shields/microdox/microdox.dtsi +++ b/app/boards/shields/microdox/microdox.dtsi @@ -7,59 +7,59 @@ #include / { - chosen { - zephyr,display = &oled; - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + 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>; + 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 = < + 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"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + diode-direction = "col2row"; + row-gpios + = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; - }; + }; - // TODO: per-key RGB node(s)? + // TODO: per-key RGB node(s)? }; &pro_micro_i2c { - status = "okay"; + 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>; - }; + 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_left.overlay b/app/boards/shields/microdox/microdox_left.overlay index 307776e7..d38f50da 100644 --- a/app/boards/shields/microdox/microdox_left.overlay +++ b/app/boards/shields/microdox/microdox_left.overlay @@ -7,11 +7,11 @@ #include "microdox.dtsi" &kscan0 { - 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> - ; + 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> + ; }; diff --git a/app/boards/shields/microdox/microdox_right.overlay b/app/boards/shields/microdox/microdox_right.overlay index 5475c31f..4dd29016 100644 --- a/app/boards/shields/microdox/microdox_right.overlay +++ b/app/boards/shields/microdox/microdox_right.overlay @@ -7,20 +7,20 @@ #include "microdox.dtsi" &default_transform { - col-offset = <5>; + col-offset = <5>; }; &oled { - segment-remap; - com-invdir; + segment-remap; + com-invdir; }; &kscan0 { - col-gpios - = <&pro_micro 15 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - , <&pro_micro 21 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> + ; }; diff --git a/app/boards/shields/murphpad/Kconfig.defconfig b/app/boards/shields/murphpad/Kconfig.defconfig index 07e71826..80e65351 100644 --- a/app/boards/shields/murphpad/Kconfig.defconfig +++ b/app/boards/shields/murphpad/Kconfig.defconfig @@ -4,34 +4,34 @@ if SHIELD_MURPHPAD config ZMK_KEYBOARD_NAME - default "MurphPad" + default "MurphPad" if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/murphpad/Kconfig.shield b/app/boards/shields/murphpad/Kconfig.shield index 389caa26..1c961aea 100644 --- a/app/boards/shields/murphpad/Kconfig.shield +++ b/app/boards/shields/murphpad/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_MURPHPAD - def_bool $(shields_list_contains,murphpad) \ No newline at end of file + def_bool $(shields_list_contains,murphpad) \ No newline at end of file diff --git a/app/boards/shields/murphpad/boards/nice_nano.overlay b/app/boards/shields/murphpad/boards/nice_nano.overlay index 3e2241a2..ac6c51d5 100644 --- a/app/boards/shields/murphpad/boards/nice_nano.overlay +++ b/app/boards/shields/murphpad/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/murphpad/boards/nice_nano_v2.overlay b/app/boards/shields/murphpad/boards/nice_nano_v2.overlay index 3e2241a2..ac6c51d5 100644 --- a/app/boards/shields/murphpad/boards/nice_nano_v2.overlay +++ b/app/boards/shields/murphpad/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/murphpad/murphpad.overlay b/app/boards/shields/murphpad/murphpad.overlay index b7fead60..13905092 100644 --- a/app/boards/shields/murphpad/murphpad.overlay +++ b/app/boards/shields/murphpad/murphpad.overlay @@ -7,69 +7,69 @@ #include / { - chosen { - zephyr,display = &oled; - zmk,kscan = &kscan0; - }; + chosen { + zephyr,display = &oled; + zmk,kscan = &kscan0; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + diode-direction = "col2row"; + row-gpios + = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; - col-gpios - = <&pro_micro 9 GPIO_ACTIVE_HIGH> - , <&pro_micro 6 GPIO_ACTIVE_HIGH> - , <&pro_micro 5 GPIO_ACTIVE_HIGH> - , <&pro_micro 4 GPIO_ACTIVE_HIGH> - , <&pro_micro 10 GPIO_ACTIVE_HIGH> - ; - }; + col-gpios + = <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + ; + }; - encoder_1: encoder_1 { - compatible = "alps,ec11"; - 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>; - status = "disabled"; - }; + encoder_1: encoder_1 { + compatible = "alps,ec11"; + 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>; + status = "disabled"; + }; - encoder_2: encoder_2 { - compatible = "alps,ec11"; - 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>; - status = "disabled"; - }; + encoder_2: encoder_2 { + compatible = "alps,ec11"; + 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>; + status = "disabled"; + }; }; &pro_micro_i2c { - status = "okay"; + 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>; - }; + 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/nibble/Kconfig.defconfig b/app/boards/shields/nibble/Kconfig.defconfig index d5e8cbeb..31ac7cfe 100644 --- a/app/boards/shields/nibble/Kconfig.defconfig +++ b/app/boards/shields/nibble/Kconfig.defconfig @@ -4,38 +4,38 @@ if SHIELD_NIBBLE config ZMK_KEYBOARD_NAME - default "NIBBLE" + default "NIBBLE" config ZMK_USB - default y + default y if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/nibble/Kconfig.shield b/app/boards/shields/nibble/Kconfig.shield index 44364f4e..cb6fd15e 100644 --- a/app/boards/shields/nibble/Kconfig.shield +++ b/app/boards/shields/nibble/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_NIBBLE - def_bool $(shields_list_contains,nibble) + def_bool $(shields_list_contains,nibble) diff --git a/app/boards/shields/nibble/boards/nice_nano.overlay b/app/boards/shields/nibble/boards/nice_nano.overlay index 54ab9fec..45c55263 100644 --- a/app/boards/shields/nibble/boards/nice_nano.overlay +++ b/app/boards/shields/nibble/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/nibble/boards/nice_nano_v2.overlay b/app/boards/shields/nibble/boards/nice_nano_v2.overlay index 54ab9fec..45c55263 100644 --- a/app/boards/shields/nibble/boards/nice_nano_v2.overlay +++ b/app/boards/shields/nibble/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/nibble/nibble.keymap b/app/boards/shields/nibble/nibble.keymap index c02aad75..5b90f6c1 100644 --- a/app/boards/shields/nibble/nibble.keymap +++ b/app/boards/shields/nibble/nibble.keymap @@ -9,39 +9,39 @@ #include / { - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&encoder_1>; - }; + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&encoder_1>; + }; - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - label = "Default"; + default_layer { + label = "Default"; - sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; + sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; - bindings = < + 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 C_MUTE &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 DEL &trans &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 RET &kp PG_UP &trans &kp LSHFT &trans &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 PG_DN &trans &kp LCTRL &kp LGUI &kp LALT &kp SPACE &mo 1 &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT - >; - }; - function_layer { - label = "Function"; + >; + }; + function_layer { + label = "Function"; - sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; + sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; - bindings = < + bindings = < &kp TILDE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &kp END &kp C_MUTE &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bootloader &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_PRV &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &kp C_PREV &kp C_PP &kp C_NEXT - >; - }; - }; + >; + }; + }; }; diff --git a/app/boards/shields/nibble/nibble.overlay b/app/boards/shields/nibble/nibble.overlay index baf1eb10..cd117640 100644 --- a/app/boards/shields/nibble/nibble.overlay +++ b/app/boards/shields/nibble/nibble.overlay @@ -7,69 +7,69 @@ #include / { - chosen { - zephyr,display = &oled; - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zephyr,display = &oled; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - encoder_1: encoder_1 { - compatible = "alps,ec11"; - 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>; - status = "okay"; - }; + encoder_1: encoder_1 { + compatible = "alps,ec11"; + 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>; + status = "okay"; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-demux"; - label = "KSCAN"; - polling-interval-msec = <25>; - input-gpios - = <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; - output-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> - ; - }; + kscan0: kscan { + compatible = "zmk,kscan-gpio-demux"; + label = "KSCAN"; + polling-interval-msec = <25>; + input-gpios + = <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + output-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> + ; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <16>; - rows = <5>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <16>; + rows = <5>; - map = < + map = < RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15) 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(1,15) -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(2,15) +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(2,15) RC(3,0) RC(3,1) RC(0,0) 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,14) RC(3,15) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,6) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15) - >; - }; + >; + }; }; &pro_micro_i2c { - status = "okay"; + 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>; - }; + 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/nice_view/Kconfig.defconfig b/app/boards/shields/nice_view/Kconfig.defconfig index 22c5f647..d2378409 100644 --- a/app/boards/shields/nice_view/Kconfig.defconfig +++ b/app/boards/shields/nice_view/Kconfig.defconfig @@ -4,24 +4,24 @@ if SHIELD_NICE_VIEW config ZMK_DISPLAY - select LV_FONT_MONTSERRAT_26 + select LV_FONT_MONTSERRAT_26 if ZMK_DISPLAY config SPI - default y + default y config LS0XX - default y + default y config ZMK_WIDGET_WPM_STATUS - default y if !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL + default y if !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # ZMK_DISPLAY diff --git a/app/boards/shields/nice_view/Kconfig.shield b/app/boards/shields/nice_view/Kconfig.shield index 55cba788..fbe4fde8 100644 --- a/app/boards/shields/nice_view/Kconfig.shield +++ b/app/boards/shields/nice_view/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_NICE_VIEW - def_bool $(shields_list_contains,nice_view) + def_bool $(shields_list_contains,nice_view) diff --git a/app/boards/shields/nice_view/nice_view.overlay b/app/boards/shields/nice_view/nice_view.overlay index eacdd41a..49ce0f23 100644 --- a/app/boards/shields/nice_view/nice_view.overlay +++ b/app/boards/shields/nice_view/nice_view.overlay @@ -5,19 +5,19 @@ */ &nice_view_spi { - status = "okay"; - nice_view: ls0xx@0 { - compatible = "sharp,ls0xx"; - label = "DISPLAY"; - spi-max-frequency = <1000000>; - reg = <0>; - width = <160>; - height = <68>; - }; + status = "okay"; + nice_view: ls0xx@0 { + compatible = "sharp,ls0xx"; + label = "DISPLAY"; + spi-max-frequency = <1000000>; + reg = <0>; + width = <160>; + height = <68>; + }; }; / { - chosen { - zephyr,display = &nice_view; - }; + chosen { + zephyr,display = &nice_view; + }; }; diff --git a/app/boards/shields/nice_view_adapter/Kconfig.shield b/app/boards/shields/nice_view_adapter/Kconfig.shield index bf9ba7cb..f95a209c 100644 --- a/app/boards/shields/nice_view_adapter/Kconfig.shield +++ b/app/boards/shields/nice_view_adapter/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_NICE_VIEW_ADAPTER - def_bool $(shields_list_contains,nice_view_adapter) + def_bool $(shields_list_contains,nice_view_adapter) diff --git a/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay b/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay index b8b07258..706cffbe 100644 --- a/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay +++ b/app/boards/shields/nice_view_adapter/boards/bluemicro840_v1.overlay @@ -5,31 +5,31 @@ */ &pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; - spi0_sleep: spi0_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; nice_view_spi: &spi0 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; - cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; + compatible = "nordic,nrf-spim"; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; + cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; &pro_micro_i2c { - status = "disabled"; + status = "disabled"; }; diff --git a/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay b/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay index d9cc0835..e00b599c 100644 --- a/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay +++ b/app/boards/shields/nice_view_adapter/boards/mikoto_520.overlay @@ -5,31 +5,31 @@ */ &pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; - spi0_sleep: spi0_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; nice_view_spi: &spi0 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; - cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; + compatible = "nordic,nrf-spim"; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; + cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; &pro_micro_i2c { - status = "disabled"; + status = "disabled"; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay b/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay index 2a1b757d..45ba34de 100644 --- a/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nice_nano.overlay @@ -5,31 +5,31 @@ */ &pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; - spi0_sleep: spi0_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; nice_view_spi: &spi0 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; - cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; + compatible = "nordic,nrf-spim"; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; + cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; &pro_micro_i2c { - status = "disabled"; + status = "disabled"; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay b/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay index 2a1b757d..45ba34de 100644 --- a/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nice_nano_v2.overlay @@ -5,31 +5,31 @@ */ &pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; - spi0_sleep: spi0_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; nice_view_spi: &spi0 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; - cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; + compatible = "nordic,nrf-spim"; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; + cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; &pro_micro_i2c { - status = "disabled"; + status = "disabled"; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay index b8b07258..706cffbe 100644 --- a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11.overlay @@ -5,31 +5,31 @@ */ &pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; - spi0_sleep: spi0_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; nice_view_spi: &spi0 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; - cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; + compatible = "nordic,nrf-spim"; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; + cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; &pro_micro_i2c { - status = "disabled"; + status = "disabled"; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay index 1cd19db9..5b5dbfb1 100644 --- a/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nrfmicro_11_flipped.overlay @@ -5,31 +5,31 @@ */ &pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; - spi0_sleep: spi0_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; nice_view_spi: &spi0 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; - cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; + compatible = "nordic,nrf-spim"; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; + cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; &pro_micro_i2c { - status = "disabled"; + status = "disabled"; }; diff --git a/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay b/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay index b8b07258..706cffbe 100644 --- a/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay +++ b/app/boards/shields/nice_view_adapter/boards/nrfmicro_13.overlay @@ -5,31 +5,31 @@ */ &pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; - spi0_sleep: spi0_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; nice_view_spi: &spi0 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; - cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; + compatible = "nordic,nrf-spim"; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; + cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; &pro_micro_i2c { - status = "disabled"; + status = "disabled"; }; diff --git a/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay b/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay index b8b07258..706cffbe 100644 --- a/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay +++ b/app/boards/shields/nice_view_adapter/boards/puchi_ble_v1.overlay @@ -5,31 +5,31 @@ */ &pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; - spi0_sleep: spi0_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; nice_view_spi: &spi0 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; - cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; + compatible = "nordic,nrf-spim"; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; + cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>; }; &pro_micro_i2c { - status = "disabled"; + status = "disabled"; }; diff --git a/app/boards/shields/pancake/Kconfig.shield b/app/boards/shields/pancake/Kconfig.shield index 784d25a4..ca00d303 100644 --- a/app/boards/shields/pancake/Kconfig.shield +++ b/app/boards/shields/pancake/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_PANCAKE - def_bool $(shields_list_contains,pancake) \ No newline at end of file + def_bool $(shields_list_contains,pancake) \ No newline at end of file diff --git a/app/boards/shields/quefrency/Kconfig.defconfig b/app/boards/shields/quefrency/Kconfig.defconfig index 28e46a56..db618287 100644 --- a/app/boards/shields/quefrency/Kconfig.defconfig +++ b/app/boards/shields/quefrency/Kconfig.defconfig @@ -5,16 +5,16 @@ if SHIELD_QUEFRENCY_LEFT config ZMK_KEYBOARD_NAME - default "Quefrency" + default "Quefrency" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_QUEFRENCY_LEFT || SHIELD_QUEFRENCY_RIGHT config ZMK_SPLIT - default y + default y endif \ No newline at end of file diff --git a/app/boards/shields/quefrency/Kconfig.shield b/app/boards/shields/quefrency/Kconfig.shield index d205e58f..d30d30f1 100644 --- a/app/boards/shields/quefrency/Kconfig.shield +++ b/app/boards/shields/quefrency/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_QUEFRENCY_LEFT - def_bool $(shields_list_contains,quefrency_left) + def_bool $(shields_list_contains,quefrency_left) config SHIELD_QUEFRENCY_RIGHT - def_bool $(shields_list_contains,quefrency_right) + def_bool $(shields_list_contains,quefrency_right) diff --git a/app/boards/shields/quefrency/quefrency.dtsi b/app/boards/shields/quefrency/quefrency.dtsi index c9cb7d43..f7dc4489 100644 --- a/app/boards/shields/quefrency/quefrency.dtsi +++ b/app/boards/shields/quefrency/quefrency.dtsi @@ -7,26 +7,26 @@ #include / { - chosen { - zmk,kscan = &kscan0; + chosen { + zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + zmk,matrix_transform = &default_transform; + }; - /* - * This transform correspondsto the 60% left without macro keypad and 65% right, even this - * combination of PCBs can have keys in different locations based on configuration. - */ - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <15>; - rows = <6>; - map = < + /* + * This transform correspondsto the 60% left without macro keypad and 65% right, even this + * combination of PCBs can have keys in different locations based on configuration. + */ + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <15>; + rows = <6>; + 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,14) RC(5,13) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) /**/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(5,14) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) /**/ RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,14) RC(2,13) RC(3,0) 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,12) RC(3,13) RC(3,14) RC(3,11) RC(4,0) RC(4,1) RC(4,2) RC(4,4) RC(4,6) /**/ RC(4,7) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) RC(4,9) - >; - }; + >; + }; }; diff --git a/app/boards/shields/redox/Kconfig.defconfig b/app/boards/shields/redox/Kconfig.defconfig index bf122b5e..32e30ad5 100644 --- a/app/boards/shields/redox/Kconfig.defconfig +++ b/app/boards/shields/redox/Kconfig.defconfig @@ -3,16 +3,16 @@ if SHIELD_REDOX_LEFT config ZMK_KEYBOARD_NAME - default "Redox" + default "Redox" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_REDOX_LEFT || SHIELD_REDOX_RIGHT config ZMK_SPLIT - default y + default y endif \ No newline at end of file diff --git a/app/boards/shields/redox/Kconfig.shield b/app/boards/shields/redox/Kconfig.shield index 2df91c11..8e6c601d 100644 --- a/app/boards/shields/redox/Kconfig.shield +++ b/app/boards/shields/redox/Kconfig.shield @@ -1,7 +1,7 @@ # Copyright (c) 2021 The ZMK Contributors # SPDX-License-Identifier: MIT config SHIELD_REDOX_LEFT - def_bool $(shields_list_contains,redox_left) + def_bool $(shields_list_contains,redox_left) config SHIELD_REDOX_RIGHT - def_bool $(shields_list_contains,redox_right) + def_bool $(shields_list_contains,redox_right) diff --git a/app/boards/shields/redox/boards/nice_nano.overlay b/app/boards/shields/redox/boards/nice_nano.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/redox/boards/nice_nano.overlay +++ b/app/boards/shields/redox/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/redox/boards/nice_nano_v2.overlay b/app/boards/shields/redox/boards/nice_nano_v2.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/redox/boards/nice_nano_v2.overlay +++ b/app/boards/shields/redox/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/redox/redox.dtsi b/app/boards/shields/redox/redox.dtsi index 9c0705a6..d2d72d0f 100644 --- a/app/boards/shields/redox/redox.dtsi +++ b/app/boards/shields/redox/redox.dtsi @@ -7,42 +7,42 @@ #include / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <14>; - rows = <5>; + 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 | SW13 | | SW13 | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | // | SW14 | SW15 | SW16 | SW17 | SW18 | SW19 | SW20 | | SW20 | SW19 | SW18 | SW17 | SW16 | SW15 | SW14 | // | SW21 | SW22 | SW23 | SW24 | SW25 | SW26 | SW27 | SW28 | | SW28 | SW27 | SW26 | SW25 | SW24 | SW23 | SW22 | SW21 | // | SW29 | SW30 | SW31 | SW32 | SW33 | SW34 | SW35 | | SW35 | SW34 | SW33 | SW32 | SW31 | SW30 | SW29 | - map = < + 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(0,6) RC(0,7) 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(1,6) RC(1,7) 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(2,6) RC(3,6) RC(3,7) RC(2,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) - >; - }; + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&pro_micro 4 (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)> - ; + diode-direction = "col2row"; + row-gpios + = <&pro_micro 4 (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/redox/redox_left.overlay b/app/boards/shields/redox/redox_left.overlay index 322dca79..d68029d8 100644 --- a/app/boards/shields/redox/redox_left.overlay +++ b/app/boards/shields/redox/redox_left.overlay @@ -7,13 +7,13 @@ #include "redox.dtsi" &kscan0 { - col-gpios - = <&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> - ; + col-gpios + = <&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> + ; }; diff --git a/app/boards/shields/redox/redox_right.overlay b/app/boards/shields/redox/redox_right.overlay index f2dcfed0..09b14637 100644 --- a/app/boards/shields/redox/redox_right.overlay +++ b/app/boards/shields/redox/redox_right.overlay @@ -7,17 +7,17 @@ #include "redox.dtsi" &default_transform { - col-offset = <7>; + col-offset = <7>; }; &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> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - ; + 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> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + ; }; diff --git a/app/boards/shields/reviung41/boards/nice_nano.overlay b/app/boards/shields/reviung41/boards/nice_nano.overlay index 741237e1..8590149e 100644 --- a/app/boards/shields/reviung41/boards/nice_nano.overlay +++ b/app/boards/shields/reviung41/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <11>; - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <11>; + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/reviung41/boards/nice_nano_v2.overlay b/app/boards/shields/reviung41/boards/nice_nano_v2.overlay index 741237e1..8590149e 100644 --- a/app/boards/shields/reviung41/boards/nice_nano_v2.overlay +++ b/app/boards/shields/reviung41/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <11>; - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <11>; + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/romac/Kconfig.defconfig b/app/boards/shields/romac/Kconfig.defconfig index 53527971..5cd94faa 100644 --- a/app/boards/shields/romac/Kconfig.defconfig +++ b/app/boards/shields/romac/Kconfig.defconfig @@ -4,7 +4,7 @@ if SHIELD_ROMAC config ZMK_KEYBOARD_NAME - default "RoMac" + default "RoMac" endif diff --git a/app/boards/shields/romac/Kconfig.shield b/app/boards/shields/romac/Kconfig.shield index 59669d33..9bdd2c5f 100644 --- a/app/boards/shields/romac/Kconfig.shield +++ b/app/boards/shields/romac/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_ROMAC - def_bool $(shields_list_contains,romac) + def_bool $(shields_list_contains,romac) diff --git a/app/boards/shields/romac/romac.overlay b/app/boards/shields/romac/romac.overlay index 827273a4..480d3f84 100644 --- a/app/boards/shields/romac/romac.overlay +++ b/app/boards/shields/romac/romac.overlay @@ -7,28 +7,28 @@ #include / { - chosen { - zmk,kscan = &kscan0; - }; + chosen { + zmk,kscan = &kscan0; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + diode-direction = "col2row"; + row-gpios + = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; - col-gpios - = <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 15 GPIO_ACTIVE_HIGH> - , <&pro_micro 14 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + ; - }; + }; }; diff --git a/app/boards/shields/romac_plus/Kconfig.defconfig b/app/boards/shields/romac_plus/Kconfig.defconfig index c4efdb97..442bc0bd 100644 --- a/app/boards/shields/romac_plus/Kconfig.defconfig +++ b/app/boards/shields/romac_plus/Kconfig.defconfig @@ -4,6 +4,6 @@ if SHIELD_ROMAC_PLUS config ZMK_KEYBOARD_NAME - default "RoMac+ v4" + default "RoMac+ v4" endif \ No newline at end of file diff --git a/app/boards/shields/romac_plus/Kconfig.shield b/app/boards/shields/romac_plus/Kconfig.shield index a7c7c614..277f1eb3 100644 --- a/app/boards/shields/romac_plus/Kconfig.shield +++ b/app/boards/shields/romac_plus/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_ROMAC_PLUS - def_bool $(shields_list_contains,romac_plus) + def_bool $(shields_list_contains,romac_plus) diff --git a/app/boards/shields/romac_plus/boards/nice_nano.overlay b/app/boards/shields/romac_plus/boards/nice_nano.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/romac_plus/boards/nice_nano.overlay +++ b/app/boards/shields/romac_plus/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay b/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay +++ b/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/romac_plus/romac_plus.dtsi b/app/boards/shields/romac_plus/romac_plus.dtsi index 0fd4374a..71ec87b2 100644 --- a/app/boards/shields/romac_plus/romac_plus.dtsi +++ b/app/boards/shields/romac_plus/romac_plus.dtsi @@ -7,50 +7,50 @@ #include / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <3>; - rows = <4>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <3>; + rows = <4>; - map = < + map = < RC(0,0) RC(0,1) RC(0,2) RC(1,0) RC(1,1) RC(1,2) RC(2,0) RC(2,1) RC(2,2) RC(3,0) RC(3,1) RC(3,2) - >; - }; + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + 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 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - }; + diode-direction = "col2row"; + row-gpios + = <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; - left_encoder: encoder_left { - compatible = "alps,ec11"; - 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>; - status = "disabled"; - }; + left_encoder: encoder_left { + compatible = "alps,ec11"; + 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>; + status = "disabled"; + }; - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder>; - }; + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder>; + }; - // TODO: per-key RGB node(s)? + // TODO: per-key RGB node(s)? }; \ No newline at end of file diff --git a/app/boards/shields/romac_plus/romac_plus.overlay b/app/boards/shields/romac_plus/romac_plus.overlay index 4ef38744..2308e284 100644 --- a/app/boards/shields/romac_plus/romac_plus.overlay +++ b/app/boards/shields/romac_plus/romac_plus.overlay @@ -7,22 +7,22 @@ #include "romac_plus.dtsi" / { - chosen { - zmk,kscan = &kscan0; - }; + chosen { + zmk,kscan = &kscan0; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; + diode-direction = "col2row"; - col-gpios - = <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - , <&pro_micro 21 GPIO_ACTIVE_HIGH> - ; - }; + col-gpios + = <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> + ; + }; }; diff --git a/app/boards/shields/settings_reset/Kconfig.defconfig b/app/boards/shields/settings_reset/Kconfig.defconfig index 6d050cb4..05f3b406 100644 --- a/app/boards/shields/settings_reset/Kconfig.defconfig +++ b/app/boards/shields/settings_reset/Kconfig.defconfig @@ -4,7 +4,7 @@ if SHIELD_SETTINGS_RESET config ZMK_KEYBOARD_NAME - default "SETTINGS RESET" + default "SETTINGS RESET" endif diff --git a/app/boards/shields/settings_reset/Kconfig.shield b/app/boards/shields/settings_reset/Kconfig.shield index b5ce97f9..b1e6ed0e 100644 --- a/app/boards/shields/settings_reset/Kconfig.shield +++ b/app/boards/shields/settings_reset/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_SETTINGS_RESET - def_bool $(shields_list_contains,settings_reset) + def_bool $(shields_list_contains,settings_reset) diff --git a/app/boards/shields/settings_reset/settings_reset.overlay b/app/boards/shields/settings_reset/settings_reset.overlay index 51e04ba7..77a9d858 100644 --- a/app/boards/shields/settings_reset/settings_reset.overlay +++ b/app/boards/shields/settings_reset/settings_reset.overlay @@ -7,18 +7,18 @@ #include / { - chosen { - zmk,kscan = &kscan0; - }; + chosen { + zmk,kscan = &kscan0; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-direct"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + label = "KSCAN"; - input-gpios - = <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; - }; + input-gpios + = <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; }; diff --git a/app/boards/shields/snap/Kconfig.defconfig b/app/boards/shields/snap/Kconfig.defconfig index c4a67e65..e21111e9 100644 --- a/app/boards/shields/snap/Kconfig.defconfig +++ b/app/boards/shields/snap/Kconfig.defconfig @@ -4,44 +4,44 @@ if SHIELD_SNAP_LEFT config ZMK_KEYBOARD_NAME - default "SNAP" + default "SNAP" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_SNAP_LEFT || SHIELD_SNAP_RIGHT config ZMK_SPLIT - default y + default y if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/snap/Kconfig.shield b/app/boards/shields/snap/Kconfig.shield index eb02c45f..edbd1b57 100644 --- a/app/boards/shields/snap/Kconfig.shield +++ b/app/boards/shields/snap/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_SNAP_LEFT - def_bool $(shields_list_contains,snap_left) + def_bool $(shields_list_contains,snap_left) config SHIELD_SNAP_RIGHT - def_bool $(shields_list_contains,snap_right) + def_bool $(shields_list_contains,snap_right) diff --git a/app/boards/shields/snap/boards/nice_nano.overlay b/app/boards/shields/snap/boards/nice_nano.overlay index 28e9ce69..1a51eb16 100644 --- a/app/boards/shields/snap/boards/nice_nano.overlay +++ b/app/boards/shields/snap/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/snap/boards/nice_nano_v2.overlay b/app/boards/shields/snap/boards/nice_nano_v2.overlay index 28e9ce69..1a51eb16 100644 --- a/app/boards/shields/snap/boards/nice_nano_v2.overlay +++ b/app/boards/shields/snap/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/snap/snap.dtsi b/app/boards/shields/snap/snap.dtsi index 77070db9..a374ad17 100644 --- a/app/boards/shields/snap/snap.dtsi +++ b/app/boards/shields/snap/snap.dtsi @@ -7,30 +7,30 @@ #include / { - chosen { - zephyr,display = &oled; - zmk,kscan = &kscan_composite; - zmk,matrix_transform = &default_transform; - }; + chosen { + zephyr,display = &oled; + zmk,kscan = &kscan_composite; + zmk,matrix_transform = &default_transform; + }; - left_encoder: encoder_left { - compatible = "alps,ec11"; - label = "LEFT_ENCODER"; - resolution = <4>; - status = "disabled"; - }; + left_encoder: encoder_left { + compatible = "alps,ec11"; + label = "LEFT_ENCODER"; + resolution = <4>; + status = "disabled"; + }; - right_encoder: encoder_right { - compatible = "alps,ec11"; - label = "RIGHT_ENCODER"; - resolution = <4>; - status = "disabled"; - }; + right_encoder: encoder_right { + compatible = "alps,ec11"; + label = "RIGHT_ENCODER"; + resolution = <4>; + status = "disabled"; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <17>; - rows = <6>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <17>; + rows = <6>; // | R0C06L | R0C05L | R0C04L | R0C03L | R0C02L | R0C01L | R0C00L | | R0C15R | R0C14R | R0C13R | R0C12R | R0C11R | R0C10R | R0C09R | R0C08R | // R1C07L | R1C06L | R1C05L | R1C04L | R1C03L | R1C02L | R1C01L | R1C00L | | R1C15R | R1C14R | R1C13R | R1C12R | R1C11R | R1C10R | R1C09R | R1C08R | R2C0XR | @@ -39,48 +39,48 @@ // R4C07L | R4C06L | R4C05L | R4C04L | R4C03L | R4C02L | R4C01L | R4C00L | | R4C15R | R4C14R | R4C13R | R4C12R | R4C11R | R4C10R | R4C09R | R5C08R | // R5C07L | R5C06L | R5C05L | R5C04L | R5C02L | R5C00L | | R5C15R | R5C14R | R5C13R | R5C12R | R5C11R | R5C10R | R5C09R | - map = < - RC(0,6) RC(0,5) RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(0,15) RC(0,14) RC(0,13) RC(0,12) RC(0,11) RC(0,10) RC(0,9) RC(0,8) + map = < + RC(0,6) RC(0,5) RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(0,15) RC(0,14) RC(0,13) RC(0,12) RC(0,11) RC(0,10) RC(0,9) RC(0,8) RC(1,7) RC(1,6) RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) RC(1,15) RC(1,14) RC(1,13) RC(1,12) RC(1,11) RC(1,10) RC(1,9) RC(1,8) RC(1,16) RC(2,7) RC(2,6) RC(2,5) RC(2,4) RC(2,3) RC(2,2) RC(2,0) RC(2,15) RC(2,14) RC(2,13) RC(2,12) RC(2,11) RC(2,10) RC(2,9) RC(3,8) RC(2,8) RC(3,7) RC(3,6) RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,0) RC(3,15) RC(3,14) RC(3,13) RC(3,12) RC(3,11) RC(3,10) RC(3,9) RC(4,8) RC(4,7) RC(4,6) RC(4,5) RC(4,4) RC(4,3) RC(4,2) RC(4,1) RC(4,0) RC(4,15) RC(4,14) RC(4,13) RC(4,12) RC(4,11) RC(4,10) RC(4,9) RC(5,8) RC(5,7) RC(5,6) RC(5,5) RC(5,4) RC(5,2) RC(5,0) RC(5,15) RC(5,14) RC(5,13) RC(5,12) RC(5,11) RC(5,10) RC(5,9) - >; - }; + >; + }; - kscan_composite: kscan { - compatible = "zmk,kscan-composite"; - label = "KSCAN"; - rows = <6>; - columns = <17>; + kscan_composite: kscan { + compatible = "zmk,kscan-composite"; + label = "KSCAN"; + rows = <6>; + columns = <17>; - demux { - kscan = <&kscan_demux>; - }; - }; + demux { + kscan = <&kscan_demux>; + }; + }; - kscan_demux: kscan_demux { - compatible = "zmk,kscan-gpio-demux"; - label = "DEMUX"; - polling-interval-msec = <25>; - }; + kscan_demux: kscan_demux { + compatible = "zmk,kscan-gpio-demux"; + label = "DEMUX"; + polling-interval-msec = <25>; + }; }; &pro_micro_i2c { - status = "okay"; + 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>; - }; + 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/snap/snap.keymap b/app/boards/shields/snap/snap.keymap index cc4c5255..7c750f9f 100644 --- a/app/boards/shields/snap/snap.keymap +++ b/app/boards/shields/snap/snap.keymap @@ -10,38 +10,38 @@ #include / { - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder &right_encoder>; - }; + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + }; - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - label = "Default"; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp C_VOL_UP C_VOL_DN>; - bindings = < + default_layer { + label = "Default"; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp C_VOL_UP C_VOL_DN>; + bindings = < &kp ESC &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 KP_NUM &kp PAUSE_BREAK &kp C_MUTE &kp TILDE &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 DEL &kp HOME &kp F13 &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 END &kp F14 &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 RET &kp PG_UP &kp F15 &kp LSHFT &kp NUHS &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 PG_DN &kp F16 &kp LCTRL &kp LGUI &kp LALT &mo 1 &kp SPACE &kp BSPC &mo 1 &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT - >; - }; + >; + }; - function_layer { - label = "Function"; - sensor-bindings = <&inc_dec_kp C_NEXT C_PREV &inc_dec_kp C_NEXT C_PREV>; - bindings = < + function_layer { + label = "Function"; + sensor-bindings = <&inc_dec_kp C_NEXT C_PREV &inc_dec_kp C_NEXT C_PREV>; + bindings = < &bootloader &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bootloader &kp C_PP &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_PP &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 &rgb_ug RGB_TOG &rgb_ug RGB_BRI &rgb_ug RGB_EFF &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &rgb_ug RGB_HUD &rgb_ug RGB_BRD &rgb_ug RGB_HUI - >; - }; - }; + >; + }; + }; }; diff --git a/app/boards/shields/snap/snap_left.overlay b/app/boards/shields/snap/snap_left.overlay index b5b8a841..abbe9450 100644 --- a/app/boards/shields/snap/snap_left.overlay +++ b/app/boards/shields/snap/snap_left.overlay @@ -7,28 +7,28 @@ #include "snap.dtsi" &kscan_demux { - input-gpios - = <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; - output-gpios - = <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - ; + input-gpios + = <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + output-gpios + = <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + ; }; &left_encoder { - a-gpios = <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - status = "okay"; + a-gpios = <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + status = "okay"; }; &oled { - segment-remap; - com-invdir; + segment-remap; + com-invdir; }; diff --git a/app/boards/shields/snap/snap_right.overlay b/app/boards/shields/snap/snap_right.overlay index dc71a5cf..ad04ae24 100644 --- a/app/boards/shields/snap/snap_right.overlay +++ b/app/boards/shields/snap/snap_right.overlay @@ -8,44 +8,44 @@ / { kscan_direct: kscan_direct { - compatible = "zmk,kscan-gpio-direct"; - label = "DIRECT"; - input-gpios - = <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; - }; + compatible = "zmk,kscan-gpio-direct"; + label = "DIRECT"; + input-gpios + = <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; }; &default_transform { - col-offset = <8>; + col-offset = <8>; }; &kscan_composite { - direct { - kscan = <&kscan_direct>; - row-offset = <1>; - column-offset = <8>; - }; + direct { + kscan = <&kscan_direct>; + row-offset = <1>; + column-offset = <8>; + }; }; &kscan_demux { - input-gpios - = <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; - output-gpios - = <&pro_micro 6 GPIO_ACTIVE_HIGH> - , <&pro_micro 5 GPIO_ACTIVE_HIGH> - , <&pro_micro 4 GPIO_ACTIVE_HIGH> - ; + input-gpios + = <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + output-gpios + = <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 4 GPIO_ACTIVE_HIGH> + ; }; &right_encoder { - a-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - status = "okay"; + a-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + status = "okay"; }; diff --git a/app/boards/shields/sofle/Kconfig.defconfig b/app/boards/shields/sofle/Kconfig.defconfig index afa710ff..cc598d67 100644 --- a/app/boards/shields/sofle/Kconfig.defconfig +++ b/app/boards/shields/sofle/Kconfig.defconfig @@ -4,44 +4,44 @@ if SHIELD_SOFLE_LEFT config ZMK_KEYBOARD_NAME - default "Sofle" + default "Sofle" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_SOFLE_LEFT || SHIELD_SOFLE_RIGHT config ZMK_SPLIT - default y + default y if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/sofle/Kconfig.shield b/app/boards/shields/sofle/Kconfig.shield index e23a97a1..a865e839 100644 --- a/app/boards/shields/sofle/Kconfig.shield +++ b/app/boards/shields/sofle/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_SOFLE_LEFT - def_bool $(shields_list_contains,sofle_left) + def_bool $(shields_list_contains,sofle_left) config SHIELD_SOFLE_RIGHT - def_bool $(shields_list_contains,sofle_right) + def_bool $(shields_list_contains,sofle_right) diff --git a/app/boards/shields/sofle/sofle_left.overlay b/app/boards/shields/sofle/sofle_left.overlay index 13bfb397..057e6050 100644 --- a/app/boards/shields/sofle/sofle_left.overlay +++ b/app/boards/shields/sofle/sofle_left.overlay @@ -7,16 +7,16 @@ #include "sofle.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> - ; + 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"; + status = "okay"; }; diff --git a/app/boards/shields/sofle/sofle_right.overlay b/app/boards/shields/sofle/sofle_right.overlay index 53b10e60..65e5f330 100644 --- a/app/boards/shields/sofle/sofle_right.overlay +++ b/app/boards/shields/sofle/sofle_right.overlay @@ -7,20 +7,20 @@ #include "sofle.dtsi" &default_transform { - col-offset = <6>; + 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> - ; + 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"; + status = "okay"; }; diff --git a/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig index 03078cd6..a28792c7 100644 --- a/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig @@ -4,50 +4,50 @@ if SHIELD_SPLITKB_AURORA_CORNE_LEFT config ZMK_KEYBOARD_NAME - default "Aurora Corne" + default "Aurora Corne" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif # SHIELD_SPLITKB_AURORA_CORNE_LEFT if SHIELD_SPLITKB_AURORA_CORNE_LEFT || SHIELD_SPLITKB_AURORA_CORNE_RIGHT config ZMK_SPLIT - default y + default y config ZMK_RGB_UNDERGLOW - select WS2812_STRIP - select SPI + select WS2812_STRIP + select SPI config ZMK_DISPLAY if ZMK_DISPLAY config SSD1306 - default y + default y config I2C - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/splitkb_aurora_corne/Kconfig.shield b/app/boards/shields/splitkb_aurora_corne/Kconfig.shield index 3de10105..1efcdf00 100644 --- a/app/boards/shields/splitkb_aurora_corne/Kconfig.shield +++ b/app/boards/shields/splitkb_aurora_corne/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_SPLITKB_AURORA_CORNE_LEFT - def_bool $(shields_list_contains,splitkb_aurora_corne_left) + def_bool $(shields_list_contains,splitkb_aurora_corne_left) config SHIELD_SPLITKB_AURORA_CORNE_RIGHT - def_bool $(shields_list_contains,splitkb_aurora_corne_right) + def_bool $(shields_list_contains,splitkb_aurora_corne_right) diff --git a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay +++ b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay +++ b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; 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 aa525948..a1b7b643 100644 --- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi +++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi @@ -8,85 +8,85 @@ / { - chosen { - zephyr,display = &oled; - zmk,matrix_transform = &default_transform; - }; + chosen { + zephyr,display = &oled; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <4>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <4>; // | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | // | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | // | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - map = < + map = < RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) - >; - }; + >; + }; - five_column_transform: keymap_transform_1 { - compatible = "zmk,matrix-transform"; - columns = <10>; - rows = <4>; + five_column_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; // | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | // | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | // | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | // | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | - map = < + map = < RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) - >; - }; + >; + }; - left_encoder: left_encoder { - compatible = "alps,ec11"; - label = "L_ENCODER"; - resolution = <4>; - status = "disabled"; + left_encoder: left_encoder { + compatible = "alps,ec11"; + label = "L_ENCODER"; + resolution = <4>; + status = "disabled"; - a-gpios = <&pro_micro 4 GPIO_PULL_UP>; - b-gpios = <&pro_micro 5 GPIO_PULL_UP>; - }; + a-gpios = <&pro_micro 4 GPIO_PULL_UP>; + b-gpios = <&pro_micro 5 GPIO_PULL_UP>; + }; - right_encoder: right_encoder { - compatible = "alps,ec11"; - label = "R_ENCODER"; - resolution = <4>; - status = "disabled"; + right_encoder: right_encoder { + compatible = "alps,ec11"; + label = "R_ENCODER"; + resolution = <4>; + status = "disabled"; - a-gpios = <&pro_micro 19 GPIO_PULL_UP>; - b-gpios = <&pro_micro 18 GPIO_PULL_UP>; - }; + a-gpios = <&pro_micro 19 GPIO_PULL_UP>; + b-gpios = <&pro_micro 18 GPIO_PULL_UP>; + }; - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder &right_encoder>; - }; + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + }; }; &pro_micro_i2c { - status = "okay"; + 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>; - }; + 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_corne/splitkb_aurora_corne.keymap b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.keymap index 53218a86..0555cf41 100644 --- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.keymap +++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.keymap @@ -35,7 +35,7 @@ &kp TAB &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans &kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT + &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT >; }; @@ -49,7 +49,7 @@ &kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC &kp LCTRL &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE &kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE - &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT + &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT >; }; }; diff --git a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_left.overlay b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_left.overlay index 82234278..89563f42 100644 --- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_left.overlay +++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_left.overlay @@ -7,36 +7,36 @@ #include "splitkb_aurora_corne.dtsi" / { - chosen { - zmk,kscan = &kscan; - }; + chosen { + zmk,kscan = &kscan; + }; - kscan: kscan { - compatible = "zmk,kscan-gpio-matrix"; + kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; - diode-direction = "col2row"; + label = "KSCAN"; + diode-direction = "col2row"; - row-gpios - = <&pro_micro 6 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 7 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 8 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - ; + row-gpios + = <&pro_micro 6 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 7 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 8 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + ; - col-gpios - = <&pro_micro 16 GPIO_ACTIVE_HIGH> - , <&pro_micro 10 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> - ; - }; + col-gpios + = <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 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> + ; + }; }; &left_encoder { - status = "okay"; + status = "okay"; }; diff --git a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_right.overlay b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_right.overlay index c1d34ffd..e05df223 100644 --- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_right.overlay +++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_right.overlay @@ -7,42 +7,42 @@ #include "splitkb_aurora_corne.dtsi" / { - chosen { - zmk,kscan = &kscan; - }; + chosen { + zmk,kscan = &kscan; + }; - kscan: kscan { - compatible = "zmk,kscan-gpio-matrix"; + kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; - diode-direction = "col2row"; + label = "KSCAN"; + diode-direction = "col2row"; - row-gpios - = <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 14 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 16 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 10 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - ; + row-gpios + = <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 14 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 16 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 10 (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> - ; - }; + 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> + ; + }; }; &right_encoder { - status = "okay"; + status = "okay"; }; &default_transform { - col-offset = <6>; + col-offset = <6>; }; &five_column_transform { - col-offset = <6>; + col-offset = <6>; }; diff --git a/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig index 221bf90a..e54e2b43 100644 --- a/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_lily58/Kconfig.defconfig @@ -4,50 +4,50 @@ if SHIELD_SPLITKB_AURORA_LILY58_LEFT config ZMK_KEYBOARD_NAME - default "Aurora Lily58" + default "Aurora Lily58" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif # SHIELD_SPLITKB_AURORA_LILY58_LEFT if SHIELD_SPLITKB_AURORA_LILY58_LEFT || SHIELD_SPLITKB_AURORA_LILY58_RIGHT config ZMK_SPLIT - default y + default y config ZMK_RGB_UNDERGLOW - select WS2812_STRIP - select SPI + select WS2812_STRIP + select SPI config ZMK_DISPLAY if ZMK_DISPLAY config SSD1306 - default y + default y config I2C - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/splitkb_aurora_lily58/Kconfig.shield b/app/boards/shields/splitkb_aurora_lily58/Kconfig.shield index 35f8b2d1..a64f47dc 100644 --- a/app/boards/shields/splitkb_aurora_lily58/Kconfig.shield +++ b/app/boards/shields/splitkb_aurora_lily58/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_SPLITKB_AURORA_LILY58_LEFT - def_bool $(shields_list_contains,splitkb_aurora_lily58_left) + def_bool $(shields_list_contains,splitkb_aurora_lily58_left) config SHIELD_SPLITKB_AURORA_LILY58_RIGHT - def_bool $(shields_list_contains,splitkb_aurora_lily58_right) + def_bool $(shields_list_contains,splitkb_aurora_lily58_right) diff --git a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay index 5b9ce4a8..0eafa704 100644 --- a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay +++ b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay @@ -2,46 +2,46 @@ &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <5>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - color-mapping = ; - }; + /* WS2812 */ + chain-length = <5>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay index 9e168625..6601d27d 100644 --- a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay +++ b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay @@ -1,46 +1,46 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <5>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - color-mapping = ; - }; + /* WS2812 */ + chain-length = <5>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; 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 08e2ac9e..908356c7 100644 --- a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi +++ b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi @@ -8,71 +8,71 @@ / { - chosen { - zephyr,display = &oled; - zmk,matrix_transform = &default_transform; - }; + chosen { + zephyr,display = &oled; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <14>; - rows = <5>; + 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 | // | SW29 | SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | SW29 | - map = < + 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,1) RC(4,10) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) - >; - }; + >; + }; - left_encoder: left_encoder { - compatible = "alps,ec11"; - label = "L_ENCODER"; - resolution = <4>; - status = "disabled"; + left_encoder: left_encoder { + compatible = "alps,ec11"; + label = "L_ENCODER"; + resolution = <4>; + status = "disabled"; - a-gpios = <&pro_micro 5 GPIO_PULL_UP>; - b-gpios = <&pro_micro 4 GPIO_PULL_UP>; - }; + a-gpios = <&pro_micro 5 GPIO_PULL_UP>; + b-gpios = <&pro_micro 4 GPIO_PULL_UP>; + }; - right_encoder: right_encoder { - compatible = "alps,ec11"; - label = "R_ENCODER"; - resolution = <4>; - status = "disabled"; + right_encoder: right_encoder { + compatible = "alps,ec11"; + label = "R_ENCODER"; + resolution = <4>; + status = "disabled"; - a-gpios = <&pro_micro 18 GPIO_PULL_UP>; - b-gpios = <&pro_micro 19 GPIO_PULL_UP>; - }; + a-gpios = <&pro_micro 18 GPIO_PULL_UP>; + b-gpios = <&pro_micro 19 GPIO_PULL_UP>; + }; - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder &right_encoder>; - }; + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + }; }; &pro_micro_i2c { - status = "okay"; + 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>; - }; + 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_lily58/splitkb_aurora_lily58.keymap b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.keymap index 376bcf26..b8a9103b 100644 --- a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.keymap +++ b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.keymap @@ -10,61 +10,61 @@ #include / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { + 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 | // | ALT | GUI | LOWER| SPACE | | ENTER | RAISE| BSPC | GUI | - bindings = < + 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 LALT &kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp BSPC &kp RGUI - >; + >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; - lower_layer { + lower_layer { // ------------------------------------------------------------------------------------------------------------ // | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | // | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | // | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ | // | | | | | | | | | | | _ | + | { | } | "|" | // | | | | | | | | | | - bindings = < + 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 - >; + >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; - raise_layer { + 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 = < + 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 - >; + >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - }; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + }; }; diff --git a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_left.overlay b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_left.overlay index 10a195ff..c4f12dda 100644 --- a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_left.overlay +++ b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_left.overlay @@ -7,37 +7,37 @@ #include "splitkb_aurora_lily58.dtsi" / { - chosen { - zmk,kscan = &kscan; - }; + chosen { + zmk,kscan = &kscan; + }; - kscan: kscan { - compatible = "zmk,kscan-gpio-matrix"; + kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; - diode-direction = "row2col"; + label = "KSCAN"; + diode-direction = "row2col"; - row-gpios - = <&pro_micro 21 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 6 GPIO_ACTIVE_HIGH> - , <&pro_micro 7 GPIO_ACTIVE_HIGH> - , <&pro_micro 8 GPIO_ACTIVE_HIGH> - ; + row-gpios + = <&pro_micro 21 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 7 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + ; - col-gpios - = <&pro_micro 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 18 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 14 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 16 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 10 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - ; - }; + col-gpios + = <&pro_micro 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 18 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 14 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 16 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 10 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + ; + }; }; &left_encoder { - status = "okay"; + status = "okay"; }; diff --git a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_right.overlay b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_right.overlay index eaebff36..09da298c 100644 --- a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_right.overlay +++ b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_right.overlay @@ -7,39 +7,39 @@ #include "splitkb_aurora_lily58.dtsi" / { - chosen { - zmk,kscan = &kscan; - }; + chosen { + zmk,kscan = &kscan; + }; - kscan: kscan { - compatible = "zmk,kscan-gpio-matrix"; + kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; - diode-direction = "row2col"; + label = "KSCAN"; + diode-direction = "row2col"; - row-gpios - = <&pro_micro 21 GPIO_ACTIVE_HIGH> - , <&pro_micro 4 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> + , <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + ; - col-gpios - = <&pro_micro 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 8 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 7 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 6 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 5 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - ; - }; + col-gpios + = <&pro_micro 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 8 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 7 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 6 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 5 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + ; + }; }; &right_encoder { - status = "okay"; + status = "okay"; }; &default_transform { - col-offset = <6>; + col-offset = <6>; }; diff --git a/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig b/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig index ac07c935..83cb1bf6 100644 --- a/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig +++ b/app/boards/shields/splitkb_aurora_sweep/Kconfig.defconfig @@ -4,50 +4,50 @@ if SHIELD_SPLITKB_AURORA_SWEEP_LEFT config ZMK_KEYBOARD_NAME - default "Aurora Sweep" + default "Aurora Sweep" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif # SHIELD_SPLITKB_AURORA_SWEEP_LEFT if SHIELD_SPLITKB_AURORA_SWEEP_LEFT || SHIELD_SPLITKB_AURORA_SWEEP_RIGHT config ZMK_SPLIT - default y + default y config ZMK_RGB_UNDERGLOW - select WS2812_STRIP - select SPI + select WS2812_STRIP + select SPI config ZMK_DISPLAY if ZMK_DISPLAY config SSD1306 - default y + default y config I2C - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/splitkb_aurora_sweep/Kconfig.shield b/app/boards/shields/splitkb_aurora_sweep/Kconfig.shield index abb05282..7d92134c 100644 --- a/app/boards/shields/splitkb_aurora_sweep/Kconfig.shield +++ b/app/boards/shields/splitkb_aurora_sweep/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_SPLITKB_AURORA_SWEEP_LEFT - def_bool $(shields_list_contains,splitkb_aurora_sweep_left) + def_bool $(shields_list_contains,splitkb_aurora_sweep_left) config SHIELD_SPLITKB_AURORA_SWEEP_RIGHT - def_bool $(shields_list_contains,splitkb_aurora_sweep_right) + def_bool $(shields_list_contains,splitkb_aurora_sweep_right) diff --git a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay +++ b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay index f1330669..810340f9 100644 --- a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay +++ b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; 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 a999df6a..ab568a09 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi @@ -8,73 +8,73 @@ / { - chosen { - zephyr,display = &oled; - zmk,matrix_transform = &default_transform; - }; + chosen { + zephyr,display = &oled; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <10>; - rows = <4>; - map = < - RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) - RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) - RC(2,4) RC(2,3) RC(2,2) RC(2,1) RC(2,0) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) - RC(3,1) RC(3,0) RC(3,5) RC(3,6) - >; - }; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; + map = < + RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) + RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) + RC(2,4) RC(2,3) RC(2,2) RC(2,1) RC(2,0) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) + RC(3,1) RC(3,0) RC(3,5) RC(3,6) + >; + }; - left_encoder1: left_encoder1 { - compatible = "alps,ec11"; - label = "L_ENCODER1"; - resolution = <4>; - status = "disabled"; - }; + left_encoder1: left_encoder1 { + compatible = "alps,ec11"; + label = "L_ENCODER1"; + resolution = <4>; + status = "disabled"; + }; - left_encoder2: left_encoder2 { - compatible = "alps,ec11"; - label = "L_ENCODER2"; - resolution = <4>; - status = "disabled"; - }; + left_encoder2: left_encoder2 { + compatible = "alps,ec11"; + label = "L_ENCODER2"; + resolution = <4>; + status = "disabled"; + }; - right_encoder1: right_encoder1 { - compatible = "alps,ec11"; - label = "R_ENCODER1"; - resolution = <4>; - status = "disabled"; - }; + right_encoder1: right_encoder1 { + compatible = "alps,ec11"; + label = "R_ENCODER1"; + resolution = <4>; + status = "disabled"; + }; - right_encoder2: right_encoder2 { - compatible = "alps,ec11"; - label = "R_ENCODER2"; - resolution = <4>; - status = "disabled"; - }; + right_encoder2: right_encoder2 { + compatible = "alps,ec11"; + label = "R_ENCODER2"; + resolution = <4>; + status = "disabled"; + }; - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder1 &right_encoder1>; - }; + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder1 &right_encoder1>; + }; }; &pro_micro_i2c { - status = "okay"; + 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>; - }; + 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_sweep/splitkb_aurora_sweep.keymap b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.keymap index 385d2022..4b57beac 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.keymap +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.keymap @@ -62,41 +62,41 @@ keymap { compatible = "zmk,keymap"; - default_layer { - 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 QUOT - &mt LSFT Z &kp X &kp C &kp V &kp B &kp N &kp M &kp CMMA &kp DOT &mt LSFT RET - &mo 1 &kp LCTL &kp SPC &mo 2 - >; - }; + default_layer { + 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 QUOT + &mt LSFT Z &kp X &kp C &kp V &kp B &kp N &kp M &kp CMMA &kp DOT &mt LSFT RET + &mo 1 &kp LCTL &kp SPC &mo 2 + >; + }; - left_layer { - bindings = < - &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp NUM_0 - &kp TAB &kp LC(S) &kp DQT &kp PIPE2 &kp HASH &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp DEL - &kp ESC &kp TILDE &kp NON_US_BSLH &kp NON_US_HASH &kp TILDE2 &kp MINUS &kp GRAVE &kp LBKT &kp RBKT &kp DEL - &mo 1 &kp LGUI &kp RGUI &mo 2 - >; - }; + left_layer { + bindings = < + &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp NUM_0 + &kp TAB &kp LC(S) &kp DQT &kp PIPE2 &kp HASH &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp DEL + &kp ESC &kp TILDE &kp NON_US_BSLH &kp NON_US_HASH &kp TILDE2 &kp MINUS &kp GRAVE &kp LBKT &kp RBKT &kp DEL + &mo 1 &kp LGUI &kp RGUI &mo 2 + >; + }; - right_layer { - bindings = < - &kp BANG &kp ATSN &kp HASH &kp DLLR &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN - &kp HASH &kp QMARK &kp FSLH &kp COLN &kp SCLN &kp MINUS &kp KP_EQUAL &kp LBRC &kp RBRC &kp BKSP - &kp LSFT &kp KPLS &kp LBKT &kp RBKT &kp BSLH &kp UNDER &kp LEFT &kp DOWN &kp UP &kp RIGHT - &mo 3 &kp LCTL &kp SPC &mo 2 - >; - }; + right_layer { + bindings = < + &kp BANG &kp ATSN &kp HASH &kp DLLR &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN + &kp HASH &kp QMARK &kp FSLH &kp COLN &kp SCLN &kp MINUS &kp KP_EQUAL &kp LBRC &kp RBRC &kp BKSP + &kp LSFT &kp KPLS &kp LBKT &kp RBKT &kp BSLH &kp UNDER &kp LEFT &kp DOWN &kp UP &kp RIGHT + &mo 3 &kp LCTL &kp SPC &mo 2 + >; + }; - tri_layer { - bindings = < - &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &trans &trans &trans &trans &trans - &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &kp PG_UP &kp K_VOL_UP &kp K_MUTE &trans - &bt BT_CLR &bt BT_NXT &bt BT_PRV &kp F6 &kp F7 &trans &kp PG_DN &kp K_VOL_DN &trans &trans - &trans &trans &trans &trans - >; - }; + tri_layer { + bindings = < + &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &trans &trans &trans &trans &trans + &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &kp PG_UP &kp K_VOL_UP &kp K_MUTE &trans + &bt BT_CLR &bt BT_NXT &bt BT_PRV &kp F6 &kp F7 &trans &kp PG_DN &kp K_VOL_DN &trans &trans + &trans &trans &trans &trans + >; + }; - }; + }; }; diff --git a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_left.overlay b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_left.overlay index 1ff5ed5e..f62d24fa 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_left.overlay +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_left.overlay @@ -7,42 +7,42 @@ #include "splitkb_aurora_sweep.dtsi" / { - chosen { - zmk,kscan = &kscan; - }; + chosen { + zmk,kscan = &kscan; + }; - kscan: kscan { - compatible = "zmk,kscan-gpio-matrix"; + kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; - diode-direction = "row2col"; + label = "KSCAN"; + diode-direction = "row2col"; - row-gpios - = <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 15 GPIO_ACTIVE_HIGH> - ; + row-gpios + = <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + ; - col-gpios - = <&pro_micro 10 (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)> - , <&pro_micro 7 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - ; - }; + col-gpios + = <&pro_micro 10 (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)> + , <&pro_micro 7 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + ; + }; }; &left_encoder1 { - status = "okay"; - a-gpios = <&pro_micro 9 GPIO_PULL_UP>; - b-gpios = <&pro_micro 8 GPIO_PULL_UP>; + status = "okay"; + a-gpios = <&pro_micro 9 GPIO_PULL_UP>; + b-gpios = <&pro_micro 8 GPIO_PULL_UP>; }; &left_encoder2 { - status = "okay"; - a-gpios = <&pro_micro 14 GPIO_PULL_UP>; - b-gpios = <&pro_micro 16 GPIO_PULL_UP>; + status = "okay"; + a-gpios = <&pro_micro 14 GPIO_PULL_UP>; + b-gpios = <&pro_micro 16 GPIO_PULL_UP>; }; diff --git a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_right.overlay b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_right.overlay index 81ddca40..ff1d16d3 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_right.overlay +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_right.overlay @@ -7,45 +7,45 @@ #include "splitkb_aurora_sweep.dtsi" / { - chosen { - zmk,kscan = &kscan; - }; + chosen { + zmk,kscan = &kscan; + }; - kscan: kscan { - compatible = "zmk,kscan-gpio-matrix"; + kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; - diode-direction = "row2col"; + label = "KSCAN"; + diode-direction = "row2col"; - row-gpios - = <&pro_micro 15 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 14 GPIO_ACTIVE_HIGH> - ; + row-gpios + = <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + ; - col-gpios - = <&pro_micro 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 8 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 7 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 6 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - , <&pro_micro 5 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> - ; - }; + col-gpios + = <&pro_micro 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 8 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 7 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 6 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + , <&pro_micro 5 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)> + ; + }; }; &right_encoder1 { - status = "okay"; - a-gpios = <&pro_micro 16 GPIO_PULL_UP>; - b-gpios = <&pro_micro 10 GPIO_PULL_UP>; + status = "okay"; + a-gpios = <&pro_micro 16 GPIO_PULL_UP>; + b-gpios = <&pro_micro 10 GPIO_PULL_UP>; }; &right_encoder2 { - status = "okay"; - a-gpios = <&pro_micro 20 GPIO_PULL_UP>; - b-gpios = <&pro_micro 4 GPIO_PULL_UP>; + status = "okay"; + a-gpios = <&pro_micro 20 GPIO_PULL_UP>; + b-gpios = <&pro_micro 4 GPIO_PULL_UP>; }; &default_transform { - col-offset = <5>; + col-offset = <5>; }; diff --git a/app/boards/shields/splitreus62/Kconfig.defconfig b/app/boards/shields/splitreus62/Kconfig.defconfig index 14063d3e..52d62c9d 100644 --- a/app/boards/shields/splitreus62/Kconfig.defconfig +++ b/app/boards/shields/splitreus62/Kconfig.defconfig @@ -6,16 +6,16 @@ if SHIELD_SPLITREUS62_LEFT config ZMK_KEYBOARD_NAME - default "Splitreus62" + default "Splitreus62" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_SPLITREUS62_LEFT || SHIELD_SPLITREUS62_RIGHT config ZMK_SPLIT - default y + default y endif diff --git a/app/boards/shields/splitreus62/Kconfig.shield b/app/boards/shields/splitreus62/Kconfig.shield index 762d991b..951ab9fb 100644 --- a/app/boards/shields/splitreus62/Kconfig.shield +++ b/app/boards/shields/splitreus62/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_SPLITREUS62_LEFT - def_bool $(shields_list_contains,splitreus62_left) + def_bool $(shields_list_contains,splitreus62_left) config SHIELD_SPLITREUS62_RIGHT - def_bool $(shields_list_contains,splitreus62_right) + def_bool $(shields_list_contains,splitreus62_right) diff --git a/app/boards/shields/splitreus62/splitreus62.dtsi b/app/boards/shields/splitreus62/splitreus62.dtsi index 905605e9..abc3b7f7 100644 --- a/app/boards/shields/splitreus62/splitreus62.dtsi +++ b/app/boards/shields/splitreus62/splitreus62.dtsi @@ -7,44 +7,44 @@ #include / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <6>; -// | SW0 | SW5 | SW10 | SW15 | SW20 | SW25 | SW25 | SW20 | SW15 | SW10 | SW5 | SW1 | -// | SW1 | SW6 | SW11 | SW16 | SW21 | SW26 | SW26 | SW21 | SW16 | SW11 | SW6 | SW2 | -// | SW2 | SW7 | SW12 | SW17 | SW22 | SW27 | SW27 | SW22 | SW17 | SW12 | SW7 | SW3 | -// | SW3 | SW8 | SW13 | SW18 | SW23 | SW28 | SW28 | SW23 | SW18 | SW13 | SW8 | SW4 | + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <6>; +// | SW0 | SW5 | SW10 | SW15 | SW20 | SW25 | SW25 | SW20 | SW15 | SW10 | SW5 | SW1 | +// | SW1 | SW6 | SW11 | SW16 | SW21 | SW26 | SW26 | SW21 | SW16 | SW11 | SW6 | SW2 | +// | SW2 | SW7 | SW12 | SW17 | SW22 | SW27 | SW27 | SW22 | SW17 | SW12 | SW7 | SW3 | +// | SW3 | SW8 | SW13 | SW18 | SW23 | SW28 | SW28 | SW23 | SW18 | SW13 | SW8 | SW4 | // | SW4 | SW9 | SW14 | SW19 | SW24 | SW29 | SW29 | SW24 | SW19 | SW14 | SW9 | SW5 | // SW30 | SW30 - map = < + 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,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(5,5) RC(5,6) - >; - }; + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "row2col"; - row-gpios - = <&pro_micro 1 GPIO_ACTIVE_HIGH > - , <&pro_micro 0 GPIO_ACTIVE_HIGH> - , <&pro_micro 2 GPIO_ACTIVE_HIGH> - , <&pro_micro 4 GPIO_ACTIVE_HIGH> - , <&pro_micro 5 GPIO_ACTIVE_HIGH> - , <&pro_micro 6 GPIO_ACTIVE_HIGH> - ; + diode-direction = "row2col"; + row-gpios + = <&pro_micro 1 GPIO_ACTIVE_HIGH > + , <&pro_micro 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 2 GPIO_ACTIVE_HIGH> + , <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + ; - }; + }; }; diff --git a/app/boards/shields/splitreus62/splitreus62.keymap b/app/boards/shields/splitreus62/splitreus62.keymap index c1b0f50f..c7bdb443 100644 --- a/app/boards/shields/splitreus62/splitreus62.keymap +++ b/app/boards/shields/splitreus62/splitreus62.keymap @@ -9,24 +9,24 @@ #include / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { + 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 | // | LCTL | LGUI | LALT | GRAV | | EQL | DEL | BKSP| | RET | SPC | LBKT | RBKT | LBKT | HOME | END | - bindings = < + 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 TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH &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 N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp LCTRL &kp LGUI &kp LALT &kp GRAVE &kp EQUAL &kp DEL &kp SPACE &kp LBKT &kp RBKT &kp MINUS &kp HOME &kp END &kp BSPC &kp RET - >; - }; - }; + >; + }; + }; }; diff --git a/app/boards/shields/splitreus62/splitreus62_left.overlay b/app/boards/shields/splitreus62/splitreus62_left.overlay index ba5c21ff..992eb0db 100644 --- a/app/boards/shields/splitreus62/splitreus62_left.overlay +++ b/app/boards/shields/splitreus62/splitreus62_left.overlay @@ -7,12 +7,12 @@ #include "splitreus62.dtsi" &kscan0 { - col-gpios - = <&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)> - , <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + col-gpios + = <&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)> + , <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; }; diff --git a/app/boards/shields/splitreus62/splitreus62_right.overlay b/app/boards/shields/splitreus62/splitreus62_right.overlay index 9f76e7eb..d83db26d 100644 --- a/app/boards/shields/splitreus62/splitreus62_right.overlay +++ b/app/boards/shields/splitreus62/splitreus62_right.overlay @@ -7,16 +7,16 @@ #include "splitreus62.dtsi" &default_transform { - col-offset = <6>; + col-offset = <6>; }; &kscan0 { - col-gpios - = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + col-gpios + = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; }; diff --git a/app/boards/shields/tg4x/Kconfig.shield b/app/boards/shields/tg4x/Kconfig.shield index 27166b10..d7fc1c13 100644 --- a/app/boards/shields/tg4x/Kconfig.shield +++ b/app/boards/shields/tg4x/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_TG4X - def_bool $(shields_list_contains,tg4x) + def_bool $(shields_list_contains,tg4x) diff --git a/app/boards/shields/tg4x/boards/nice_nano.overlay b/app/boards/shields/tg4x/boards/nice_nano.overlay index 54046bf5..85ab6fbc 100644 --- a/app/boards/shields/tg4x/boards/nice_nano.overlay +++ b/app/boards/shields/tg4x/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/tg4x/boards/nice_nano_v2.overlay b/app/boards/shields/tg4x/boards/nice_nano_v2.overlay index 54046bf5..85ab6fbc 100644 --- a/app/boards/shields/tg4x/boards/nice_nano_v2.overlay +++ b/app/boards/shields/tg4x/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/tg4x/tg4x.keymap b/app/boards/shields/tg4x/tg4x.keymap index e68d0f92..89a478ae 100644 --- a/app/boards/shields/tg4x/tg4x.keymap +++ b/app/boards/shields/tg4x/tg4x.keymap @@ -9,46 +9,46 @@ #include / { - behaviors { - ht: hold_tap { - compatible = "zmk,behavior-hold-tap"; - label = "Hold Tap"; - #binding-cells = <2>; - tapping-term-ms = <200>; - flavor = "tap-preferred"; - bindings = <&kp>, <&kp>; - }; - }; + behaviors { + ht: hold_tap { + compatible = "zmk,behavior-hold-tap"; + label = "Hold Tap"; + #binding-cells = <2>; + tapping-term-ms = <200>; + flavor = "tap-preferred"; + bindings = <&kp>, <&kp>; + }; + }; - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - bindings = < + default_layer { + bindings = < &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp SEMI &kp BSPC &ht CAPS TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp APOS &kp RET &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp RSHFT &kp LCTRL &kp LGUI &kp LALT < 1 SPACE &kp SPACE &kp RALT &kp RGUI &mo 2 &kp RCTRL - >; - }; + >; + }; - function_layer { - bindings = < + function_layer { + bindings = < &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp DEL &none &kp HOME &kp PG_UP &trans &trans &trans &kp LBKT &kp RBKT &kp EQUAL &kp BSLH &kp FSLH &trans &trans &kp END &kp PG_DN &trans &trans &trans &trans &trans &trans &kp UP &trans &trans &trans &trans &trans &trans &trans &kp LEFT &kp DOWN &kp RIGHT - >; - }; + >; + }; - other_layer { - bindings = < + other_layer { + bindings = < &kp PRINTSCREEN &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &bootloader &sys_reset &trans &trans &trans &trans &trans &trans &kp C_VOL_UP &kp C_VOL_DN &kp C_PP - >; - }; + >; + }; - }; + }; }; diff --git a/app/boards/shields/tg4x/tg4x.overlay b/app/boards/shields/tg4x/tg4x.overlay index ca6e23c3..c0b1b3bc 100644 --- a/app/boards/shields/tg4x/tg4x.overlay +++ b/app/boards/shields/tg4x/tg4x.overlay @@ -7,49 +7,49 @@ #include / { - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; + diode-direction = "col2row"; - row-gpios - = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + row-gpios + = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; - col-gpios - = <&pro_micro 1 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> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - , <&pro_micro 21 GPIO_ACTIVE_HIGH> - ; - }; + col-gpios + = <&pro_micro 1 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> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> + ; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - rows = <8>; - columns = <7>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + rows = <8>; + columns = <7>; - map = < + map = < RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(6,0) RC(6,1) RC(6,2) RC(6,4) RC(3,0) RC(3,1) RC(3,2) RC(3,4) RC(3,5) RC(7,1) RC(7,2) RC(7,3) RC(7,4) - >; - }; + >; + }; - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; }; diff --git a/app/boards/shields/tidbit/Kconfig.defconfig b/app/boards/shields/tidbit/Kconfig.defconfig index e3655a9e..393fbef1 100644 --- a/app/boards/shields/tidbit/Kconfig.defconfig +++ b/app/boards/shields/tidbit/Kconfig.defconfig @@ -4,35 +4,35 @@ if SHIELD_TIDBIT config ZMK_KEYBOARD_NAME - default "tidbit" + default "tidbit" if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/tidbit/Kconfig.shield b/app/boards/shields/tidbit/Kconfig.shield index c1e8ecca..dc811bb2 100644 --- a/app/boards/shields/tidbit/Kconfig.shield +++ b/app/boards/shields/tidbit/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_TIDBIT - def_bool $(shields_list_contains,tidbit) + def_bool $(shields_list_contains,tidbit) diff --git a/app/boards/shields/tidbit/boards/nice_nano.overlay b/app/boards/shields/tidbit/boards/nice_nano.overlay index ad66feac..75514ac4 100644 --- a/app/boards/shields/tidbit/boards/nice_nano.overlay +++ b/app/boards/shields/tidbit/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/tidbit/boards/nice_nano_v2.overlay b/app/boards/shields/tidbit/boards/nice_nano_v2.overlay index ad66feac..75514ac4 100644 --- a/app/boards/shields/tidbit/boards/nice_nano_v2.overlay +++ b/app/boards/shields/tidbit/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/tidbit/tidbit.dtsi b/app/boards/shields/tidbit/tidbit.dtsi index ba97a57a..fb84c89e 100644 --- a/app/boards/shields/tidbit/tidbit.dtsi +++ b/app/boards/shields/tidbit/tidbit.dtsi @@ -7,111 +7,111 @@ #include / { - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "row2col"; + diode-direction = "row2col"; - row-gpios - = <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + row-gpios + = <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; - col-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)> - ; + col-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)> + ; - }; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <4>; - rows = <5>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <4>; + rows = <5>; - map = < - RC(0,1) RC(0,2) RC(0,3) - RC(1,0) RC(1,1) RC(1,2) RC(1,3) - RC(2,0) RC(2,1) RC(2,2) RC(2,3) - RC(3,0) RC(3,1) RC(3,2) RC(3,3) - RC(4,0) RC(4,1) RC(4,2) RC(4,3) - >; - }; + map = < + RC(0,1) RC(0,2) RC(0,3) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) + RC(4,0) RC(4,1) RC(4,2) RC(4,3) + >; + }; - encoder_1_top_row: encoder_1_top_row { - compatible = "alps,ec11"; - 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>; - status = "disabled"; - }; + encoder_1_top_row: encoder_1_top_row { + compatible = "alps,ec11"; + 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>; + status = "disabled"; + }; - encoder_1: encoder_1 { - compatible = "alps,ec11"; - 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>; - status = "disabled"; - }; + encoder_1: encoder_1 { + compatible = "alps,ec11"; + 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>; + status = "disabled"; + }; - encoder_2: encoder_2 { - compatible = "alps,ec11"; - 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>; - status = "disabled"; - }; + encoder_2: encoder_2 { + compatible = "alps,ec11"; + 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>; + status = "disabled"; + }; - encoder_3: encoder_3 { - compatible = "alps,ec11"; - 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>; - status = "disabled"; - }; + encoder_3: encoder_3 { + compatible = "alps,ec11"; + 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>; + status = "disabled"; + }; - encoder_4: encoder_4 { - compatible = "alps,ec11"; - 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>; - status = "disabled"; - }; + encoder_4: encoder_4 { + compatible = "alps,ec11"; + 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>; + status = "disabled"; + }; - chosen { - zephyr,display = &oled; - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zephyr,display = &oled; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; }; &pro_micro_i2c { - status = "okay"; + 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>; - }; + 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/tidbit/tidbit.keymap b/app/boards/shields/tidbit/tidbit.keymap index 11424dc8..2e415bf8 100644 --- a/app/boards/shields/tidbit/tidbit.keymap +++ b/app/boards/shields/tidbit/tidbit.keymap @@ -10,40 +10,40 @@ #include &encoder_1_top_row { - status = "okay"; + status = "okay"; }; / { - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&encoder_1_top_row>; - }; + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&encoder_1_top_row>; + }; - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - bindings = < - &kp KP_NUMLOCK &kp KP_ASTERISK &kp KP_MINUS - &kp KP_NUMBER_7 &kp KP_NUMBER_8 &kp KP_NUMBER_9 &kp KP_PLUS - &kp KP_NUMBER_4 &kp KP_NUMBER_5 &kp KP_NUMBER_6 &none - &kp KP_NUMBER_1 &kp KP_NUMBER_2 &kp KP_NUMBER_3 < 1 KP_ENTER - &none &kp KP_NUMBER_0 &kp KP_DOT &none - >; + default_layer { + bindings = < + &kp KP_NUMLOCK &kp KP_ASTERISK &kp KP_MINUS + &kp KP_NUMBER_7 &kp KP_NUMBER_8 &kp KP_NUMBER_9 &kp KP_PLUS + &kp KP_NUMBER_4 &kp KP_NUMBER_5 &kp KP_NUMBER_6 &none + &kp KP_NUMBER_1 &kp KP_NUMBER_2 &kp KP_NUMBER_3 < 1 KP_ENTER + &none &kp KP_NUMBER_0 &kp KP_DOT &none + >; - sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; - }; + sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; + }; - func_layer { - bindings = < - &none &sys_reset &bootloader - &out OUT_TOG &out OUT_USB &out OUT_BLE &none - &bt BT_SEL 0 &bt BT_PRV &bt BT_NXT &bt BT_CLR - &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &tog 0 - &kp C_MUTE &none &none &none - >; + func_layer { + bindings = < + &none &sys_reset &bootloader + &out OUT_TOG &out OUT_USB &out OUT_BLE &none + &bt BT_SEL 0 &bt BT_PRV &bt BT_NXT &bt BT_CLR + &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &tog 0 + &kp C_MUTE &none &none &none + >; - sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; - }; - }; + sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; + }; + }; }; diff --git a/app/boards/shields/tidbit/tidbit_19key.keymap b/app/boards/shields/tidbit/tidbit_19key.keymap index 5710aeaf..1be71e7a 100644 --- a/app/boards/shields/tidbit/tidbit_19key.keymap +++ b/app/boards/shields/tidbit/tidbit_19key.keymap @@ -11,40 +11,40 @@ #include &encoder_4 { - status = "okay"; + status = "okay"; }; / { - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&encoder_4>; - }; + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&encoder_4>; + }; - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - bindings = < - &tog 1 &kp KP_NUMLOCK &kp KP_SLASH - &kp KP_NUMBER_7 &kp KP_NUMBER_8 &kp KP_NUMBER_9 &kp KP_ASTERISK - &kp KP_NUMBER_4 &kp KP_NUMBER_5 &kp KP_NUMBER_6 &kp KP_MINUS - &kp KP_NUMBER_1 &kp KP_NUMBER_2 &kp KP_NUMBER_3 &kp KP_PLUS - &kp C_MUTE &kp KP_NUMBER_0 &kp KP_DOT &kp KP_ENTER - >; + default_layer { + bindings = < + &tog 1 &kp KP_NUMLOCK &kp KP_SLASH + &kp KP_NUMBER_7 &kp KP_NUMBER_8 &kp KP_NUMBER_9 &kp KP_ASTERISK + &kp KP_NUMBER_4 &kp KP_NUMBER_5 &kp KP_NUMBER_6 &kp KP_MINUS + &kp KP_NUMBER_1 &kp KP_NUMBER_2 &kp KP_NUMBER_3 &kp KP_PLUS + &kp C_MUTE &kp KP_NUMBER_0 &kp KP_DOT &kp KP_ENTER + >; - sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; - }; + sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; + }; - func_layer { - bindings = < - &tog 0 &sys_reset &bootloader - &out OUT_TOG &out OUT_USB &out OUT_BLE &none - &bt BT_SEL 0 &bt BT_PRV &bt BT_NXT &bt BT_CLR - &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &none - &kp C_MUTE &none &none &none - >; + func_layer { + bindings = < + &tog 0 &sys_reset &bootloader + &out OUT_TOG &out OUT_USB &out OUT_BLE &none + &bt BT_SEL 0 &bt BT_PRV &bt BT_NXT &bt BT_CLR + &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &none + &kp C_MUTE &none &none &none + >; - sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; - }; - }; + sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; + }; + }; }; diff --git a/app/boards/shields/two_percent_milk/Kconfig.shield b/app/boards/shields/two_percent_milk/Kconfig.shield index ec2c3b1f..b6fbcfdc 100644 --- a/app/boards/shields/two_percent_milk/Kconfig.shield +++ b/app/boards/shields/two_percent_milk/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_TWO_PERCENT_MILK - def_bool $(shields_list_contains,two_percent_milk) + def_bool $(shields_list_contains,two_percent_milk) diff --git a/app/boards/shields/two_percent_milk/boards/nice_nano.overlay b/app/boards/shields/two_percent_milk/boards/nice_nano.overlay index ad66feac..75514ac4 100644 --- a/app/boards/shields/two_percent_milk/boards/nice_nano.overlay +++ b/app/boards/shields/two_percent_milk/boards/nice_nano.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay b/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay index ad66feac..75514ac4 100644 --- a/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay +++ b/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/two_percent_milk/boards/nrfmicro_11.overlay b/app/boards/shields/two_percent_milk/boards/nrfmicro_11.overlay index 64d16572..d20e58e7 100644 --- a/app/boards/shields/two_percent_milk/boards/nrfmicro_11.overlay +++ b/app/boards/shields/two_percent_milk/boards/nrfmicro_11.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi1_default: spi1_default { - group1 { - psels = ; - }; - }; + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; - spi1_sleep: spi1_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi1 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/two_percent_milk/boards/nrfmicro_11_flipped.overlay b/app/boards/shields/two_percent_milk/boards/nrfmicro_11_flipped.overlay index b84beb93..31678980 100644 --- a/app/boards/shields/two_percent_milk/boards/nrfmicro_11_flipped.overlay +++ b/app/boards/shields/two_percent_milk/boards/nrfmicro_11_flipped.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi1_default: spi1_default { - group1 { - psels = ; - }; - }; + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; - spi1_sleep: spi1_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi1 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/two_percent_milk/boards/nrfmicro_13.overlay b/app/boards/shields/two_percent_milk/boards/nrfmicro_13.overlay index 64d16572..d20e58e7 100644 --- a/app/boards/shields/two_percent_milk/boards/nrfmicro_13.overlay +++ b/app/boards/shields/two_percent_milk/boards/nrfmicro_13.overlay @@ -1,47 +1,47 @@ #include &pinctrl { - spi1_default: spi1_default { - group1 { - psels = ; - }; - }; + spi1_default: spi1_default { + group1 { + psels = ; + }; + }; - spi1_sleep: spi1_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi1_sleep: spi1_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi1 { - compatible = "nordic,nrf-spim"; - status = "okay"; + compatible = "nordic,nrf-spim"; + status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; - pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; diff --git a/app/boards/shields/two_percent_milk/two_percent_milk.overlay b/app/boards/shields/two_percent_milk/two_percent_milk.overlay index d43ed321..8d4a244a 100644 --- a/app/boards/shields/two_percent_milk/two_percent_milk.overlay +++ b/app/boards/shields/two_percent_milk/two_percent_milk.overlay @@ -5,20 +5,20 @@ */ / { - chosen { - zmk,kscan = &kscan0; - }; + chosen { + zmk,kscan = &kscan0; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-direct"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; - label = "KSCAN"; + label = "KSCAN"; - input-gpios - = <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; + input-gpios + = <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; - }; + }; }; \ No newline at end of file diff --git a/app/boards/shields/waterfowl/Kconfig.defconfig b/app/boards/shields/waterfowl/Kconfig.defconfig index 5a77ca11..dbee82b8 100644 --- a/app/boards/shields/waterfowl/Kconfig.defconfig +++ b/app/boards/shields/waterfowl/Kconfig.defconfig @@ -2,44 +2,44 @@ if SHIELD_WATERFOWL_LEFT config ZMK_KEYBOARD_NAME - default "Waterfowl" + default "Waterfowl" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_WATERFOWL_LEFT || SHIELD_WATERFOWL_RIGHT config ZMK_SPLIT - default y + default y if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/waterfowl/Kconfig.shield b/app/boards/shields/waterfowl/Kconfig.shield index a321b73d..ec01a626 100644 --- a/app/boards/shields/waterfowl/Kconfig.shield +++ b/app/boards/shields/waterfowl/Kconfig.shield @@ -3,7 +3,7 @@ config SHIELD_WATERFOWL_LEFT - def_bool $(shields_list_contains,waterfowl_left) + def_bool $(shields_list_contains,waterfowl_left) config SHIELD_WATERFOWL_RIGHT - def_bool $(shields_list_contains,waterfowl_right) + def_bool $(shields_list_contains,waterfowl_right) diff --git a/app/boards/shields/waterfowl/waterfowl.dtsi b/app/boards/shields/waterfowl/waterfowl.dtsi index a156360e..7f4929b3 100644 --- a/app/boards/shields/waterfowl/waterfowl.dtsi +++ b/app/boards/shields/waterfowl/waterfowl.dtsi @@ -7,79 +7,79 @@ #include / { - chosen { - zephyr,display = &oled; - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zephyr,display = &oled; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <16>; - rows = <4>; -// | MX5 | MX4 | MX3 | MX2 | MX1 | | MX1 | MX2 | MX3 | MX4 | MX5 | -// | MX10 | MX9 | MX8 | MX7 | MX6 | | MX6 | MX7 | MX8 | MX9 | MX10 | -// | MX15 | MX14 | MX13 | MX12 | MX11 | | MX11 | MX12 | MX13 | MX14 | MX15 | -// | MX20 | MX19 | MX18 | MX17 | MX16 | | MX16 | MX17 | MX18 | MX19 | MX20 | - 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,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) - >; - }; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <16>; + rows = <4>; +// | MX5 | MX4 | MX3 | MX2 | MX1 | | MX1 | MX2 | MX3 | MX4 | MX5 | +// | MX10 | MX9 | MX8 | MX7 | MX6 | | MX6 | MX7 | MX8 | MX9 | MX10 | +// | MX15 | MX14 | MX13 | MX12 | MX11 | | MX11 | MX12 | MX13 | MX14 | MX15 | +// | MX20 | MX19 | MX18 | MX17 | MX16 | | MX16 | MX17 | MX18 | MX19 | MX20 | + 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,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) + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + diode-direction = "col2row"; + row-gpios + = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; - }; + }; - left_encoder: encoder_left { //roller - compatible = "alps,ec11"; - label = "LEFT_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>; - }; + left_encoder: encoder_left { //roller + compatible = "alps,ec11"; + label = "LEFT_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>; + }; - right_encoder: encoder_right { //Standard encoder on left half - 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>; - }; + right_encoder: encoder_right { //Standard encoder on left half + 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>; + }; - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder &right_encoder>; - }; + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + }; - // TODO: RGB node(s) + // TODO: RGB node(s) }; &pro_micro_i2c { - status = "okay"; + status = "okay"; - oled: ssd1306@3c { - compatible = "solomon,ssd1306fb"; - reg = <0x3c>; - label = "DISPLAY"; - width = <128>; - height = <64>; - segment-offset = <0>; - page-offset = <0>; - display-offset = <0>; - multiplex-ratio = <63>; - prechargep = <0x22>; - }; + oled: ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <64>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <63>; + prechargep = <0x22>; + }; }; diff --git a/app/boards/shields/waterfowl/waterfowl.keymap b/app/boards/shields/waterfowl/waterfowl.keymap index 9583499c..c47f188b 100644 --- a/app/boards/shields/waterfowl/waterfowl.keymap +++ b/app/boards/shields/waterfowl/waterfowl.keymap @@ -9,10 +9,10 @@ #include / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { + default_layer { /* QWERTY * * ,----------------------------------. ,----------------------------------. @@ -26,17 +26,17 @@ * | 1 | | DEL | SPACE | TAB | | ESC | BS | ENTER | | 4 | * `-----' `--------------------' `--------------------' `-----' */ - bindings = < - &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P - &mt LGUI A &mt LALT S &mt LCTRL D &mt LSHFT F &kp G &kp H &mt LSHFT J &mt LCTRL K &mt LALT L &mt LGUI SEMI - &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH - &kp N1 < 3 DEL < 1 SPACE &kp TAB &kp N2 &kp N3 &kp ESC &kp BSPC < 2 RET &kp N4 - >; + bindings = < + &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P + &mt LGUI A &mt LALT S &mt LCTRL D &mt LSHFT F &kp G &kp H &mt LSHFT J &mt LCTRL K &mt LALT L &mt LGUI SEMI + &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH + &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_UP PAGE_DOWN &inc_dec_kp TAB LS(TAB)>; + }; - navnum_layer { + navnum_layer { /* NAVNUM * * ,----------------------------------. ,----------------------------------. @@ -50,17 +50,17 @@ * | 1 | | DEL | SPACE | MO(3)| | ESC | BS | ENTER | | 4 | * `-----' `--------------------' `--------------------' `-----' */ - bindings = < - &trans &kp PG_UP &kp UP &kp PG_DN &trans &kp FSLH &kp N7 &kp N8 &kp N9 &kp MINUS - &kp HOME &kp LEFT &kp DOWN &kp RIGHT &kp END &kp EQUAL &kp N4 &kp N5 &kp N6 &kp PLUS - &trans &trans &kp INS &trans &trans &kp N0 &kp N1 &kp N2 &kp N3 &kp ASTERISK - &kp N1 < 3 DEL < 1 SPACE &kp TAB &kp N2 &kp N3 &kp ESC &kp BSPC < 2 RET &kp N4 - >; + bindings = < + &trans &kp PG_UP &kp UP &kp PG_DN &trans &kp FSLH &kp N7 &kp N8 &kp N9 &kp MINUS + &kp HOME &kp LEFT &kp DOWN &kp RIGHT &kp END &kp EQUAL &kp N4 &kp N5 &kp N6 &kp PLUS + &trans &trans &kp INS &trans &trans &kp N0 &kp N1 &kp N2 &kp N3 &kp ASTERISK + &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_UP PAGE_DOWN &inc_dec_kp TAB LS(TAB)>; + }; - symbol_layer { + symbol_layer { /* SYM * * ,----------------------------------. ,----------------------------------. @@ -74,17 +74,17 @@ * | 1 | | DEL | SPACE | TAB | | ESC | BS | ENTER | | 4 | * `-----' `--------------------' `--------------------' `-----' */ - bindings = < - &kp PRCNT &kp AT &kp LBKT &kp RBKT &kp NON_US_BSLH &trans &trans &kp CARET &trans &trans - &kp HASH &kp EXCL &kp LPAR &kp RPAR &kp PIPE &kp UNDER &kp APOS &kp DOUBLE_QUOTES &kp TILDE &kp GRAVE - &kp DLLR &trans &kp LBRC &kp RBRC &kp AMPS &trans &trans &trans &trans &trans - &kp N1 < 3 DEL < 1 SPACE &kp TAB &kp N2 &kp N3 &kp ESC &kp BSPC < 2 RET &kp N4 - >; + bindings = < + &kp PRCNT &kp AT &kp LBKT &kp RBKT &kp NON_US_BSLH &trans &trans &kp CARET &trans &trans + &kp HASH &kp EXCL &kp LPAR &kp RPAR &kp PIPE &kp UNDER &kp APOS &kp DOUBLE_QUOTES &kp TILDE &kp GRAVE + &kp DLLR &trans &kp LBRC &kp RBRC &kp AMPS &trans &trans &trans &trans &trans + &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_UP PAGE_DOWN &inc_dec_kp TAB LS(TAB)>; + }; - function_layer { + function_layer { /* FUNC * * ,----------------------------------. ,----------------------------------. @@ -98,15 +98,15 @@ * | 1 | | DEL | SPACE | TAB | | ESC | BS | ENTER | | 4 | * `-----' `--------------------' `--------------------' `-----' */ - bindings = < - &trans &trans &bt BT_CLR &trans &sys_reset &sys_reset &kp F7 &kp F8 &kp F9 &kp F11 - &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &kp F4 &kp F5 &kp F6 &kp F12 - &trans &trans &trans &trans &trans &kp F10 &kp F1 &kp F2 &kp F3 &kp F13 - &kp N1 < 3 DEL < 1 SPACE &kp TAB &kp N2 &kp N3 &kp ESC &kp BSPC < 2 RET &kp N4 - >; + bindings = < + &trans &trans &bt BT_CLR &trans &sys_reset &sys_reset &kp F7 &kp F8 &kp F9 &kp F11 + &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &kp F4 &kp F5 &kp F6 &kp F12 + &trans &trans &trans &trans &trans &kp F10 &kp F1 &kp F2 &kp F3 &kp F13 + &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_UP PAGE_DOWN &inc_dec_kp TAB LS(TAB)>; + }; - }; + }; }; \ 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 031936ea..3b9fd42d 100644 --- a/app/boards/shields/waterfowl/waterfowl_left.overlay +++ b/app/boards/shields/waterfowl/waterfowl_left.overlay @@ -7,15 +7,15 @@ #include "waterfowl.dtsi" &kscan0 { - 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> - ; + 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> + ; }; &left_encoder { - status = "okay"; + status = "okay"; }; diff --git a/app/boards/shields/waterfowl/waterfowl_right.overlay b/app/boards/shields/waterfowl/waterfowl_right.overlay index cff0d53c..bf8f3a44 100644 --- a/app/boards/shields/waterfowl/waterfowl_right.overlay +++ b/app/boards/shields/waterfowl/waterfowl_right.overlay @@ -7,20 +7,20 @@ #include "waterfowl.dtsi" &default_transform { - col-offset = <5>; + col-offset = <5>; }; &kscan0 { - col-gpios - = <&pro_micro 15 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - , <&pro_micro 21 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> + ; }; &right_encoder { - status = "okay"; + status = "okay"; }; diff --git a/app/boards/shields/zmk_uno/Kconfig.shield b/app/boards/shields/zmk_uno/Kconfig.shield index 3f7331c3..958915f5 100644 --- a/app/boards/shields/zmk_uno/Kconfig.shield +++ b/app/boards/shields/zmk_uno/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_ZMK_UNO - def_bool $(shields_list_contains,zmk_uno) + def_bool $(shields_list_contains,zmk_uno) diff --git a/app/boards/shields/zmk_uno/zmk_uno.overlay b/app/boards/shields/zmk_uno/zmk_uno.overlay index 12b5e2b3..04332911 100644 --- a/app/boards/shields/zmk_uno/zmk_uno.overlay +++ b/app/boards/shields/zmk_uno/zmk_uno.overlay @@ -8,172 +8,172 @@ #include &arduino_i2c { - status = "okay"; + status = "okay"; }; &arduino_spi { - status = "okay"; + status = "okay"; - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain-length = <7>; /* 4 underglow + 3 per-key LEDs */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; + /* WS2812 */ + chain-length = <7>; /* 4 underglow + 3 per-key LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; - color-mapping = ; - }; + color-mapping = ; + }; }; / { - chosen { - zmk,kscan = &kscan_matrix_comp; - zmk,backlight = &backlight; - zmk,underglow = &led_strip; - zmk,matrix-transform = &matrix_transform; - }; + chosen { + zmk,kscan = &kscan_matrix_comp; + zmk,backlight = &backlight; + zmk,underglow = &led_strip; + zmk,matrix-transform = &matrix_transform; + }; - // 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>; - // }; + // 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>; + // }; - rgb_power { - compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; - // label = "RGB_POWER"; - init-delay-ms = <200>; - control-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>; - }; + rgb_power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + // label = "RGB_POWER"; + init-delay-ms = <200>; + control-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>; + }; - backlight: gpioleds { - compatible = "gpio-leds"; - label = "Backlight LEDs"; - gpio_led_0 { - gpios = <&arduino_header 12 GPIO_ACTIVE_HIGH>; - label = "Backlight LED 0"; - }; - }; + backlight: gpioleds { + compatible = "gpio-leds"; + label = "Backlight LEDs"; + gpio_led_0 { + gpios = <&arduino_header 12 GPIO_ACTIVE_HIGH>; + label = "Backlight LED 0"; + }; + }; - matrix_transform: matrix_transform { - compatible = "zmk,matrix-transform"; - rows = <3>; - columns = <4>; + matrix_transform: matrix_transform { + compatible = "zmk,matrix-transform"; + rows = <3>; + columns = <4>; - map = < - RC(0,0) RC(0,1) - RC(1,0) RC(1,1) - RC(2,0) RC(2,1) RC(2,2) - >; - }; + map = < + RC(0,0) RC(0,1) + RC(1,0) RC(1,1) + RC(2,0) RC(2,1) RC(2,2) + >; + }; - direct_matrix_transform: direct_matrix_transform { - compatible = "zmk,matrix-transform"; - rows = <3>; - columns = <4>; + direct_matrix_transform: direct_matrix_transform { + compatible = "zmk,matrix-transform"; + rows = <3>; + columns = <4>; - map = < - RC(0,0) RC(0,1) - RC(0,2) RC(0,3) - RC(1,0) RC(1,1) RC(1,2) - >; - }; + map = < + RC(0,0) RC(0,1) + RC(0,2) RC(0,3) + RC(1,0) RC(1,1) RC(1,2) + >; + }; - kscan_matrix_comp: kscan_matrix_comp { - compatible = "zmk,kscan-composite"; - rows = <1>; - columns = <7>; + kscan_matrix_comp: kscan_matrix_comp { + compatible = "zmk,kscan-composite"; + rows = <1>; + columns = <7>; - label = "KSCAN_MATRIX_COMP"; + label = "KSCAN_MATRIX_COMP"; - matrix { - kscan = <&kscan_matrix>; - }; + matrix { + kscan = <&kscan_matrix>; + }; - toggle { - kscan = <&kscan_sp3t_toggle>; - row-offset = <2>; - }; + toggle { + kscan = <&kscan_sp3t_toggle>; + row-offset = <2>; + }; - }; + }; - kscan_direct_comp: kscan_direct_comp { - compatible = "zmk,kscan-composite"; + kscan_direct_comp: kscan_direct_comp { + compatible = "zmk,kscan-composite"; - label = "KSCAN_DIRECT_COMP"; - status = "disabled"; + label = "KSCAN_DIRECT_COMP"; + status = "disabled"; - matrix { - kscan = <&kscan_direct>; - }; + matrix { + kscan = <&kscan_direct>; + }; - toggle { - kscan = <&kscan_sp3t_toggle>; - row-offset = <1>; - }; + toggle { + kscan = <&kscan_sp3t_toggle>; + row-offset = <1>; + }; - }; + }; - kscan_matrix: kscan_matrix { - compatible = "zmk,kscan-gpio-matrix"; + kscan_matrix: kscan_matrix { + compatible = "zmk,kscan-gpio-matrix"; - diode-direction = "col2row"; + diode-direction = "col2row"; - col-gpios - = <&arduino_header 10 GPIO_ACTIVE_HIGH> - , <&arduino_header 9 GPIO_ACTIVE_HIGH> - ; + col-gpios + = <&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)> - ; + row-gpios + = <&arduino_header 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&arduino_header 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; - }; + }; - kscan_direct: kscan_direct { - compatible = "zmk,kscan-gpio-direct"; - status = "disabled"; + kscan_direct: kscan_direct { + compatible = "zmk,kscan-gpio-direct"; + 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)> - ; + 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)> + ; - }; + }; - kscan_sp3t_toggle: kscan_sp3t_toggle { - compatible = "zmk,kscan-gpio-direct"; - toggle-mode; + kscan_sp3t_toggle: kscan_sp3t_toggle { + compatible = "zmk,kscan-gpio-direct"; + 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)> - ; - }; + 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)> + ; + }; - encoder: encoder { - label = "ENCODER"; - resolution = <4>; - compatible = "alps,ec11"; - a-gpios = <&arduino_header 14 GPIO_PULL_UP>; - b-gpios = <&arduino_header 15 GPIO_PULL_UP>; - }; + encoder: encoder { + label = "ENCODER"; + resolution = <4>; + compatible = "alps,ec11"; + a-gpios = <&arduino_header 14 GPIO_PULL_UP>; + b-gpios = <&arduino_header 15 GPIO_PULL_UP>; + }; - sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&encoder>; - }; + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&encoder>; + }; }; diff --git a/app/boards/shields/zodiark/Kconfig.defconfig b/app/boards/shields/zodiark/Kconfig.defconfig index c6024694..e7538c41 100644 --- a/app/boards/shields/zodiark/Kconfig.defconfig +++ b/app/boards/shields/zodiark/Kconfig.defconfig @@ -4,44 +4,44 @@ if SHIELD_ZODIARK_LEFT config ZMK_KEYBOARD_NAME - default "Zodiark" + default "Zodiark" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_ZODIARK_LEFT || SHIELD_ZODIARK_RIGHT config ZMK_SPLIT - default y + default y if ZMK_DISPLAY config I2C - default y + default y config SSD1306 - default y + default y config SSD1306_REVERSE_MODE - default y + default y endif # ZMK_DISPLAY if LVGL config LV_Z_VDB_SIZE - default 64 + default 64 config LV_Z_DPI - default 148 + default 148 config LV_Z_BITS_PER_PIXEL - default 1 + default 1 choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 + default LV_COLOR_DEPTH_1 endchoice endif # LVGL diff --git a/app/boards/shields/zodiark/Kconfig.shield b/app/boards/shields/zodiark/Kconfig.shield index 25e23a14..0eb4e8ad 100644 --- a/app/boards/shields/zodiark/Kconfig.shield +++ b/app/boards/shields/zodiark/Kconfig.shield @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT config SHIELD_ZODIARK_LEFT - def_bool $(shields_list_contains,zodiark_left) + def_bool $(shields_list_contains,zodiark_left) config SHIELD_ZODIARK_RIGHT - def_bool $(shields_list_contains,zodiark_right) + def_bool $(shields_list_contains,zodiark_right) diff --git a/app/boards/shields/zodiark/zodiark_left.overlay b/app/boards/shields/zodiark/zodiark_left.overlay index fe55edc6..1f866f78 100644 --- a/app/boards/shields/zodiark/zodiark_left.overlay +++ b/app/boards/shields/zodiark/zodiark_left.overlay @@ -7,17 +7,17 @@ #include "zodiark.dtsi" &kscan0 { - col-gpios - = <&pro_micro 2 GPIO_ACTIVE_HIGH> - , <&pro_micro 1 GPIO_ACTIVE_HIGH> - , <&pro_micro 0 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> - ; + col-gpios + = <&pro_micro 2 GPIO_ACTIVE_HIGH> + , <&pro_micro 1 GPIO_ACTIVE_HIGH> + , <&pro_micro 0 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"; + status = "okay"; }; diff --git a/app/boards/shields/zodiark/zodiark_right.overlay b/app/boards/shields/zodiark/zodiark_right.overlay index 3405f59b..998f1e00 100644 --- a/app/boards/shields/zodiark/zodiark_right.overlay +++ b/app/boards/shields/zodiark/zodiark_right.overlay @@ -7,21 +7,21 @@ #include "zodiark.dtsi" &default_transform { - col-offset = <7>; + col-offset = <7>; }; &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 0 GPIO_ACTIVE_HIGH> - , <&pro_micro 1 GPIO_ACTIVE_HIGH> - , <&pro_micro 2 GPIO_ACTIVE_HIGH> - ; + 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 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 1 GPIO_ACTIVE_HIGH> + , <&pro_micro 2 GPIO_ACTIVE_HIGH> + ; }; &right_encoder { - status = "okay"; + status = "okay"; }; diff --git a/app/boards/usb_console.dtsi b/app/boards/usb_console.dtsi index 4ce59408..3cc76ad3 100644 --- a/app/boards/usb_console.dtsi +++ b/app/boards/usb_console.dtsi @@ -6,15 +6,15 @@ / { - chosen { - zephyr,console = &cdc_acm_uart; - }; + chosen { + zephyr,console = &cdc_acm_uart; + }; }; &usbd { - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; }; diff --git a/app/cmake/ZephyrBuildConfig.cmake b/app/cmake/ZephyrBuildConfig.cmake index 931dd7ac..ade34199 100644 --- a/app/cmake/ZephyrBuildConfig.cmake +++ b/app/cmake/ZephyrBuildConfig.cmake @@ -14,13 +14,13 @@ get_property(cached_user_config_value CACHE ZMK_CONFIG PROPERTY VALUE) set(user_config_cli_argument ${cached_user_config_value}) # Either new or old if(user_config_cli_argument STREQUAL CACHED_ZMK_CONFIG) - # We already have a CACHED_ZMK_CONFIG so there is no new input on the CLI + # We already have a CACHED_ZMK_CONFIG so there is no new input on the CLI unset(user_config_cli_argument) endif() set(user_config_app_cmake_lists ${ZMK_CONFIG}) if(cached_user_config_value STREQUAL ZMK_CONFIG) - # The app build scripts did not set a default, The ZMK_CONFIG we are + # The app build scripts did not set a default, The ZMK_CONFIG we are # reading is the cached value from the CLI unset(user_config_app_cmake_lists) endif() @@ -29,172 +29,172 @@ if(CACHED_ZMK_CONFIG) # Warn the user if it looks like he is trying to change the user_config # without cleaning first if(user_config_cli_argument) - if(NOT (CACHED_ZMK_CONFIG STREQUAL user_config_cli_argument)) + if(NOT (CACHED_ZMK_CONFIG STREQUAL user_config_cli_argument)) message(WARNING "The build directory must be cleaned pristinely when changing user ZMK config") endif() endif() set(ZMK_CONFIG ${CACHED_ZMK_CONFIG}) elseif(user_config_cli_argument) - set(ZMK_CONFIG ${user_config_cli_argument}) + set(ZMK_CONFIG ${user_config_cli_argument}) elseif(DEFINED ENV{ZMK_CONFIG}) - set(ZMK_CONFIG $ENV{ZMK_CONFIG}) + set(ZMK_CONFIG $ENV{ZMK_CONFIG}) elseif(user_config_app_cmake_lists) - set(ZMK_CONFIG ${user_config_app_cmake_lists}) + set(ZMK_CONFIG ${user_config_app_cmake_lists}) endif() # Store the selected user_config in the cache set(CACHED_ZMK_CONFIG ${ZMK_CONFIG} CACHE STRING "Selected user ZMK config") if (ZMK_CONFIG) - set(ENV{ZMK_CONFIG} "${ZMK_CONFIG}") - if(EXISTS ${ZMK_CONFIG}/boards) - message(STATUS "Adding ZMK config directory as board root: ${ZMK_CONFIG}") - list(APPEND BOARD_ROOT ${ZMK_CONFIG}) - endif() - if(EXISTS ${ZMK_CONFIG}/dts) - message(STATUS "Adding ZMK config directory as DTS root: ${ZMK_CONFIG}") - list(APPEND DTS_ROOT ${ZMK_CONFIG}) - endif() + set(ENV{ZMK_CONFIG} "${ZMK_CONFIG}") + if(EXISTS ${ZMK_CONFIG}/boards) + message(STATUS "Adding ZMK config directory as board root: ${ZMK_CONFIG}") + list(APPEND BOARD_ROOT ${ZMK_CONFIG}) + endif() + if(EXISTS ${ZMK_CONFIG}/dts) + message(STATUS "Adding ZMK config directory as DTS root: ${ZMK_CONFIG}") + list(APPEND DTS_ROOT ${ZMK_CONFIG}) + endif() endif() if(DEFINED SHIELD) - string(REPLACE " " ";" SHIELD_AS_LIST "${SHIELD}") + string(REPLACE " " ";" SHIELD_AS_LIST "${SHIELD}") endif() foreach(root ${BOARD_ROOT}) - set(shield_dir ${root}/boards/shields) - # Match the Kconfig.shield files in the shield directories to make sure we are - # finding shields, e.g. x_nucleo_iks01a1/Kconfig.shield - file(GLOB_RECURSE shields_refs_list ${shield_dir}/*/Kconfig.shield) - unset(SHIELD_LIST) - foreach(shields_refs ${shields_refs_list}) - get_filename_component(shield_path ${shields_refs} DIRECTORY) - file(GLOB shield_overlays RELATIVE ${shield_path} ${shield_path}/*.overlay) - foreach(overlay ${shield_overlays}) - get_filename_component(shield ${overlay} NAME_WE) - list(APPEND SHIELD_LIST ${shield}) - set(SHIELD_DIR_${shield} ${shield_path}) - endforeach() - endforeach() + set(shield_dir ${root}/boards/shields) + # Match the Kconfig.shield files in the shield directories to make sure we are + # finding shields, e.g. x_nucleo_iks01a1/Kconfig.shield + file(GLOB_RECURSE shields_refs_list ${shield_dir}/*/Kconfig.shield) + unset(SHIELD_LIST) + foreach(shields_refs ${shields_refs_list}) + get_filename_component(shield_path ${shields_refs} DIRECTORY) + file(GLOB shield_overlays RELATIVE ${shield_path} ${shield_path}/*.overlay) + foreach(overlay ${shield_overlays}) + get_filename_component(shield ${overlay} NAME_WE) + list(APPEND SHIELD_LIST ${shield}) + set(SHIELD_DIR_${shield} ${shield_path}) + endforeach() + endforeach() - if (EXISTS "${root}/boards/${BOARD}.overlay") - list(APPEND shield_dts_files "${root}/boards/${BOARD}.overlay") - endif() - if (NOT DEFINED BOARD_DIR_NAME) - find_path(BOARD_DIR - NAMES ${BOARD}_defconfig - PATHS ${root}/boards/*/* - NO_DEFAULT_PATH - ) - if(BOARD_DIR) - get_filename_component(BOARD_DIR_NAME ${BOARD_DIR} NAME) - list(APPEND KEYMAP_DIRS ${BOARD_DIR}) - endif() - endif() + if (EXISTS "${root}/boards/${BOARD}.overlay") + list(APPEND shield_dts_files "${root}/boards/${BOARD}.overlay") + endif() + if (NOT DEFINED BOARD_DIR_NAME) + find_path(BOARD_DIR + NAMES ${BOARD}_defconfig + PATHS ${root}/boards/*/* + NO_DEFAULT_PATH + ) + if(BOARD_DIR) + get_filename_component(BOARD_DIR_NAME ${BOARD_DIR} NAME) + list(APPEND KEYMAP_DIRS ${BOARD_DIR}) + endif() + endif() - if(DEFINED SHIELD) - foreach(s ${SHIELD_AS_LIST}) - if(NOT ${s} IN_LIST SHIELD_LIST) - message(WARNING "Didn't find ${s}") - continue() - endif() - message(STATUS "Adding ${SHIELD_DIR_${s}}") - list(APPEND KEYMAP_DIRS ${SHIELD_DIR_${s}}) - get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) - list(APPEND SHIELD_DIR ${shield_dir_name}) - endforeach() - endif() + if(DEFINED SHIELD) + foreach(s ${SHIELD_AS_LIST}) + if(NOT ${s} IN_LIST SHIELD_LIST) + message(WARNING "Didn't find ${s}") + continue() + endif() + message(STATUS "Adding ${SHIELD_DIR_${s}}") + list(APPEND KEYMAP_DIRS ${SHIELD_DIR_${s}}) + get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) + list(APPEND SHIELD_DIR ${shield_dir_name}) + endforeach() + endif() endforeach() # Give a shield like `kyria_rev2_left` we want to use `kyria_rev2` and `kyria` as candidate names for # overlay/conf/keymap files. if(DEFINED SHIELD) - foreach(s ${SHIELD_AS_LIST}) - if (DEFINED $SHIELD_DIR_${s}) - get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) - endif() - string(REPLACE "_" ";" S_PIECES ${s}) - list(LENGTH S_PIECES S_PIECES_LEN) - while(NOT S_PIECES STREQUAL "") - list(POP_BACK S_PIECES) - list(JOIN S_PIECES "_" s_substr) - if ("${s_substr}" STREQUAL "" OR "${s_substr}" STREQUAL "${shield_dir_name}") - break() - endif() - list(APPEND shield_candidate_names ${s_substr}) - endwhile() - endforeach() + foreach(s ${SHIELD_AS_LIST}) + if (DEFINED $SHIELD_DIR_${s}) + get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) + endif() + string(REPLACE "_" ";" S_PIECES ${s}) + list(LENGTH S_PIECES S_PIECES_LEN) + while(NOT S_PIECES STREQUAL "") + list(POP_BACK S_PIECES) + list(JOIN S_PIECES "_" s_substr) + if ("${s_substr}" STREQUAL "" OR "${s_substr}" STREQUAL "${shield_dir_name}") + break() + endif() + list(APPEND shield_candidate_names ${s_substr}) + endwhile() + endforeach() endif() if (ZMK_CONFIG) - if (EXISTS ${ZMK_CONFIG}) - message(STATUS "ZMK Config directory: ${ZMK_CONFIG}") - list(PREPEND KEYMAP_DIRS "${ZMK_CONFIG}") + if (EXISTS ${ZMK_CONFIG}) + message(STATUS "ZMK Config directory: ${ZMK_CONFIG}") + list(PREPEND KEYMAP_DIRS "${ZMK_CONFIG}") - if (DEFINED SHIELD) - foreach (s ${shield_candidate_names} ${SHIELD_AS_LIST}) - if (DEFINED ${SHIELD_DIR_${s}}) - get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) - endif() - list(APPEND overlay_candidates "${ZMK_CONFIG}/${s}_${BOARD}.overlay") - list(APPEND overlay_candidates "${ZMK_CONFIG}/${s}.overlay") - if (NOT "${shield_dir_name}" STREQUAL "${s}") - list(APPEND config_candidates "${ZMK_CONFIG}/${shield_dir_name}_${BOARD}.conf") - list(APPEND config_candidates "${ZMK_CONFIG}/${shield_dir_name}.conf") - endif() - list(APPEND config_candidates "${ZMK_CONFIG}/${s}_${BOARD}.conf") - list(APPEND config_candidates "${ZMK_CONFIG}/${s}.conf") - endforeach() - endif() + if (DEFINED SHIELD) + foreach (s ${shield_candidate_names} ${SHIELD_AS_LIST}) + if (DEFINED ${SHIELD_DIR_${s}}) + get_filename_component(shield_dir_name ${SHIELD_DIR_${s}} NAME) + endif() + list(APPEND overlay_candidates "${ZMK_CONFIG}/${s}_${BOARD}.overlay") + list(APPEND overlay_candidates "${ZMK_CONFIG}/${s}.overlay") + if (NOT "${shield_dir_name}" STREQUAL "${s}") + list(APPEND config_candidates "${ZMK_CONFIG}/${shield_dir_name}_${BOARD}.conf") + list(APPEND config_candidates "${ZMK_CONFIG}/${shield_dir_name}.conf") + endif() + list(APPEND config_candidates "${ZMK_CONFIG}/${s}_${BOARD}.conf") + list(APPEND config_candidates "${ZMK_CONFIG}/${s}.conf") + endforeach() + endif() - # TODO: Board revisions? - list(APPEND overlay_candidates "${ZMK_CONFIG}/${BOARD_DIR_NAME}.overlay") - list(APPEND overlay_candidates "${ZMK_CONFIG}/${BOARD}.overlay") - list(APPEND overlay_candidates "${ZMK_CONFIG}/default.overlay") - list(APPEND config_candidates "${ZMK_CONFIG}/${BOARD_DIR_NAME}.conf") - list(APPEND config_candidates "${ZMK_CONFIG}/${BOARD}.conf") - list(APPEND config_candidates "${ZMK_CONFIG}/default.conf") + # TODO: Board revisions? + list(APPEND overlay_candidates "${ZMK_CONFIG}/${BOARD_DIR_NAME}.overlay") + list(APPEND overlay_candidates "${ZMK_CONFIG}/${BOARD}.overlay") + list(APPEND overlay_candidates "${ZMK_CONFIG}/default.overlay") + list(APPEND config_candidates "${ZMK_CONFIG}/${BOARD_DIR_NAME}.conf") + list(APPEND config_candidates "${ZMK_CONFIG}/${BOARD}.conf") + list(APPEND config_candidates "${ZMK_CONFIG}/default.conf") - foreach(overlay ${overlay_candidates}) - if (EXISTS "${overlay}") - message(STATUS "ZMK Config devicetree overlay: ${overlay}") - list(APPEND shield_dts_files "${overlay}") - break() - endif() - endforeach() + foreach(overlay ${overlay_candidates}) + if (EXISTS "${overlay}") + message(STATUS "ZMK Config devicetree overlay: ${overlay}") + list(APPEND shield_dts_files "${overlay}") + break() + endif() + endforeach() - foreach(conf ${config_candidates}) - if (EXISTS "${conf}") - message(STATUS "ZMK Config Kconfig: ${conf}") - list(APPEND shield_conf_files "${conf}") - endif() - endforeach() - else() - message(WARNING "Unable to locate ZMK config at: ${ZMK_CONFIG}") - endif() + foreach(conf ${config_candidates}) + if (EXISTS "${conf}") + message(STATUS "ZMK Config Kconfig: ${conf}") + list(APPEND shield_conf_files "${conf}") + endif() + endforeach() + else() + message(WARNING "Unable to locate ZMK config at: ${ZMK_CONFIG}") + endif() endif() if(NOT KEYMAP_FILE) - foreach(keymap_dir ${KEYMAP_DIRS}) - foreach(keymap_prefix ${shield_candidate_names} ${SHIELD_AS_LIST} ${SHIELD_DIR} ${BOARD} ${BOARD_DIR_NAME}) - if (EXISTS ${keymap_dir}/${keymap_prefix}.keymap) - set(KEYMAP_FILE "${keymap_dir}/${keymap_prefix}.keymap" CACHE STRING "Selected keymap file") - message(STATUS "Using keymap file: ${KEYMAP_FILE}") - set(DTC_OVERLAY_FILE ${KEYMAP_FILE}) - break() - endif() - endforeach() - endforeach() + foreach(keymap_dir ${KEYMAP_DIRS}) + foreach(keymap_prefix ${shield_candidate_names} ${SHIELD_AS_LIST} ${SHIELD_DIR} ${BOARD} ${BOARD_DIR_NAME}) + if (EXISTS ${keymap_dir}/${keymap_prefix}.keymap) + set(KEYMAP_FILE "${keymap_dir}/${keymap_prefix}.keymap" CACHE STRING "Selected keymap file") + message(STATUS "Using keymap file: ${KEYMAP_FILE}") + set(DTC_OVERLAY_FILE ${KEYMAP_FILE}) + break() + endif() + endforeach() + endforeach() else() - message(STATUS "Using keymap file: ${KEYMAP_FILE}") - set(DTC_OVERLAY_FILE ${KEYMAP_FILE}) + message(STATUS "Using keymap file: ${KEYMAP_FILE}") + set(DTC_OVERLAY_FILE ${KEYMAP_FILE}) endif() if (NOT KEYMAP_FILE) - message(WARNING "Failed to locate keymap file!") + message(WARNING "Failed to locate keymap file!") endif() diff --git a/app/drivers/display/CMakeLists.txt b/app/drivers/display/CMakeLists.txt index 13b97193..d5e83c1d 100644 --- a/app/drivers/display/CMakeLists.txt +++ b/app/drivers/display/CMakeLists.txt @@ -1,4 +1,4 @@ # Copyright (c) 2021 The ZMK Contributors # SPDX-License-Identifier: MIT -zephyr_sources_ifdef(CONFIG_IL0323 il0323.c) \ No newline at end of file +zephyr_sources_ifdef(CONFIG_IL0323 il0323.c) \ No newline at end of file diff --git a/app/drivers/display/Kconfig.il0323 b/app/drivers/display/Kconfig.il0323 index f39015ef..f3308c16 100644 --- a/app/drivers/display/Kconfig.il0323 +++ b/app/drivers/display/Kconfig.il0323 @@ -4,8 +4,8 @@ # IL0323 display controller configuration options config IL0323 - bool "IL0323 compatible display controller driver" - depends on SPI - depends on HEAP_MEM_POOL_SIZE != 0 - help - Enable driver for IL0323 compatible controller. \ No newline at end of file + bool "IL0323 compatible display controller driver" + depends on SPI + depends on HEAP_MEM_POOL_SIZE != 0 + help + Enable driver for IL0323 compatible controller. \ No newline at end of file diff --git a/app/drivers/gpio/Kconfig.595 b/app/drivers/gpio/Kconfig.595 index f43e807b..b4b6bdcc 100644 --- a/app/drivers/gpio/Kconfig.595 +++ b/app/drivers/gpio/Kconfig.595 @@ -6,20 +6,20 @@ DT_COMPAT_ZMK_GPIO_595 := zmk,gpio-595 menuconfig GPIO_595 - bool "595 Shift Register SPI driver" - 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. + bool "595 Shift Register SPI driver" + 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. if GPIO_595 config GPIO_595_INIT_PRIORITY - int "Init priority" - default 75 - help - Device driver initialization priority. + int "Init priority" + default 75 + help + Device driver initialization priority. endif #GPIO_595 diff --git a/app/drivers/gpio/Kconfig.max7318 b/app/drivers/gpio/Kconfig.max7318 index ded7f926..d572b970 100644 --- a/app/drivers/gpio/Kconfig.max7318 +++ b/app/drivers/gpio/Kconfig.max7318 @@ -6,20 +6,20 @@ DT_COMPAT_MAXIM_MAX7318 := maxim,max7318 menuconfig GPIO_MAX7318 - bool "MAX7318 I2C-based GPIO chip" - 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. + bool "MAX7318 I2C-based GPIO chip" + 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. if GPIO_MAX7318 config GPIO_MAX7318_INIT_PRIORITY - int "Init priority" - default 75 - help - Device driver initialization priority. + int "Init priority" + default 75 + help + Device driver initialization priority. endif #GPIO_MAX7318 diff --git a/app/drivers/kscan/Kconfig b/app/drivers/kscan/Kconfig index 216651a1..1d165669 100644 --- a/app/drivers/kscan/Kconfig +++ b/app/drivers/kscan/Kconfig @@ -8,87 +8,87 @@ DT_COMPAT_ZMK_KSCAN_GPIO_MATRIX := zmk,kscan-gpio-matrix DT_COMPAT_ZMK_KSCAN_MOCK := zmk,kscan-mock config ZMK_KSCAN_COMPOSITE_DRIVER - bool - default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_COMPOSITE)) + bool + default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_COMPOSITE)) config ZMK_KSCAN_GPIO_DRIVER - bool - select GPIO + bool + select GPIO config ZMK_KSCAN_GPIO_DEMUX - bool - default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_GPIO_DEMUX)) - select ZMK_KSCAN_GPIO_DRIVER + bool + default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_GPIO_DEMUX)) + select ZMK_KSCAN_GPIO_DRIVER config ZMK_KSCAN_GPIO_DIRECT - bool - default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_GPIO_DIRECT)) - select ZMK_KSCAN_GPIO_DRIVER + bool + default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_GPIO_DIRECT)) + select ZMK_KSCAN_GPIO_DRIVER config ZMK_KSCAN_GPIO_MATRIX - bool - default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_GPIO_MATRIX)) - select ZMK_KSCAN_GPIO_DRIVER + bool + default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_GPIO_MATRIX)) + select ZMK_KSCAN_GPIO_DRIVER if ZMK_KSCAN_GPIO_MATRIX config ZMK_KSCAN_MATRIX_WAIT_BEFORE_INPUTS - int "Ticks to wait before reading inputs after an output set active" - default 0 - help - When iterating over each output to drive it active, read inputs, then set - inactive again, some boards may take time for output to propagate to the - inputs. In that scenario, set this value to a positive value to configure - the number of ticks to wait after setting an output active before reading - the inputs for their active state. + int "Ticks to wait before reading inputs after an output set active" + default 0 + help + When iterating over each output to drive it active, read inputs, then set + inactive again, some boards may take time for output to propagate to the + inputs. In that scenario, set this value to a positive value to configure + the number of ticks to wait after setting an output active before reading + the inputs for their active state. config ZMK_KSCAN_MATRIX_WAIT_BETWEEN_OUTPUTS int "Ticks to wait between each output when scanning" - default 1 if SOC_RP2040 - default 0 - help - When iterating over each output to drive it active, read inputs, then set - inactive again, some boards may take time for the previous output to - "settle" before reading inputs for the next active output column. In that - scenario, set this value to a positive value to configure the number of - ticks to wait after reading each column of keys. + default 1 if SOC_RP2040 + default 0 + help + When iterating over each output to drive it active, read inputs, then set + inactive again, some boards may take time for the previous output to + "settle" before reading inputs for the next active output column. In that + scenario, set this value to a positive value to configure the number of + ticks to wait after reading each column of keys. endif # ZMK_KSCAN_GPIO_MATRIX config ZMK_KSCAN_MOCK_DRIVER - bool - default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_MOCK)) + bool + default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_MOCK)) if ZMK_KSCAN_GPIO_DRIVER config ZMK_KSCAN_MATRIX_POLLING - bool "Poll for key event triggers instead of using interrupts on matrix boards." + bool "Poll for key event triggers instead of using interrupts on matrix boards." config ZMK_KSCAN_DIRECT_POLLING - bool "Poll for key event triggers instead of using interrupts on direct wired boards." + bool "Poll for key event triggers instead of using interrupts on direct wired boards." config ZMK_KSCAN_DEBOUNCE_PRESS_MS - int "Debounce time for key press in milliseconds." - default -1 - help - Global debounce time for key press in milliseconds. - If this is -1, the debounce time is controlled by the debounce-press-ms - Devicetree property, which defaults to 5 ms. Otherwise this overrides the - debounce time for all key scan drivers to the chosen value. + int "Debounce time for key press in milliseconds." + default -1 + help + Global debounce time for key press in milliseconds. + If this is -1, the debounce time is controlled by the debounce-press-ms + Devicetree property, which defaults to 5 ms. Otherwise this overrides the + debounce time for all key scan drivers to the chosen value. config ZMK_KSCAN_DEBOUNCE_RELEASE_MS - int "Debounce time for key release in milliseconds." - default -1 - help - Global debounce time for key release in milliseconds. - If this is -1, the debounce time is controlled by the debounce-release-ms - Devicetree property, which defaults to 5 ms. Otherwise this overrides the - debounce time for all key scan drivers to the chosen value. + int "Debounce time for key release in milliseconds." + default -1 + help + Global debounce time for key release in milliseconds. + If this is -1, the debounce time is controlled by the debounce-release-ms + Devicetree property, which defaults to 5 ms. Otherwise this overrides the + debounce time for all key scan drivers to the chosen value. endif config ZMK_KSCAN_INIT_PRIORITY - int "Keyboard scan driver init priority" - default 40 - help - Keyboard scan device driver initialization priority. + int "Keyboard scan driver init priority" + default 40 + help + Keyboard scan device driver initialization priority. diff --git a/app/drivers/sensor/battery/Kconfig b/app/drivers/sensor/battery/Kconfig index d7c82bb0..a9d7189e 100644 --- a/app/drivers/sensor/battery/Kconfig +++ b/app/drivers/sensor/battery/Kconfig @@ -5,22 +5,22 @@ DT_COMPAT_ZMK_BATTERY_NRF_VDDH := zmk,battery-nrf-vddh DT_COMPAT_ZMK_BATTERY_VOLTAGE_DIVIDER := zmk,battery-voltage-divider config ZMK_BATTERY - bool "ZMK battery monitoring" - help - Enable battery monitoring + bool "ZMK battery monitoring" + help + Enable battery monitoring config ZMK_BATTERY_NRF_VDDH - bool - default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BATTERY_NRF_VDDH)) - select ADC - select ZMK_BATTERY - help - Enable ZMK nRF VDDH voltage driver for battery monitoring. + bool + default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BATTERY_NRF_VDDH)) + select ADC + select ZMK_BATTERY + help + Enable ZMK nRF VDDH voltage driver for battery monitoring. config ZMK_BATTERY_VOLTAGE_DIVIDER - bool - default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BATTERY_VOLTAGE_DIVIDER)) - select ADC - select ZMK_BATTERY - help - Enable ZMK battery voltage divider driver for battery monitoring. + bool + default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BATTERY_VOLTAGE_DIVIDER)) + select ADC + select ZMK_BATTERY + help + Enable ZMK battery voltage divider driver for battery monitoring. diff --git a/app/drivers/sensor/ec11/Kconfig b/app/drivers/sensor/ec11/Kconfig index 6854e530..e86d092a 100644 --- a/app/drivers/sensor/ec11/Kconfig +++ b/app/drivers/sensor/ec11/Kconfig @@ -2,49 +2,49 @@ # SPDX-License-Identifier: MIT menuconfig EC11 - bool "EC11 Incremental Encoder Sensor" - depends on GPIO - help - Enable driver for EC11 incremental encoder sensors. + bool "EC11 Incremental Encoder Sensor" + depends on GPIO + help + Enable driver for EC11 incremental encoder sensors. if EC11 choice - prompt "Trigger mode" - default EC11_TRIGGER_NONE - help - Specify the type of triggering to be used by the driver. + prompt "Trigger mode" + default EC11_TRIGGER_NONE + help + Specify the type of triggering to be used by the driver. config EC11_TRIGGER_NONE - bool "No trigger" + bool "No trigger" config EC11_TRIGGER_GLOBAL_THREAD - bool "Use global thread" - depends on GPIO - select EC11_TRIGGER + bool "Use global thread" + depends on GPIO + select EC11_TRIGGER config EC11_TRIGGER_OWN_THREAD - bool "Use own thread" - depends on GPIO - select EC11_TRIGGER + bool "Use own thread" + depends on GPIO + select EC11_TRIGGER endchoice config EC11_TRIGGER - bool + bool config EC11_THREAD_PRIORITY - int "Thread priority" - depends on EC11_TRIGGER_OWN_THREAD - default 10 - help - Priority of thread used by the driver to handle interrupts. + int "Thread priority" + depends on EC11_TRIGGER_OWN_THREAD + default 10 + help + Priority of thread used by the driver to handle interrupts. config EC11_THREAD_STACK_SIZE - int "Thread stack size" - depends on EC11_TRIGGER_OWN_THREAD - default 1024 - help - Stack size of thread used by the driver to handle interrupts. + int "Thread stack size" + depends on EC11_TRIGGER_OWN_THREAD + default 1024 + help + Stack size of thread used by the driver to handle interrupts. endif # EC11 \ No newline at end of file diff --git a/app/dts/behaviors/backlight.dtsi b/app/dts/behaviors/backlight.dtsi index f9bd02b8..bebd6dfb 100644 --- a/app/dts/behaviors/backlight.dtsi +++ b/app/dts/behaviors/backlight.dtsi @@ -5,11 +5,11 @@ */ / { - behaviors { - /omit-if-no-ref/ bl: behavior_backlight { - compatible = "zmk,behavior-backlight"; - label = "BCKLGHT"; - #binding-cells = <2>; - }; - }; + behaviors { + /omit-if-no-ref/ bl: behavior_backlight { + compatible = "zmk,behavior-backlight"; + label = "BCKLGHT"; + #binding-cells = <2>; + }; + }; }; diff --git a/app/dts/behaviors/bluetooth.dtsi b/app/dts/behaviors/bluetooth.dtsi index 1e9cf21b..a49ff4d6 100644 --- a/app/dts/behaviors/bluetooth.dtsi +++ b/app/dts/behaviors/bluetooth.dtsi @@ -5,11 +5,11 @@ */ / { - behaviors { - /omit-if-no-ref/ bt: behavior_bluetooth { - compatible = "zmk,behavior-bluetooth"; - label = "BLUETOOTH"; - #binding-cells = <2>; - }; - }; + behaviors { + /omit-if-no-ref/ bt: behavior_bluetooth { + compatible = "zmk,behavior-bluetooth"; + label = "BLUETOOTH"; + #binding-cells = <2>; + }; + }; }; diff --git a/app/dts/behaviors/caps_word.dtsi b/app/dts/behaviors/caps_word.dtsi index ac04e26b..219300dc 100644 --- a/app/dts/behaviors/caps_word.dtsi +++ b/app/dts/behaviors/caps_word.dtsi @@ -7,13 +7,13 @@ #include / { - behaviors { - /omit-if-no-ref/ caps_word: behavior_caps_word { - compatible = "zmk,behavior-caps-word"; - label = "CAPS_WORD"; - #binding-cells = <0>; - continue-list = ; - }; - }; + behaviors { + /omit-if-no-ref/ caps_word: behavior_caps_word { + compatible = "zmk,behavior-caps-word"; + label = "CAPS_WORD"; + #binding-cells = <0>; + continue-list = ; + }; + }; }; diff --git a/app/dts/behaviors/ext_power.dtsi b/app/dts/behaviors/ext_power.dtsi index 18e824e2..f61170dd 100644 --- a/app/dts/behaviors/ext_power.dtsi +++ b/app/dts/behaviors/ext_power.dtsi @@ -5,11 +5,11 @@ */ / { - behaviors { - ext_power: behavior_ext_power { - compatible = "zmk,behavior-ext-power"; - label = "EXTPOWER"; - #binding-cells = <1>; - }; - }; + behaviors { + ext_power: behavior_ext_power { + compatible = "zmk,behavior-ext-power"; + label = "EXTPOWER"; + #binding-cells = <1>; + }; + }; }; diff --git a/app/dts/behaviors/gresc.dtsi b/app/dts/behaviors/gresc.dtsi index 29593880..fa4c685b 100644 --- a/app/dts/behaviors/gresc.dtsi +++ b/app/dts/behaviors/gresc.dtsi @@ -7,13 +7,13 @@ #include / { - behaviors { - /omit-if-no-ref/ gresc: grave_escape { - compatible = "zmk,behavior-mod-morph"; - label = "GRAVE_ESCAPE"; - #binding-cells = <0>; - bindings = <&kp ESC>, <&kp GRAVE>; + behaviors { + /omit-if-no-ref/ gresc: grave_escape { + compatible = "zmk,behavior-mod-morph"; + label = "GRAVE_ESCAPE"; + #binding-cells = <0>; + bindings = <&kp ESC>, <&kp GRAVE>; mods = <(MOD_LGUI|MOD_LSFT|MOD_RGUI|MOD_RSFT)>; - }; - }; + }; + }; }; diff --git a/app/dts/behaviors/key_press.dtsi b/app/dts/behaviors/key_press.dtsi index 59a4e12a..b0fc2db1 100644 --- a/app/dts/behaviors/key_press.dtsi +++ b/app/dts/behaviors/key_press.dtsi @@ -5,12 +5,12 @@ */ / { - behaviors { - /* DEPRECATED: `cp` will be removed in the future */ - /omit-if-no-ref/ cp: kp: behavior_key_press { - compatible = "zmk,behavior-key-press"; - label = "KEY_PRESS"; - #binding-cells = <1>; - }; - }; + behaviors { + /* DEPRECATED: `cp` will be removed in the future */ + /omit-if-no-ref/ cp: kp: behavior_key_press { + compatible = "zmk,behavior-key-press"; + label = "KEY_PRESS"; + #binding-cells = <1>; + }; + }; }; diff --git a/app/dts/behaviors/key_repeat.dtsi b/app/dts/behaviors/key_repeat.dtsi index aa8ffa04..795a77f6 100644 --- a/app/dts/behaviors/key_repeat.dtsi +++ b/app/dts/behaviors/key_repeat.dtsi @@ -7,13 +7,13 @@ #include / { - behaviors { - /omit-if-no-ref/ key_repeat: behavior_key_repeat { - compatible = "zmk,behavior-key-repeat"; - label = "KEY_REPEAT"; - #binding-cells = <0>; - usage-pages = ; - }; - }; + behaviors { + /omit-if-no-ref/ key_repeat: behavior_key_repeat { + compatible = "zmk,behavior-key-repeat"; + label = "KEY_REPEAT"; + #binding-cells = <0>; + usage-pages = ; + }; + }; }; diff --git a/app/dts/behaviors/key_toggle.dtsi b/app/dts/behaviors/key_toggle.dtsi index 98001b79..df581014 100644 --- a/app/dts/behaviors/key_toggle.dtsi +++ b/app/dts/behaviors/key_toggle.dtsi @@ -5,11 +5,11 @@ */ / { - behaviors { - /omit-if-no-ref/ kt: behavior_key_toggle { - compatible = "zmk,behavior-key-toggle"; - label = "KEY_TOGGLE"; - #binding-cells = <1>; - }; - }; + behaviors { + /omit-if-no-ref/ kt: behavior_key_toggle { + compatible = "zmk,behavior-key-toggle"; + label = "KEY_TOGGLE"; + #binding-cells = <1>; + }; + }; }; diff --git a/app/dts/behaviors/layer_tap.dtsi b/app/dts/behaviors/layer_tap.dtsi index 21fd9d56..1d92245c 100644 --- a/app/dts/behaviors/layer_tap.dtsi +++ b/app/dts/behaviors/layer_tap.dtsi @@ -5,14 +5,14 @@ */ / { - behaviors { - /omit-if-no-ref/ lt: behavior_layer_tap { - compatible = "zmk,behavior-hold-tap"; - label = "LAYER_TAP"; - #binding-cells = <2>; - flavor = "tap-preferred"; - tapping-term-ms = <200>; - bindings = <&mo>, <&kp>; - }; - }; + behaviors { + /omit-if-no-ref/ lt: behavior_layer_tap { + compatible = "zmk,behavior-hold-tap"; + label = "LAYER_TAP"; + #binding-cells = <2>; + flavor = "tap-preferred"; + tapping-term-ms = <200>; + bindings = <&mo>, <&kp>; + }; + }; }; diff --git a/app/dts/behaviors/macros.dtsi b/app/dts/behaviors/macros.dtsi index 76153291..757c046e 100644 --- a/app/dts/behaviors/macros.dtsi +++ b/app/dts/behaviors/macros.dtsi @@ -6,49 +6,49 @@ #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__ \ + }; / { - behaviors { - macro_tap: macro_control_mode_tap { - compatible = "zmk,macro-control-mode-tap"; - label = "MAC_TAP"; - #binding-cells = <0>; - }; + behaviors { + macro_tap: macro_control_mode_tap { + compatible = "zmk,macro-control-mode-tap"; + label = "MAC_TAP"; + #binding-cells = <0>; + }; - macro_press: macro_control_mode_press { - compatible = "zmk,macro-control-mode-press"; - label = "MAC_PRESS"; - #binding-cells = <0>; - }; + macro_press: macro_control_mode_press { + compatible = "zmk,macro-control-mode-press"; + label = "MAC_PRESS"; + #binding-cells = <0>; + }; - macro_release: macro_control_mode_release { - compatible = "zmk,macro-control-mode-release"; - label = "MAC_REL"; - #binding-cells = <0>; - }; + macro_release: macro_control_mode_release { + compatible = "zmk,macro-control-mode-release"; + label = "MAC_REL"; + #binding-cells = <0>; + }; - macro_tap_time: macro_control_tap_time { - compatible = "zmk,macro-control-tap-time"; - label = "MAC_TAP_TIME"; - #binding-cells = <1>; - }; + macro_tap_time: macro_control_tap_time { + compatible = "zmk,macro-control-tap-time"; + label = "MAC_TAP_TIME"; + #binding-cells = <1>; + }; - macro_wait_time: macro_control_wait_time { - compatible = "zmk,macro-control-wait-time"; - label = "MAC_WAIT_TIME"; - #binding-cells = <1>; - }; + macro_wait_time: macro_control_wait_time { + compatible = "zmk,macro-control-wait-time"; + label = "MAC_WAIT_TIME"; + #binding-cells = <1>; + }; - macro_pause_for_release: macro_pause_for_release { - compatible = "zmk,macro-pause-for-release"; - label = "MAC_WAIT_REL"; - #binding-cells = <0>; - }; - }; + macro_pause_for_release: macro_pause_for_release { + compatible = "zmk,macro-pause-for-release"; + label = "MAC_WAIT_REL"; + #binding-cells = <0>; + }; + }; }; diff --git a/app/dts/behaviors/mod_tap.dtsi b/app/dts/behaviors/mod_tap.dtsi index 7a98713c..d441a4f1 100644 --- a/app/dts/behaviors/mod_tap.dtsi +++ b/app/dts/behaviors/mod_tap.dtsi @@ -5,14 +5,14 @@ */ / { - behaviors { - /omit-if-no-ref/ mt: behavior_mod_tap { - compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; - #binding-cells = <2>; - flavor = "hold-preferred"; - tapping-term-ms = <200>; - bindings = <&kp>, <&kp>; - }; - }; + behaviors { + /omit-if-no-ref/ mt: behavior_mod_tap { + compatible = "zmk,behavior-hold-tap"; + label = "MOD_TAP"; + #binding-cells = <2>; + flavor = "hold-preferred"; + tapping-term-ms = <200>; + bindings = <&kp>, <&kp>; + }; + }; }; diff --git a/app/dts/behaviors/momentary_layer.dtsi b/app/dts/behaviors/momentary_layer.dtsi index 2dbd88d9..d1c91232 100644 --- a/app/dts/behaviors/momentary_layer.dtsi +++ b/app/dts/behaviors/momentary_layer.dtsi @@ -5,11 +5,11 @@ */ / { - behaviors { - /omit-if-no-ref/ mo: behavior_momentary_layer { - compatible = "zmk,behavior-momentary-layer"; - label = "MO"; - #binding-cells = <1>; - }; - }; + behaviors { + /omit-if-no-ref/ mo: behavior_momentary_layer { + compatible = "zmk,behavior-momentary-layer"; + label = "MO"; + #binding-cells = <1>; + }; + }; }; diff --git a/app/dts/behaviors/none.dtsi b/app/dts/behaviors/none.dtsi index 790f2d61..fc4890c3 100644 --- a/app/dts/behaviors/none.dtsi +++ b/app/dts/behaviors/none.dtsi @@ -5,11 +5,11 @@ */ / { - behaviors { - /omit-if-no-ref/ none: behavior_none { - compatible = "zmk,behavior-none"; - label = "NONE"; - #binding-cells = <0>; - }; - }; + behaviors { + /omit-if-no-ref/ none: behavior_none { + compatible = "zmk,behavior-none"; + label = "NONE"; + #binding-cells = <0>; + }; + }; }; diff --git a/app/dts/behaviors/reset.dtsi b/app/dts/behaviors/reset.dtsi index 74a7163b..2e775269 100644 --- a/app/dts/behaviors/reset.dtsi +++ b/app/dts/behaviors/reset.dtsi @@ -7,18 +7,18 @@ #include / { - behaviors { - sys_reset: behavior_reset { - compatible = "zmk,behavior-reset"; - label = "SYSRESET"; - #binding-cells = <0>; - }; + behaviors { + sys_reset: behavior_reset { + compatible = "zmk,behavior-reset"; + label = "SYSRESET"; + #binding-cells = <0>; + }; - bootloader: behavior_reset_dfu { - compatible = "zmk,behavior-reset"; - label = "BOOTLOAD"; - type = ; - #binding-cells = <0>; - }; - }; + bootloader: behavior_reset_dfu { + compatible = "zmk,behavior-reset"; + label = "BOOTLOAD"; + type = ; + #binding-cells = <0>; + }; + }; }; diff --git a/app/dts/behaviors/rgb_underglow.dtsi b/app/dts/behaviors/rgb_underglow.dtsi index 54fe422e..6ffec2e6 100644 --- a/app/dts/behaviors/rgb_underglow.dtsi +++ b/app/dts/behaviors/rgb_underglow.dtsi @@ -5,11 +5,11 @@ */ / { - behaviors { - rgb_ug: behavior_rgb_underglow { - compatible = "zmk,behavior-rgb-underglow"; - label = "RGB_UG"; - #binding-cells = <2>; - }; - }; + behaviors { + rgb_ug: behavior_rgb_underglow { + compatible = "zmk,behavior-rgb-underglow"; + label = "RGB_UG"; + #binding-cells = <2>; + }; + }; }; diff --git a/app/dts/behaviors/sensor_rotate_key_press.dtsi b/app/dts/behaviors/sensor_rotate_key_press.dtsi index ed1b4cd0..dc30b798 100644 --- a/app/dts/behaviors/sensor_rotate_key_press.dtsi +++ b/app/dts/behaviors/sensor_rotate_key_press.dtsi @@ -5,13 +5,13 @@ */ / { - behaviors { - /* DEPRECATED: `inc_dec_cp` will be removed in the future */ - /omit-if-no-ref/ inc_dec_cp: inc_dec_kp: behavior_sensor_rotate_key_press { - compatible = "zmk,behavior-sensor-rotate-var"; - label = "ENC_KEY_PRESS"; - #sensor-binding-cells = <2>; - bindings = <&kp>, <&kp>; - }; - }; + behaviors { + /* DEPRECATED: `inc_dec_cp` will be removed in the future */ + /omit-if-no-ref/ inc_dec_cp: inc_dec_kp: behavior_sensor_rotate_key_press { + compatible = "zmk,behavior-sensor-rotate-var"; + label = "ENC_KEY_PRESS"; + #sensor-binding-cells = <2>; + bindings = <&kp>, <&kp>; + }; + }; }; diff --git a/app/dts/behaviors/sticky_key.dtsi b/app/dts/behaviors/sticky_key.dtsi index 886d35b7..72a80a90 100644 --- a/app/dts/behaviors/sticky_key.dtsi +++ b/app/dts/behaviors/sticky_key.dtsi @@ -5,24 +5,24 @@ */ / { - behaviors { - /omit-if-no-ref/ sk: behavior_sticky_key { - compatible = "zmk,behavior-sticky-key"; - label = "STICKY_KEY"; - #binding-cells = <1>; - release-after-ms = <1000>; - bindings = <&kp>; - ignore-modifiers; - }; - /omit-if-no-ref/ sl: behavior_sticky_layer { - compatible = "zmk,behavior-sticky-key"; - label = "STICKY_LAYER"; - #binding-cells = <1>; - release-after-ms = <1000>; - bindings = <&mo>; - quick-release; - }; - }; + behaviors { + /omit-if-no-ref/ sk: behavior_sticky_key { + compatible = "zmk,behavior-sticky-key"; + label = "STICKY_KEY"; + #binding-cells = <1>; + release-after-ms = <1000>; + bindings = <&kp>; + ignore-modifiers; + }; + /omit-if-no-ref/ sl: behavior_sticky_layer { + compatible = "zmk,behavior-sticky-key"; + label = "STICKY_LAYER"; + #binding-cells = <1>; + release-after-ms = <1000>; + bindings = <&mo>; + quick-release; + }; + }; }; diff --git a/app/dts/behaviors/to_layer.dtsi b/app/dts/behaviors/to_layer.dtsi index fa8f98bd..0ea66fa9 100644 --- a/app/dts/behaviors/to_layer.dtsi +++ b/app/dts/behaviors/to_layer.dtsi @@ -5,11 +5,11 @@ */ / { - behaviors { - /omit-if-no-ref/ to: behavior_to_layer { - compatible = "zmk,behavior-to-layer"; - label = "TO_LAYER"; - #binding-cells = <1>; - }; - }; + behaviors { + /omit-if-no-ref/ to: behavior_to_layer { + compatible = "zmk,behavior-to-layer"; + label = "TO_LAYER"; + #binding-cells = <1>; + }; + }; }; diff --git a/app/dts/behaviors/toggle_layer.dtsi b/app/dts/behaviors/toggle_layer.dtsi index ea0b1c19..75730934 100644 --- a/app/dts/behaviors/toggle_layer.dtsi +++ b/app/dts/behaviors/toggle_layer.dtsi @@ -5,11 +5,11 @@ */ / { - behaviors { - /omit-if-no-ref/ tog: behavior_toggle_layer { - compatible = "zmk,behavior-toggle-layer"; - label = "TOGGLE_LAYER"; - #binding-cells = <1>; - }; - }; + behaviors { + /omit-if-no-ref/ tog: behavior_toggle_layer { + compatible = "zmk,behavior-toggle-layer"; + label = "TOGGLE_LAYER"; + #binding-cells = <1>; + }; + }; }; diff --git a/app/dts/behaviors/transparent.dtsi b/app/dts/behaviors/transparent.dtsi index 81ebb133..0dfaade2 100644 --- a/app/dts/behaviors/transparent.dtsi +++ b/app/dts/behaviors/transparent.dtsi @@ -5,11 +5,11 @@ */ / { - behaviors { - /omit-if-no-ref/ trans: behavior_transparent { - compatible = "zmk,behavior-transparent"; - label = "TRANS"; - #binding-cells = <0>; - }; - }; + behaviors { + /omit-if-no-ref/ trans: behavior_transparent { + compatible = "zmk,behavior-transparent"; + label = "TRANS"; + #binding-cells = <0>; + }; + }; }; diff --git a/app/dts/common/arduino_uno_pro_micro_map.dtsi b/app/dts/common/arduino_uno_pro_micro_map.dtsi index 3f3d64f0..a6b8d792 100644 --- a/app/dts/common/arduino_uno_pro_micro_map.dtsi +++ b/app/dts/common/arduino_uno_pro_micro_map.dtsi @@ -7,41 +7,41 @@ /* This provies a mapping from Arduino Uno to Arduino Pro Micro pins for development */ / { - pro_micro_d: connector_d { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &arduino_header 6 0> /* D0 */ - , <1 0 &arduino_header 7 0> /* D1 */ - , <2 0 &arduino_header 8 0> /* D2 */ - , <3 0 &arduino_header 9 0> /* D3 */ - , <4 0 &arduino_header 10 0> /* D4/A6 */ - , <5 0 &arduino_header 11 0> /* D5 */ - , <6 0 &arduino_header 12 0> /* D6/A7 */ - , <7 0 &arduino_header 13 0> /* D7 */ - , <8 0 &arduino_header 14 0> /* D8/A8 */ - , <9 0 &arduino_header 15 0> /* D9/A9 */ - , <10 0 &arduino_header 16 0> /* D10/A10 */ - , <16 0 &arduino_header 17 0> /* D16 */ - , <14 0 &arduino_header 18 0> /* D14 */ - , <15 0 &arduino_header 19 0> /* D15 */ - ; - }; + pro_micro_d: connector_d { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &arduino_header 6 0> /* D0 */ + , <1 0 &arduino_header 7 0> /* D1 */ + , <2 0 &arduino_header 8 0> /* D2 */ + , <3 0 &arduino_header 9 0> /* D3 */ + , <4 0 &arduino_header 10 0> /* D4/A6 */ + , <5 0 &arduino_header 11 0> /* D5 */ + , <6 0 &arduino_header 12 0> /* D6/A7 */ + , <7 0 &arduino_header 13 0> /* D7 */ + , <8 0 &arduino_header 14 0> /* D8/A8 */ + , <9 0 &arduino_header 15 0> /* D9/A9 */ + , <10 0 &arduino_header 16 0> /* D10/A10 */ + , <16 0 &arduino_header 17 0> /* D16 */ + , <14 0 &arduino_header 18 0> /* D14 */ + , <15 0 &arduino_header 19 0> /* D15 */ + ; + }; - pro_micro_a: connector_a { - compatible = "arduino-pro-micro"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map - = <0 0 &arduino_header 0 0> /* A0 */ - , <1 0 &arduino_header 1 0> /* A1 */ - , <2 0 &arduino_header 2 0> /* A2 */ - , <3 0 &arduino_header 3 0> /* A3 */ - ; - }; + pro_micro_a: connector_a { + compatible = "arduino-pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &arduino_header 0 0> /* A0 */ + , <1 0 &arduino_header 1 0> /* A1 */ + , <2 0 &arduino_header 2 0> /* A2 */ + , <3 0 &arduino_header 3 0> /* A3 */ + ; + }; }; pro_micro_i2c: &arduino_i2c {}; diff --git a/app/include/linker/zmk-events.ld b/app/include/linker/zmk-events.ld index 3e307f85..0c4bb6e4 100644 --- a/app/include/linker/zmk-events.ld +++ b/app/include/linker/zmk-events.ld @@ -6,11 +6,11 @@ #include - __event_type_start = .; \ - KEEP(*(".event_type")); \ - __event_type_end = .; \ + __event_type_start = .; \ + KEEP(*(".event_type")); \ + __event_type_end = .; \ - __event_subscriptions_start = .; \ - KEEP(*(".event_subscription")); \ - __event_subscriptions_end = .; \ + __event_subscriptions_start = .; \ + KEEP(*(".event_subscription")); \ + __event_subscriptions_end = .; \ diff --git a/app/run-test.sh b/app/run-test.sh index 94438f34..6935f2c8 100755 --- a/app/run-test.sh +++ b/app/run-test.sh @@ -4,23 +4,23 @@ # SPDX-License-Identifier: MIT if [ -z "$1" ]; then - echo "Usage: ./run-test.sh " - exit 1 + echo "Usage: ./run-test.sh " + exit 1 fi path="$1" if [ $path = "all" ]; then - path="tests" + path="tests" fi testcases=$(find $path -name native_posix_64.keymap -exec dirname \{\} \;) num_cases=$(echo "$testcases" | wc -l) if [ $num_cases -gt 1 ] || [ "$testcases" != "$path" ]; then - echo "" > ./build/tests/pass-fail.log - echo "$testcases" | xargs -L 1 -P ${J:-4} ./run-test.sh - err=$? - sort -k2 ./build/tests/pass-fail.log - exit $err + echo "" > ./build/tests/pass-fail.log + echo "$testcases" | xargs -L 1 -P ${J:-4} ./run-test.sh + err=$? + sort -k2 ./build/tests/pass-fail.log + exit $err fi testcase="$path" @@ -28,19 +28,19 @@ echo "Running $testcase:" west build -d build/$testcase -b native_posix_64 -- -DZMK_CONFIG="$(pwd)/$testcase" > /dev/null 2>&1 if [ $? -gt 0 ]; then - echo "FAILED: $testcase did not build" | tee -a ./build/tests/pass-fail.log - exit 1 + echo "FAILED: $testcase did not build" | tee -a ./build/tests/pass-fail.log + exit 1 fi ./build/$testcase/zephyr/zmk.exe | sed -e "s/.*> //" | tee build/$testcase/keycode_events_full.log | sed -n -f $testcase/events.patterns > build/$testcase/keycode_events.log diff -auZ $testcase/keycode_events.snapshot build/$testcase/keycode_events.log if [ $? -gt 0 ]; then - if [ -f $testcase/pending ]; then - echo "PENDING: $testcase" | tee -a ./build/tests/pass-fail.log - exit 0 - fi - echo "FAILED: $testcase" | tee -a ./build/tests/pass-fail.log - exit 1 + if [ -f $testcase/pending ]; then + echo "PENDING: $testcase" | tee -a ./build/tests/pass-fail.log + exit 0 + fi + echo "FAILED: $testcase" | tee -a ./build/tests/pass-fail.log + exit 1 fi echo "PASS: $testcase" | tee -a ./build/tests/pass-fail.log diff --git a/app/src/split/Kconfig b/app/src/split/Kconfig index 42cb411c..dbe5f092 100644 --- a/app/src/split/Kconfig +++ b/app/src/split/Kconfig @@ -2,21 +2,21 @@ # SPDX-License-Identifier: MIT menuconfig ZMK_SPLIT - bool "Split keyboard support" + bool "Split keyboard support" if ZMK_SPLIT config ZMK_SPLIT_ROLE_CENTRAL - bool "Split central device" + bool "Split central device" choice ZMK_SPLIT_TRANSPORT - prompt "Split transport" + prompt "Split transport" config ZMK_SPLIT_BLE - bool "BLE" - depends on ZMK_BLE - select BT_USER_PHY_UPDATE - select BT_AUTO_PHY_UPDATE + bool "BLE" + depends on ZMK_BLE + select BT_USER_PHY_UPDATE + select BT_AUTO_PHY_UPDATE endchoice diff --git a/app/src/split/bluetooth/Kconfig b/app/src/split/bluetooth/Kconfig index f6976cff..53119d82 100644 --- a/app/src/split/bluetooth/Kconfig +++ b/app/src/split/bluetooth/Kconfig @@ -7,55 +7,55 @@ menu "BLE Transport" # Added for backwards compatibility. New shields/board should set `ZMK_SPLIT_ROLE_CENTRAL` only. config ZMK_SPLIT_BLE_ROLE_CENTRAL - bool - select ZMK_SPLIT_ROLE_CENTRAL + bool + select ZMK_SPLIT_ROLE_CENTRAL config ZMK_SPLIT_ROLE_CENTRAL - select BT_CENTRAL - select BT_GATT_CLIENT - select BT_GATT_AUTO_DISCOVER_CCC + select BT_CENTRAL + select BT_GATT_CLIENT + select BT_GATT_AUTO_DISCOVER_CCC if ZMK_SPLIT_ROLE_CENTRAL config ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE - int "Max number of key position state events to queue when received from peripherals" - default 5 + 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 - int "BLE split central write thread stack size" - default 512 + int "BLE split central write thread stack size" + default 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)" - default 5 + int "Max number of behavior run events to queue to send to the peripheral(s)" + default 5 endif # ZMK_SPLIT_ROLE_CENTRAL if !ZMK_SPLIT_ROLE_CENTRAL config ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE - int "BLE split peripheral notify thread stack size" - default 650 + int "BLE split peripheral notify thread stack size" + default 650 config ZMK_SPLIT_BLE_PERIPHERAL_PRIORITY - int "BLE split peripheral notify thread priority" - default 5 + int "BLE split peripheral notify thread priority" + default 5 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 + int "Max number of key position state events to queue to send to the central" + default 10 config ZMK_USB - default n + default n config BT_MAX_PAIRED - default 1 + default 1 config BT_MAX_CONN - default 1 + default 1 config BT_PERIPHERAL_PREF_MAX_INT - default 6 + default 6 #!ZMK_SPLIT_ROLE_CENTRAL endif @@ -71,10 +71,10 @@ if ZMK_BLE if ZMK_SPLIT_BLE && ZMK_SPLIT_ROLE_CENTRAL config BT_MAX_CONN - default 6 + default 6 config BT_MAX_PAIRED - default 6 + default 6 #ZMK_SPLIT_BLE && ZMK_SPLIT_ROLE_CENTRAL endif @@ -82,10 +82,10 @@ endif if !ZMK_SPLIT_BLE config BT_MAX_CONN - default 5 + default 5 config BT_MAX_PAIRED - default 5 + default 5 #!ZMK_SPLIT_BLE endif diff --git a/app/tests/backlight/basic/native_posix_64.keymap b/app/tests/backlight/basic/native_posix_64.keymap index 185dbf7c..dfb08fef 100644 --- a/app/tests/backlight/basic/native_posix_64.keymap +++ b/app/tests/backlight/basic/native_posix_64.keymap @@ -1,30 +1,30 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - /* BL_INC */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_INC */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_DEC */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* BL_DEC */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* BL_OFF */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,10) - /* BL_OFF */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,10) - /* BL_ON */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - /* BL_ON */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + /* BL_INC */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_INC */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_DEC */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* BL_DEC */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* BL_OFF */ + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + /* BL_OFF */ + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + /* BL_ON */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + /* BL_ON */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; diff --git a/app/tests/backlight/behavior_keymap.dtsi b/app/tests/backlight/behavior_keymap.dtsi index 26869272..771072ac 100644 --- a/app/tests/backlight/behavior_keymap.dtsi +++ b/app/tests/backlight/behavior_keymap.dtsi @@ -4,31 +4,31 @@ #include / { - chosen { - zmk,backlight = &backlight; - }; + chosen { + zmk,backlight = &backlight; + }; - backlight: leds { - compatible = "gpio-leds"; - led_0 { - gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; - label = "Backlight LED 0"; - }; - led_1 { - gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; - label = "Backlight LED 1"; - }; - }; + backlight: leds { + compatible = "gpio-leds"; + led_0 { + gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; + label = "Backlight LED 0"; + }; + led_1 { + gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; + label = "Backlight LED 1"; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &bl BL_INC &bl BL_DEC - &bl BL_ON &bl BL_OFF - >; - }; - }; + default_layer { + bindings = < + &bl BL_INC &bl BL_DEC + &bl BL_ON &bl BL_OFF + >; + }; + }; }; diff --git a/app/tests/backlight/config-brt/native_posix_64.keymap b/app/tests/backlight/config-brt/native_posix_64.keymap index 6617c9f6..cbb6c93f 100644 --- a/app/tests/backlight/config-brt/native_posix_64.keymap +++ b/app/tests/backlight/config-brt/native_posix_64.keymap @@ -1,12 +1,12 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - /* BL_INC */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_DEC */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + events = < + /* BL_INC */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_DEC */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; diff --git a/app/tests/backlight/config-on/native_posix_64.keymap b/app/tests/backlight/config-on/native_posix_64.keymap index a95ccd93..1a8de928 100644 --- a/app/tests/backlight/config-on/native_posix_64.keymap +++ b/app/tests/backlight/config-on/native_posix_64.keymap @@ -1,12 +1,12 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - /* BL_ON */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - /* BL_OFF */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,10) - >; + events = < + /* BL_ON */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + /* BL_OFF */ + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + >; }; diff --git a/app/tests/backlight/config-step/native_posix_64.keymap b/app/tests/backlight/config-step/native_posix_64.keymap index 96fbe96a..70614459 100644 --- a/app/tests/backlight/config-step/native_posix_64.keymap +++ b/app/tests/backlight/config-step/native_posix_64.keymap @@ -1,36 +1,36 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - /* BL_INC */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_INC */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_INC */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_DEC */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* BL_DEC */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* BL_DEC */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* BL_DEC */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* BL_DEC */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* BL_INC */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_INC */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + /* BL_INC */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_INC */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_INC */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_DEC */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* BL_DEC */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* BL_DEC */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* BL_DEC */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* BL_DEC */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* BL_INC */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_INC */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; diff --git a/app/tests/backlight/cycle/native_posix_64.keymap b/app/tests/backlight/cycle/native_posix_64.keymap index a2f3c830..00615e35 100644 --- a/app/tests/backlight/cycle/native_posix_64.keymap +++ b/app/tests/backlight/cycle/native_posix_64.keymap @@ -4,75 +4,75 @@ #include / { - chosen { - zmk,backlight = &backlight; - }; + chosen { + zmk,backlight = &backlight; + }; - backlight: leds { - compatible = "gpio-leds"; - led_0 { - gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; - label = "Backlight LED 0"; - }; - led_1 { - gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; - label = "Backlight LED 1"; - }; - }; + backlight: leds { + compatible = "gpio-leds"; + led_0 { + gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; + label = "Backlight LED 0"; + }; + led_1 { + gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; + label = "Backlight LED 1"; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &bl BL_CYCLE &none - &none &none - >; - }; - }; + default_layer { + bindings = < + &bl BL_CYCLE &none + &none &none + >; + }; + }; }; &kscan { - events = < - /* BL_CYCLE */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_CYCLE */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_CYCLE */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_CYCLE */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_CYCLE */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_CYCLE */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_CYCLE */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_CYCLE */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_CYCLE */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_CYCLE */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_CYCLE */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_CYCLE */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_CYCLE */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + /* BL_CYCLE */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_CYCLE */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_CYCLE */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_CYCLE */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_CYCLE */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_CYCLE */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_CYCLE */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_CYCLE */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_CYCLE */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_CYCLE */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_CYCLE */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_CYCLE */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_CYCLE */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; diff --git a/app/tests/backlight/low-brightness/native_posix_64.keymap b/app/tests/backlight/low-brightness/native_posix_64.keymap index 3b01f700..a151e0f6 100644 --- a/app/tests/backlight/low-brightness/native_posix_64.keymap +++ b/app/tests/backlight/low-brightness/native_posix_64.keymap @@ -1,39 +1,39 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - /* BL_DEC */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* BL_DEC */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* BL_ON */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - /* BL_OFF */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,10) - /* BL_INC */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_INC */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* BL_OFF */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,10) - /* BL_DEC */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* BL_DEC */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* BL_DEC */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* BL_INC */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + /* BL_DEC */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* BL_DEC */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* BL_ON */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + /* BL_OFF */ + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + /* BL_INC */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_INC */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* BL_OFF */ + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + /* BL_DEC */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* BL_DEC */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* BL_DEC */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* BL_INC */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; diff --git a/app/tests/caps-word/behavior_keymap.dtsi b/app/tests/caps-word/behavior_keymap.dtsi index 04653bec..855406fc 100644 --- a/app/tests/caps-word/behavior_keymap.dtsi +++ b/app/tests/caps-word/behavior_keymap.dtsi @@ -3,15 +3,15 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label = "Default keymap"; + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; - default_layer { - bindings = < - &caps_word &kp A - &kp N6 &kp MINUS - >; - }; - }; + default_layer { + bindings = < + &caps_word &kp A + &kp N6 &kp MINUS + >; + }; + }; }; diff --git a/app/tests/caps-word/continue-with-modifiers/native_posix_64.keymap b/app/tests/caps-word/continue-with-modifiers/native_posix_64.keymap index 3053d5df..bbbdac10 100644 --- a/app/tests/caps-word/continue-with-modifiers/native_posix_64.keymap +++ b/app/tests/caps-word/continue-with-modifiers/native_posix_64.keymap @@ -4,30 +4,30 @@ #include "../behavior_keymap.dtsi" / { - keymap { - compatible = "zmk,keymap"; - label = "Default keymap"; + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; - default_layer { - bindings = < - &caps_word &kp A - &kp LSHFT &kp MINUS - >; - }; - }; + default_layer { + bindings = < + &caps_word &kp A + &kp LSHFT &kp MINUS + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; \ No newline at end of file diff --git a/app/tests/caps-word/continue-with-non-alpha-continue-list-item/native_posix_64.keymap b/app/tests/caps-word/continue-with-non-alpha-continue-list-item/native_posix_64.keymap index 68c3249f..08b173bd 100644 --- a/app/tests/caps-word/continue-with-non-alpha-continue-list-item/native_posix_64.keymap +++ b/app/tests/caps-word/continue-with-non-alpha-continue-list-item/native_posix_64.keymap @@ -4,18 +4,18 @@ #include "../behavior_keymap.dtsi" &caps_word { - continue-list = ; + continue-list = ; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; \ No newline at end of file diff --git a/app/tests/caps-word/continue-with-non-modified-numeric-usage-id/native_posix_64.keymap b/app/tests/caps-word/continue-with-non-modified-numeric-usage-id/native_posix_64.keymap index 40a4d4a9..cde97c84 100644 --- a/app/tests/caps-word/continue-with-non-modified-numeric-usage-id/native_posix_64.keymap +++ b/app/tests/caps-word/continue-with-non-modified-numeric-usage-id/native_posix_64.keymap @@ -4,18 +4,18 @@ #include "../behavior_keymap.dtsi" &caps_word { - continue-list = ; + continue-list = ; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; \ No newline at end of file diff --git a/app/tests/caps-word/deactivate-by-non-alpha-non-continuation/native_posix_64.keymap b/app/tests/caps-word/deactivate-by-non-alpha-non-continuation/native_posix_64.keymap index 4219e354..3fbb020b 100644 --- a/app/tests/caps-word/deactivate-by-non-alpha-non-continuation/native_posix_64.keymap +++ b/app/tests/caps-word/deactivate-by-non-alpha-non-continuation/native_posix_64.keymap @@ -4,14 +4,14 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; \ No newline at end of file diff --git a/app/tests/caps-word/deactivate-by-second-press/native_posix.keymap b/app/tests/caps-word/deactivate-by-second-press/native_posix.keymap index 05f13fed..121a827c 100644 --- a/app/tests/caps-word/deactivate-by-second-press/native_posix.keymap +++ b/app/tests/caps-word/deactivate-by-second-press/native_posix.keymap @@ -4,14 +4,14 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; \ No newline at end of file diff --git a/app/tests/caps-word/deactivate-by-second-press/native_posix_64.keymap b/app/tests/caps-word/deactivate-by-second-press/native_posix_64.keymap index e0695564..b8ae4ee0 100644 --- a/app/tests/caps-word/deactivate-by-second-press/native_posix_64.keymap +++ b/app/tests/caps-word/deactivate-by-second-press/native_posix_64.keymap @@ -4,14 +4,14 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10000) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,1,30) - ZMK_MOCK_RELEASE(0,1,30) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,30) - ZMK_MOCK_PRESS(0,1,30) - ZMK_MOCK_RELEASE(0,1,1000) - >; + events = < + ZMK_MOCK_PRESS(0,0,10000) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,30) + ZMK_MOCK_RELEASE(0,1,30) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,30) + ZMK_MOCK_PRESS(0,1,30) + ZMK_MOCK_RELEASE(0,1,1000) + >; }; \ No newline at end of file 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 a02f6c64..e6754b71 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 @@ -3,7 +3,7 @@ #include &mt { - flavor = "hold-preferred"; + flavor = "hold-preferred"; }; /* @@ -12,36 +12,36 @@ and combos is wrong. Hold-taps need to process key position events first so the decision to hold or tap can be made. */ / { - combos { - compatible = "zmk,combos"; + combos { + compatible = "zmk,combos"; - combo_two { - timeout-ms = <100>; - key-positions = <1 2>; - bindings = <&kp Y>; - }; - }; + combo_two { + timeout-ms = <100>; + key-positions = <1 2>; + bindings = <&kp Y>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &mt LEFT_CONTROL A &kp B - &kp C &none - >; - }; - }; + default_layer { + bindings = < + &mt LEFT_CONTROL A &kp B + &kp C &none + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,2,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,2,10) + >; }; \ No newline at end of file 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 325da627..95382432 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 @@ -3,40 +3,40 @@ #include &mt { - flavor = "hold-preferred"; + flavor = "hold-preferred"; }; /* this test checks if hold-taps can be part of a combo */ / { - combos { - compatible = "zmk,combos"; - combo_two { - timeout-ms = <100>; - key-positions = <0 1>; - bindings = <&kp Y>; - }; - }; + combos { + compatible = "zmk,combos"; + combo_two { + timeout-ms = <100>; + key-positions = <0 1>; + bindings = <&kp Y>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &mt LEFT_CONTROL A &kp B - &kp C &none - >; - }; - }; + default_layer { + bindings = < + &mt LEFT_CONTROL A &kp B + &kp C &none + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,2,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,2,10) + >; }; \ No newline at end of file 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 7a789808..d6d187e2 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 @@ -3,43 +3,43 @@ #include &mt { - flavor = "hold-preferred"; + flavor = "hold-preferred"; }; /* This test verifies that hold-tap keys can observe * events which were released from combos. */ / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = <100>; - key-positions = <0 2>; - bindings = <&kp Y>; - }; - combo_two { - timeout-ms = <100>; - key-positions = <1 3>; - bindings = <&kp Z>; - }; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = <100>; + key-positions = <0 2>; + bindings = <&kp Y>; + }; + combo_two { + timeout-ms = <100>; + key-positions = <1 3>; + bindings = <&kp Z>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label = "Default keymap"; + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; - default_layer { - bindings = < - &mt LEFT_CONTROL A &mt RIGHT_CONTROL B - &none &none - >; - }; - }; + default_layer { + bindings = < + &mt LEFT_CONTROL A &mt RIGHT_CONTROL B + &none &none + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,0) - ZMK_MOCK_PRESS(0,1,300) - >; + events = < + ZMK_MOCK_PRESS(0,0,0) + ZMK_MOCK_PRESS(0,1,300) + >; }; \ No newline at end of file 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 d4053793..f1c7eee7 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 @@ -3,38 +3,38 @@ #include &mt { - flavor = "hold-preferred"; + flavor = "hold-preferred"; }; / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = <40>; - key-positions = <0 1>; - bindings = <&kp X>; - }; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = <40>; + key-positions = <0 1>; + bindings = <&kp X>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label = "Default keymap"; + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &mt RSHFT RET &kp C - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &mt RSHFT RET &kp C + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(0,1,50) - ZMK_MOCK_RELEASE(1,1,50) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(0,1,50) + ZMK_MOCK_RELEASE(1,1,50) + >; }; 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 ba6cecc6..134b77df 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 @@ -5,14 +5,14 @@ #define ZMK_COMBO(name, combo_bindings, keypos, combo_term) \ / { \ - combos { \ - compatible = "zmk,combos"; \ - combo_ ## name { \ - key-positions = ; \ - bindings = ; \ - timeout-ms = ; \ - }; \ - }; \ + combos { \ + compatible = "zmk,combos"; \ + combo_ ## name { \ + key-positions = ; \ + bindings = ; \ + timeout-ms = ; \ + }; \ + }; \ }; ZMK_COMBO(qmark, &kp QMARK, 0 3, 30) @@ -20,27 +20,27 @@ ZMK_COMBO(dllr, &kp DLLR, 1 3, 50) ZMK_COMBO(tilde, &kp TILDE, 3 4, 50) / { - keymap { - compatible = "zmk,keymap"; - label = "Default keymap"; + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; - default_layer { - bindings = < - &none &none - &kp A &mt LSHFT T - &none - >; - }; - }; + default_layer { + bindings = < + &none &none + &kp A &mt LSHFT T + &none + >; + }; + }; }; &kscan { - rows = <3>; - columns = <2>; - events = < - ZMK_MOCK_PRESS(1,1,500) - ZMK_MOCK_PRESS(1,0,100) - ZMK_MOCK_RELEASE(1,0,500) - ZMK_MOCK_RELEASE(1,1,0) - >; + rows = <3>; + columns = <2>; + events = < + ZMK_MOCK_PRESS(1,1,500) + ZMK_MOCK_PRESS(1,0,100) + ZMK_MOCK_RELEASE(1,0,500) + ZMK_MOCK_RELEASE(1,1,0) + >; }; \ No newline at end of file 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 33712822..8d94872b 100644 --- a/app/tests/combo/layer-filter-0/native_posix_64.keymap +++ b/app/tests/combo/layer-filter-0/native_posix_64.keymap @@ -6,73 +6,73 @@ #define TIMEOUT (60*60*1000) / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = ; - key-positions = <0 1>; - bindings = <&kp X>; - layers = <0>; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = ; + key-positions = <0 1>; + bindings = <&kp X>; + layers = <0>; + }; - combo_two { - timeout-ms = ; - key-positions = <0 1>; - bindings = <&kp Y>; - layers = <1>; - }; + combo_two { + timeout-ms = ; + key-positions = <0 1>; + bindings = <&kp Y>; + layers = <1>; + }; - combo_three { - timeout-ms = ; - key-positions = <0 2>; - bindings = <&kp Z>; - }; - }; + combo_three { + timeout-ms = ; + key-positions = <0 2>; + bindings = <&kp Z>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &kp C &tog 1 - >; - }; + default_layer { + bindings = < + &kp A &kp B + &kp C &tog 1 + >; + }; - filtered_layer { - bindings = < - &kp A &kp B - &kp C &tog 0 - >; - }; - }; + filtered_layer { + bindings = < + &kp A &kp B + &kp C &tog 0 + >; + }; + }; }; &kscan { - events = < - /* 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 Three */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(1,1,10) - /* Toggle Layer */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,10) - /* Combo Two */ - 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 Three */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(1,1,10) - >; + events = < + /* 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 Three */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(1,1,10) + /* Toggle Layer */ + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + /* Combo Two */ + 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 Three */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(1,1,10) + >; }; \ No newline at end of file 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 8eb5e9eb..96eccea4 100644 --- a/app/tests/combo/layer-filter-1/native_posix_64.keymap +++ b/app/tests/combo/layer-filter-1/native_posix_64.keymap @@ -6,35 +6,35 @@ #define TIMEOUT (60*60*1000) / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = ; - key-positions = <0 1>; - bindings = <&kp X>; - layers = <1>; - }; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = ; + key-positions = <0 1>; + bindings = <&kp X>; + layers = <1>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &kp C &tog 1 - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &kp C &tog 1 + >; + }; + }; }; &kscan { - events = < - /* 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) - >; + events = < + /* 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) + >; }; \ No newline at end of file diff --git a/app/tests/combo/multiple-timeouts/native_posix_64.keymap b/app/tests/combo/multiple-timeouts/native_posix_64.keymap index 87d21be1..d2176390 100644 --- a/app/tests/combo/multiple-timeouts/native_posix_64.keymap +++ b/app/tests/combo/multiple-timeouts/native_posix_64.keymap @@ -3,38 +3,38 @@ #include / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = <30>; - key-positions = <0 1>; - bindings = <&kp C>; - }; - combo_two { - timeout-ms = <120>; - key-positions = <0 1 2>; - bindings = <&kp C>; - }; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = <30>; + key-positions = <0 1>; + bindings = <&kp C>; + }; + combo_two { + timeout-ms = <120>; + key-positions = <0 1 2>; + bindings = <&kp C>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &none &none - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &none &none + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; \ No newline at end of file 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 8b7b4196..e8284665 100644 --- a/app/tests/combo/overlapping-combos-0/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-0/native_posix_64.keymap @@ -3,7 +3,7 @@ #include /* - combo 0 timeout inf + combo 0 timeout inf combo 01 timeout inf combo 0123 timeout inf press 012 in any combination, release any of those keys @@ -14,104 +14,104 @@ #define TIMEOUT (60*60*1000) / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = ; - key-positions = <0 1 2>; - bindings = <&kp X>; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = ; + key-positions = <0 1 2>; + bindings = <&kp X>; + }; - combo_two { - timeout-ms = ; - key-positions = <0 2>; - bindings = <&kp Y>; - }; + combo_two { + timeout-ms = ; + key-positions = <0 2>; + bindings = <&kp Y>; + }; - combo_three { - timeout-ms = ; - key-positions = <1>; - bindings = <&kp Z>; - }; - }; + combo_three { + timeout-ms = ; + key-positions = <1>; + bindings = <&kp Z>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &kp C &none - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &kp C &none + >; + }; + }; }; &kscan { - events = < - /* all permutations of combo one press, combo triggered by release */ - /* while debugging these, you may want to set the release_timer to a high number */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,2,10) + events = < + /* all permutations of combo one press, combo triggered by release */ + /* while debugging these, you may want to set the release_timer to a high number */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,2,10) + ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,2,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,2,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) - /* all permutations of combo two press and release, combo triggered by release */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,2,10) + /* all permutations of combo two press and release, combo triggered by release */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,2,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_RELEASE(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file 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 45737882..a695a388 100644 --- a/app/tests/combo/overlapping-combos-1/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-1/native_posix_64.keymap @@ -9,57 +9,57 @@ expected outcome: AB after 100ms */ / { - combos { - compatible = "zmk,combos"; - combo_two { - timeout-ms = <50>; - key-positions = <0 1>; - bindings = <&kp Y>; - }; + combos { + compatible = "zmk,combos"; + combo_two { + timeout-ms = <50>; + key-positions = <0 1>; + bindings = <&kp Y>; + }; - combo_three { - timeout-ms = <100>; - key-positions = <0 1 2>; - bindings = <&kp X>; - }; - }; + combo_three { + timeout-ms = <100>; + key-positions = <0 1 2>; + bindings = <&kp X>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &kp C &none - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &kp C &none + >; + }; + }; }; &kscan { - events = < - /* if you're debugging these, remember that the timer can be triggered between - events while stepping through code. */ - /* all permutations of combo two press and release, combo triggered by timeout */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,100) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) + events = < + /* if you're debugging these, remember that the timer can be triggered between + events while stepping through code. */ + /* all permutations of combo two press and release, combo triggered by timeout */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,100) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,100) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,100) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file 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 ba547dc2..6bf0e710 100644 --- a/app/tests/combo/overlapping-combos-2/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-2/native_posix_64.keymap @@ -9,44 +9,44 @@ expected: combo 01 after 100ms, immediately followed by key 2. */ / { - combos { - compatible = "zmk,combos"; - combo_two { - timeout-ms = <100>; - key-positions = <0 1>; - bindings = <&kp Y>; - }; + combos { + compatible = "zmk,combos"; + combo_two { + timeout-ms = <100>; + key-positions = <0 1>; + bindings = <&kp Y>; + }; - combo_four { - timeout-ms = <100>; - key-positions = <0 1 2 3>; - bindings = <&kp W>; - }; + combo_four { + timeout-ms = <100>; + key-positions = <0 1 2 3>; + bindings = <&kp W>; + }; - }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &kp C &none - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &kp C &none + >; + }; + }; }; &kscan { - events = < - /* if you're debugging these, remember that the timer can be triggered between - events while stepping through code. */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,2,100) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,2,100) - >; + events = < + /* if you're debugging these, remember that the timer can be triggered between + events while stepping through code. */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,2,100) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,2,100) + >; }; \ No newline at end of file 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 0da394b5..0a2f5ee1 100644 --- a/app/tests/combo/overlapping-combos-3/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-3/native_posix_64.keymap @@ -9,45 +9,45 @@ expected: key pos 0 followed by combo 12 */ / { - combos { - compatible = "zmk,combos"; - combo_two { - timeout-ms = <100>; - key-positions = <1 2>; - bindings = <&kp Y>; - }; + combos { + compatible = "zmk,combos"; + combo_two { + timeout-ms = <100>; + key-positions = <1 2>; + bindings = <&kp Y>; + }; - combo_four { - timeout-ms = <100>; - key-positions = <0 1 2 3>; - bindings = <&kp W>; - }; + combo_four { + timeout-ms = <100>; + key-positions = <0 1 2 3>; + bindings = <&kp W>; + }; - }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &kp C &none - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &kp C &none + >; + }; + }; }; &kscan { - events = < - /* if you're debugging these, remember that the timer can be triggered between - events while stepping through code. */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,2,100) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,2,100) - >; + events = < + /* if you're debugging these, remember that the timer can be triggered between + events while stepping through code. */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,2,100) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,2,100) + >; }; \ No newline at end of file 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 f9537344..900c4af3 100644 --- a/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap +++ b/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap @@ -3,82 +3,82 @@ #include / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = <30>; - key-positions = <0 1>; - bindings = <&kp X>; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = <30>; + key-positions = <0 1>; + bindings = <&kp X>; + }; - combo_two { - timeout-ms = <30>; - key-positions = <0 2>; - bindings = <&kp Y>; - }; + combo_two { + timeout-ms = <30>; + key-positions = <0 2>; + bindings = <&kp Y>; + }; - combo_three { - timeout-ms = <30>; - key-positions = <3>; - bindings = <&kp Z>; - }; - }; + combo_three { + timeout-ms = <30>; + key-positions = <3>; + bindings = <&kp Z>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &kp C &none - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &kp C &none + >; + }; + }; }; &kscan { - events = < - /* all permutations of combo one press and release */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) + events = < + /* all permutations of combo one press and release */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) - /* all permutations of combo two press and release */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,2,10) + /* all permutations of combo two press and release */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,2,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,2,10) - ZMK_MOCK_RELEASE(0,2,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,2,10) + ZMK_MOCK_RELEASE(0,2,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; 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 2a71ad32..dac0bd5c 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 @@ -3,37 +3,37 @@ #include / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = <80>; - key-positions = <0 1 2 3>; - bindings = <&kp Z>; - }; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = <80>; + key-positions = <0 1 2 3>; + bindings = <&kp Z>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &kp C &kp D - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &kp C &kp D + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,100) - ZMK_MOCK_RELEASE(1,0,100) - ZMK_MOCK_RELEASE(0,1,100) - ZMK_MOCK_RELEASE(1,1,100) - >; + events = < + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,100) + ZMK_MOCK_RELEASE(1,0,100) + ZMK_MOCK_RELEASE(0,1,100) + ZMK_MOCK_RELEASE(1,1,100) + >; }; 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 c6202365..19bad1d0 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 @@ -3,33 +3,33 @@ #include / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = <80>; - key-positions = <0 1 2 3>; - bindings = <&kp Z>; - }; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = <80>; + key-positions = <0 1 2 3>; + bindings = <&kp Z>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &kp C &kp D - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &kp C &kp D + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,100) - ZMK_MOCK_RELEASE(1,1,100) - >; + events = < + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,100) + ZMK_MOCK_RELEASE(1,1,100) + >; }; \ No newline at end of file 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 b8117187..2eb6271e 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 @@ -3,35 +3,35 @@ #include / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = <80>; - key-positions = <0 1 2>; - bindings = <&kp Z>; - }; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = <80>; + key-positions = <0 1 2>; + bindings = <&kp Z>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &kp C &kp D - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &kp C &kp D + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,100) - ZMK_MOCK_RELEASE(0,1,100) - ZMK_MOCK_RELEASE(0,0,100) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,100) + ZMK_MOCK_RELEASE(0,1,100) + ZMK_MOCK_RELEASE(0,0,100) + >; }; diff --git a/app/tests/combo/press-release/native_posix_64.keymap b/app/tests/combo/press-release/native_posix_64.keymap index 8d81f35b..6bd432f9 100644 --- a/app/tests/combo/press-release/native_posix_64.keymap +++ b/app/tests/combo/press-release/native_posix_64.keymap @@ -3,49 +3,49 @@ #include / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = <30>; - key-positions = <0 1>; - bindings = <&kp C>; - }; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = <30>; + key-positions = <0 1>; + bindings = <&kp C>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &none &none - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &none &none + >; + }; + }; }; &kscan { - events = < - /* all different combinations of press and release order */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) + events = < + /* all different combinations of press and release order */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/combo/press-timeout/native_posix_64.keymap b/app/tests/combo/press-timeout/native_posix_64.keymap index 497cf1aa..6ca6487b 100644 --- a/app/tests/combo/press-timeout/native_posix_64.keymap +++ b/app/tests/combo/press-timeout/native_posix_64.keymap @@ -3,33 +3,33 @@ #include / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = <30>; - key-positions = <0 1>; - bindings = <&kp C>; - }; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = <30>; + key-positions = <0 1>; + bindings = <&kp C>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &none &none - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &none &none + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; \ No newline at end of file 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 cf7e79f7..9a395a41 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 @@ -3,43 +3,43 @@ #include / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = <30>; - key-positions = <0 1>; - bindings = <&kp C>; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = <30>; + key-positions = <0 1>; + bindings = <&kp C>; + }; - combo_two { - timeout-ms = <30>; - key-positions = <2 3>; - bindings = <&kp D>; - }; - }; + combo_two { + timeout-ms = <30>; + key-positions = <2 3>; + bindings = <&kp D>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &kp Z &kp Y - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &kp Z &kp Y + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(1,1,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(1,1,10) + >; }; \ No newline at end of file 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 0c55eb47..86ca3931 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 @@ -3,44 +3,44 @@ #include / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = <30>; - key-positions = <0 1>; - bindings = <&kp C>; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = <30>; + key-positions = <0 1>; + bindings = <&kp C>; + }; - combo_two { - timeout-ms = <30>; - key-positions = <2 3>; - bindings = <&kp D>; - }; - }; + combo_two { + timeout-ms = <30>; + key-positions = <2 3>; + bindings = <&kp D>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &kp Z &kp Y - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &kp Z &kp Y + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(1,1,10) + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; \ No newline at end of file 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 248d6e75..65089578 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 @@ -3,44 +3,44 @@ #include / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = <30>; - key-positions = <0 1>; - bindings = <&kp C>; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = <30>; + key-positions = <0 1>; + bindings = <&kp C>; + }; - combo_two { - timeout-ms = <30>; - key-positions = <2 3>; - bindings = <&kp D>; - }; - }; + combo_two { + timeout-ms = <30>; + key-positions = <2 3>; + bindings = <&kp D>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &kp Z &kp Y - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &kp Z &kp Y + >; + }; + }; }; &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) + 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) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(1,1,10) - >; + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(1,1,10) + >; }; \ No newline at end of file diff --git a/app/tests/combo/slowrelease-disabled/native_posix_64.keymap b/app/tests/combo/slowrelease-disabled/native_posix_64.keymap index 5af94d45..832e9705 100644 --- a/app/tests/combo/slowrelease-disabled/native_posix_64.keymap +++ b/app/tests/combo/slowrelease-disabled/native_posix_64.keymap @@ -3,36 +3,36 @@ #include / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = <30>; - key-positions = <0 1>; - bindings = <&kp C>; - /* no slow-release! */ - }; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = <30>; + key-positions = <0 1>; + bindings = <&kp C>; + /* no slow-release! */ + }; + }; - keymap { - compatible = "zmk,keymap"; - label = "Default keymap"; + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &kp D &none - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &kp D &none + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) /* this should release the combo */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) /* this should release the combo */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/combo/slowrelease-enabled/native_posix_64.keymap b/app/tests/combo/slowrelease-enabled/native_posix_64.keymap index 88351bea..7fdb012e 100644 --- a/app/tests/combo/slowrelease-enabled/native_posix_64.keymap +++ b/app/tests/combo/slowrelease-enabled/native_posix_64.keymap @@ -3,36 +3,36 @@ #include / { - combos { - compatible = "zmk,combos"; - combo_one { - timeout-ms = <30>; - key-positions = <0 1>; - bindings = <&kp C>; - slow-release; - }; - }; + combos { + compatible = "zmk,combos"; + combo_one { + timeout-ms = <30>; + key-positions = <0 1>; + bindings = <&kp C>; + slow-release; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp A &kp B - &kp D &none - >; - }; - }; + default_layer { + bindings = < + &kp A &kp B + &kp D &none + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) /* this should not release the combo yet */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) /* this should not release the combo yet */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; \ No newline at end of file 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 4b658a73..5e3fac42 100644 --- a/app/tests/gresc/gresc-press-release/native_posix_64.keymap +++ b/app/tests/gresc/gresc-press-release/native_posix_64.keymap @@ -3,47 +3,47 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &gresc &none - &kp LEFT_SHIFT &kp LEFT_GUI - >; - }; - }; + default_layer { + bindings = < + &gresc &none + &kp LEFT_SHIFT &kp LEFT_GUI + >; + }; + }; }; &kscan { - events = < - /* esc */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + events = < + /* esc */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) - /* ~ */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(1,0,10) + /* ~ */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(1,0,10) - /* LGUI+` */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(1,1,10) + /* LGUI+` */ + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(1,1,10) - /* ~ */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) + /* ~ */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) - /* LGUI+` */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + /* LGUI+` */ + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file 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 78b8ebcb..18f94da5 100644 --- a/app/tests/gresc/gresc-two-instances/native_posix_64.keymap +++ b/app/tests/gresc/gresc-two-instances/native_posix_64.keymap @@ -11,33 +11,33 @@ The first gresc that is released releases the key. */ / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &gresc &gresc - &kp LEFT_SHIFT &kp LEFT_GUI - >; - }; - }; + default_layer { + bindings = < + &gresc &gresc + &kp LEFT_SHIFT &kp LEFT_GUI + >; + }; + }; }; &kscan { - events = < - /* esc */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) /* the second gresc is ignored */ - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) /* the second gresc is ignored */ + events = < + /* esc */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) /* the second gresc is ignored */ + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) /* the second gresc is ignored */ - /* ~ */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) /* the second gresc is ignored */ - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) /* the second gresc is ignored */ - >; + /* ~ */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) /* the second gresc is ignored */ + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) /* the second gresc is ignored */ + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/1-dn-up/native_posix_64.keymap index 38c8668c..5b725bb1 100644 --- a/app/tests/hold-tap/balanced/1-dn-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/1-dn-up/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/2-dn-timer-up/native_posix_64.keymap index b5834e06..bb20a323 100644 --- a/app/tests/hold-tap/balanced/2-dn-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/2-dn-timer-up/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,500) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_posix_64.keymap index a540353b..3a696af7 100644 --- a/app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/3a-moddn-dn-modup-up/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ - ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ + ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_posix_64.keymap index 76bb2fa3..5704ca4b 100644 --- a/app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/3b-moddn-dn-modup-timer-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ - ZMK_MOCK_PRESS(0,0,50) /*mt f-shift */ - ZMK_MOCK_RELEASE(1,1,300) - /*timer*/ - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ + ZMK_MOCK_PRESS(0,0,50) /*mt f-shift */ + ZMK_MOCK_RELEASE(1,1,300) + /*timer*/ + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_posix_64.keymap index 882f33aa..df066fb0 100644 --- a/app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/3c-kcdn-dn-kcup-up/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) /*d*/ - ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) /*d*/ + ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap index 0fc0b848..34645ad4 100644 --- a/app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) /* d */ - ZMK_MOCK_PRESS(0,0,100) /* mt f-shift */ - ZMK_MOCK_RELEASE(1,0,400) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) /* d */ + ZMK_MOCK_PRESS(0,0,100) /* mt f-shift */ + ZMK_MOCK_RELEASE(1,0,400) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_posix_64.keymap index 5d0fcbfb..9c108d32 100644 --- a/app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/4a-dn-htdn-timer-htup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,200) - ZMK_MOCK_PRESS(0,1,200) - /* timer fires */ - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_PRESS(0,1,200) + /* timer fires */ + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap index fca60ba8..9fd7cbf0 100644 --- a/app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,200) - ZMK_MOCK_PRESS(1,0,200) - /* timer fires */ - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_PRESS(1,0,200) + /* timer fires */ + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap index 5d0af9ca..f586b978 100644 --- a/app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_PRESS(1,0,100) - ZMK_MOCK_RELEASE(1,0,200) - /* timer fires */ - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_PRESS(1,0,100) + ZMK_MOCK_RELEASE(1,0,200) + /* timer fires */ + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_posix_64.keymap index 6b138352..3a5eab10 100644 --- a/app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/4c-dn-kcdn-kcup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* timer */ - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* timer */ + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap b/app/tests/hold-tap/balanced/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap index 301ef0ac..cc7412f7 100644 --- a/app/tests/hold-tap/balanced/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_PRESS(1,0,100) - ZMK_MOCK_RELEASE(0,0,200) - /* timer fires */ - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_PRESS(1,0,100) + ZMK_MOCK_RELEASE(0,0,200) + /* timer fires */ + ZMK_MOCK_RELEASE(1,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/balanced/5-quick-tap/native_posix_64.keymap index d895df02..bd431ceb 100644 --- a/app/tests/hold-tap/balanced/5-quick-tap/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/5-quick-tap/native_posix_64.keymap @@ -5,10 +5,10 @@ &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap b/app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap index 832ea7ef..51995f8d 100644 --- a/app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap @@ -3,43 +3,43 @@ #include / { - behaviors { - ht_bal: behavior_balanced { - compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; - #binding-cells = <2>; - flavor = "balanced"; - tapping_term_ms = <300>; - bindings = <&kp>, <&kp>; - retro-tap; - }; - }; + behaviors { + ht_bal: behavior_balanced { + compatible = "zmk,behavior-hold-tap"; + label = "MOD_TAP"; + #binding-cells = <2>; + flavor = "balanced"; + tapping_term_ms = <300>; + bindings = <&kp>, <&kp>; + retro-tap; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &ht_bal LEFT_SHIFT F &none - &kp D &none>; - }; - }; + default_layer { + bindings = < + &ht_bal LEFT_SHIFT F &none + &kp D &none>; + }; + }; }; &kscan { - events = < - /* tap */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* retro tap */ - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) - /* hold */ - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + /* tap */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* retro tap */ + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_RELEASE(0,0,10) + /* hold */ + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_posix_64.keymap index b5834e06..bb20a323 100644 --- a/app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/7-positional/2-dn-timer-up/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,500) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap index 7560a05a..9ee237d3 100644 --- a/app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,200) - ZMK_MOCK_PRESS(1,1,200) // non trigger key - /* timer fires */ - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_PRESS(1,1,200) // non trigger key + /* timer fires */ + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap index b915a6a9..f2f2f8bd 100644 --- a/app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,200) - ZMK_MOCK_PRESS(1,0,200) // trigger key - /* timer fires */ - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_PRESS(1,0,200) // trigger key + /* timer fires */ + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/balanced/7-positional/behavior_keymap.dtsi b/app/tests/hold-tap/balanced/7-positional/behavior_keymap.dtsi index 5657644d..c750f8e3 100644 --- a/app/tests/hold-tap/balanced/7-positional/behavior_keymap.dtsi +++ b/app/tests/hold-tap/balanced/7-positional/behavior_keymap.dtsi @@ -3,27 +3,27 @@ #include / { - behaviors { - ht_bal: behavior_hold_tap_balanced { - compatible = "zmk,behavior-hold-tap"; - label = "HOLD_TAP_BALANCED"; - #binding-cells = <2>; - flavor = "balanced"; - tapping-term-ms = <300>; - quick-tap-ms = <200>; - bindings = <&kp>, <&kp>; + behaviors { + ht_bal: behavior_hold_tap_balanced { + compatible = "zmk,behavior-hold-tap"; + label = "HOLD_TAP_BALANCED"; + #binding-cells = <2>; + flavor = "balanced"; + tapping-term-ms = <300>; + quick-tap-ms = <200>; + bindings = <&kp>, <&kp>; hold-trigger-key-positions = <2>; - }; - }; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &ht_bal LEFT_SHIFT F &ht_bal LEFT_CONTROL J - &kp D &kp E>; - }; - }; + default_layer { + bindings = < + &ht_bal LEFT_SHIFT F &ht_bal LEFT_CONTROL J + &kp D &kp E>; + }; + }; }; diff --git a/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_posix_64.keymap index 942d5ae4..8c24dc34 100644 --- a/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/7-positional/on-release-no-trigger/native_posix_64.keymap @@ -6,12 +6,12 @@ &ht_bal { hold-trigger-on-release; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) // mod 1 - ZMK_MOCK_PRESS(0,1,10) // mod 2 - ZMK_MOCK_PRESS(1,1,10) // not trigger position - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) // mod 1 + ZMK_MOCK_PRESS(0,1,10) // mod 2 + ZMK_MOCK_PRESS(1,1,10) // not trigger position + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; diff --git a/app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_posix_64.keymap index 677a2534..1db5f20e 100644 --- a/app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/7-positional/on-release-trigger/native_posix_64.keymap @@ -6,12 +6,12 @@ &ht_bal { hold-trigger-on-release; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) // mod 1 - ZMK_MOCK_PRESS(0,1,10) // mod 2 - ZMK_MOCK_PRESS(1,0,10) // trigger position - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) // mod 1 + ZMK_MOCK_PRESS(0,1,10) // mod 2 + ZMK_MOCK_PRESS(1,0,10) // trigger position + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; diff --git a/app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap index a6ac1507..78404536 100644 --- a/app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap @@ -4,13 +4,13 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) // trigger key - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,1,400) // not trigger key - /* timer fires */ - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) // trigger key + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,1,400) // not trigger key + /* timer fires */ + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file 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 9965c9b3..5af001f6 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 @@ -4,22 +4,22 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - /* tap */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* normal quick tap */ - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,400) - /* hold */ - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,400) - /* global quick tap */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + /* tap */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* normal quick tap */ + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_RELEASE(0,0,400) + /* hold */ + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,400) + /* global quick tap */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; 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-global-quick-tap/2-double-hold/native_posix_64.keymap index 37c37f55..69d691ce 100644 --- a/app/tests/hold-tap/balanced/8-global-quick-tap/2-double-hold/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/8-global-quick-tap/2-double-hold/native_posix_64.keymap @@ -4,17 +4,17 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - /* hold the first mod tap */ - ZMK_MOCK_PRESS(0,0,400) - /* hold the second mod tap */ - ZMK_MOCK_PRESS(0,1,400) - /* press the normal key */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) + events = < + /* hold the first mod tap */ + ZMK_MOCK_PRESS(0,0,400) + /* hold the second mod tap */ + ZMK_MOCK_PRESS(0,1,400) + /* press the normal key */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) - /* release the hold taps */ - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + /* release the hold taps */ + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; 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 0966ce0d..ef8efd43 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 @@ -3,27 +3,27 @@ #include / { - behaviors { - ht_bal: behavior_balanced { - compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; - #binding-cells = <2>; - flavor = "balanced"; - tapping-term-ms = <300>; - quick-tap-ms = <300>; - bindings = <&kp>, <&kp>; - global-quick-tap; - }; - }; + behaviors { + ht_bal: behavior_balanced { + compatible = "zmk,behavior-hold-tap"; + label = "MOD_TAP"; + #binding-cells = <2>; + flavor = "balanced"; + tapping-term-ms = <300>; + quick-tap-ms = <300>; + bindings = <&kp>, <&kp>; + global-quick-tap; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &ht_bal LEFT_SHIFT F &ht_bal LEFT_CONTROL C - &kp D &none>; - }; - }; + default_layer { + bindings = < + &ht_bal LEFT_SHIFT F &ht_bal LEFT_CONTROL C + &kp D &none>; + }; + }; }; diff --git a/app/tests/hold-tap/balanced/behavior_keymap.dtsi b/app/tests/hold-tap/balanced/behavior_keymap.dtsi index d62be888..9f338ebc 100644 --- a/app/tests/hold-tap/balanced/behavior_keymap.dtsi +++ b/app/tests/hold-tap/balanced/behavior_keymap.dtsi @@ -3,26 +3,26 @@ #include / { - behaviors { - ht_bal: behavior_hold_tap_balanced { - compatible = "zmk,behavior-hold-tap"; - label = "HOLD_TAP_BALANCED"; - #binding-cells = <2>; - flavor = "balanced"; - tapping-term-ms = <300>; - quick-tap-ms = <200>; - bindings = <&kp>, <&kp>; - }; - }; + behaviors { + ht_bal: behavior_hold_tap_balanced { + compatible = "zmk,behavior-hold-tap"; + label = "HOLD_TAP_BALANCED"; + #binding-cells = <2>; + flavor = "balanced"; + tapping-term-ms = <300>; + quick-tap-ms = <200>; + bindings = <&kp>, <&kp>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &ht_bal LEFT_SHIFT F &ht_bal LEFT_CONTROL J - &kp D &kp RIGHT_CONTROL>; - }; - }; + default_layer { + bindings = < + &ht_bal LEFT_SHIFT F &ht_bal LEFT_CONTROL J + &kp D &kp RIGHT_CONTROL>; + }; + }; }; diff --git a/app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap b/app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap index 6d016501..4bac8b83 100644 --- a/app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap @@ -3,39 +3,39 @@ #include / { - behaviors { - ht_bal: behavior_hold_tap_balanced { - compatible = "zmk,behavior-hold-tap"; - label = "HOLD_TAP_BALANCED"; - #binding-cells = <2>; - flavor = "balanced"; - tapping-term-ms = <300>; - bindings = <&kp>, <&kp>; - }; - }; + behaviors { + ht_bal: behavior_hold_tap_balanced { + compatible = "zmk,behavior-hold-tap"; + label = "HOLD_TAP_BALANCED"; + #binding-cells = <2>; + flavor = "balanced"; + tapping-term-ms = <300>; + bindings = <&kp>, <&kp>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &ht_bal LEFT_SHIFT F &ht_bal LEFT_CONTROL J - &ht_bal LEFT_GUI H &ht_bal LEFT_ALT L - >; - }; - }; + default_layer { + bindings = < + &ht_bal LEFT_SHIFT F &ht_bal LEFT_CONTROL J + &ht_bal LEFT_GUI H &ht_bal LEFT_ALT L + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_PRESS(0,1,100) - ZMK_MOCK_PRESS(1,0,100) - ZMK_MOCK_PRESS(1,1,100) - ZMK_MOCK_RELEASE(0,0,100) - ZMK_MOCK_RELEASE(0,1,100) - ZMK_MOCK_RELEASE(1,0,100) - ZMK_MOCK_RELEASE(1,1,100) - >; + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_PRESS(0,1,100) + ZMK_MOCK_PRESS(1,0,100) + ZMK_MOCK_PRESS(1,1,100) + ZMK_MOCK_RELEASE(0,0,100) + ZMK_MOCK_RELEASE(0,1,100) + ZMK_MOCK_RELEASE(1,0,100) + ZMK_MOCK_RELEASE(1,1,100) + >; }; diff --git a/app/tests/hold-tap/hold-preferred/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/1-dn-up/native_posix_64.keymap index 38c8668c..5b725bb1 100644 --- a/app/tests/hold-tap/hold-preferred/1-dn-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/1-dn-up/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_posix_64.keymap index b5834e06..bb20a323 100644 --- a/app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/2-dn-timer-up/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,500) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap index a540353b..3a696af7 100644 --- a/app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ - ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ + ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap index 76bb2fa3..5704ca4b 100644 --- a/app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ - ZMK_MOCK_PRESS(0,0,50) /*mt f-shift */ - ZMK_MOCK_RELEASE(1,1,300) - /*timer*/ - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ + ZMK_MOCK_PRESS(0,0,50) /*mt f-shift */ + ZMK_MOCK_RELEASE(1,1,300) + /*timer*/ + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap index 882f33aa..df066fb0 100644 --- a/app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) /*d*/ - ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) /*d*/ + ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap index 0fc0b848..34645ad4 100644 --- a/app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) /* d */ - ZMK_MOCK_PRESS(0,0,100) /* mt f-shift */ - ZMK_MOCK_RELEASE(1,0,400) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) /* d */ + ZMK_MOCK_PRESS(0,0,100) /* mt f-shift */ + ZMK_MOCK_RELEASE(1,0,400) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap index 5d0fcbfb..9c108d32 100644 --- a/app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,200) - ZMK_MOCK_PRESS(0,1,200) - /* timer fires */ - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_PRESS(0,1,200) + /* timer fires */ + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap index fca60ba8..9fd7cbf0 100644 --- a/app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,200) - ZMK_MOCK_PRESS(1,0,200) - /* timer fires */ - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_PRESS(1,0,200) + /* timer fires */ + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap index 5d0af9ca..f586b978 100644 --- a/app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_PRESS(1,0,100) - ZMK_MOCK_RELEASE(1,0,200) - /* timer fires */ - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_PRESS(1,0,100) + ZMK_MOCK_RELEASE(1,0,200) + /* timer fires */ + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap index 6b138352..3a5eab10 100644 --- a/app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* timer */ - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* timer */ + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap index 301ef0ac..cc7412f7 100644 --- a/app/tests/hold-tap/hold-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_PRESS(1,0,100) - ZMK_MOCK_RELEASE(0,0,200) - /* timer fires */ - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_PRESS(1,0,100) + ZMK_MOCK_RELEASE(0,0,200) + /* timer fires */ + ZMK_MOCK_RELEASE(1,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/5-quick-tap/native_posix_64.keymap index d895df02..bd431ceb 100644 --- a/app/tests/hold-tap/hold-preferred/5-quick-tap/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/5-quick-tap/native_posix_64.keymap @@ -5,10 +5,10 @@ &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap index dc96ee8b..8dbc7d82 100644 --- a/app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap @@ -3,43 +3,43 @@ #include / { - behaviors { - hp: behavior_hold_preferred { - compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; - #binding-cells = <2>; - flavor = "hold-preferred"; - tapping_term_ms = <300>; - bindings = <&kp>, <&kp>; - retro-tap; - }; - }; + behaviors { + hp: behavior_hold_preferred { + compatible = "zmk,behavior-hold-tap"; + label = "MOD_TAP"; + #binding-cells = <2>; + flavor = "hold-preferred"; + tapping_term_ms = <300>; + bindings = <&kp>, <&kp>; + retro-tap; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &hp LEFT_SHIFT F &none - &kp D &none>; - }; - }; + default_layer { + bindings = < + &hp LEFT_SHIFT F &none + &kp D &none>; + }; + }; }; &kscan { - events = < - /* tap */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* retro tap */ - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) - /* hold */ - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + /* tap */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* retro tap */ + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_RELEASE(0,0,10) + /* hold */ + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap index b5834e06..bb20a323 100644 --- a/app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,500) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap index 7560a05a..9ee237d3 100644 --- a/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,200) - ZMK_MOCK_PRESS(1,1,200) // non trigger key - /* timer fires */ - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_PRESS(1,1,200) // non trigger key + /* timer fires */ + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap index b915a6a9..f2f2f8bd 100644 --- a/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,200) - ZMK_MOCK_PRESS(1,0,200) // trigger key - /* timer fires */ - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_PRESS(1,0,200) // trigger key + /* timer fires */ + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/hold-preferred/7-positional/behavior_keymap.dtsi b/app/tests/hold-tap/hold-preferred/7-positional/behavior_keymap.dtsi index bf681004..71f3aba5 100644 --- a/app/tests/hold-tap/hold-preferred/7-positional/behavior_keymap.dtsi +++ b/app/tests/hold-tap/hold-preferred/7-positional/behavior_keymap.dtsi @@ -3,27 +3,27 @@ #include / { - behaviors { - ht_hold: behavior_hold_hold_tap { - compatible = "zmk,behavior-hold-tap"; - label = "hold_hold_tap"; - #binding-cells = <2>; - flavor = "hold-preferred"; - tapping-term-ms = <300>; - quick-tap-ms = <200>; - bindings = <&kp>, <&kp>; + behaviors { + ht_hold: behavior_hold_hold_tap { + compatible = "zmk,behavior-hold-tap"; + label = "hold_hold_tap"; + #binding-cells = <2>; + flavor = "hold-preferred"; + tapping-term-ms = <300>; + quick-tap-ms = <200>; + bindings = <&kp>, <&kp>; hold-trigger-key-positions = <2>; - }; - }; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &ht_hold LEFT_SHIFT F &ht_hold LEFT_CONTROL J - &kp D &kp E>; - }; - }; + default_layer { + bindings = < + &ht_hold LEFT_SHIFT F &ht_hold LEFT_CONTROL J + &kp D &kp E>; + }; + }; }; diff --git a/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap index b48332ff..f35b73ba 100644 --- a/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap @@ -6,12 +6,12 @@ &ht_hold { hold-trigger-on-release; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) // mod 1 - ZMK_MOCK_PRESS(0,1,10) // mod 2 - ZMK_MOCK_PRESS(1,1,10) // not trigger position - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) // mod 1 + ZMK_MOCK_PRESS(0,1,10) // mod 2 + ZMK_MOCK_PRESS(1,1,10) // not trigger position + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; diff --git a/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_posix_64.keymap index 77398582..0b4eb320 100644 --- a/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/7-positional/on-release-trigger/native_posix_64.keymap @@ -6,12 +6,12 @@ &ht_hold { hold-trigger-on-release; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) // mod 1 - ZMK_MOCK_PRESS(0,1,10) // mod 2 - ZMK_MOCK_PRESS(1,0,10) // trigger position - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) // mod 1 + ZMK_MOCK_PRESS(0,1,10) // mod 2 + ZMK_MOCK_PRESS(1,0,10) // trigger position + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; diff --git a/app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap index a6ac1507..78404536 100644 --- a/app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap @@ -4,13 +4,13 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) // trigger key - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,1,400) // not trigger key - /* timer fires */ - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) // trigger key + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,1,400) // not trigger key + /* timer fires */ + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file 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 13a58c3e..e28eb4c3 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 @@ -4,22 +4,22 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - /* tap */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* normal quick tap */ - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,400) - /* hold */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,400) - /* global quick tap */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + /* tap */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* normal quick tap */ + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_RELEASE(0,0,400) + /* hold */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,400) + /* global quick tap */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; 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-global-quick-tap/2-double-hold/native_posix_64.keymap index 37c37f55..69d691ce 100644 --- 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-global-quick-tap/2-double-hold/native_posix_64.keymap @@ -4,17 +4,17 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - /* hold the first mod tap */ - ZMK_MOCK_PRESS(0,0,400) - /* hold the second mod tap */ - ZMK_MOCK_PRESS(0,1,400) - /* press the normal key */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) + events = < + /* hold the first mod tap */ + ZMK_MOCK_PRESS(0,0,400) + /* hold the second mod tap */ + ZMK_MOCK_PRESS(0,1,400) + /* press the normal key */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) - /* release the hold taps */ - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + /* release the hold taps */ + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; 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 fee3361e..392a5f83 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 @@ -3,27 +3,27 @@ #include / { - behaviors { - hp: behavior_hold_preferred { - compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; - #binding-cells = <2>; - flavor = "hold-preferred"; - tapping-term-ms = <300>; - quick-tap-ms = <300>; - bindings = <&kp>, <&kp>; - global-quick-tap; - }; - }; + behaviors { + hp: behavior_hold_preferred { + compatible = "zmk,behavior-hold-tap"; + label = "MOD_TAP"; + #binding-cells = <2>; + flavor = "hold-preferred"; + tapping-term-ms = <300>; + quick-tap-ms = <300>; + bindings = <&kp>, <&kp>; + global-quick-tap; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &hp LEFT_SHIFT F &hp LEFT_CONTROL G - &kp D &none>; - }; - }; + default_layer { + bindings = < + &hp LEFT_SHIFT F &hp LEFT_CONTROL G + &kp D &none>; + }; + }; }; diff --git a/app/tests/hold-tap/hold-preferred/behavior_keymap.dtsi b/app/tests/hold-tap/hold-preferred/behavior_keymap.dtsi index 41c84e1e..da6b8362 100644 --- a/app/tests/hold-tap/hold-preferred/behavior_keymap.dtsi +++ b/app/tests/hold-tap/hold-preferred/behavior_keymap.dtsi @@ -5,26 +5,26 @@ / { - behaviors { - ht_hold: behavior_hold_hold_tap { - compatible = "zmk,behavior-hold-tap"; - label = "hold_hold_tap"; - #binding-cells = <2>; - flavor = "hold-preferred"; - tapping-term-ms = <300>; - quick-tap-ms = <200>; - bindings = <&kp>, <&kp>; - }; - }; + behaviors { + ht_hold: behavior_hold_hold_tap { + compatible = "zmk,behavior-hold-tap"; + label = "hold_hold_tap"; + #binding-cells = <2>; + flavor = "hold-preferred"; + tapping-term-ms = <300>; + quick-tap-ms = <200>; + bindings = <&kp>, <&kp>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &ht_hold LEFT_SHIFT F &ht_hold LEFT_CONTROL J - &kp D &kp RIGHT_CONTROL>; - }; - }; + default_layer { + bindings = < + &ht_hold LEFT_SHIFT F &ht_hold LEFT_CONTROL J + &kp D &kp RIGHT_CONTROL>; + }; + }; }; diff --git a/app/tests/hold-tap/tap-preferred/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/1-dn-up/native_posix_64.keymap index 38c8668c..5b725bb1 100644 --- a/app/tests/hold-tap/tap-preferred/1-dn-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/1-dn-up/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_posix_64.keymap index b5834e06..bb20a323 100644 --- a/app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/2-dn-timer-up/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,500) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap index a540353b..3a696af7 100644 --- a/app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/3a-moddn-dn-modup-up/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ - ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ + ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap index 76bb2fa3..5704ca4b 100644 --- a/app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/3b-moddn-dn-modup-timer-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ - ZMK_MOCK_PRESS(0,0,50) /*mt f-shift */ - ZMK_MOCK_RELEASE(1,1,300) - /*timer*/ - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ + ZMK_MOCK_PRESS(0,0,50) /*mt f-shift */ + ZMK_MOCK_RELEASE(1,1,300) + /*timer*/ + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap index 882f33aa..df066fb0 100644 --- a/app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/3c-kcdn-dn-kcup-up/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) /*d*/ - ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) /*d*/ + ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap index 0fc0b848..34645ad4 100644 --- a/app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) /* d */ - ZMK_MOCK_PRESS(0,0,100) /* mt f-shift */ - ZMK_MOCK_RELEASE(1,0,400) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) /* d */ + ZMK_MOCK_PRESS(0,0,100) /* mt f-shift */ + ZMK_MOCK_RELEASE(1,0,400) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap index 5d0fcbfb..9c108d32 100644 --- a/app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/4a-dn-htdn-timer-htup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,200) - ZMK_MOCK_PRESS(0,1,200) - /* timer fires */ - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_PRESS(0,1,200) + /* timer fires */ + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap index fca60ba8..9fd7cbf0 100644 --- a/app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,200) - ZMK_MOCK_PRESS(1,0,200) - /* timer fires */ - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_PRESS(1,0,200) + /* timer fires */ + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap index 5d0af9ca..f586b978 100644 --- a/app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_PRESS(1,0,100) - ZMK_MOCK_RELEASE(1,0,200) - /* timer fires */ - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_PRESS(1,0,100) + ZMK_MOCK_RELEASE(1,0,200) + /* timer fires */ + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap index 6b138352..3a5eab10 100644 --- a/app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/4c-dn-kcdn-kcup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* timer */ - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* timer */ + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap index 301ef0ac..cc7412f7 100644 --- a/app/tests/hold-tap/tap-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_PRESS(1,0,100) - ZMK_MOCK_RELEASE(0,0,200) - /* timer fires */ - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_PRESS(1,0,100) + ZMK_MOCK_RELEASE(0,0,200) + /* timer fires */ + ZMK_MOCK_RELEASE(1,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/5-quick-tap/native_posix_64.keymap index d895df02..bd431ceb 100644 --- a/app/tests/hold-tap/tap-preferred/5-quick-tap/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/5-quick-tap/native_posix_64.keymap @@ -5,10 +5,10 @@ &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap index b733e3a2..500d2670 100644 --- a/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap @@ -9,45 +9,45 @@ */ / { - behaviors { - tp_short: short_tap { - compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP_SHORT"; - #binding-cells = <2>; - flavor = "tap-preferred"; - tapping-term-ms = <100>; - quick-tap-ms = <200>; - bindings = <&kp>, <&kp>; - }; - tp_long: long_tap { - compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP_LONG"; - #binding-cells = <2>; - flavor = "tap-preferred"; - tapping-term-ms = <200>; - quick-tap-ms = <200>; - bindings = <&kp>, <&kp>; - }; - }; + behaviors { + tp_short: short_tap { + compatible = "zmk,behavior-hold-tap"; + label = "MOD_TAP_SHORT"; + #binding-cells = <2>; + flavor = "tap-preferred"; + tapping-term-ms = <100>; + quick-tap-ms = <200>; + bindings = <&kp>, <&kp>; + }; + tp_long: long_tap { + compatible = "zmk,behavior-hold-tap"; + label = "MOD_TAP_LONG"; + #binding-cells = <2>; + flavor = "tap-preferred"; + tapping-term-ms = <200>; + quick-tap-ms = <200>; + bindings = <&kp>, <&kp>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &tp_long LEFT_SHIFT F &tp_short LEFT_CONTROL J - &kp D &kp RIGHT_CONTROL>; - }; - }; + default_layer { + bindings = < + &tp_long LEFT_SHIFT F &tp_short LEFT_CONTROL J + &kp D &kp RIGHT_CONTROL>; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,20) - ZMK_MOCK_PRESS(0,1,20) - ZMK_MOCK_RELEASE(0,1,200) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,20) + ZMK_MOCK_PRESS(0,1,20) + ZMK_MOCK_RELEASE(0,1,200) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap index b5834e06..bb20a323 100644 --- a/app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/7-positional/2-dn-timer-up/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,500) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap index 7560a05a..9ee237d3 100644 --- a/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-ntgdn-timer-ntgup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,200) - ZMK_MOCK_PRESS(1,1,200) // non trigger key - /* timer fires */ - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_PRESS(1,1,200) // non trigger key + /* timer fires */ + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap index b915a6a9..f2f2f8bd 100644 --- a/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/7-positional/4a-dn-tgdn-timer-tgup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,200) - ZMK_MOCK_PRESS(1,0,200) // trigger key - /* timer fires */ - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_PRESS(1,0,200) // trigger key + /* timer fires */ + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-preferred/7-positional/behavior_keymap.dtsi b/app/tests/hold-tap/tap-preferred/7-positional/behavior_keymap.dtsi index e4be8d15..79a88eb2 100644 --- a/app/tests/hold-tap/tap-preferred/7-positional/behavior_keymap.dtsi +++ b/app/tests/hold-tap/tap-preferred/7-positional/behavior_keymap.dtsi @@ -3,27 +3,27 @@ #include / { - behaviors { - tp: behavior_tap_preferred { - compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; - #binding-cells = <2>; - flavor = "tap-preferred"; - tapping-term-ms = <300>; - quick-tap-ms = <200>; - bindings = <&kp>, <&kp>; + behaviors { + tp: behavior_tap_preferred { + compatible = "zmk,behavior-hold-tap"; + label = "MOD_TAP"; + #binding-cells = <2>; + flavor = "tap-preferred"; + tapping-term-ms = <300>; + quick-tap-ms = <200>; + bindings = <&kp>, <&kp>; hold-trigger-key-positions = <2>; - }; - }; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &tp LEFT_SHIFT F &tp LEFT_CONTROL J - &kp D &kp E>; - }; - }; + default_layer { + bindings = < + &tp LEFT_SHIFT F &tp LEFT_CONTROL J + &kp D &kp E>; + }; + }; }; diff --git a/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap index 504318f7..179b64ee 100644 --- a/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/7-positional/on-release-no-trigger/native_posix_64.keymap @@ -6,12 +6,12 @@ &tp { hold-trigger-on-release; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) // mod 1 - ZMK_MOCK_PRESS(0,1,10) // mod 2 - ZMK_MOCK_PRESS(1,1,10) // not trigger position - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) // mod 1 + ZMK_MOCK_PRESS(0,1,10) // mod 2 + ZMK_MOCK_PRESS(1,1,10) // not trigger position + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; diff --git a/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_posix_64.keymap index 7061eee7..e926b45c 100644 --- a/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/7-positional/on-release-trigger/native_posix_64.keymap @@ -6,12 +6,12 @@ &tp { hold-trigger-on-release; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) // mod 1 - ZMK_MOCK_PRESS(0,1,10) // mod 2 - ZMK_MOCK_PRESS(1,0,10) // trigger position - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) // mod 1 + ZMK_MOCK_PRESS(0,1,10) // mod 2 + ZMK_MOCK_PRESS(1,0,10) // trigger position + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; diff --git a/app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap index a6ac1507..78404536 100644 --- a/app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/7-positional/tgdn-dn-ntgdn-timer-ntgup-tgup-up/native_posix_64.keymap @@ -4,13 +4,13 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) // trigger key - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,1,400) // not trigger key - /* timer fires */ - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) // trigger key + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,1,400) // not trigger key + /* timer fires */ + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file 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 9965c9b3..5af001f6 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 @@ -4,22 +4,22 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - /* tap */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* normal quick tap */ - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,400) - /* hold */ - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,400) - /* global quick tap */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + /* tap */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* normal quick tap */ + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_RELEASE(0,0,400) + /* hold */ + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,400) + /* global quick tap */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; 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 37c37f55..69d691ce 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 @@ -4,17 +4,17 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - /* hold the first mod tap */ - ZMK_MOCK_PRESS(0,0,400) - /* hold the second mod tap */ - ZMK_MOCK_PRESS(0,1,400) - /* press the normal key */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) + events = < + /* hold the first mod tap */ + ZMK_MOCK_PRESS(0,0,400) + /* hold the second mod tap */ + ZMK_MOCK_PRESS(0,1,400) + /* press the normal key */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) - /* release the hold taps */ - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + /* release the hold taps */ + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; 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 4771ab75..02362ef2 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 @@ -3,27 +3,27 @@ #include / { - behaviors { - tp: behavior_tap_preferred { - compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; - #binding-cells = <2>; - flavor = "tap-preferred"; - tapping-term-ms = <300>; - quick-tap-ms = <300>; - bindings = <&kp>, <&kp>; - global-quick-tap; - }; - }; + behaviors { + tp: behavior_tap_preferred { + compatible = "zmk,behavior-hold-tap"; + label = "MOD_TAP"; + #binding-cells = <2>; + flavor = "tap-preferred"; + tapping-term-ms = <300>; + quick-tap-ms = <300>; + bindings = <&kp>, <&kp>; + global-quick-tap; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &tp LEFT_SHIFT F &tp LEFT_CONTROL C - &kp D &none>; - }; - }; + default_layer { + bindings = < + &tp LEFT_SHIFT F &tp LEFT_CONTROL C + &kp D &none>; + }; + }; }; diff --git a/app/tests/hold-tap/tap-preferred/behavior_keymap.dtsi b/app/tests/hold-tap/tap-preferred/behavior_keymap.dtsi index cdeb9596..df307740 100644 --- a/app/tests/hold-tap/tap-preferred/behavior_keymap.dtsi +++ b/app/tests/hold-tap/tap-preferred/behavior_keymap.dtsi @@ -3,26 +3,26 @@ #include / { - behaviors { - tp: behavior_tap_preferred { - compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; - #binding-cells = <2>; - flavor = "tap-preferred"; - tapping-term-ms = <300>; - quick-tap-ms = <200>; - bindings = <&kp>, <&kp>; - }; - }; + behaviors { + tp: behavior_tap_preferred { + compatible = "zmk,behavior-hold-tap"; + label = "MOD_TAP"; + #binding-cells = <2>; + flavor = "tap-preferred"; + tapping-term-ms = <300>; + quick-tap-ms = <200>; + bindings = <&kp>, <&kp>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &tp LEFT_SHIFT F &tp LEFT_CONTROL J - &kp D &kp RIGHT_CONTROL>; - }; - }; + default_layer { + bindings = < + &tp LEFT_SHIFT F &tp LEFT_CONTROL J + &kp D &kp RIGHT_CONTROL>; + }; + }; }; diff --git a/app/tests/hold-tap/tap-unless-interrupted/1-dn-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/1-dn-up/native_posix_64.keymap index 38c8668c..5b725bb1 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/1-dn-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/1-dn-up/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_posix_64.keymap index b5834e06..bb20a323 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/2-dn-timer-up/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,500) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,500) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_posix_64.keymap index a540353b..3a696af7 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/3a-moddn-dn-modup-up/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ - ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ + ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_posix_64.keymap index 76bb2fa3..5704ca4b 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/3b-moddn-dn-modup-timer-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ - ZMK_MOCK_PRESS(0,0,50) /*mt f-shift */ - ZMK_MOCK_RELEASE(1,1,300) - /*timer*/ - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,1,10) /*ctrl*/ + ZMK_MOCK_PRESS(0,0,50) /*mt f-shift */ + ZMK_MOCK_RELEASE(1,1,300) + /*timer*/ + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_posix_64.keymap index 882f33aa..df066fb0 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/3c-kcdn-dn-kcup-up/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) /*d*/ - ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) /*d*/ + ZMK_MOCK_PRESS(0,0,100) /*mt f-shift */ + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap index 0fc0b848..34645ad4 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/3d-kcdn-dn-kcup-timer-up/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) /* d */ - ZMK_MOCK_PRESS(0,0,100) /* mt f-shift */ - ZMK_MOCK_RELEASE(1,0,400) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) /* d */ + ZMK_MOCK_PRESS(0,0,100) /* mt f-shift */ + ZMK_MOCK_RELEASE(1,0,400) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_posix_64.keymap index 5d0fcbfb..9c108d32 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/4a-dn-htdn-timer-htup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,200) - ZMK_MOCK_PRESS(0,1,200) - /* timer fires */ - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_PRESS(0,1,200) + /* timer fires */ + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap index fca60ba8..9fd7cbf0 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/4a-dn-kcdn-timer-kcup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,200) - ZMK_MOCK_PRESS(1,0,200) - /* timer fires */ - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,200) + ZMK_MOCK_PRESS(1,0,200) + /* timer fires */ + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap index 5d0af9ca..f586b978 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/4b-dn-kcdn-kcup-timer-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_PRESS(1,0,100) - ZMK_MOCK_RELEASE(1,0,200) - /* timer fires */ - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_PRESS(1,0,100) + ZMK_MOCK_RELEASE(1,0,200) + /* timer fires */ + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_posix_64.keymap index 6b138352..3a5eab10 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/4c-dn-kcdn-kcup-up/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* timer */ - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* timer */ + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap index 301ef0ac..cc7412f7 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/4d-dn-kcdn-timer-up-kcup/native_posix_64.keymap @@ -4,11 +4,11 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,100) - ZMK_MOCK_PRESS(1,0,100) - ZMK_MOCK_RELEASE(0,0,200) - /* timer fires */ - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,100) + ZMK_MOCK_PRESS(1,0,100) + ZMK_MOCK_RELEASE(0,0,200) + /* timer fires */ + ZMK_MOCK_RELEASE(1,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_posix_64.keymap b/app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_posix_64.keymap index d895df02..bd431ceb 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-unless-interrupted/5-quick-tap/native_posix_64.keymap @@ -5,10 +5,10 @@ &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file 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 9965c9b3..5af001f6 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 @@ -4,22 +4,22 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - /* tap */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* normal quick tap */ - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,400) - /* hold */ - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,400) - /* global quick tap */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + /* tap */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* normal quick tap */ + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_RELEASE(0,0,400) + /* hold */ + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,400) + /* global quick tap */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; 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-global-quick-tap/2-double-hold/native_posix_64.keymap index 37c37f55..69d691ce 100644 --- 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-global-quick-tap/2-double-hold/native_posix_64.keymap @@ -4,17 +4,17 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - /* hold the first mod tap */ - ZMK_MOCK_PRESS(0,0,400) - /* hold the second mod tap */ - ZMK_MOCK_PRESS(0,1,400) - /* press the normal key */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) + events = < + /* hold the first mod tap */ + ZMK_MOCK_PRESS(0,0,400) + /* hold the second mod tap */ + ZMK_MOCK_PRESS(0,1,400) + /* press the normal key */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) - /* release the hold taps */ - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + /* release the hold taps */ + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; 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 6ca7ac72..029a8128 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 @@ -3,27 +3,27 @@ #include / { - behaviors { - ht_tui: behavior_hold_tap_tap_unless_interrupted { - compatible = "zmk,behavior-hold-tap"; - label = "hold_tap_tap_unless_interrupted"; - #binding-cells = <2>; - flavor = "tap-unless-interrupted"; - tapping-term-ms = <300>; - quick-tap-ms = <300>; - bindings = <&kp>, <&kp>; - global-quick-tap; - }; - }; + behaviors { + ht_tui: behavior_hold_tap_tap_unless_interrupted { + compatible = "zmk,behavior-hold-tap"; + label = "hold_tap_tap_unless_interrupted"; + #binding-cells = <2>; + flavor = "tap-unless-interrupted"; + tapping-term-ms = <300>; + quick-tap-ms = <300>; + bindings = <&kp>, <&kp>; + global-quick-tap; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &ht_tui LEFT_SHIFT F &ht_tui LEFT_CONTROL J - &kp D &kp RIGHT_CONTROL>; - }; - }; + default_layer { + bindings = < + &ht_tui LEFT_SHIFT F &ht_tui LEFT_CONTROL J + &kp D &kp RIGHT_CONTROL>; + }; + }; }; diff --git a/app/tests/hold-tap/tap-unless-interrupted/behavior_keymap.dtsi b/app/tests/hold-tap/tap-unless-interrupted/behavior_keymap.dtsi index 18f68d63..b24de6dd 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/behavior_keymap.dtsi +++ b/app/tests/hold-tap/tap-unless-interrupted/behavior_keymap.dtsi @@ -5,26 +5,26 @@ / { - behaviors { - ht_tui: behavior_hold_tap_tap_unless_interrupted { - compatible = "zmk,behavior-hold-tap"; - label = "hold_tap_tap_unless_interrupted"; - #binding-cells = <2>; - flavor = "tap-unless-interrupted"; - tapping-term-ms = <300>; - quick-tap-ms = <200>; - bindings = <&kp>, <&kp>; - }; - }; + behaviors { + ht_tui: behavior_hold_tap_tap_unless_interrupted { + compatible = "zmk,behavior-hold-tap"; + label = "hold_tap_tap_unless_interrupted"; + #binding-cells = <2>; + flavor = "tap-unless-interrupted"; + tapping-term-ms = <300>; + quick-tap-ms = <200>; + bindings = <&kp>, <&kp>; + }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &ht_tui LEFT_SHIFT F &ht_tui LEFT_CONTROL J - &kp D &kp RIGHT_CONTROL>; - }; - }; + default_layer { + bindings = < + &ht_tui LEFT_SHIFT F &ht_tui LEFT_CONTROL J + &kp D &kp RIGHT_CONTROL>; + }; + }; }; diff --git a/app/tests/key-repeat/behavior_keymap.dtsi b/app/tests/key-repeat/behavior_keymap.dtsi index 24902fc6..c8e2d9c4 100644 --- a/app/tests/key-repeat/behavior_keymap.dtsi +++ b/app/tests/key-repeat/behavior_keymap.dtsi @@ -3,15 +3,15 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label = "Default keymap"; + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; - default_layer { - bindings = < - &key_repeat &kp A - &kp LCTRL &kp C_VOL_UP - >; - }; - }; + default_layer { + bindings = < + &key_repeat &kp A + &kp LCTRL &kp C_VOL_UP + >; + }; + }; }; diff --git a/app/tests/key-repeat/ignore-other-usage-page-events/native_posix_64.keymap b/app/tests/key-repeat/ignore-other-usage-page-events/native_posix_64.keymap index b042e8e0..e4687573 100644 --- a/app/tests/key-repeat/ignore-other-usage-page-events/native_posix_64.keymap +++ b/app/tests/key-repeat/ignore-other-usage-page-events/native_posix_64.keymap @@ -4,12 +4,12 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/key-repeat/press-and-release-after-key-usage/native_posix.keymap b/app/tests/key-repeat/press-and-release-after-key-usage/native_posix.keymap index 98c8f6f8..9078f304 100644 --- a/app/tests/key-repeat/press-and-release-after-key-usage/native_posix.keymap +++ b/app/tests/key-repeat/press-and-release-after-key-usage/native_posix.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/key-repeat/press-and-release-after-key-usage/native_posix_64.keymap b/app/tests/key-repeat/press-and-release-after-key-usage/native_posix_64.keymap index 42f6514b..1d27770b 100644 --- a/app/tests/key-repeat/press-and-release-after-key-usage/native_posix_64.keymap +++ b/app/tests/key-repeat/press-and-release-after-key-usage/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,1,9000) - ZMK_MOCK_RELEASE(0,1,30) - ZMK_MOCK_PRESS(0,0,30) - ZMK_MOCK_RELEASE(0,0,3000) - >; + events = < + ZMK_MOCK_PRESS(0,1,9000) + ZMK_MOCK_RELEASE(0,1,30) + ZMK_MOCK_PRESS(0,0,30) + ZMK_MOCK_RELEASE(0,0,3000) + >; }; \ No newline at end of file diff --git a/app/tests/key-repeat/press-and-release-with-explicit-modifiers/native_posix_64.keymap b/app/tests/key-repeat/press-and-release-with-explicit-modifiers/native_posix_64.keymap index ab9622e4..109aed5a 100644 --- a/app/tests/key-repeat/press-and-release-with-explicit-modifiers/native_posix_64.keymap +++ b/app/tests/key-repeat/press-and-release-with-explicit-modifiers/native_posix_64.keymap @@ -4,12 +4,12 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/key-repeat/send-nothing-if-no-keys-pressed-yet/native_posix_64.keymap b/app/tests/key-repeat/send-nothing-if-no-keys-pressed-yet/native_posix_64.keymap index 9ff64468..0d2d0f6c 100644 --- a/app/tests/key-repeat/send-nothing-if-no-keys-pressed-yet/native_posix_64.keymap +++ b/app/tests/key-repeat/send-nothing-if-no-keys-pressed-yet/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/keypress/behavior_keymap.dtsi b/app/tests/keypress/behavior_keymap.dtsi index f0c5d0c2..52f9421c 100644 --- a/app/tests/keypress/behavior_keymap.dtsi +++ b/app/tests/keypress/behavior_keymap.dtsi @@ -3,15 +3,15 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp B &none - &none &none - >; - }; - }; + default_layer { + bindings = < + &kp B &none + &none &none + >; + }; + }; }; diff --git a/app/tests/keypress/kp-press-release/native_posix_64.keymap b/app/tests/keypress/kp-press-release/native_posix_64.keymap index c8e744ee..a414f34b 100644 --- a/app/tests/keypress/kp-press-release/native_posix_64.keymap +++ b/app/tests/keypress/kp-press-release/native_posix_64.keymap @@ -1,8 +1,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/keytoggle/behavior_keymap.dtsi b/app/tests/keytoggle/behavior_keymap.dtsi index 32712a8d..45d48164 100644 --- a/app/tests/keytoggle/behavior_keymap.dtsi +++ b/app/tests/keytoggle/behavior_keymap.dtsi @@ -3,15 +3,15 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kt B &none - &none &none - >; - }; - }; + default_layer { + bindings = < + &kt B &none + &none &none + >; + }; + }; }; diff --git a/app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap b/app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap index f4d03429..4f70b591 100644 --- a/app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap +++ b/app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap @@ -3,46 +3,46 @@ #include &kscan { - events = < + events = < /* Toggle LALT on */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* Tap TAB twice */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) /* Toggle LSHFT on */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) /* Tap TAB once */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) /* Toggle LALT off */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* Tap A */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) /* Toggle LSHFT off */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) /* Tap A */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,10) - >; + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + >; }; / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kt LALT &kp TAB - &kt LSHFT &kp A - >; - }; - }; + default_layer { + bindings = < + &kt LALT &kp TAB + &kt LSHFT &kp A + >; + }; + }; }; \ No newline at end of file diff --git a/app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap b/app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap index 0a4ad4ae..b07f297f 100644 --- a/app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap +++ b/app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap @@ -3,36 +3,36 @@ #include &kscan { - events = < + events = < /* Toggle LS(A) on */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* Toggle LS(A) off */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* Press A */ - ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(1,0,10) /* Toggle LS(A) on */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* Toggle LS(A) off */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) /* Release A */ - ZMK_MOCK_RELEASE(1,0,10) - >; + ZMK_MOCK_RELEASE(1,0,10) + >; }; / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kt LS(A) &trans - &kp A &trans - >; - }; - }; + default_layer { + bindings = < + &kt LS(A) &trans + &kp A &trans + >; + }; + }; }; \ No newline at end of file diff --git a/app/tests/keytoggle/kt-press-release-nkro/native_posix_64.keymap b/app/tests/keytoggle/kt-press-release-nkro/native_posix_64.keymap index e25d4b18..5c2d2028 100644 --- a/app/tests/keytoggle/kt-press-release-nkro/native_posix_64.keymap +++ b/app/tests/keytoggle/kt-press-release-nkro/native_posix_64.keymap @@ -1,10 +1,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/keytoggle/kt-press-release/native_posix_64.keymap b/app/tests/keytoggle/kt-press-release/native_posix_64.keymap index e25d4b18..5c2d2028 100644 --- a/app/tests/keytoggle/kt-press-release/native_posix_64.keymap +++ b/app/tests/keytoggle/kt-press-release/native_posix_64.keymap @@ -1,10 +1,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/macros/basic/native_posix_64.keymap b/app/tests/macros/basic/native_posix_64.keymap index a2812792..a34ba99f 100644 --- a/app/tests/macros/basic/native_posix_64.keymap +++ b/app/tests/macros/basic/native_posix_64.keymap @@ -10,5 +10,5 @@ #include "../behavior_keymap.dtsi" &kscan { - events = ; + events = ; }; \ No newline at end of file diff --git a/app/tests/macros/behavior_keymap.dtsi b/app/tests/macros/behavior_keymap.dtsi index 7399cd5b..90322e42 100644 --- a/app/tests/macros/behavior_keymap.dtsi +++ b/app/tests/macros/behavior_keymap.dtsi @@ -9,60 +9,60 @@ #include / { - macros { - ZMK_MACRO(abc_macro, - wait-ms = <10>; - tap-ms = <50>; - bindings = <&kp A &kp B &kp C>; - ) + macros { + ZMK_MACRO(abc_macro, + wait-ms = <10>; + tap-ms = <50>; + bindings = <&kp A &kp B &kp C>; + ) - ZMK_MACRO(hold_shift_macro, - bindings - = <¯o_press &kp LSHFT> - , <¯o_tap> - , <&kp D &kp O &kp G> - , <¯o_release &kp LSHFT> - ; - ) + ZMK_MACRO(hold_shift_macro, + bindings + = <¯o_press &kp LSHFT> + , <¯o_tap> + , <&kp D &kp O &kp G> + , <¯o_release &kp LSHFT> + ; + ) - ZMK_MACRO(custom_timing, - bindings - = <¯o_wait_time 50> - , <&kp A> - , <¯o_tap_time 20> - , <&kp B &kp C> - ; - ) + ZMK_MACRO(custom_timing, + bindings + = <¯o_wait_time 50> + , <&kp A> + , <¯o_tap_time 20> + , <&kp B &kp C> + ; + ) - ZMK_MACRO(dual_sequence_macro, - wait-ms = <10>; - tap-ms = <40>; - bindings - = <¯o_press &kp LALT> - , <¯o_tap> - , <&kp TAB> - , <¯o_pause_for_release> - , <¯o_release &kp LALT> - ; - ) - }; + ZMK_MACRO(dual_sequence_macro, + wait-ms = <10>; + tap-ms = <40>; + bindings + = <¯o_press &kp LALT> + , <¯o_tap> + , <&kp TAB> + , <¯o_pause_for_release> + , <¯o_release &kp LALT> + ; + ) + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &abc_macro &mo 1 - &hold_shift_macro &custom_timing>; - }; + default_layer { + bindings = < + &abc_macro &mo 1 + &hold_shift_macro &custom_timing>; + }; - extra_layer { - bindings = < - &dual_sequence_macro &trans - &kp TAB &none>; + extra_layer { + bindings = < + &dual_sequence_macro &trans + &kp TAB &none>; - }; + }; - }; + }; }; diff --git a/app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap b/app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap index e6ef4f49..bdf89abf 100644 --- a/app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap +++ b/app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap @@ -9,19 +9,19 @@ #include / { - macros { - ZMK_MACRO( - mo_mod_macro, - wait-ms = <0>; - tap-ms = <20>; - bindings - = <¯o_press &mo 1 &kp LSHFT> - , <¯o_pause_for_release> - , <¯o_release &mo 1 &kp LSHFT>; - ) - }; + macros { + ZMK_MACRO( + mo_mod_macro, + wait-ms = <0>; + tap-ms = <20>; + bindings + = <¯o_press &mo 1 &kp LSHFT> + , <¯o_pause_for_release> + , <¯o_release &mo 1 &kp LSHFT>; + ) + }; - behaviors { + behaviors { mth: macro_tap_hold { compatible = "zmk,behavior-hold-tap"; label = "MACRO_TAP_HOLD"; @@ -30,28 +30,28 @@ tapping-term-ms = <200>; bindings = <&mo_mod_macro>, <&kp>; }; - }; + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &mth 0 TAB &kp A - &kp B &kp C>; - }; + default_layer { + bindings = < + &mth 0 TAB &kp A + &kp B &kp C>; + }; - extra_layer { - bindings = < - &kp D &kp E - &kp F &kp G>; + extra_layer { + bindings = < + &kp D &kp E + &kp F &kp G>; - }; + }; - }; + }; }; &kscan { - events = ; + events = ; }; \ No newline at end of file diff --git a/app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap b/app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap index c5cde5b4..4cc60bf5 100644 --- a/app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap +++ b/app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap @@ -9,38 +9,38 @@ #include / { - macros { - ZMK_MACRO( - mo_mod_macro, - wait-ms = <0>; - tap-ms = <20>; - bindings - = <¯o_press &mo 1 &kp LSHFT> - , <¯o_pause_for_release> - , <¯o_release &mo 1 &kp LSHFT>; - ) - }; + macros { + ZMK_MACRO( + mo_mod_macro, + wait-ms = <0>; + tap-ms = <20>; + bindings + = <¯o_press &mo 1 &kp LSHFT> + , <¯o_pause_for_release> + , <¯o_release &mo 1 &kp LSHFT>; + ) + }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &mo_mod_macro &kp A - &kp B &kp C>; - }; + default_layer { + bindings = < + &mo_mod_macro &kp A + &kp B &kp C>; + }; - extra_layer { - bindings = < - &kp D &kp E - &kp F &kp G>; + extra_layer { + bindings = < + &kp D &kp E + &kp F &kp G>; - }; + }; - }; + }; }; &kscan { - events = ; + events = ; }; \ No newline at end of file diff --git a/app/tests/macros/press-mid-macro/native_posix_64.keymap b/app/tests/macros/press-mid-macro/native_posix_64.keymap index b8ae76f1..8010a8e7 100644 --- a/app/tests/macros/press-mid-macro/native_posix_64.keymap +++ b/app/tests/macros/press-mid-macro/native_posix_64.keymap @@ -10,5 +10,5 @@ #include "../behavior_keymap.dtsi" &kscan { - events = ; + events = ; }; \ No newline at end of file diff --git a/app/tests/macros/press-release/native_posix_64.keymap b/app/tests/macros/press-release/native_posix_64.keymap index 25467126..75333333 100644 --- a/app/tests/macros/press-release/native_posix_64.keymap +++ b/app/tests/macros/press-release/native_posix_64.keymap @@ -10,5 +10,5 @@ #include "../behavior_keymap.dtsi" &kscan { - events = ; + events = ; }; \ No newline at end of file diff --git a/app/tests/macros/timing-override/native_posix_64.keymap b/app/tests/macros/timing-override/native_posix_64.keymap index 343926a7..e5d35e88 100644 --- a/app/tests/macros/timing-override/native_posix_64.keymap +++ b/app/tests/macros/timing-override/native_posix_64.keymap @@ -10,5 +10,5 @@ #include "../behavior_keymap.dtsi" &kscan { - events = ; + events = ; }; \ No newline at end of file diff --git a/app/tests/macros/wait-macro-release/native_posix_64.keymap b/app/tests/macros/wait-macro-release/native_posix_64.keymap index 6dabaeca..394e4a88 100644 --- a/app/tests/macros/wait-macro-release/native_posix_64.keymap +++ b/app/tests/macros/wait-macro-release/native_posix_64.keymap @@ -10,5 +10,5 @@ #include "../behavior_keymap.dtsi" &kscan { - events = ; + events = ; }; \ No newline at end of file diff --git a/app/tests/mod-morph/1-no-morph/native_posix_64.keymap b/app/tests/mod-morph/1-no-morph/native_posix_64.keymap index fb939de5..916aa569 100644 --- a/app/tests/mod-morph/1-no-morph/native_posix_64.keymap +++ b/app/tests/mod-morph/1-no-morph/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + events = < + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; diff --git a/app/tests/mod-morph/2a-masked-morph/native_posix_64.keymap b/app/tests/mod-morph/2a-masked-morph/native_posix_64.keymap index 9ad50202..ec0591e5 100644 --- a/app/tests/mod-morph/2a-masked-morph/native_posix_64.keymap +++ b/app/tests/mod-morph/2a-masked-morph/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; diff --git a/app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_posix_64.keymap b/app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_posix_64.keymap index 74de8588..66fb1ed0 100644 --- a/app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_posix_64.keymap +++ b/app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_posix_64.keymap @@ -13,25 +13,25 @@ }; }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp LEFT_ALT &mod_morph - &kp LEFT_SHIFT &kp RIGHT_SHIFT - >; - }; - }; + default_layer { + bindings = < + &kp LEFT_ALT &mod_morph + &kp LEFT_SHIFT &kp RIGHT_SHIFT + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; diff --git a/app/tests/mod-morph/2c-masked-morph-and-explicit-mods/native_posix_64.keymap b/app/tests/mod-morph/2c-masked-morph-and-explicit-mods/native_posix_64.keymap index d5406e19..de1368bd 100644 --- a/app/tests/mod-morph/2c-masked-morph-and-explicit-mods/native_posix_64.keymap +++ b/app/tests/mod-morph/2c-masked-morph-and-explicit-mods/native_posix_64.keymap @@ -4,12 +4,12 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; diff --git a/app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_posix_64.keymap b/app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_posix_64.keymap index 7071e8cd..9b7f4fe1 100644 --- a/app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_posix_64.keymap +++ b/app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_posix_64.keymap @@ -3,13 +3,13 @@ #include &kscan { - events = < + events = < /* Shift + tap &mod_morph --> expect B (but get Shift + B) */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; / { @@ -24,22 +24,22 @@ }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp LEFT_SHIFT &mod_morph - &kp C &none - >; - }; + default_layer { + bindings = < + &kp LEFT_SHIFT &mod_morph + &kp C &none + >; + }; second_layer { - bindings = < - &trans &trans - &kp D &trans - >; - }; - }; + bindings = < + &trans &trans + &kp D &trans + >; + }; + }; }; diff --git a/app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_posix_64.keymap b/app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_posix_64.keymap index 96c2f270..e0c1d1e5 100644 --- a/app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_posix_64.keymap +++ b/app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_posix_64.keymap @@ -3,15 +3,15 @@ #include &kscan { - events = < + events = < /* Shift + hold &mod_morph --> expect and get D (no shift) */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,200) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,200) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; / { @@ -26,22 +26,22 @@ }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp LEFT_SHIFT &mod_morph - &kp C &none - >; - }; + default_layer { + bindings = < + &kp LEFT_SHIFT &mod_morph + &kp C &none + >; + }; second_layer { - bindings = < - &trans &trans - &kp D &trans - >; - }; - }; + bindings = < + &trans &trans + &kp D &trans + >; + }; + }; }; diff --git a/app/tests/mod-morph/3-unmasked-morph/native_posix_64.keymap b/app/tests/mod-morph/3-unmasked-morph/native_posix_64.keymap index a82d3ea7..a20c04d5 100644 --- a/app/tests/mod-morph/3-unmasked-morph/native_posix_64.keymap +++ b/app/tests/mod-morph/3-unmasked-morph/native_posix_64.keymap @@ -14,24 +14,24 @@ }; }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp LEFT_ALT &mod_morph - &kp LEFT_SHIFT &kp RIGHT_SHIFT - >; - }; - }; + default_layer { + bindings = < + &kp LEFT_ALT &mod_morph + &kp LEFT_SHIFT &kp RIGHT_SHIFT + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; diff --git a/app/tests/mod-morph/behavior_keymap.dtsi b/app/tests/mod-morph/behavior_keymap.dtsi index 09720d8d..2f880540 100644 --- a/app/tests/mod-morph/behavior_keymap.dtsi +++ b/app/tests/mod-morph/behavior_keymap.dtsi @@ -9,15 +9,15 @@ }; }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp LEFT_ALT &mod_morph - &kp LEFT_SHIFT &kp RIGHT_SHIFT - >; - }; - }; + default_layer { + bindings = < + &kp LEFT_ALT &mod_morph + &kp LEFT_SHIFT &kp RIGHT_SHIFT + >; + }; + }; }; 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 dbb2df5c..621945a8 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 @@ -4,25 +4,25 @@ &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) - >; + >; }; / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp LS(LA(LG(LEFT_CONTROL))) &kp LEFT_CONTROL - &kp A &none - >; - }; - }; + default_layer { + bindings = < + &kp LS(LA(LG(LEFT_CONTROL))) &kp LEFT_CONTROL + &kp A &none + >; + }; + }; }; diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap index b01c6257..d68f8921 100644 --- a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap +++ b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap @@ -4,24 +4,24 @@ &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) - >; + 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"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp LEFT_CONTROL &kp LEFT_CONTROL - &kp LEFT_SHIFT &none - >; - }; - }; + default_layer { + bindings = < + &kp LEFT_CONTROL &kp LEFT_CONTROL + &kp LEFT_SHIFT &none + >; + }; + }; }; diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap index 89930328..c2d12eb2 100644 --- a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap +++ b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap @@ -4,22 +4,22 @@ &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp LEFT_CONTROL &kp LEFT_CONTROL - &kp LEFT_SHIFT &none - >; - }; - }; + default_layer { + bindings = < + &kp LEFT_CONTROL &kp LEFT_CONTROL + &kp LEFT_SHIFT &none + >; + }; + }; }; diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap index acd55e83..7be62b94 100644 --- a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap +++ b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap @@ -4,24 +4,24 @@ &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp LEFT_CONTROL &kp LEFT_CONTROL - &kp LEFT_SHIFT &none - >; - }; - }; + default_layer { + bindings = < + &kp LEFT_CONTROL &kp LEFT_CONTROL + &kp LEFT_SHIFT &none + >; + }; + }; }; diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap index 7e1865a0..8d1d773e 100644 --- a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap +++ b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap @@ -4,25 +4,25 @@ &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) - >; + >; }; / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp LEFT_CONTROL &kp LEFT_CONTROL - &kp LEFT_SHIFT &none - >; - }; - }; + default_layer { + bindings = < + &kp LEFT_CONTROL &kp LEFT_CONTROL + &kp LEFT_SHIFT &none + >; + }; + }; }; diff --git a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap index e175d60e..87101d83 100644 --- a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap +++ b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap @@ -4,24 +4,24 @@ &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) - >; + 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) + >; }; / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp LC(A) &kp LS(B) - &kp LEFT_CONTROL &none - >; - }; - }; + default_layer { + bindings = < + &kp LC(A) &kp LS(B) + &kp LEFT_CONTROL &none + >; + }; + }; }; diff --git a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap index 8c4534f4..6b40fef1 100644 --- a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap +++ b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap @@ -4,24 +4,24 @@ &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp LC(A) &kp LS(B) - &none &none - >; - }; - }; + default_layer { + bindings = < + &kp LC(A) &kp LS(B) + &none &none + >; + }; + }; }; diff --git a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap index e82182c4..4b2ca139 100644 --- a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap +++ b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap @@ -4,24 +4,24 @@ &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp LC(A) &kp LS(B) - &kp LEFT_CONTROL &none - >; - }; - }; + default_layer { + bindings = < + &kp LC(A) &kp LS(B) + &kp LEFT_CONTROL &none + >; + }; + }; }; diff --git a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap index a36b85d2..a2564762 100644 --- a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap +++ b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap @@ -4,24 +4,24 @@ &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp LC(A) &kp LS(B) - &kp LEFT_CONTROL &none - >; - }; - }; + default_layer { + bindings = < + &kp LC(A) &kp LS(B) + &kp LEFT_CONTROL &none + >; + }; + }; }; diff --git a/app/tests/momentary-layer/1-normal/native_posix_64.keymap b/app/tests/momentary-layer/1-normal/native_posix_64.keymap index ed0e8ad1..387a1322 100644 --- a/app/tests/momentary-layer/1-normal/native_posix_64.keymap +++ b/app/tests/momentary-layer/1-normal/native_posix_64.keymap @@ -4,29 +4,29 @@ #include "../behavior_keymap.dtsi" / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp B &mo 1 - &none &none>; - }; + default_layer { + bindings = < + &kp B &mo 1 + &none &none>; + }; - layer_1 { - bindings = < - &kp C &trans - &none &none>; - }; - }; + layer_1 { + bindings = < + &kp C &trans + &none &none>; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + events = < + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; \ No newline at end of file diff --git a/app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap b/app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap index 9311fdee..776fc761 100644 --- a/app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap +++ b/app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap @@ -4,29 +4,29 @@ #include "../behavior_keymap.dtsi" / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp B &mo 1 - &none &none>; - }; + default_layer { + bindings = < + &kp B &mo 1 + &none &none>; + }; - layer_1 { - bindings = < - &kp C &none - &none &none>; - }; - }; + layer_1 { + bindings = < + &kp C &none + &none &none>; + }; + }; }; &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) - >; + 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) + >; }; \ No newline at end of file diff --git a/app/tests/momentary-layer/3-covered/native_posix_64.keymap b/app/tests/momentary-layer/3-covered/native_posix_64.keymap index 62ae301d..a7939d9e 100644 --- a/app/tests/momentary-layer/3-covered/native_posix_64.keymap +++ b/app/tests/momentary-layer/3-covered/native_posix_64.keymap @@ -7,27 +7,27 @@ this test verifies that the correct key is released when a layer is enabled "on and the original key is "covered". */ / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &trans &mo 1 - &trans &trans>; - }; + default_layer { + bindings = < + &trans &mo 1 + &trans &trans>; + }; - layer_1 { - bindings = < - &trans &kp A - &trans &trans>; - }; - }; + layer_1 { + bindings = < + &trans &kp A + &trans &trans>; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + events = < + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; diff --git a/app/tests/momentary-layer/4-nested/native_posix_64.keymap b/app/tests/momentary-layer/4-nested/native_posix_64.keymap index fd376d00..1f4f0aea 100644 --- a/app/tests/momentary-layer/4-nested/native_posix_64.keymap +++ b/app/tests/momentary-layer/4-nested/native_posix_64.keymap @@ -3,37 +3,37 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &none &mo 1 - &none &none>; - }; + default_layer { + bindings = < + &none &mo 1 + &none &none>; + }; - layer_1 { - bindings = < - &mo 2 &none - &none &none>; - }; + layer_1 { + bindings = < + &mo 2 &none + &none &none>; + }; - layer_2 { - bindings = < - &none &none - &kp B &none>; - }; - }; + layer_2 { + bindings = < + &none &none + &kp B &none>; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + events = < + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; \ No newline at end of file diff --git a/app/tests/momentary-layer/5-nested-early-key-release/native_posix_64.keymap b/app/tests/momentary-layer/5-nested-early-key-release/native_posix_64.keymap index c467aea3..4c8f7890 100644 --- a/app/tests/momentary-layer/5-nested-early-key-release/native_posix_64.keymap +++ b/app/tests/momentary-layer/5-nested-early-key-release/native_posix_64.keymap @@ -3,37 +3,37 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &none &mo 1 - &none &none>; - }; + default_layer { + bindings = < + &none &mo 1 + &none &none>; + }; - layer_1 { - bindings = < - &mo 2 &none - &none &none>; - }; + layer_1 { + bindings = < + &mo 2 &none + &none &none>; + }; - layer_2 { - bindings = < - &none &none - &kp B &none>; - }; - }; + layer_2 { + bindings = < + &none &none + &kp B &none>; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/momentary-layer/behavior_keymap.dtsi b/app/tests/momentary-layer/behavior_keymap.dtsi index 40bc31ec..63127a39 100644 --- a/app/tests/momentary-layer/behavior_keymap.dtsi +++ b/app/tests/momentary-layer/behavior_keymap.dtsi @@ -3,20 +3,20 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp B &mo 1 - &trans &trans>; - }; + default_layer { + bindings = < + &kp B &mo 1 + &trans &trans>; + }; - layer_1 { - bindings = < - &kp C_NEXT &trans - &trans &trans>; - }; - }; + layer_1 { + bindings = < + &kp C_NEXT &trans + &trans &trans>; + }; + }; }; diff --git a/app/tests/none/behavior_keymap.dtsi b/app/tests/none/behavior_keymap.dtsi index 40d863c1..7a4c099b 100644 --- a/app/tests/none/behavior_keymap.dtsi +++ b/app/tests/none/behavior_keymap.dtsi @@ -3,20 +3,20 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &none &mo 1 - &kp A &none>; - }; + default_layer { + bindings = < + &none &mo 1 + &kp A &none>; + }; - lower_layer { - bindings = < - &none &trans - &none &kp A>; - }; - }; + lower_layer { + bindings = < + &none &trans + &none &kp A>; + }; + }; }; diff --git a/app/tests/none/layered/native_posix_64.keymap b/app/tests/none/layered/native_posix_64.keymap index 597ca2db..b1e84c30 100644 --- a/app/tests/none/layered/native_posix_64.keymap +++ b/app/tests/none/layered/native_posix_64.keymap @@ -4,5 +4,5 @@ #include "../behavior_keymap.dtsi" &kscan { - events = ; + events = ; }; \ No newline at end of file diff --git a/app/tests/none/normal/native_posix.keymap b/app/tests/none/normal/native_posix.keymap index cbeb61dc..502f7ccc 100644 --- a/app/tests/none/normal/native_posix.keymap +++ b/app/tests/none/normal/native_posix.keymap @@ -4,5 +4,5 @@ #include "../behavior_keymap.dtsi" &kscan { - events = ; + events = ; }; \ No newline at end of file diff --git a/app/tests/none/normal/native_posix_64.keymap b/app/tests/none/normal/native_posix_64.keymap index cbeb61dc..502f7ccc 100644 --- a/app/tests/none/normal/native_posix_64.keymap +++ b/app/tests/none/normal/native_posix_64.keymap @@ -4,5 +4,5 @@ #include "../behavior_keymap.dtsi" &kscan { - events = ; + events = ; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/1-os-dn-up/native_posix_64.keymap b/app/tests/sticky-keys/1-os-dn-up/native_posix_64.keymap index 230e9566..f9612928 100644 --- a/app/tests/sticky-keys/1-os-dn-up/native_posix_64.keymap +++ b/app/tests/sticky-keys/1-os-dn-up/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,1200) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,1200) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap b/app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap index 5c1c2264..bc541824 100644 --- a/app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap +++ b/app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap @@ -3,38 +3,38 @@ #include &sk { - quick-release; + quick-release; }; / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &sk LEFT_CONTROL &kp A - &sk LEFT_SHIFT &sk LEFT_ALT>; - }; - }; + default_layer { + bindings = < + &sk LEFT_CONTROL &kp A + &sk LEFT_SHIFT &sk LEFT_ALT>; + }; + }; }; &kscan { - events = < - /* tap sk LEFT_CONTROL */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* tap sk LEFT_SHIFT */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - /* tap sk LEFT_ALT */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,10) - /* tap A */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* tap A (no sticky keys anymore) */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + events = < + /* tap sk LEFT_CONTROL */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* tap sk LEFT_SHIFT */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + /* tap sk LEFT_ALT */ + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + /* tap A */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* tap A (no sticky keys anymore) */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; diff --git a/app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap b/app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap index 79567de9..9121b188 100644 --- a/app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap +++ b/app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap @@ -3,41 +3,41 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &sk E &sl 1 - &kp A &kp B>; - }; + default_layer { + bindings = < + &sk E &sl 1 + &kp A &kp B>; + }; - lower_layer { - bindings = < - &sk LEFT_CONTROL &kp X - &sk LEFT_SHIFT &kp Z>; - }; - }; + lower_layer { + bindings = < + &sk LEFT_CONTROL &kp X + &sk LEFT_SHIFT &kp Z>; + }; + }; }; &kscan { - events = < - /* press sl lower_layer */ - ZMK_MOCK_PRESS(0,1,10) - /* tap sk LEFT_CONTROL */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* tap sk LEFT_SHIFT */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - /* release sl lower_layer */ - ZMK_MOCK_RELEASE(0,1,10) - /* tap A (with left control and left shift enabled) */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - /* tap A (no sticky keys anymore) */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + /* press sl lower_layer */ + ZMK_MOCK_PRESS(0,1,10) + /* tap sk LEFT_CONTROL */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* tap sk LEFT_SHIFT */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + /* release sl lower_layer */ + ZMK_MOCK_RELEASE(0,1,10) + /* tap A (with left control and left shift enabled) */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + /* tap A (no sticky keys anymore) */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; \ No newline at end of file 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 e89faa93..23ceeeb6 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 @@ -8,58 +8,58 @@ */ / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &sl 1 &kp A - &none &none>; - }; + default_layer { + bindings = < + &sl 1 &kp A + &none &none>; + }; - layer_1 { - bindings = < - &sl 2 &none - &none &none>; - }; + layer_1 { + bindings = < + &sl 2 &none + &none &none>; + }; - layer_2 { - bindings = < - &none &kp NUM_1 - &none &none>; - }; - }; + layer_2 { + bindings = < + &none &kp NUM_1 + &none &none>; + }; + }; }; &kscan { - events = < - /* press sl 1 */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* press sl 2 */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* press 1 */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* press A */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) + events = < + /* press sl 1 */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* press sl 2 */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* press 1 */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* press A */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) - /* repeat test to check if cleanup is done correctly */ - /* press sl 1 */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* press sl 2 */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* press 1 */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* press A */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) + /* repeat test to check if cleanup is done correctly */ + /* press sl 1 */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* press sl 2 */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* press 1 */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* press A */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) - >; + >; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_posix_64.keymap b/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_posix_64.keymap index f52a6bec..131e7069 100644 --- a/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_posix_64.keymap +++ b/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup-quick-release/native_posix_64.keymap @@ -4,23 +4,23 @@ #include "../behavior_keymap.dtsi" &sk { - quick-release; + quick-release; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - /* second key is pressed shortly after the first. It should not be capitalized. */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(1,1,10) + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + /* second key is pressed shortly after the first. It should not be capitalized. */ + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(1,1,10) - /* repeat test to check if cleanup is done correctly */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + /* repeat test to check if cleanup is done correctly */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_posix_64.keymap b/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_posix_64.keymap index 63aca99b..4a0c50c8 100644 --- a/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_posix_64.keymap +++ b/app/tests/sticky-keys/2-os-dn-up-kcdn-kcup/native_posix_64.keymap @@ -4,16 +4,16 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) - /* repeat test to check if cleanup is done correctly */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + /* repeat test to check if cleanup is done correctly */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; \ No newline at end of file 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 18d09ebc..39020751 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 @@ -8,45 +8,45 @@ */ / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &sk E &sl 1 - &kp A &kp B>; - }; + default_layer { + bindings = < + &sk E &sl 1 + &kp A &kp B>; + }; - lower_layer { - bindings = < - &sk LEFT_CONTROL &kp X - &kp Y &kp Z>; - }; - }; + lower_layer { + bindings = < + &sk LEFT_CONTROL &kp X + &kp Y &kp Z>; + }; + }; }; &kscan { - events = < - /* press sl 1 */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* press X */ - ZMK_MOCK_PRESS(0,1,10) - /* press A */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) + events = < + /* press sl 1 */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* press X */ + ZMK_MOCK_PRESS(0,1,10) + /* press A */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(1,0,10) - /* repeat test to check if cleanup is done correctly */ - /* press sl 1 */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* press X */ - ZMK_MOCK_PRESS(0,1,10) - /* press Y */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(0,1,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + /* repeat test to check if cleanup is done correctly */ + /* press sl 1 */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* press X */ + ZMK_MOCK_PRESS(0,1,10) + /* press Y */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(0,1,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_posix_64.keymap b/app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_posix_64.keymap index 47600269..c635dade 100644 --- a/app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_posix_64.keymap +++ b/app/tests/sticky-keys/3a-os-dn-kcdn-kcup-up/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_posix_64.keymap b/app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_posix_64.keymap index 2fb661a7..e629d270 100644 --- a/app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_posix_64.keymap +++ b/app/tests/sticky-keys/3b-os-dn-kcdn-up-kcup/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_posix_64.keymap b/app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_posix_64.keymap index 92fd1e0a..2404a582 100644 --- a/app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_posix_64.keymap +++ b/app/tests/sticky-keys/4-os-dn-up-kcdn-timer-kcup/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,800) - ZMK_MOCK_PRESS(1,0,400) - ZMK_MOCK_RELEASE(1,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,800) + ZMK_MOCK_PRESS(1,0,400) + ZMK_MOCK_RELEASE(1,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_posix_64.keymap b/app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_posix_64.keymap index 1daa6c4f..7cf04b7d 100644 --- a/app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_posix_64.keymap +++ b/app/tests/sticky-keys/5-os-kcdn-dn-kcup-up/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(1,0,10) - ZMK_MOCK_RELEASE(0,0,1100) - >; + events = < + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(1,0,10) + ZMK_MOCK_RELEASE(0,0,1100) + >; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_posix_64.keymap b/app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_posix_64.keymap index 1be65a5b..a22d0a5a 100644 --- a/app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_posix_64.keymap +++ b/app/tests/sticky-keys/7-os-dn-up-kc1dn-kc2dn-kc1up-kc2up/native_posix_64.keymap @@ -4,12 +4,12 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,0,100) - ZMK_MOCK_RELEASE(1,1,100) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,0,100) + ZMK_MOCK_RELEASE(1,1,100) + >; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap b/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap index 6d88a9ea..4da4ad98 100644 --- a/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap +++ b/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap @@ -3,54 +3,54 @@ #include &sk { - quick-release; + quick-release; }; / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &sk LEFT_SHIFT &sl 1 - &kp A &kp B>; - }; + default_layer { + bindings = < + &sk LEFT_SHIFT &sl 1 + &kp A &kp B>; + }; - lower_layer { - bindings = < - &sk LEFT_CONTROL &kp X - &kp Y &kp Z>; - }; - }; + lower_layer { + bindings = < + &sk LEFT_CONTROL &kp X + &kp Y &kp Z>; + }; + }; }; &kscan { - events = < - /* tap sl lower_layer */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* tap sk LEFT_CONTROL */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* tap A */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - /* tap B */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,10) + events = < + /* tap sl lower_layer */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* tap sk LEFT_CONTROL */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* tap A */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + /* tap B */ + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) - /* tap sk LEFT_SHIFT */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* tap sl lower_layer */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* tap Y */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - /* tap B */ - ZMK_MOCK_PRESS(1,1,10) - ZMK_MOCK_RELEASE(1,1,10) - >; + /* tap sk LEFT_SHIFT */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* tap sl lower_layer */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* tap Y */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + /* tap B */ + ZMK_MOCK_PRESS(1,1,10) + ZMK_MOCK_RELEASE(1,1,10) + >; }; diff --git a/app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap b/app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap index a90bb32e..d9c49014 100644 --- a/app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap +++ b/app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap @@ -3,45 +3,45 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &sk E &sl 1 - &kp A &kp B>; - }; + default_layer { + bindings = < + &sk E &sl 1 + &kp A &kp B>; + }; - lower_layer { - bindings = < - &sk LEFT_CONTROL &kp X - &kp Y &kp Z>; - }; - }; + lower_layer { + bindings = < + &sk LEFT_CONTROL &kp X + &kp Y &kp Z>; + }; + }; }; &kscan { - events = < - /* tap sl lower_layer */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* tap sk LEFT_CONTROL */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* tap A */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) + events = < + /* tap sl lower_layer */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* tap sk LEFT_CONTROL */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* tap A */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) - /* repeat */ - /* tap sl */ - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - /* tap sk */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* tap A */ - ZMK_MOCK_PRESS(1,0,10) - ZMK_MOCK_RELEASE(1,0,10) - >; + /* repeat */ + /* tap sl */ + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + /* tap sk */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* tap A */ + ZMK_MOCK_PRESS(1,0,10) + ZMK_MOCK_RELEASE(1,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap b/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap index f811f7e9..74678256 100644 --- a/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap +++ b/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap @@ -3,25 +3,25 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &sk LEFT_SHIFT &none - &none &none - >; - }; - }; + default_layer { + bindings = < + &sk LEFT_SHIFT &none + &none &none + >; + }; + }; }; &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* the sticky key is pressed again, so the previous one must be cancelled */ - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,1200) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* the sticky key is pressed again, so the previous one must be cancelled */ + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,1200) + >; }; \ No newline at end of file diff --git a/app/tests/sticky-keys/behavior_keymap.dtsi b/app/tests/sticky-keys/behavior_keymap.dtsi index f1277009..9322cb14 100644 --- a/app/tests/sticky-keys/behavior_keymap.dtsi +++ b/app/tests/sticky-keys/behavior_keymap.dtsi @@ -3,20 +3,20 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &sk E &mo 1 - &kp A &kp B>; - }; + default_layer { + bindings = < + &sk E &mo 1 + &kp A &kp B>; + }; - lower_layer { - bindings = < - &sk LEFT_CONTROL &kp X - &kp Y &kp Z>; - }; - }; + lower_layer { + bindings = < + &sk LEFT_CONTROL &kp X + &kp Y &kp Z>; + }; + }; }; diff --git a/app/tests/tap-dance/1a-tap1/native_posix_64.keymap b/app/tests/tap-dance/1a-tap1/native_posix_64.keymap index 1e5dff06..4e65cfa1 100644 --- a/app/tests/tap-dance/1a-tap1/native_posix_64.keymap +++ b/app/tests/tap-dance/1a-tap1/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,200) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,200) + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/1b-tap2/native_posix_64.keymap b/app/tests/tap-dance/1b-tap2/native_posix_64.keymap index 5674c4ea..47fa8c33 100644 --- a/app/tests/tap-dance/1b-tap2/native_posix_64.keymap +++ b/app/tests/tap-dance/1b-tap2/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + events = < ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,200) - >; + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,200) + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/1c-tap3/native_posix_64.keymap b/app/tests/tap-dance/1c-tap3/native_posix_64.keymap index 142b8236..6b01dfff 100644 --- a/app/tests/tap-dance/1c-tap3/native_posix_64.keymap +++ b/app/tests/tap-dance/1c-tap3/native_posix_64.keymap @@ -4,12 +4,12 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + events = < ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,200) - >; + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,200) + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/2a-hold1/native_posix_64.keymap b/app/tests/tap-dance/2a-hold1/native_posix_64.keymap index bcfc21d2..c16f875b 100644 --- a/app/tests/tap-dance/2a-hold1/native_posix_64.keymap +++ b/app/tests/tap-dance/2a-hold1/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) - >; + events = < + ZMK_MOCK_PRESS(0,0,400) + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/2b-hold2/native_posix_64.keymap b/app/tests/tap-dance/2b-hold2/native_posix_64.keymap index 6691437e..49948886 100644 --- a/app/tests/tap-dance/2b-hold2/native_posix_64.keymap +++ b/app/tests/tap-dance/2b-hold2/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) - >; + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/2c-hold3/native_posix_64.keymap b/app/tests/tap-dance/2c-hold3/native_posix_64.keymap index 942ecfc0..7bedd650 100644 --- a/app/tests/tap-dance/2c-hold3/native_posix_64.keymap +++ b/app/tests/tap-dance/2c-hold3/native_posix_64.keymap @@ -4,12 +4,12 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + events = < ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,0,400) - ZMK_MOCK_RELEASE(0,0,10) - >; + ZMK_MOCK_RELEASE(0,0,10) + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/3a-tap-int-mid/native_posix_64.keymap b/app/tests/tap-dance/3a-tap-int-mid/native_posix_64.keymap index 8a62430c..903b9a88 100644 --- a/app/tests/tap-dance/3a-tap-int-mid/native_posix_64.keymap +++ b/app/tests/tap-dance/3a-tap-int-mid/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) + events = < + ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(1,0,10) - >; + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/3b-tap-int-seq/native_posix_64.keymap b/app/tests/tap-dance/3b-tap-int-seq/native_posix_64.keymap index 4a76bdb0..7d10b715 100644 --- a/app/tests/tap-dance/3b-tap-int-seq/native_posix_64.keymap +++ b/app/tests/tap-dance/3b-tap-int-seq/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) + events = < + ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(0,1,10) - >; + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/3c-tap-int-after/native_posix_64.keymap b/app/tests/tap-dance/3c-tap-int-after/native_posix_64.keymap index e1b6d979..571a877f 100644 --- a/app/tests/tap-dance/3c-tap-int-after/native_posix_64.keymap +++ b/app/tests/tap-dance/3c-tap-int-after/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) + events = < + ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,1,10) - >; + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/3d-hold-int-mid/native_posix_64.keymap b/app/tests/tap-dance/3d-hold-int-mid/native_posix_64.keymap index 55a98d36..0220977a 100644 --- a/app/tests/tap-dance/3d-hold-int-mid/native_posix_64.keymap +++ b/app/tests/tap-dance/3d-hold-int-mid/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,400) + events = < + ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,1,10) ZMK_MOCK_RELEASE(0,0,10) - >; + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/3e-hold-int-seq/native_posix_64.keymap b/app/tests/tap-dance/3e-hold-int-seq/native_posix_64.keymap index b31e92dc..58595291 100644 --- a/app/tests/tap-dance/3e-hold-int-seq/native_posix_64.keymap +++ b/app/tests/tap-dance/3e-hold-int-seq/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,400) + events = < + ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_RELEASE(0,1,10) - >; + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/3f-hold-int-after/native_posix_64.keymap b/app/tests/tap-dance/3f-hold-int-after/native_posix_64.keymap index 6397fbb3..78770b13 100644 --- a/app/tests/tap-dance/3f-hold-int-after/native_posix_64.keymap +++ b/app/tests/tap-dance/3f-hold-int-after/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,400) + events = < + ZMK_MOCK_PRESS(0,0,400) ZMK_MOCK_RELEASE(0,0,10) ZMK_MOCK_PRESS(0,1,10) ZMK_MOCK_RELEASE(0,1,10) - >; + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/4a-single/native_posix_64.keymap b/app/tests/tap-dance/4a-single/native_posix_64.keymap index 348a6827..d473a7d2 100644 --- a/app/tests/tap-dance/4a-single/native_posix_64.keymap +++ b/app/tests/tap-dance/4a-single/native_posix_64.keymap @@ -4,8 +4,8 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,1,10) - >; + events = < + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,1,10) + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/5a-tdint-mid/native_posix_64.keymap b/app/tests/tap-dance/5a-tdint-mid/native_posix_64.keymap index 2188fd02..79bdf2f7 100644 --- a/app/tests/tap-dance/5a-tdint-mid/native_posix_64.keymap +++ b/app/tests/tap-dance/5a-tdint-mid/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) + events = < + ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_PRESS(1,1,10) ZMK_MOCK_RELEASE(1,1,10) ZMK_MOCK_RELEASE(1,0,200) - >; + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/5b-tdint-seq/native_posix_64.keymap b/app/tests/tap-dance/5b-tdint-seq/native_posix_64.keymap index 320b7199..012d932d 100644 --- a/app/tests/tap-dance/5b-tdint-seq/native_posix_64.keymap +++ b/app/tests/tap-dance/5b-tdint-seq/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) + events = < + ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_PRESS(1,1,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_RELEASE(1,1,200) - >; + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/5c-tdint-after/native_posix_64.keymap b/app/tests/tap-dance/5c-tdint-after/native_posix_64.keymap index 17e538bd..fea96a56 100644 --- a/app/tests/tap-dance/5c-tdint-after/native_posix_64.keymap +++ b/app/tests/tap-dance/5c-tdint-after/native_posix_64.keymap @@ -4,10 +4,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) + events = < + ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_PRESS(1,1,10) ZMK_MOCK_RELEASE(1,1,200) - >; + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/5d-tdint-multiple/native_posix_64.keymap b/app/tests/tap-dance/5d-tdint-multiple/native_posix_64.keymap index 150f6d05..f98be05f 100644 --- a/app/tests/tap-dance/5d-tdint-multiple/native_posix_64.keymap +++ b/app/tests/tap-dance/5d-tdint-multiple/native_posix_64.keymap @@ -4,12 +4,12 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(1,0,10) + events = < + ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,10) ZMK_MOCK_PRESS(1,1,10) ZMK_MOCK_RELEASE(1,1,10) ZMK_MOCK_PRESS(1,0,10) ZMK_MOCK_RELEASE(1,0,200) - >; + >; }; \ No newline at end of file diff --git a/app/tests/tap-dance/6-combo-tap2/native_posix_64.keymap b/app/tests/tap-dance/6-combo-tap2/native_posix_64.keymap index 72b6744a..a8a82fd9 100644 --- a/app/tests/tap-dance/6-combo-tap2/native_posix_64.keymap +++ b/app/tests/tap-dance/6-combo-tap2/native_posix_64.keymap @@ -4,14 +4,14 @@ #include "../behavior_keymap.dtsi" &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) - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_PRESS(0,1,10) - ZMK_MOCK_RELEASE(0,0,10) - ZMK_MOCK_RELEASE(0,1,200) - >; + 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) + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_PRESS(0,1,10) + ZMK_MOCK_RELEASE(0,0,10) + ZMK_MOCK_RELEASE(0,1,200) + >; }; \ No newline at end of file diff --git a/app/tests/to-layer/behavior_keymap.dtsi b/app/tests/to-layer/behavior_keymap.dtsi index 81e7e809..663e897d 100644 --- a/app/tests/to-layer/behavior_keymap.dtsi +++ b/app/tests/to-layer/behavior_keymap.dtsi @@ -3,20 +3,20 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &to 0 &to 1 - &kp A &kp S>; - }; + default_layer { + bindings = < + &to 0 &to 1 + &kp A &kp S>; + }; - second_layer { - bindings = < - &to 0 &to 1 - &kp J &kp K>; - }; - }; + second_layer { + bindings = < + &to 0 &to 1 + &kp J &kp K>; + }; + }; }; diff --git a/app/tests/to-layer/normal/native_posix_64.keymap b/app/tests/to-layer/normal/native_posix_64.keymap index 056341f7..4cb23809 100644 --- a/app/tests/to-layer/normal/native_posix_64.keymap +++ b/app/tests/to-layer/normal/native_posix_64.keymap @@ -11,19 +11,19 @@ // To layer 0 -- does nothing &kscan { - events = ; + events = ; }; \ No newline at end of file diff --git a/app/tests/toggle-layer/behavior_keymap.dtsi b/app/tests/toggle-layer/behavior_keymap.dtsi index b9c0d4a4..1ecf8599 100644 --- a/app/tests/toggle-layer/behavior_keymap.dtsi +++ b/app/tests/toggle-layer/behavior_keymap.dtsi @@ -3,26 +3,26 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp B &tog 1 - &kp D &kp G>; - }; + default_layer { + bindings = < + &kp B &tog 1 + &kp D &kp G>; + }; - lower_layer { - bindings = < - &kp C_NEXT &trans - &kp L &kp J>; - }; + lower_layer { + bindings = < + &kp C_NEXT &trans + &kp L &kp J>; + }; - raise_layer { - bindings = < - &kp W &kp U - &kp X &kp M>; - }; - }; + raise_layer { + bindings = < + &kp W &kp U + &kp X &kp M>; + }; + }; }; diff --git a/app/tests/toggle-layer/early-key-release/native_posix_64.keymap b/app/tests/toggle-layer/early-key-release/native_posix_64.keymap index 6c293390..0a0c88ea 100644 --- a/app/tests/toggle-layer/early-key-release/native_posix_64.keymap +++ b/app/tests/toggle-layer/early-key-release/native_posix_64.keymap @@ -4,6 +4,6 @@ #include "../behavior_keymap.dtsi" &kscan { - events = ; + events = ; }; \ No newline at end of file diff --git a/app/tests/toggle-layer/normal/native_posix_64.keymap b/app/tests/toggle-layer/normal/native_posix_64.keymap index 9df9d649..97bdd179 100644 --- a/app/tests/toggle-layer/normal/native_posix_64.keymap +++ b/app/tests/toggle-layer/normal/native_posix_64.keymap @@ -4,5 +4,5 @@ #include "../behavior_keymap.dtsi" &kscan { - events = ; + events = ; }; \ No newline at end of file diff --git a/app/tests/transparent/behavior_keymap.dtsi b/app/tests/transparent/behavior_keymap.dtsi index 2a7e783a..dd5ded90 100644 --- a/app/tests/transparent/behavior_keymap.dtsi +++ b/app/tests/transparent/behavior_keymap.dtsi @@ -3,20 +3,20 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &trans &mo 1 - &kp A &none>; - }; + default_layer { + bindings = < + &trans &mo 1 + &kp A &none>; + }; - lower_layer { - bindings = < - &trans &trans - &trans &kp A>; - }; - }; + lower_layer { + bindings = < + &trans &trans + &trans &kp A>; + }; + }; }; diff --git a/app/tests/transparent/layered/native_posix_64.keymap b/app/tests/transparent/layered/native_posix_64.keymap index 597ca2db..b1e84c30 100644 --- a/app/tests/transparent/layered/native_posix_64.keymap +++ b/app/tests/transparent/layered/native_posix_64.keymap @@ -4,5 +4,5 @@ #include "../behavior_keymap.dtsi" &kscan { - events = ; + events = ; }; \ No newline at end of file diff --git a/app/tests/transparent/normal/native_posix_64.keymap b/app/tests/transparent/normal/native_posix_64.keymap index cbeb61dc..502f7ccc 100644 --- a/app/tests/transparent/normal/native_posix_64.keymap +++ b/app/tests/transparent/normal/native_posix_64.keymap @@ -4,5 +4,5 @@ #include "../behavior_keymap.dtsi" &kscan { - events = ; + events = ; }; \ No newline at end of file diff --git a/app/tests/wpm/1-single_keypress/native_posix_64.keymap b/app/tests/wpm/1-single_keypress/native_posix_64.keymap index 2aa52c16..2b113409 100644 --- a/app/tests/wpm/1-single_keypress/native_posix_64.keymap +++ b/app/tests/wpm/1-single_keypress/native_posix_64.keymap @@ -1,10 +1,10 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - /* Wait for the worker to trigger and reset after 5 seconds, followed by a 0 at 6 seconds */ - ZMK_MOCK_PRESS(0,0,6000) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + /* Wait for the worker to trigger and reset after 5 seconds, followed by a 0 at 6 seconds */ + ZMK_MOCK_PRESS(0,0,6000) + >; }; \ No newline at end of file diff --git a/app/tests/wpm/2-multiple_keypress/native_posix_64.keymap b/app/tests/wpm/2-multiple_keypress/native_posix_64.keymap index 3cfab946..869a5208 100644 --- a/app/tests/wpm/2-multiple_keypress/native_posix_64.keymap +++ b/app/tests/wpm/2-multiple_keypress/native_posix_64.keymap @@ -1,15 +1,15 @@ #include "../behavior_keymap.dtsi" &kscan { - events = < - ZMK_MOCK_PRESS(0,0,10) - ZMK_MOCK_RELEASE(0,0,10) - //1st WPM worker call - 12wpm - 1 key press in 1 second - ZMK_MOCK_PRESS(0,0,1000) - ZMK_MOCK_RELEASE(0,0,10) - // 2nd WPM worker call - 12wpm - 2 key press in 2 second - // note there is no event for this as WPM hasn't changed - // 3rd WPM worker call - 8wpm - 2 key press in 3 seconds - ZMK_MOCK_PRESS(0,0,2000) - >; + events = < + ZMK_MOCK_PRESS(0,0,10) + ZMK_MOCK_RELEASE(0,0,10) + //1st WPM worker call - 12wpm - 1 key press in 1 second + ZMK_MOCK_PRESS(0,0,1000) + ZMK_MOCK_RELEASE(0,0,10) + // 2nd WPM worker call - 12wpm - 2 key press in 2 second + // note there is no event for this as WPM hasn't changed + // 3rd WPM worker call - 8wpm - 2 key press in 3 seconds + ZMK_MOCK_PRESS(0,0,2000) + >; }; \ No newline at end of file diff --git a/app/tests/wpm/behavior_keymap.dtsi b/app/tests/wpm/behavior_keymap.dtsi index f0c5d0c2..52f9421c 100644 --- a/app/tests/wpm/behavior_keymap.dtsi +++ b/app/tests/wpm/behavior_keymap.dtsi @@ -3,15 +3,15 @@ #include / { - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; - default_layer { - bindings = < - &kp B &none - &none &none - >; - }; - }; + default_layer { + bindings = < + &kp B &none + &none &none + >; + }; + }; }; diff --git a/docs/blog/2020-10-03-bootloader-fix.md b/docs/blog/2020-10-03-bootloader-fix.md index 8a9fd7f8..ec1d7b0b 100644 --- a/docs/blog/2020-10-03-bootloader-fix.md +++ b/docs/blog/2020-10-03-bootloader-fix.md @@ -175,19 +175,19 @@ do is shift back the settings area and code space `0xC000` bytes. We'll apply this to all of the `.dts` files for the boards that were affected by this issue. ```diff - code_partition: partition@26000 { - label = "code_partition"; -- reg = <0x00026000 0x000d2000>; -+ reg = <0x00026000 0x000c6000>; - }; + code_partition: partition@26000 { + label = "code_partition"; +- reg = <0x00026000 0x000d2000>; ++ reg = <0x00026000 0x000c6000>; + }; -- storage_partition: partition@f8000 { -+ storage_partition: partition@ec000 { - label = "storage"; -- reg = <0x000f8000 0x00008000>; -+ reg = <0x000ec000 0x00008000>; - }; +- storage_partition: partition@f8000 { ++ storage_partition: partition@ec000 { + label = "storage"; +- reg = <0x000f8000 0x00008000>; ++ reg = <0x000ec000 0x00008000>; + }; ``` And with those changes, we should no longer run into this issue! In the process diff --git a/docs/docs/behaviors/hold-tap.md b/docs/docs/behaviors/hold-tap.md index f267e4a4..f0096606 100644 --- a/docs/docs/behaviors/hold-tap.md +++ b/docs/docs/behaviors/hold-tap.md @@ -57,14 +57,14 @@ For example, the following hold-tap configuration enables `global-quick-tap` wit ``` gqt: global-quick-tap { - compatible = "zmk,behavior-hold-tap"; - label = "GLOBAL_QUICK_TAP"; - #binding-cells = <2>; - flavor = "tap-preferred"; - tapping-term-ms = <200>; - quick-tap-ms = <125>; - global-quick-tap; - bindings = <&kp>, <&kp>; + compatible = "zmk,behavior-hold-tap"; + label = "GLOBAL_QUICK_TAP"; + #binding-cells = <2>; + flavor = "tap-preferred"; + tapping-term-ms = <200>; + quick-tap-ms = <125>; + global-quick-tap; + bindings = <&kp>, <&kp>; }; ``` @@ -80,7 +80,7 @@ For example, if you press `&mt LEFT_SHIFT A` and then release it without pressin ``` &mt { - retro-tap; + retro-tap; }; ``` @@ -101,28 +101,28 @@ See the following example, which uses a hold-tap behavior definition, configured #include / { - behaviors { - pht: positional_hold_tap { - compatible = "zmk,behavior-hold-tap"; - label = "POSITIONAL_HOLD_TAP"; - #binding-cells = <2>; - flavor = "hold-preferred"; - tapping-term-ms = <400>; - quick-tap-ms = <200>; - bindings = <&kp>, <&kp>; - hold-trigger-key-positions = <1>; // <---[[the W key]] - }; - }; - keymap { - compatible = "zmk,keymap"; - label ="Default keymap"; - default_layer { - bindings = < - // position 0 position 1 position 2 - &pht LEFT_SHIFT Q &kp W &kp E - >; - }; - }; + behaviors { + pht: positional_hold_tap { + compatible = "zmk,behavior-hold-tap"; + label = "POSITIONAL_HOLD_TAP"; + #binding-cells = <2>; + flavor = "hold-preferred"; + tapping-term-ms = <400>; + quick-tap-ms = <200>; + bindings = <&kp>, <&kp>; + hold-trigger-key-positions = <1>; // <---[[the W key]] + }; + }; + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + default_layer { + bindings = < + // position 0 position 1 position 2 + &pht LEFT_SHIFT Q &kp W &kp E + >; + }; + }; }; ``` @@ -154,28 +154,28 @@ The following are suggested hold-tap configurations that work well with home row #include / { - behaviors { - lh_pht: left_hand_positional_hold_tap { - compatible = "zmk,behavior-hold-tap"; - label = "LEFT_POSITIONAL_HOLD_TAP"; - #binding-cells = <2>; - flavor = "tap-unless-interrupted"; - tapping-term-ms = <100>; // <---[[produces tap if held longer than tapping-term-ms]] - quick-tap-ms = <200>; - bindings = <&kp>, <&kp>; - hold-trigger-key-positions = <5 6 7 8 9 10>; // <---[[right-hand keys]] - }; - }; + behaviors { + lh_pht: left_hand_positional_hold_tap { + compatible = "zmk,behavior-hold-tap"; + label = "LEFT_POSITIONAL_HOLD_TAP"; + #binding-cells = <2>; + flavor = "tap-unless-interrupted"; + tapping-term-ms = <100>; // <---[[produces tap if held longer than tapping-term-ms]] + quick-tap-ms = <200>; + bindings = <&kp>, <&kp>; + hold-trigger-key-positions = <5 6 7 8 9 10>; // <---[[right-hand keys]] + }; + }; - keymap { - compatible = "zmk,keymap"; - default_layer { - bindings = < - // position 0 pos 1 pos 2 pos 3 pos 4 pos 5 pos 6 pos 7 pos 8 pos 9 pos 10 - &lh_pht LSFT A &lh_pht LGUI S &lh_pht LALT D &lh_pht LCTL F &kp G &kp H &kp I &kp J &kp K &kp L &kp SEMI - >; - }; - }; + keymap { + compatible = "zmk,keymap"; + default_layer { + bindings = < + // position 0 pos 1 pos 2 pos 3 pos 4 pos 5 pos 6 pos 7 pos 8 pos 9 pos 10 + &lh_pht LSFT A &lh_pht LGUI S &lh_pht LALT D &lh_pht LCTL F &kp G &kp H &kp I &kp J &kp K &kp L &kp SEMI + >; + }; + }; }; ``` @@ -186,26 +186,26 @@ The following are suggested hold-tap configurations that work well with home row #include / { - behaviors { - hm: homerow_mods { - compatible = "zmk,behavior-hold-tap"; - label = "HOMEROW_MODS"; - #binding-cells = <2>; - tapping-term-ms = <150>; - quick-tap-ms = <0>; - flavor = "tap-preferred"; - bindings = <&kp>, <&kp>; - }; - }; + behaviors { + hm: homerow_mods { + compatible = "zmk,behavior-hold-tap"; + label = "HOMEROW_MODS"; + #binding-cells = <2>; + tapping-term-ms = <150>; + quick-tap-ms = <0>; + flavor = "tap-preferred"; + bindings = <&kp>, <&kp>; + }; + }; - keymap { - compatible = "zmk,keymap"; - default_layer { - bindings = < - &hm LCTRL A &hm LGUI S &hm LALT D &hm LSHIFT F - >; - }; - }; + keymap { + compatible = "zmk,keymap"; + default_layer { + bindings = < + &hm LCTRL A &hm LGUI S &hm LALT D &hm LSHIFT F + >; + }; + }; }; ``` @@ -216,26 +216,26 @@ The following are suggested hold-tap configurations that work well with home row #include / { - behaviors { - bhm: balanced_homerow_mods { - compatible = "zmk,behavior-hold-tap"; - label = "HOMEROW_MODS"; - #binding-cells = <2>; - tapping-term-ms = <200>; // <---[[moderate duration]] - quick-tap-ms = <0>; - flavor = "balanced"; - bindings = <&kp>, <&kp>; - }; - }; + behaviors { + bhm: balanced_homerow_mods { + compatible = "zmk,behavior-hold-tap"; + label = "HOMEROW_MODS"; + #binding-cells = <2>; + tapping-term-ms = <200>; // <---[[moderate duration]] + quick-tap-ms = <0>; + flavor = "balanced"; + bindings = <&kp>, <&kp>; + }; + }; - keymap { - compatible = "zmk,keymap"; - default_layer { - bindings = < - &bhm LCTRL A &bhm LGUI S &bhm LALT D &bhm LSHIFT F - >; - }; - }; + keymap { + compatible = "zmk,keymap"; + default_layer { + bindings = < + &bhm LCTRL A &bhm LGUI S &bhm LALT D &bhm LSHIFT F + >; + }; + }; }; ``` @@ -264,14 +264,14 @@ A popular method of implementing Autoshift in ZMK involves a C-preprocessor macr }; }; - keymap { - compatible = "zmk,keymap"; - default_layer { - bindings = < - AS(Q) AS(W) AS(E) AS(R) AS(T) AS(Y) // Autoshift applied for QWERTY keys - >; - }; - }; + keymap { + compatible = "zmk,keymap"; + default_layer { + bindings = < + AS(Q) AS(W) AS(E) AS(R) AS(T) AS(Y) // Autoshift applied for QWERTY keys + >; + }; + }; }; ``` @@ -300,14 +300,14 @@ This hold-tap example implements a [momentary-layer](layers.md/#momentary-layer) }; keymap { - compatible = "zmk,keymap"; - default_layer { - bindings = < - &mo_tog 2 1 // &mo 2 on hold, &tog 1 on tap - MO_TOG(3) // &mo 3 on hold, &tog 3 on tap - >; - }; - }; + compatible = "zmk,keymap"; + default_layer { + bindings = < + &mo_tog 2 1 // &mo 2 on hold, &tog 1 on tap + MO_TOG(3) // &mo 3 on hold, &tog 3 on tap + >; + }; + }; }; ``` diff --git a/docs/docs/behaviors/layers.md b/docs/docs/behaviors/layers.md index 0818aaae..cf793089 100644 --- a/docs/docs/behaviors/layers.md +++ b/docs/docs/behaviors/layers.md @@ -105,29 +105,29 @@ Example: #define NONE 0 / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - bindings = < + default_layer { + bindings = < &tog NAVI &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS &kp NUMBER_7 &kp NUMBER_8 &kp NUMBER_9 &kp KP_PLUS &kp NUMBER_4 &kp NUMBER_5 &kp NUMBER_6 &kp KP_PLUS &kp NUMBER_1 &kp NUMBER_2 &kp NUMBER_3 &kp RETURN &kp NUMBER_0 &kp NUMBER_0 &kp DOT &kp RETURN - >; - }; + >; + }; - nav_layer { - bindings = < + nav_layer { + bindings = < &tog NAVI &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS &kp HOME &kp UP &kp PAGE_UP &kp KP_PLUS &kp LEFT &none &kp RIGHT &kp KP_PLUS &kp END &kp DOWN &kp PAGE_DOWN &kp RETURN &kp INSERT &kp INSERT &kp DEL &kp RETURN >; - }; - }; + }; + }; }; ``` diff --git a/docs/docs/behaviors/tap-dance.md b/docs/docs/behaviors/tap-dance.md index 65d5e765..c68b51dc 100644 --- a/docs/docs/behaviors/tap-dance.md +++ b/docs/docs/behaviors/tap-dance.md @@ -42,25 +42,25 @@ This example configures a tap-dance named `td0` that outputs the number of times #include / { - behaviors { - td0: tap_dance_0 { + behaviors { + td0: tap_dance_0 { compatible = "zmk,behavior-tap-dance"; label = "TAP_DANCE_0"; #binding-cells = <0>; tapping-term-ms = <200>; bindings = <&kp N1>, <&kp N2>, <&kp N3>; }; - }; + }; - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - bindings = < - &td0 - >; - }; - }; + default_layer { + bindings = < + &td0 + >; + }; + }; }; ``` @@ -83,25 +83,25 @@ This example configures a mod-tap inside a tap-dance named `td_mt` that outputs #include / { - behaviors { - td_mt: tap_dance_mod_tap { + behaviors { + td_mt: tap_dance_mod_tap { compatible = "zmk,behavior-tap-dance"; label = "TAP_DANCE_MOD_TAP"; #binding-cells = <0>; tapping-term-ms = <200>; bindings = <&mt LSHIFT CAPSLOCK>, <&kp LCTRL>; }; - }; + }; - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - bindings = < - &td_mt - >; - }; - }; + default_layer { + bindings = < + &td_mt + >; + }; + }; }; ``` diff --git a/docs/docs/config/index.md b/docs/docs/config/index.md index 51fd45b7..1ff1bfa0 100644 --- a/docs/docs/config/index.md +++ b/docs/docs/config/index.md @@ -116,14 +116,14 @@ Devicetree files look like this: ```devicetree / { - chosen { - zmk,kscan = &kscan0; - }; + chosen { + zmk,kscan = &kscan0; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; - }; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + }; }; ``` @@ -167,9 +167,9 @@ If the node you want to edit doesn't have a label, you can also write a new tree ```devicetree / { - kscan { - debounce-press-ms = <0>; - }; + kscan { + debounce-press-ms = <0>; + }; }; ``` @@ -244,7 +244,7 @@ Example: some-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>, <&gpio0 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; + ; ``` #### path diff --git a/docs/docs/development/new-behavior.md b/docs/docs/development/new-behavior.md index 6d026f2b..0d70aa3b 100644 --- a/docs/docs/development/new-behavior.md +++ b/docs/docs/development/new-behavior.md @@ -367,15 +367,15 @@ For the purpose of this section, we will discuss the structure of `app/dts/behav #include / { - behaviors { - /omit-if-no-ref/ gresc: grave_escape { - compatible = "zmk,behavior-mod-morph"; - label = "GRAVE_ESCAPE"; - #binding-cells = <0>; - bindings = <&kp ESC>, <&kp GRAVE>; + behaviors { + /omit-if-no-ref/ gresc: grave_escape { + compatible = "zmk,behavior-mod-morph"; + label = "GRAVE_ESCAPE"; + #binding-cells = <0>; + bindings = <&kp ESC>, <&kp GRAVE>; mods = <(MOD_LGUI|MOD_LSFT|MOD_RGUI|MOD_RSFT)>; - }; - }; + }; + }; }; ``` diff --git a/docs/docs/development/new-shield.md b/docs/docs/development/new-shield.md index 62d71f03..18616923 100644 --- a/docs/docs/development/new-shield.md +++ b/docs/docs/development/new-shield.md @@ -55,7 +55,7 @@ The `Kconfig.shield` file defines any additional Kconfig settings that may be re ``` config SHIELD_MY_BOARD - def_bool $(shields_list_contains,my_board) + def_bool $(shields_list_contains,my_board) ``` This will make sure that a new configuration value named `SHIELD_MY_BOARD` is set to true whenever `my_board` is used as the shield name, either as the `SHIELD` variable [in a local build](build-flash.md) or in your `build.yaml` file [when using Github Actions](../customization). Note that this configuration value will be used in `Kconfig.defconfig` to set other properties about your shield, so make sure that they match. @@ -64,10 +64,10 @@ This will make sure that a new configuration value named `SHIELD_MY_BOARD` is se ``` config SHIELD_MY_BOARD_LEFT - def_bool $(shields_list_contains,my_board_left) + def_bool $(shields_list_contains,my_board_left) config SHIELD_MY_BOARD_RIGHT - def_bool $(shields_list_contains,my_board_right) + def_bool $(shields_list_contains,my_board_right) ``` ### Kconfig.defconfig @@ -87,7 +87,7 @@ The keyboard name must be less than or equal to 16 characters in length, otherwi if SHIELD_MY_BOARD config ZMK_KEYBOARD_NAME - default "My Board" + default "My Board" endif ``` @@ -101,17 +101,17 @@ Finally, you'll want to turn on the split option for both sides. This can all be if SHIELD_MY_BOARD_LEFT config ZMK_KEYBOARD_NAME - default "My Board" + default "My Board" config ZMK_SPLIT_ROLE_CENTRAL - default y + default y endif if SHIELD_MY_BOARD_LEFT || SHIELD_MY_BOARD_RIGHT config ZMK_SPLIT - default y + default y endif ``` @@ -134,13 +134,13 @@ this might look something like: ``` / { - chosen { - zmk,kscan = &kscan0; - }; + chosen { + zmk,kscan = &kscan0; + }; - kscan0: kscan_0 { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; diode-direction = "col2row"; col-gpios @@ -149,12 +149,12 @@ this might look something like: , <&pro_micro 16 GPIO_ACTIVE_HIGH> ; - row-gpios - = <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + row-gpios + = <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - }; + ; + }; }; ``` @@ -174,43 +174,43 @@ For `col2row` directed boards like the iris, the shared .dtsi file may look like #include / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <16>; - rows = <4>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <16>; + rows = <4>; // | 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 | // | SW29 | SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | SW29 | - map = < + 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,2) RC(4,9) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) - RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) - >; - }; + RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) + >; + }; - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; - diode-direction = "col2row"; - row-gpios - = <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row A from the schematic file - , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row B from the schematic file - , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row C from the schematic file - , <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row D from the schematic file - , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row E from the schematic file - ; + diode-direction = "col2row"; + row-gpios + = <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row A from the schematic file + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row B from the schematic file + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row C from the schematic file + , <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row D from the schematic file + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row E from the schematic file + ; - }; + }; }; ``` @@ -230,14 +230,14 @@ This is exemplified with the iris .overlay files. #include "iris.dtsi" // Notice that the main dtsi files are included in the overlay. &kscan0 { - col-gpios - = <&pro_micro 19 GPIO_ACTIVE_HIGH> // col1 in the schematic - , <&pro_micro 18 GPIO_ACTIVE_HIGH> // col2 in the schematic - , <&pro_micro 15 GPIO_ACTIVE_HIGH> // col3 in the schematic - , <&pro_micro 14 GPIO_ACTIVE_HIGH> // col4 in the schematic - , <&pro_micro 16 GPIO_ACTIVE_HIGH> // col5 in the schematic - , <&pro_micro 10 GPIO_ACTIVE_HIGH> // col6 in the schematic - ; + col-gpios + = <&pro_micro 19 GPIO_ACTIVE_HIGH> // col1 in the schematic + , <&pro_micro 18 GPIO_ACTIVE_HIGH> // col2 in the schematic + , <&pro_micro 15 GPIO_ACTIVE_HIGH> // col3 in the schematic + , <&pro_micro 14 GPIO_ACTIVE_HIGH> // col4 in the schematic + , <&pro_micro 16 GPIO_ACTIVE_HIGH> // col5 in the schematic + , <&pro_micro 10 GPIO_ACTIVE_HIGH> // col6 in the schematic + ; }; ``` @@ -247,18 +247,18 @@ This is exemplified with the iris .overlay files. #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. - col-offset = <6>; + col-offset = <6>; }; &kscan0 { - col-gpios - = <&pro_micro 10 GPIO_ACTIVE_HIGH> // col6 in the schematic - , <&pro_micro 16 GPIO_ACTIVE_HIGH> // col5 in the schematic - , <&pro_micro 14 GPIO_ACTIVE_HIGH> // col4 in the schematic - , <&pro_micro 15 GPIO_ACTIVE_HIGH> // col3 in the schematic - , <&pro_micro 18 GPIO_ACTIVE_HIGH> // col2 in the schematic - , <&pro_micro 19 GPIO_ACTIVE_HIGH> // col1 in the schematic - ; + col-gpios + = <&pro_micro 10 GPIO_ACTIVE_HIGH> // col6 in the schematic + , <&pro_micro 16 GPIO_ACTIVE_HIGH> // col5 in the schematic + , <&pro_micro 14 GPIO_ACTIVE_HIGH> // col4 in the schematic + , <&pro_micro 15 GPIO_ACTIVE_HIGH> // col3 in the schematic + , <&pro_micro 18 GPIO_ACTIVE_HIGH> // col2 in the schematic + , <&pro_micro 19 GPIO_ACTIVE_HIGH> // col1 in the schematic + ; }; ``` @@ -316,28 +316,28 @@ Here is an example for the [nice60](https://github.com/Nicell/nice60), which use #include / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <8>; - rows = <8>; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <8>; + rows = <8>; // | MX1 | MX2 | MX3 | MX4 | MX5 | MX6 | MX7 | MX8 | MX9 | MX10 | MX11 | MX12 | MX13 | MX14 | // | MX15 | MX16 | MX17 | MX18 | MX19 | MX20 | MX21 | MX22 | MX23 | MX34 | MX25 | MX26 | MX27 | MX28 | // | MX29 | MX30 | MX31 | MX32 | MX33 | MX34 | MX35 | MX36 | MX37 | MX38 | MX39 | MX40 | MX41 | // | MX42 | MX43 | MX44 | MX45 | MX46 | MX47 | MX48 | MX49 | MX50 | MX51 | MX52 | MX53 | // | MX54 | MX55 | MX56 | MX57 | MX58 | MX59 | MX60 | MX61 | - map = < + map = < RC(3,0) RC(2,0) RC(1,0) RC(0,0) RC(1,1) RC(0,1) RC(0,2) RC(1,3) RC(0,3) RC(1,4) RC(0,4) RC(0,5) RC(1,6) RC(1,7) RC(4,0) RC(4,1) RC(3,1) RC(2,1) RC(2,2) RC(1,2) RC(2,3) RC(3,4) RC(2,4) RC(2,5) RC(1,5) RC(2,6) RC(2,7) RC(3,7) RC(5,0) RC(5,1) RC(5,2) RC(4,2) RC(3,2) RC(4,3) RC(3,3) RC(4,4) RC(4,5) RC(3,5) RC(4,6) RC(3,6) RC(4,7) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(5,3) RC(6,4) RC(5,4) RC(6,5) RC(5,5) RC(6,6) RC(5,6) RC(5,7) RC(7,0) RC(7,1) RC(7,2) RC(7,3) RC(7,5) RC(7,6) RC(6,7) RC(7,7) - >; - }; + >; + }; ``` Some important things to note: @@ -433,13 +433,13 @@ In your device tree file you will need to add the following lines to define the ``` left_encoder: encoder_left { - compatible = "alps,ec11"; - label = "LEFT_ENCODER"; - a-gpios = ; - b-gpios = ; - resolution = <4>; - status = "disabled"; - }; + compatible = "alps,ec11"; + label = "LEFT_ENCODER"; + a-gpios = ; + b-gpios = ; + resolution = <4>; + 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. @@ -450,9 +450,9 @@ Once you have defined the encoder sensors, you will have to add them to the list ``` sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder &right_encoder>; - }; + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + }; ``` 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. @@ -463,7 +463,7 @@ Add the following lines to your overlay file(s) to enable the encoder: ``` &left_encoder { - status = "okay"; + status = "okay"; }; ``` diff --git a/docs/docs/features/backlight.md b/docs/docs/features/backlight.md index 03d206f1..717361a2 100644 --- a/docs/docs/features/backlight.md +++ b/docs/docs/features/backlight.md @@ -62,9 +62,9 @@ Then you have to add the following lines to your `.dts` file: ``` &pwm0 { - status = "okay"; - ch0-pin = <45>; - /* ch0-inverted; */ + status = "okay"; + ch0-pin = <45>; + /* ch0-inverted; */ }; ``` @@ -84,7 +84,7 @@ Then you have to add the following lines inside the root devicetree node on the label = "Backlight LEDs"; pwm_led_0 { pwms = <&pwm0 45>; - label = "Backlight LED 0"; + label = "Backlight LED 0"; }; }; }; @@ -129,9 +129,9 @@ Then add the following lines to your `.overlay` file: ``` &pwm0 { - status = "okay"; - ch0-pin = <45>; - /* ch0-inverted; */ + status = "okay"; + ch0-pin = <45>; + /* ch0-inverted; */ }; ``` @@ -151,7 +151,7 @@ Then you have to add the following lines inside the root devicetree node on the label = "Backlight LEDs"; pwm_led_0 { pwms = <&pwm0 45>; - label = "Backlight LED 0"; + label = "Backlight LED 0"; }; }; }; @@ -182,7 +182,7 @@ Optionally, on Pro Micro compatible shields you can add a LED GPIO node to your label = "Backlight LEDs"; gpio_led_0 { gpios = <&pro_micro 20 GPIO_ACTIVE_HIGH>; - label = "Backlight LED 0"; + label = "Backlight LED 0"; }; }; }; @@ -201,10 +201,10 @@ In order to do that, first you need to enable PWM for each pin: ``` &pwm0 { - status = "okay"; - ch0-pin = <45>; /* LED 0 */ - ch1-pin = <46>; /* LED 1 */ - ch2-pin = <47>; /* LED 2 */ + status = "okay"; + ch0-pin = <45>; /* LED 0 */ + ch1-pin = <46>; /* LED 1 */ + ch2-pin = <47>; /* LED 2 */ ... }; ``` diff --git a/docs/docs/features/combos.md b/docs/docs/features/combos.md index 09191896..44313cc1 100644 --- a/docs/docs/features/combos.md +++ b/docs/docs/features/combos.md @@ -12,14 +12,14 @@ Combos configured in your `.keymap` file, but are separate from the `keymap` nod ``` / { - combos { - compatible = "zmk,combos"; - combo_esc { - timeout-ms = <50>; - key-positions = <0 1>; - bindings = <&kp ESC>; - }; - }; + combos { + compatible = "zmk,combos"; + combo_esc { + timeout-ms = <50>; + key-positions = <0 1>; + bindings = <&kp ESC>; + }; + }; }; ``` diff --git a/docs/docs/features/keymaps.md b/docs/docs/features/keymaps.md index 6d4e5f2c..93c2c825 100644 --- a/docs/docs/features/keymaps.md +++ b/docs/docs/features/keymaps.md @@ -113,10 +113,10 @@ Nested under the devicetree root, is the keymap node. The node _name_ itself is ``` keymap { - compatible = "zmk,keymap"; + compatible = "zmk,keymap"; // Layer nodes go here! - }; + }; ``` ### Layers diff --git a/docs/docs/features/underglow.md b/docs/docs/features/underglow.md index c1dc68d3..00d3aa0a 100644 --- a/docs/docs/features/underglow.md +++ b/docs/docs/features/underglow.md @@ -60,18 +60,18 @@ Here's an example on a definition that uses P0.06: #include &pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; &spi3 { @@ -149,9 +149,9 @@ Once you have your `led_strip` properly defined you need to add it to the root d ``` / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { + zmk,underglow = &led_strip; + }; }; ``` diff --git a/docs/docs/keymap-example-file.md b/docs/docs/keymap-example-file.md index cb20cb6d..d8d201af 100644 --- a/docs/docs/keymap-example-file.md +++ b/docs/docs/keymap-example-file.md @@ -3,24 +3,24 @@ #include / { - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { + default_layer { // -------------------------------------------------------------------------------------------------------------------------------------------------------------------- // | 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 | CTRL+A | CTRL+C | | CTRL+V | CTRL+X | N | M | , | . | / | R CTRL | // | GUI | DEL | RETURN | SPACE | ESCAPE | | RETURN | SPACE | TAB | BSPC | R ALT | - bindings = < + 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 LSHIFT &kp Z &kp X &kp C &kp V &kp B &kp LC(A) &kp LC(C) &kp LC(V) &kp LC(X) &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>; - }; - }; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + }; }; ``` diff --git a/docs/docs/keymap-example.md b/docs/docs/keymap-example.md index 9d751f59..47d1c06b 100644 --- a/docs/docs/keymap-example.md +++ b/docs/docs/keymap-example.md @@ -1,21 +1,21 @@ ``` - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { + default_layer { // -------------------------------------------------------------------------------------------------------------------------------------------------------------------- // | 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 | CTRL+A | CTRL+C | | CTRL+V | CTRL+X | N | M | , | . | / | R CTRL | // | GUI | DEL | RETURN | SPACE | ESCAPE | | RETURN | SPACE | TAB | BSPC | R ALT | - bindings = < + 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 LSHIFT &kp Z &kp X &kp C &kp V &kp B &kp LC(A) &kp LC(C) &kp LC(V) &kp LC(X) &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>; - }; - }; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + }; ``` From 5b07c86d05a81a82d4fd72ad29d3daa846a2b458 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 23 Apr 2023 00:00:12 -0500 Subject: [PATCH 61/64] chore: Update Prettier Added a workaround to select the latest version of Prettier with pre-commit, since the pre-commit mirror repo started tracking alpha releases and doesn't have anything beyond 2.7.1. --- .pre-commit-config.yaml | 3 +++ app/package-lock.json | 14 +++++++------- app/package.json | 2 +- docs/package-lock.json | 14 +++++++------- docs/package.json | 2 +- 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1375a6ae..e0666ea8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,6 +15,9 @@ repos: rev: v2.7.1 hooks: - id: prettier + # Workaround for https://github.com/pre-commit/mirrors-prettier/issues/29 + additional_dependencies: + - prettier@2.8.7 - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: diff --git a/app/package-lock.json b/app/package-lock.json index ed8765f3..060fcba0 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -9,13 +9,13 @@ "version": "1.0.0", "license": "MIT", "devDependencies": { - "prettier": "^2.7.1" + "prettier": "^2.8.7" } }, "node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.7.tgz", + "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -30,9 +30,9 @@ }, "dependencies": { "prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.7.tgz", + "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", "dev": true } } diff --git a/app/package.json b/app/package.json index 9ad28788..e1a7957f 100644 --- a/app/package.json +++ b/app/package.json @@ -18,6 +18,6 @@ }, "homepage": "https://zmk.dev/", "devDependencies": { - "prettier": "^2.7.1" + "prettier": "^2.8.7" } } diff --git a/docs/package-lock.json b/docs/package-lock.json index c7333cb3..2c8a7fba 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -39,7 +39,7 @@ "mustache": "^4.2.0", "null-loader": "^4.0.0", "prebuild-webpack-plugin": "^1.1.1", - "prettier": "^2.7.1", + "prettier": "^2.8.7", "string-replace-loader": "^3.1.0", "typescript": "^4.6.3", "webpack": "^5.72.1" @@ -12201,9 +12201,9 @@ } }, "node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.7.tgz", + "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -24678,9 +24678,9 @@ "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==" }, "prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.7.tgz", + "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", "dev": true }, "pretty-error": { diff --git a/docs/package.json b/docs/package.json index 95d47b9f..70105b54 100644 --- a/docs/package.json +++ b/docs/package.json @@ -58,7 +58,7 @@ "mustache": "^4.2.0", "null-loader": "^4.0.0", "prebuild-webpack-plugin": "^1.1.1", - "prettier": "^2.7.1", + "prettier": "^2.8.7", "string-replace-loader": "^3.1.0", "typescript": "^4.6.3", "webpack": "^5.72.1" From 7a352908eebdc84aca905a83a22e27748154ad0d Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 23 Apr 2023 11:37:42 -0500 Subject: [PATCH 62/64] docs: Add pre-commit documentation --- docs/docs/development/pre-commit.md | 37 +++++++++++++++++++++++++++++ docs/sidebars.js | 1 + 2 files changed, 38 insertions(+) create mode 100644 docs/docs/development/pre-commit.md diff --git a/docs/docs/development/pre-commit.md b/docs/docs/development/pre-commit.md new file mode 100644 index 00000000..b4306fc9 --- /dev/null +++ b/docs/docs/development/pre-commit.md @@ -0,0 +1,37 @@ +--- +title: Pre-commit +--- + +ZMK uses [pre-commit](https://pre-commit.com/) to check for common errors and make sure the codebase is formatted consistently. + +Pre-commit is run on every pull request. You can also install it locally to get the same checks run on every commit you make _before_ you submit a pull request. + +## Installing pre-commit + +Open a terminal and run: + +```bash +pip3 install pre-commit +``` + +If this doesn't work, make sure [Python](https://www.python.org/) is installed and try again. + +## Enabling Commit Hooks + +Now that pre-commit is installed on your PC, you need to install it into the ZMK repo to enable it. Open a terminal to the ZMK repo directory and run: + +```bash +pre-commit install +``` + +This should print a message such as + +``` +pre-commit installed at .git\hooks\pre-commit +``` + +Pre-commit will now automatically check your changes whenever you run `git commit`. If it detects a problem, it will describe the problem and cancel the commit. For simple problems such as incorrect formatting, it will also automatically fix the files so you can just `git add` them and try again. + +## Automatically Enabling pre-commit + +Pre-commit can be configured to automatically install itself into any newly cloned repository, so you don't have to remember to run `pre-commit install`. See the [pre-commit documentation](https://pre-commit.com/#automatically-enabling-pre-commit-on-repositories) for instructions. diff --git a/docs/sidebars.js b/docs/sidebars.js index 21585747..43f17b41 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -71,6 +71,7 @@ module.exports = { ], Development: [ "development/clean-room", + "development/pre-commit", "development/documentation", "development/setup", "development/build-flash", From de152fe7419b8a02ca8a1723c3487dba69da3969 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 20 Apr 2023 23:51:40 -0700 Subject: [PATCH 63/64] fix(bluetooth): Revert to Legacy LLCP * Reports of constant/frequent disconnects, with HCI err 0x28, "instant passed", seem linked to newer LLCP that became default in Zephyr 3.2, so revert to the Legacy LLCP for now until a proper fix for new LLCP can be found. --- app/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Kconfig b/app/Kconfig index 25a99b55..32b708e8 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -120,6 +120,11 @@ menuconfig ZMK_BLE if ZMK_BLE +choice BT_LL_SW_LLCP_IMPL + default BT_LL_SW_LLCP_LEGACY + +endchoice + config SYSTEM_WORKQUEUE_STACK_SIZE default 4096 if SOC_RP2040 default 2048 From e52e734480816d269ecedb5bac6a3703577e6c02 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 25 Apr 2023 05:51:04 +0000 Subject: [PATCH 64/64] chore: Fix formatting of Kconfig setting. --- app/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Kconfig b/app/Kconfig index 32b708e8..d1b6682f 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -121,7 +121,7 @@ menuconfig ZMK_BLE if ZMK_BLE choice BT_LL_SW_LLCP_IMPL - default BT_LL_SW_LLCP_LEGACY + default BT_LL_SW_LLCP_LEGACY endchoice