From 76241442513da424944d29ec65e3e5be69237e6b Mon Sep 17 00:00:00 2001 From: Tobias Pickel Date: Thu, 8 Feb 2024 09:24:24 +0100 Subject: [PATCH] Update (#8) * feat: update keymap * Update bluetooth settings in light of user feedback (#289) * Make get_version use bash from $PATH (#287) * Make get_version use bash from $PATH * Update CHANGELOG.md --------- Co-authored-by: ReFil <31960031+ReFil@users.noreply.github.com> * Updated keymap * Updated keymap * Revert "Updated keymap" This reverts commit 18e664a8396089bc9b4be24fcb84b5a8cda8bab0. * Revert "Updated keymap" This reverts commit 9fc6c6239c362671e3b005fc771a3771b6b2c240. * Add pull request template (#293) * Add pull request template * Update CHANGELOG.md * Add version macro (#300) * Prefer `tr` to ${char^^}, which does not work on older bash versions (#303) * Prefer `tr` to ${char^^}, which does not work on older bash versions * Update CHANGELOG.md --------- Co-authored-by: ReFil <31960031+ReFil@users.noreply.github.com> * Base ZMK update (#326) * Update Makefile variables (#335) * Makefile enhancements to optimize local workflows (#363) - Enhance the Makefile to enable firmware building exclusively for the left side. To modify the keymap, flashing only the left side's firmware suffices. This change facilitates the creation of firmware for the left side only, thereby expediting the build process. Usage: make left This update maintains existing functionality. Without specifying the left target, firmware for both halves will be generated. - Add separate make targets to clean firmware and docker image Add targets clean_firmware and clean_image independently while maintaing clean to run both - Ensure files modified by the build process are reset at the end The current build process dynamically generates the content of the version macro in config/version.dtsi to enable users to print out the precise version and commit the firmware was built on via a keybinding on the keymap. This change ensurs that the changes to this macro file are reset at the end of the build process to ensure it isn't shown as modified and added to keymap commit changes. * feat: add f keys --------- Co-authored-by: ReFil <31960031+ReFil@users.noreply.github.com> Co-authored-by: David Whetstone Co-authored-by: adv360proapp[bot] <105741512+adv360proapp[bot]@users.noreply.github.com> Co-authored-by: Jim Jowdy Co-authored-by: Thomas Huber <113915837+huber-th@users.noreply.github.com> --- .github/pull_request_template.md | 8 ++ .idea/.gitignore | 5 + .idea/Adv360-Pro-ZMK.iml | 12 ++ .idea/modules.xml | 8 ++ .idea/vcs.xml | 6 + CHANGELOG.md | 44 +++++-- Makefile | 30 ++++- README.md | 29 ++++- bin/build.sh | 16 ++- bin/get_version.sh | 11 +- config/adv360.keymap | 113 ++++++++++-------- config/boards/arm/adv360/Kconfig.defconfig | 6 - config/boards/arm/adv360/adv360.dtsi | 7 +- .../boards/arm/adv360/adv360_left_defconfig | 20 ++-- .../boards/arm/adv360/adv360_right_defconfig | 6 +- config/keymap.json | 0 config/west.yml | 2 +- 17 files changed, 229 insertions(+), 94 deletions(-) create mode 100644 .github/pull_request_template.md create mode 100644 .idea/.gitignore create mode 100644 .idea/Adv360-Pro-ZMK.iml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 config/keymap.json diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..d7db1bb8ef --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,8 @@ +## Advantage 360 Pro PR template + +### What's changed: + +### Why has this change been implemented: + +### What (if any) actions must a user take after this change: + diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000000..b58b603fea --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/Adv360-Pro-ZMK.iml b/.idea/Adv360-Pro-ZMK.iml new file mode 100644 index 0000000000..24643cc374 --- /dev/null +++ b/.idea/Adv360-Pro-ZMK.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000..e8b13f0e92 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..35eb1ddfbb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index aeb6cc694a..6f73ee2a57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,29 @@ Here's all notable changes and commits to both the configuration repo and the ba Many thanks to all those who have submitted issues and pull requests to make this firmware better! ## Config repo +2/2/2024 - Makefile enhancements (build left side firmware only, separate clean targets for firmware and docker, reset of version.dtsi after build) [#363](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/363) + +1/16/2024 - Change the makefile to fis WSL2 compatibility [#335](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/335) + +1/14/2024 - Update base ZMK, change KConfig attributes to support, Enable experimental BLE features for improved stability [#326](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/326) + +12/27/2023 - Change how the characters are used in the versioning script for improved MacOS experience [#303](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/303) + +12/15/2022 - Update keymap.json to reflect new versioning macro [#300](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/300) + +12/15/2023 - Add PR template [#293](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/293) + +12/6/2023 - Update versioning script to use bash from $PATH [#287](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/287) + +12/5/2023 - Update Bluetooth settings in light of user feedback [#289](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/289) + 11/16/2023 - Update changelog with base ZMK update [#268](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/268) -11/15/2023 - Add and document the new automatic versioning system [#267](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/267) +11/15/2023 - Add and document the new automatic versioning system [#267](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/267) -11/7/2023 - Add and document a new configuration option for extended NKRO ranges [#264](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/264) +11/7/2023 - Add and document a new configuration option for extended NKRO ranges [#264](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/264) -11/2/2023 - Update the documentation to note the new configuration options, other miscellaneous improvements based on feedback [#260](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/260) +11/2/2023 - Update the documentation to note the new configuration options, other miscellaneous improvements based on feedback [#260](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/260) 10/30/2023 - Update the [settings_reset.uf2](/settings-reset.uf2) file to improve reset behaviour with the new update @@ -30,7 +46,6 @@ Many thanks to all those who have submitted issues and pull requests to make thi 3/4/2023 - Add extra keys into matrix that point to nowhere, fixes spurious keypress issues when using USB3.1 cables [#114](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/114) [#116](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/116) - 2/14/2023 - Disable ZMK logging by default to improve power consumption [#101](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/101) 1/25/2023 - Fix automatic OS detection to build properly when using the local builder on OS-X [#91](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/pull/91) @@ -79,15 +94,30 @@ Many thanks to all those who have submitted issues and pull requests to make thi ## Base ZMK -There have beeen 4 branches of ZMK used for the 360 Pro so far. Beta branches are not changelogged as they are subject to frequent changes and tweaks. +There have beeen 5 branches of ZMK used for the 360 Pro so far. Beta branches are not changelogged as they are subject to frequent changes and tweaks. | Branch | Date From | Date To | Config Branch | | -------- | ------- |-------|-----| | [adv360-beta](https://github.com/ReFil/zmk/tree/adv360-beta) | 3/1/2022 | 9/17/2022 | V1.0 (since deleted) | | [adv360-z3](https://github.com/ReFil/zmk/tree/adv360-z3) | 9/17/2022 | 7/6/2023 | V2.0 (since deleted) | | [adv360-z3.2](https://github.com/ReFil/zmk/tree/adv360-z3.2) | 7/6/2023 | 20/10/2023 | [V3.0](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/tree/V3.0) (Up to commit 82494e7) | -| [adv360-z3.2-2](https://github.com/ReFil/zmk/tree/adv360-z3.2-2) | 20/10/2023 | To date | [V3.0](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/tree/V3.0) (current) | +| [adv360-z3.2-2](https://github.com/ReFil/zmk/tree/adv360-z3.2-2) | 20/10/2023 | 1/14/2024 | [V3.0](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/tree/V3.0) (Up to commit XXXXXXX) | +| [adv360-z3.2-3](https://github.com/ReFil/zmk/tree/adv360-z3.2-3) | 1/14/2024 | To date | [V3.0](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/tree/V3.0) (current) | + + +### adv360-z3.2-3 + +1/8/2023 - Merge latest upstream ZMK (Commit 7652fbeb) + +12/17/2023 - Add KConfig line to ensure compatibility with previous NKRO extended report is maintained + +12/17/2023 - Fix conflicts with upstream HID indicators code for split communication + +12/17/2023 - Add defines for HID indicator LEDs to maintain compatibility with lighting code + +12/17/2023 - Merge latest upstream ZMK (Commit 78fa1e77) +Note: Several features that used to be custom to this branch (BT battery reporting disable, Extended NKRO, HID Indicators) are now upstream ### adv360-z3.2-2 @@ -99,7 +129,7 @@ There have beeen 4 branches of ZMK used for the 360 Pro so far. Beta branches ar 11/1/2023 - Change order of RGB initialisation to prevent situations where lighting could get stuck in battery reporting mode -10/27/2023 - Change HID max NKRO usage to allow usage of F13-F24 and other rarely used keycodes with NKRO enabled +10/27/2023 - Change HID max NKRO usage to allow usage of F13-F24 and other rarely used keycodes with NKRO enabled 10/18/2023 - Disable saving certain RGB elements to flash memory to help with flash wear diff --git a/Makefile b/Makefile index e5231eb4fb..9d7d347a5c 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -DOCKER := $(shell { command -v podman || command -v docker; }) -TIMESTAMP := $(shell date -u +"%Y%m%d%H%M") -COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null) -detected_OS := $(shell uname) # Classify UNIX OS +DOCKER := "$(shell { command -v podman || command -v docker; })" +TIMESTAMP := "$(shell date -u +"%Y%m%d%H%M")" +COMMIT := "$(shell git rev-parse --short HEAD 2>/dev/null)" +detected_OS := "$(shell uname)" # Classify UNIX OS ifeq ($(strip $(detected_OS)),Darwin) #We only care if it's OS X SELINUX1 := SELINUX2 := @@ -10,7 +10,7 @@ SELINUX1 := :z SELINUX2 := ,z endif -.PHONY: all clean +.PHONY: all left clean_firmware clean_image clean all: $(shell bin/get_version.sh >> /dev/null) @@ -20,8 +20,26 @@ all: -v $(PWD)/config:/app/config:ro$(SELINUX2) \ -e TIMESTAMP=$(TIMESTAMP) \ -e COMMIT=$(COMMIT) \ + -e BUILD_RIGHT=true \ zmk + $(shell git checkout config/version.dtsi) -clean: +left: + $(shell bin/get_version.sh >> /dev/null) + $(DOCKER) build --tag zmk --file Dockerfile . + $(DOCKER) run --rm -it --name zmk \ + -v $(PWD)/firmware:/app/firmware$(SELINUX1) \ + -v $(PWD)/config:/app/config:ro$(SELINUX2) \ + -e TIMESTAMP=$(TIMESTAMP) \ + -e COMMIT=$(COMMIT) \ + -e BUILD_RIGHT=false \ + zmk + $(shell git checkout config/version.dtsi) + +clean_firmware: rm -f firmware/*.uf2 + +clean_image: $(DOCKER) image rm zmk docker.io/zmkfirmware/zmk-build-arm:stable + +clean: clean_firmware clean_image diff --git a/README.md b/README.md index ac090a2f7c..2500787c64 100644 --- a/README.md +++ b/README.md @@ -35,14 +35,33 @@ Certain ZMK features (e.g. combos) require knowing the exact key positions in th * Install make using `sudo apt-get install make` inside the WSL2 instance. * The repository can be cloned directly into the WSL2 instance or accessed through the C: mount point WSL provides by default (`/mnt/c/path-to-repo`). -### Build firmware +#### macOS specific + +On macOS [brew](https://brew.sh) can be used to install the required components. + +* docker +* [colima](https://github.com/abiosoft/colima) can be used as the docker engine + +```shell +brew install docker colima +colima start +``` +> Note: On Apple Silicon (ARM based) systems you need to make sure to start colima with the correct architecture for the container being used. +> ``` +> colima start --arch x86_64 +> ``` -1. Execute `make`. -2. Check the `firmware` directory for the latest firmware build. + +### Build firmware locally + +1. Execute `make` to build firmware for both halves or `make left` to only build firmware for the left hand side. +2. Check the `firmware` directory for the latest firmware build. The first part of the filename is the timestamp when the firmware was built. ### Cleanup -The built docker container and compiled firmware files can be deleted with `make clean`. This might be necessary if you updated your fork from V2.0 to V3.0 and are encountering build failures. +The built docker container and compiled firmware files can be deleted with `make clean`. This might be necessary if you updated your fork from V2.0 to V3.0 and are encountering build failures. + +Creating the docker container takes some time. Therefore `make clean_firmware` can be used to only clean firmware without removing the docker container. Similarly `make clean_image` can be used to remove the docker container without removing compiled firmware files. ## Flashing firmware @@ -116,4 +135,4 @@ Further support resources can be found on Kinesis.com: * https://kinesis-ergo.com/support/kb360pro/#manuals In the event of a hardware issue it may be necessary to open a support ticket directly with Kinesis as opposed to a GitHub issue in this repository. -* https://kinesis-ergo.com/support/kb360pro/#ticket \ No newline at end of file +* https://kinesis-ergo.com/support/kb360pro/#ticket diff --git a/bin/build.sh b/bin/build.sh index cd68988ecd..bab8570a9e 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -10,9 +10,15 @@ COMMIT="${COMMIT:-$(echo xxxxxx)}" west build -s zmk/app -d build/left -b adv360_left -- -DZMK_CONFIG="${PWD}/config" # Adv360 Left Kconfig file grep -vE '(^#|^$)' build/left/zephyr/.config -# West Build (right) -west build -s zmk/app -d build/right -b adv360_right -- -DZMK_CONFIG="${PWD}/config" -# Adv360 Right Kconfig file -grep -vE '(^#|^$)' build/right/zephyr/.config # Rename zmk.uf2 -cp build/left/zephyr/zmk.uf2 "./firmware/${TIMESTAMP}-${COMMIT}-left.uf2" && cp build/right/zephyr/zmk.uf2 "./firmware/${TIMESTAMP}-${COMMIT}-right.uf2" +cp build/left/zephyr/zmk.uf2 "./firmware/${TIMESTAMP}-${COMMIT}-left.uf2" + +# Build right side if selected +if [ "${BUILD_RIGHT}" = true ]; then + # West Build (right) + west build -s zmk/app -d build/right -b adv360_right -- -DZMK_CONFIG="${PWD}/config" + # Adv360 Right Kconfig file + grep -vE '(^#|^$)' build/right/zephyr/.config + # Rename zmk.uf2 + cp build/right/zephyr/zmk.uf2 "./firmware/${TIMESTAMP}-${COMMIT}-right.uf2" +fi diff --git a/bin/get_version.sh b/bin/get_version.sh index a1b1d6e7e4..aa23e1719d 100755 --- a/bin/get_version.sh +++ b/bin/get_version.sh @@ -1,15 +1,22 @@ -#!/bin/bash +#!/usr/bin/env bash # Get the date, first 4 chars of branch name and short commit hash date=$(date -u +"%Y%m%d") branch=${1:-$(git rev-parse --abbrev-ref HEAD | cut -c1-4)} commit=${2:-$(git rev-parse --short HEAD)} +uppercase_char() { + local char=$1 + + (echo $char | tr '[a-z]' '[A-Z]' 2> /dev/null) || echo "${char^^}" +} + # Function to transform characters to ZMK key behaviours transform_char() { local char=$1 + if [[ $char =~ [A-Za-z] ]]; then - echo "<&kp ${char^^}>, " + echo "<&kp $(uppercase_char $char)>, " elif [[ $char =~ [0-9] ]]; then echo "<&kp N${char}>, " elif [ "$char" = "." ]; then diff --git a/config/adv360.keymap b/config/adv360.keymap index e0085fa26b..ca5ea11815 100644 --- a/config/adv360.keymap +++ b/config/adv360.keymap @@ -92,58 +92,67 @@ default_layer { bindings = < - &none &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &none &mo 1 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &none - &none &kp Q &kp W &kp E &kp R &kp T &none &none &kp Y &kp U &kp I &kp O &kp P &none - &none &kp A &kp S &kp D &kp F &kp G &none &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &none &kp H &kp J &kp K &kp L &kp SEMI &none - &none &kp Z &kp X < 5 C < 2 V &kp B &kp HOME &kp PG_UP &kp N < 3 M < 4 COMMA &kp DOT &kp FSLH &none - &none &none &none &none &none &kp SPACE &kp LSHFT &kp END &kp PG_DN &kp RSHFT &mt LCTRL BSPC &none &none &none &none &none + &none &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &none &mo 1 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &none + &none &kp Q &kp W &kp E &kp R &kp T &none &none &kp Y &kp U &kp I &kp O &kp P &none + &none &kp A &kp S &kp D &kp F &kp G &none &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &none &kp H &kp J &kp K &kp L &kp SEMI &none + &none &kp Z < 6 X < 5 C < 2 V &kp B &kp HOME &kp PG_UP &kp N < 3 M < 4 COMMA &kp DOT &kp FSLH &none + &none &none &none &none &none &kp SPACE &kp LSHFT &kp END &kp PG_DN &kp RSHFT &mt LCTRL BSPC &none &none &none &none &none >; - }; - mod { - bindings = < - &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &trans &none &none &none &none &none &none - &none &none &none &none &none &none &bootloader &bootloader &none &none &none &none &none &none - &none &none &none &none &none &none &none &none &none &bt BT_CLR &none &rgb_ug RGB_MEFS_CMD 5 &none &none &none &none &none &none - &none &none &none &none ¯o_ver &none &none &none &none &none &none &none &none &none - &none &none &none &none &none &none &none &none &none &bl BL_TOG &rgb_ug RGB_TOG &bl BL_INC &bl BL_DEC &none &none &none - >; - }; - numbers { - bindings = < - &trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans &none &none &trans &kp N7 &kp N8 &kp N9 &trans &trans - &trans &trans &trans &trans &trans &trans &none &trans &trans &trans &trans &none &trans &kp N4 &kp N5 &kp N6 &trans &trans - &kp LSHFT &kp LCTRL &kp LALT &kp LGUI &trans &trans &trans &trans &trans &kp N1 &kp N2 &kp N3 &trans &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp N0 &trans &trans &trans &trans &trans - >; - }; - brackets { - bindings = < - &trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans - &trans &kp UNDER &kp DQT &kp LBRC &kp RBRC &kp PIPE &none &none &trans &trans &trans &trans &trans &trans - &trans &kp MINUS &kp SQT &kp LPAR &kp RPAR &kp BSLH &none &trans &trans &trans &trans &none &trans &trans &trans &trans &trans &trans - &trans &kp TILDE &kp GRAVE &kp LBKT &kp RBKT &kp PLUS &trans &trans &trans &trans &kp LGUI &kp LALT &kp LCTRL &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - >; - }; + }; + mod { + bindings = < + &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &trans &none &none &none &none &none &none + &none &none &none &none &none &none &bootloader &bootloader &none &none &none &none &none &none + &none &none &none &none &none &none &none &none &none &bt BT_CLR &none &rgb_ug RGB_MEFS_CMD 5 &none &none &none &none &none &none + &none &none &none &none ¯o_ver &none &none &none &none &none &none &none &none &none + &none &none &none &none &none &none &none &none &none &bl BL_TOG &rgb_ug RGB_TOG &bl BL_INC &bl BL_DEC &none &none &none + >; + }; + numbers { + bindings = < + &trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &none &none &trans &kp N7 &kp N8 &kp N9 &trans &trans + &trans &trans &trans &trans &trans &trans &none &trans &trans &trans &trans &none &trans &kp N4 &kp N5 &kp N6 &trans &trans + &kp LSHFT &kp LCTRL &kp LALT &kp LGUI &trans &trans &trans &trans &trans &kp N1 &kp N2 &kp N3 &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp N0 &trans &trans &trans &trans &trans + >; + }; + brackets { + bindings = < + &trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans + &trans &kp UNDER &kp DQT &kp LBRC &kp RBRC &kp PIPE &none &none &trans &trans &trans &trans &trans &trans + &trans &kp MINUS &kp SQT &kp LPAR &kp RPAR &kp BSLH &none &trans &trans &trans &trans &none &trans &trans &trans &trans &trans &trans + &trans &kp TILDE &kp GRAVE &kp LBKT &kp RBKT &kp PLUS &trans &trans &trans &trans &kp LGUI &kp LALT &kp LCTRL &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; - symbols { - bindings = < - &trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans - &trans &trans &kp AMPERSAND &kp STAR &kp PLUS &trans &none &none &trans &trans &trans &trans &trans &trans - &trans &trans &kp DOLLAR &kp PERCENT &kp CARET &trans &none &trans &trans &trans &trans &none &trans &trans &trans &trans &trans &trans - &trans &trans &kp EXCLAMATION &kp AT_SIGN &kp HASH &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 - >; - }; - web { - bindings = < - &trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans &none &trans &trans &trans &trans &none &trans &kp EQUAL &kp GT &kp COLON &trans &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp LT &kp GT &kp SLASH &trans &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - >; + symbols { + bindings = < + &trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans + &trans &trans &kp AMPERSAND &kp STAR &kp PLUS &trans &none &none &trans &trans &trans &trans &trans &trans + &trans &trans &kp DOLLAR &kp PERCENT &kp CARET &trans &none &trans &trans &trans &trans &none &trans &trans &trans &trans &trans &trans + &trans &trans &kp EXCLAMATION &kp AT_SIGN &kp HASH &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 + >; + }; + web { + bindings = < + &trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &none &trans &trans &trans &trans &none &trans &kp EQUAL &kp GT &kp COLON &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp LT &kp GT &kp SLASH &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; + fn { + bindings = < + &trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &none &none &trans &kp F7 &kp F8 &kp F9 &trans &trans + &trans &trans &trans &trans &trans &trans &none &trans &trans &trans &trans &none &trans &kp F4 &kp F5 &kp F6 &trans &trans + &kp LCTRL &trans &kp LALT &kp LGUI &trans &trans &trans &trans &trans &kp F1 &kp F2 &kp F3 &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; }; - }; -}; + }; diff --git a/config/boards/arm/adv360/Kconfig.defconfig b/config/boards/arm/adv360/Kconfig.defconfig index aa2fb87a16..7333f89a0b 100644 --- a/config/boards/arm/adv360/Kconfig.defconfig +++ b/config/boards/arm/adv360/Kconfig.defconfig @@ -35,12 +35,6 @@ config SPI config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - if USB config USB_NRFX diff --git a/config/boards/arm/adv360/adv360.dtsi b/config/boards/arm/adv360/adv360.dtsi index 2f221fcbfb..0e092033d8 100644 --- a/config/boards/arm/adv360/adv360.dtsi +++ b/config/boards/arm/adv360/adv360.dtsi @@ -21,6 +21,7 @@ zephyr,code-partition = &code_partition; zephyr,sram = &sram0; zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; zmk,kscan = &kscan0; zmk,backlight = &backlight; zmk,battery = &vbatt; @@ -43,9 +44,8 @@ >; }; - ext-power { + EXT_POWER { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; }; @@ -90,6 +90,9 @@ &usbd { status = "okay"; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + }; }; diff --git a/config/boards/arm/adv360/adv360_left_defconfig b/config/boards/arm/adv360/adv360_left_defconfig index 91ae67402f..4be3179cae 100644 --- a/config/boards/arm/adv360/adv360_left_defconfig +++ b/config/boards/arm/adv360/adv360_left_defconfig @@ -49,12 +49,12 @@ CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y #BT configuration CONFIG_BT_CTLR_TX_PWR_PLUS_8=y CONFIG_BT_DIS_MANUF="Kinesis Corporation" -CONFIG_BT_PRIVACY=n -CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=y -CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=600 -CONFIG_BT_PERIPHERAL_PREF_MIN_INT=12 -CONFIG_BT_PERIPHERAL_PREF_MAX_INT=24 -CONFIG_BT_PERIPHERAL_PREF_LATENCY=30 +#CONFIG_BT_PRIVACY=n +#CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=y +#CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=600 +#CONFIG_BT_PERIPHERAL_PREF_MIN_INT=12 +#CONFIG_BT_PERIPHERAL_PREF_MAX_INT=24 +#CONFIG_BT_PERIPHERAL_PREF_LATENCY=30 CONFIG_BT_BAS=n #Set this to y to enable BLE battery reporting #Misc configuration @@ -65,4 +65,10 @@ CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y CONFIG_ZMK_HID_KEYBOARD_EXTENDED_REPORT=n #Set this to y for F13-F24 and intl keys with NKRO CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y CONFIG_BUILD_OUTPUT_UF2=y -CONFIG_ZMK_BATTERY_REPORT_INTERVAL=9999999 + +CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y +CONFIG_ZMK_BLE_PASSKEY_ENTRY=n + +CONFIG_ZMK_BLE=y +CONFIG_ZMK_USB=y +CONFIG_ZMK_HID_INDICATORS=y diff --git a/config/boards/arm/adv360/adv360_right_defconfig b/config/boards/arm/adv360/adv360_right_defconfig index 25209ab284..3c2e65a3b1 100644 --- a/config/boards/arm/adv360/adv360_right_defconfig +++ b/config/boards/arm/adv360/adv360_right_defconfig @@ -54,4 +54,8 @@ CONFIG_BT_CTLR_TX_PWR_PLUS_8=y CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y CONFIG_BUILD_OUTPUT_UF2=y -CONFIG_ZMK_BATTERY_REPORT_INTERVAL=9999999 + +CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y + +CONFIG_ZMK_BLE=y +CONFIG_ZMK_USB=y diff --git a/config/keymap.json b/config/keymap.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/config/west.yml b/config/west.yml index ceaefbfcb0..e35c82658b 100644 --- a/config/west.yml +++ b/config/west.yml @@ -7,7 +7,7 @@ manifest: projects: - name: zmk remote: refil - revision: adv360-z3.2-2 + revision: adv360-z3.2-3 import: app/west.yml self: path: config