Compare commits

..

27 commits

Author SHA1 Message Date
24949fe134 fix: don't wake RGB on layer change when user toggled off 2026-07-01 22:37:13 +08:00
a36c7f26f8 feat: expose persistent effect lifecycle, wakeup, fade-delay, idle hooks
Core API additions for full parity with darknao fork behaviors:

- ZMK_RGB_EFFECT_PERSISTENT flag: effect persists across RGB on/off
- on_idle(bool awake) callback: effect controls sleep/wake behavior
- is_active() callback: get_state returns on || effect->is_active()
- zmk_rgb_request_refresh_wakeup(bool): conditional wake from sleep
- zmk_rgb_set_tick_delay(int): delayed tick restart for fade-delay
- zmk_rgb_is_on(): exposed state query for modules
- state.layer_enabled restored: persistent effects survive RGB toggle
- auto_state delegates to on_idle for effects that implement it
- select_effect sets layer_enabled for PERSISTENT effects
- transient_off no longer calls on_deselect (only true deselect does)
2026-07-01 15:16:52 +08:00
8f3c4d3929 refactor: modular RGB effect registration API
Replace hardcoded effect enum/switch-case with STRUCT_SECTION_ITERABLE
registration. Effects register via ZMK_RGB_EFFECT_DEFINE macro.

Core API (rgb_effect.h):
- zmk_rgb_effect_ctx passed to render callbacks
- zmk_rgb_request_refresh() for static effects
- ZMK_RGB_EFFECT_STATIC flag skips animation timer
- on_select/on_deselect lifecycle hooks
- zmk_rgb_hsb_to_rgb/scale helpers now public

Built-in effects (solid/breathe/spectrum/swirl) use same API.
Per-key layer RGB, behaviors, DTS bindings extracted to external
zmk-rgb-effects module.
2026-07-01 14:29:24 +08:00
d94d1597c1 fix: paint layer colors on effect entry and RGB toggle
- select_effect: clear pixels + paint current layer when entering effect #4
- select_effect: restart tick timer when leaving effect #4 for normal effects
- on: paint current layer when toggling RGB on while on effect #4

Fixes: underglow stuck on old colors, frozen display until layer switch,
cycling effects requiring off/on toggle.
2026-06-25 15:32:31 +08:00
89a8f1e664 fix: disable fade animation in layer indicator effect
The effect_layer() tick handler was fading all pixels to black every
frame, then calling transient_off() which killed RGB entirely. Layer
colors are static — set by set_layer() on layer change events. No
per-frame animation needed.
2026-06-25 14:55:25 +08:00
9ab9c4619f fix: extend EFF_START range to include layer indicators (effect 4)
darknao added UNDERGLOW_EFFECT_LAYER_INDICATORS as effect #4 but
did not update the Kconfig range from [0,3] to [0,4].
2026-06-25 10:44:13 +08:00
aa79502d5a fix: guard ext_power usage behind CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER
The battery low-power code referenced ext_power unconditionally, causing
build failure when CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n.
2026-06-24 20:03:22 +08:00
a904f76092 fix: guard split_peripheral_layer_changed behind CONFIG_ZMK_SPLIT
Without this guard, non-split builds (e.g. settings_reset) fail with
undefined reference to zmk_event_zmk_split_peripheral_layer_changed.
2026-06-24 20:02:28 +08:00
darknao
28a1c4697e underglow-layer: keep RGB asleep on battery update 2026-06-24 18:57:47 +08:00
darknao
01f8f363f8 underglow-layer: add fade-delay property 2026-06-24 18:57:47 +08:00
darknao
62dc6d8ec5 underglow-layer: add battery indicators 2026-06-24 18:57:47 +08:00
darknao
0f43eeb033 fix: underglow-layer not showing on both side when powered on 2026-06-24 18:57:47 +08:00
darknao
f178f86a54 underglow-layer: use behaviors to control RGBs 2026-06-24 18:57:42 +08:00
ReFil
aa151f7473 feat(split): Compile additional events on peripheral
In preparation for the re-do of #2036 events that are useful for displays/indicators on the peripheral should be compiled on both sides so they can be raised on both sides
2026-06-24 18:55:49 +08:00
darknao
8999793d2f underglow-layer: cut off ext power if all leds are off 2026-06-24 18:55:49 +08:00
darknao
f20c011fc6 underglow-layer: enable with EXPERIMENTAL_RGB_LAYER Kconfig 2026-06-24 18:55:49 +08:00
darknao
a1d67a4e92 fix: ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE not required for underglow-layer 2026-06-24 18:55:49 +08:00
Nick Winans
bd5e07f842 feat(split): Increase split interval during idle 2026-06-24 18:55:49 +08:00
darknao
886cd1025d fix: RGB_TOG also toggle underglow-layer 2026-06-24 18:55:49 +08:00
darknao
9308ba806a underglow-layer: Don't save state on idle/resume & register activity on layer change 2026-06-24 18:55:49 +08:00
darknao
da994be0ba underglow-layer: enable only if config exists in devicetree 2026-06-24 18:55:49 +08:00
darknao
0ca086a845 underglow-layer: track layer changes with event & battery life optimization
I tried using event instead of the 25ms underglow_tick to update the underglow on
layer change only. That didn't improve the battery life much....
The second change is cutting off the led strip power if the underglow is
not defined for a layer. Power is restored if a layer with rgb is
activated, and cut off as soon as the layer is disabled.
This, on the other hand, improves the battery life a lot, especially if you
don't use rgb on your base layer.
If you are using rgb on your base layer, setting
CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE is highly recommended.
2026-06-24 18:55:49 +08:00
darknao
6f9a411793 underglow-layer: use devicetree & clean up code 2026-06-24 18:55:23 +08:00
darknao
01d0749411 valdur's mod 2026-06-24 18:53:46 +08:00
Donald Gordon
e1fc10651c ext_power: add Kconfig for initial ext_power state
Adds a Kconfig setting for the default EXT_POWER status at initialization time. Previously it was always initialized to on if no saved value was present.
2026-06-24 18:53:46 +08:00
Donald Gordon
954253c6f5 RGB underglow status support
Adds Glove80's status indicator using RGB underglow support. Requires ZMK
PR#999 and PR#1243.

The underglow status is able to show layer state, battery levels,
caps/num/scroll-lock, BLE and USB state. The underglow positions selected for
each of these indicators is configured using the new devicetree node
zmk,underglow-indicators, which takes an array of integer LED positions for each
feature.
2026-06-24 18:53:46 +08:00
Chris Andreae
319f03fd01 rgb_underglow: refresh more frequently for smoother RGB underglow 2026-06-24 18:53:46 +08:00
1295 changed files with 9662 additions and 13695 deletions

View file

@ -1,4 +1,4 @@
FROM docker.io/zmkfirmware/zmk-dev-arm:4.1-branch
FROM docker.io/zmkfirmware/zmk-dev-arm:3.5
COPY .bashrc tmp
RUN mv /tmp/.bashrc ~/.bashrc

View file

@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v4
- name: Find test directories
id: test-dirs
run: |
@ -35,12 +35,12 @@ jobs:
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-build-arm:4.1
image: docker.io/zmkfirmware/zmk-build-arm:3.5
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v4
- name: Cache west modules
uses: actions/cache@v5
uses: actions/cache@v4
env:
cache-name: cache-zephyr-modules
with:
@ -72,7 +72,7 @@ jobs:
run: BSIM_COMPONENTS_PATH="${GITHUB_WORKSPACE}/tools/bsim/components" BSIM_OUT_PATH="${GITHUB_WORKSPACE}/tools/bsim" ./run-ble-test.sh tests/ble/${{ matrix.test }}
- name: Archive artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: "${{ matrix.test }}-log-files"
path: app/build/**/*.log

View file

@ -30,28 +30,17 @@ jobs:
name: Fetch Build Keyboards
outputs:
build_matrix: ${{ env.build_matrix }}
has_valid_build_matrix: ${{ steps.fetch.outputs.has_valid_build_matrix }}
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v4
- name: Fetch Build Matrix
id: fetch
run: |
matrix_content=$(yq -oj -I0 '${{ inputs.build_matrix_path }}')
if [ -z "$matrix_content" ] || [ "$matrix_content" = "null" ]; then
echo "::notice file=${{inputs.build_matrix_path}},title=Empty build matrix file::To add a keyboard to the build, see https://zmk.dev/docs/user-setup#add-a-keyboard."
echo "has_valid_build_matrix=false" >> $GITHUB_OUTPUT
else
echo "build_matrix=$matrix_content" >> $GITHUB_ENV
echo "has_valid_build_matrix=true" >> $GITHUB_OUTPUT
echo "$matrix_content"
fi
echo "build_matrix=$(yq -oj -I0 '${{ inputs.build_matrix_path }}')" >> $GITHUB_ENV
yq -oj "${{ inputs.build_matrix_path }}"
build:
runs-on: ubuntu-latest
if: needs.matrix.outputs.has_valid_build_matrix == 'true'
container:
image: zmkfirmware/zmk-build-arm:stable
needs: matrix
@ -60,21 +49,15 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.build_matrix) }}
steps:
- name: Act Workaround # https://github.com/nektos/act/issues/973
if: ${{ env.ACT }}
run: |
apt-get update && apt-get install -y curl unzip
curl -fsSL https://deb.nodesource.com/setup_22.x | bash && apt install -y nodejs
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v4
- name: Create build directory
run: |
echo "build_dir=$(mktemp -d)" >> $GITHUB_ENV
- name: Prepare variables
shell: bash -x {0}
shell: sh -x {0}
env:
board: ${{ matrix.board }}
shield: ${{ matrix.shield }}
@ -98,7 +81,7 @@ jobs:
echo "extra_west_args=${extra_west_args}" >> $GITHUB_ENV
echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}${zmk_load_arg}" >> $GITHUB_ENV
echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV
echo "artifact_name=${artifact_name:-${shield:+$shield-}${board//\//_}-zmk}" >> $GITHUB_ENV
echo "artifact_name=${artifact_name:-${shield:+$shield-}${board}-zmk}" >> $GITHUB_ENV
- name: Copy config files to isolated temporary directory
run: |
@ -108,7 +91,7 @@ jobs:
fi
- name: Cache west modules
uses: actions/cache@v5
uses: actions/cache@v4
continue-on-error: true
env:
cache_name: cache-zephyr-${{ env.zephyr_version }}-modules
@ -133,13 +116,6 @@ jobs:
working-directory: ${{ env.base_dir }}
run: west update --fetch-opt=--filter=tree:0
- name: Check ZMK revision
working-directory: ${{ env.base_dir }}
run: |
zmk_revision=$(west list -f "{revision}" zmk)
echo "zmk_revision=${zmk_revision}" >> $GITHUB_ENV
echo "ZMK revision: ${zmk_revision}"
- name: West Zephyr export
working-directory: ${{ env.base_dir }}
run: west zephyr-export
@ -149,38 +125,6 @@ jobs:
shell: sh -x {0}
run: west build -s zmk/app -d "${{ env.build_dir }}" -b "${{ matrix.board }}" ${{ env.extra_west_args }} -- -DZMK_CONFIG=${{ env.base_dir }}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}
- name: Warn about building from main if build fails
if: failure() && env.zmk_revision == 'main'
run: |
echo "# Consider Pinning ZMK" >> $GITHUB_STEP_SUMMARY
echo "Your recent build failure might be the result of breaking changes made to ZMK's main branch." >> $GITHUB_STEP_SUMMARY
echo "Consider [pinning your ZMK version](https://zmk.dev/blog/2025/06/20/pinned-zmk) to a release for increased stability." >> $GITHUB_STEP_SUMMARY
echo "See also the [list of released versions](https://github.com/zmkfirmware/zmk/releases)." >> $GITHUB_STEP_SUMMARY
echo "If you wish to stay on main, check the most recent pending release PR for breaking changes. [Our blog](https://zmk.dev/blog) may have upgrade information if breaking changes are significant." >> $GITHUB_STEP_SUMMARY
- name: Check if building a board without explicit ZMK compat
if: always()
working-directory: "${{ env.base_dir }}/${{ inputs.config_path }}"
run: |
if ! (grep "CONFIG_ZMK_BOARD_COMPAT=y" "${{ env.build_dir }}/zephyr/.config" > /dev/null)
then
original_board=$(echo "${{ matrix.board }}" | sed -e 's$/.*$$')
west_board=$(west boards --board-root ${{ env.base_dir }}/zmk/app/module --board-root ${{ env.base_dir }}/zmk/app --board "${original_board}")
if [ -z "$west_board" ]; then
echo "Not found the board listed with west boards. Skipping further checking."
exit 0
fi
west boards --board-root ${{ env.base_dir }}/zmk/app/module --board-root ${{ env.base_dir }}/zmk/app --board "${original_board}" --format "{qualifiers}" | grep "zmk" > /dev/null
if [ $? -ne 0 ]
then
echo "::warning file=build/zephyr/.config,title=Missing ZMK Compat::The selected board does not report explicit ZMK compat. Please verify you've selected the correct board and ZMK variant if one exists"
else
echo "::error file=build/zephyr/.config,title=Missing ZMK Compat::The selected board is not set up for ZMK and there is a ZMK variant available. See https://zmk.dev/blog/2025/12/09/zephyr-4-1#zmk-board-variant."
exit 1
fi
fi
- name: ${{ env.display_name }} Kconfig file
run: |
if [ -f "${{ env.build_dir }}/zephyr/.config" ]
@ -217,19 +161,18 @@ jobs:
fi
- name: Archive (${{ env.display_name }})
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: artifact-${{ env.artifact_name }}
path: ${{ env.build_dir }}/artifacts
merge:
runs-on: ubuntu-latest
if: needs.matrix.outputs.has_valid_build_matrix == 'true'
needs: build
name: Merge Output Artifacts
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v7
uses: actions/upload-artifact/merge@v4
with:
name: ${{ inputs.archive_name }}
pattern: artifact-*

View file

@ -23,18 +23,18 @@ jobs:
if: ${{ always() }}
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-build-arm:4.1
image: docker.io/zmkfirmware/zmk-build-arm:3.5
needs: compile-matrix
strategy:
matrix:
include: ${{ fromJSON(needs.compile-matrix.outputs.include-list) }}
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Cache west modules
uses: actions/cache@v5
uses: actions/cache@v4
env:
cache-name: cache-zephyr-modules
with:
@ -57,13 +57,13 @@ jobs:
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Use Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v4
with:
node-version: "14.x"
- name: Install @actions/artifact
run: npm install @actions/artifact@5.0.3
run: npm install @actions/artifact
- name: Build
uses: actions/github-script@v9
uses: actions/github-script@v7
id: boards-list
with:
script: |
@ -95,7 +95,7 @@ jobs:
throw new Error('Failed to build one or more configurations');
}
- name: Upload artifacts
uses: actions/github-script@v9
uses: actions/github-script@v7
continue-on-error: ${{ github.event_name == 'pull_request' }}
id: boards-upload
with:
@ -123,7 +123,7 @@ jobs:
}
const cmakeName = shieldArgs['cmake-args'] ? '-' + (shieldArgs.nickname || shieldArgs['cmake-args'].split(' ').join('')) : '';
const artifactName = `${{ matrix.board }}${shieldArgs.shield ? '-' + shieldArgs.shield : ''}${cmakeName}-zmk`.replaceAll('/', '_');
const artifactName = `${{ matrix.board }}${shieldArgs.shield ? '-' + shieldArgs.shield : ''}${cmakeName}-zmk`;
await artifact.uploadArtifact(artifactName, files, rootDirectory, options);
} catch (e) {
@ -146,7 +146,7 @@ jobs:
include-list: ${{ steps.compile-list.outputs.result }}
steps:
- name: Join build lists
uses: actions/github-script@v9
uses: actions/github-script@v7
id: compile-list
with:
script: |
@ -187,16 +187,16 @@ jobs:
core-include: ${{ steps.core-list.outputs.result }}
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v4
with:
node-version: "14.x"
- name: Install js-yaml
run: npm install js-yaml
- uses: actions/github-script@v9
- uses: actions/github-script@v7
id: core-list
with:
script: |
@ -218,14 +218,14 @@ jobs:
boards-include: ${{ steps.boards-list.outputs.result }}
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v4
with:
node-version: "14.x"
- name: Install js-yaml
run: npm install js-yaml
- uses: actions/github-script@v9
- uses: actions/github-script@v7
id: boards-list
with:
script: |
@ -277,7 +277,6 @@ jobs:
);
} else {
console.error("Board without keys or interconnect");
return [];
}
break;
case "shield":
@ -303,7 +302,7 @@ jobs:
nightly-include: ${{ steps.nightly-list.outputs.result }}
steps:
- name: Create nightly list
uses: actions/github-script@v9
uses: actions/github-script@v7
id: nightly-list
with:
script: |
@ -346,17 +345,17 @@ jobs:
organized-metadata: ${{ steps.organize-metadata.outputs.result }}
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v4
with:
node-version: "14.x"
- name: Install js-yaml
run: npm install js-yaml
- name: Aggregate Metadata
uses: actions/github-script@v9
uses: actions/github-script@v7
id: aggregate-metadata
with:
script: |
@ -374,7 +373,7 @@ jobs:
result-encoding: string
- name: Organize Metadata
uses: actions/github-script@v9
uses: actions/github-script@v7
id: organize-metadata
with:
script: |
@ -428,7 +427,7 @@ jobs:
core-changes: ${{ steps.core-changes.outputs.result }}
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v4
with:
persist-credentials: false
- uses: tj-actions/changed-files@9200e69727eb73eb060652b19946b8a2fdfb654b # pin to v45.0.8 due to https://github.com/tj-actions/changed-files/issues/2463 https://www.stepsecurity.io/blog/harden-runner-detection-tj-actions-changed-files-action-is-compromised
@ -436,7 +435,7 @@ jobs:
with:
json: true
escape_json: false
- uses: actions/github-script@v9
- uses: actions/github-script@v7
id: board-changes
with:
script: |
@ -444,7 +443,7 @@ jobs:
const boardChanges = changedFiles.filter(f => f.startsWith('app/boards'));
return boardChanges.length ? 'true' : 'false';
result-encoding: string
- uses: actions/github-script@v9
- uses: actions/github-script@v7
id: core-changes
with:
script: |

View file

@ -14,7 +14,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@v4
- uses: bahmutov/npm-install@v1
with:
working-directory: docs
@ -24,7 +24,7 @@ jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@v4
- uses: bahmutov/npm-install@v1
with:
working-directory: docs

View file

@ -18,9 +18,9 @@ jobs:
validate-metadata:
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-dev-arm:4.1
image: docker.io/zmkfirmware/zmk-dev-arm:3.5
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@v4
- name: Install dependencies
run: pip install --break-system-packages -r app/scripts/requirements.txt
- name: West init

View file

@ -8,8 +8,8 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: pre-commit/action@v3.0.1

View file

@ -20,7 +20,7 @@ jobs:
minor: ${{ steps.release.outputs.minor }}
patch: ${{ steps.release.outputs.patch }}
steps:
- uses: googleapis/release-please-action@v5
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.ZMK_RELEASE_PLEASE_TOKEN }}
@ -35,7 +35,7 @@ jobs:
ZMK_RELEASE_PLEASE_TOKEN: ${{ secrets.ZMK_RELEASE_PLEASE_TOKEN }}
VERSION: v${{ needs.handle-commit.outputs.major }}.${{ needs.handle-commit.outputs.minor }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@v4
- name: Create major.minor branch
if: ${{ needs.handle-commit.outputs.patch == '0' }}
@ -69,10 +69,10 @@ jobs:
exit 1
fi
git clone "https://x-access-token:$ZMK_RELEASE_PLEASE_TOKEN@github.com/zmkfirmware/unified-zmk-config-template.git"
cd unified-zmk-config-template
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git clone "https://x-access-token:$ZMK_RELEASE_PLEASE_TOKEN@github.com/zmkfirmware/unified-zmk-config-template.git"
cd unified-zmk-config-template
sed -i 's/^\(\s*\)revision: .*/\1revision: '"$VERSION"'/' config/west.yml
sed -i 's|uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@.*|uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@'"$VERSION"'|' .github/workflows/build.yml
git add .

View file

@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-24.04
steps:
- uses: actions/stale@v10.3.0
- uses: actions/stale@v9.1.0
with:
days-before-pr-stale: 300 # ~10 months
stale-pr-label: "stale"
@ -22,7 +22,6 @@ jobs:
This PR was closed because it had no activity for over 10 months.
Feel free to give a status update or re-open when it has been
rebased and is ready for review (again).
days-before-issue-stale: 1000 # ~3 years
days-before-issue-close: -1
ascending: true # Process older PRs first
operations-per-run: 30 # Default value, listed here again to make it explicit

View file

@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v4
- name: Find test directories
id: test-dirs
run: |
@ -37,12 +37,12 @@ jobs:
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-build-arm:4.1
image: docker.io/zmkfirmware/zmk-build-arm:3.5
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v4
- name: Cache west modules
uses: actions/cache@v5
uses: actions/cache@v4
env:
cache-name: cache-zephyr-modules
with:
@ -66,10 +66,10 @@ jobs:
run: west zephyr-export
- name: Test ${{ matrix.test }}
working-directory: app
run: ZMK_TESTS_VERBOSE=1 west test tests/${{ matrix.test }}
run: west test tests/${{ matrix.test }}
- name: Archive artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: "${{ matrix.test }}-log-files"
path: app/build/**/*.log

1
.gitignore vendored
View file

@ -1,7 +1,6 @@
/.west
/bootloader
/modules
/optional
/tools
/zephyr
/zmk-config

View file

@ -11,6 +11,9 @@ project(zmk)
zephyr_linker_sources(SECTIONS include/linker/zmk-behaviors.ld)
zephyr_linker_sources(RODATA include/linker/zmk-events.ld)
if(CONFIG_ZMK_RGB_UNDERGLOW)
zephyr_linker_sources(SECTIONS include/linker/zmk-rgb-effects.ld)
endif()
if(CONFIG_ZMK_BEHAVIOR_LOCAL_IDS)
zephyr_linker_sources(DATA_SECTIONS include/linker/zmk-behavior-local-id-map.ld)
@ -23,7 +26,6 @@ zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/ext_power.h)
# Add your source file to the "app" target. This must come after
# find_package(Zephyr) which defines the target.
target_include_directories(app PRIVATE include)
add_subdirectory(src/boot)
target_sources(app PRIVATE src/stdlib.c)
target_sources(app PRIVATE src/activity.c)
target_sources(app PRIVATE src/behavior.c)
@ -72,16 +74,12 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
target_sources(app PRIVATE src/behavior_queue.c)
target_sources(app PRIVATE src/conditional_layer.c)
target_sources(app PRIVATE src/endpoints.c)
target_sources(app PRIVATE src/events/endpoint_changed.c)
target_sources(app PRIVATE src/hid_listener.c)
target_sources(app PRIVATE src/keymap.c)
target_sources(app PRIVATE src/events/layer_state_changed.c)
target_sources(app PRIVATE src/events/modifiers_state_changed.c)
target_sources(app PRIVATE src/events/keycode_state_changed.c)
target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE src/hid_indicators.c)
if (CONFIG_ZMK_BLE)
target_sources(app PRIVATE src/events/ble_active_profile_changed.c)
target_sources(app PRIVATE src/behaviors/behavior_bt.c)
target_sources(app PRIVATE src/ble.c)
target_sources(app PRIVATE src/hog.c)
@ -95,9 +93,16 @@ target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/events/battery
target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/battery.c)
target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE src/events/hid_indicators_changed.c)
add_subdirectory_ifdef(CONFIG_ZMK_HID_INDICATORS src/indicators)
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/ble_active_profile_changed.c)
target_sources_ifdef(CONFIG_ZMK_SPLIT app PRIVATE src/events/split_peripheral_status_changed.c)
target_sources_ifdef(CONFIG_ZMK_SPLIT app PRIVATE src/events/split_peripheral_layer_changed.c)
target_sources(app PRIVATE src/events/layer_state_changed.c)
target_sources(app PRIVATE src/events/modifiers_state_changed.c)
target_sources(app PRIVATE src/events/endpoint_changed.c)
add_subdirectory_ifdef(CONFIG_ZMK_SPLIT src/split)
target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/usb.c)

View file

@ -5,17 +5,6 @@ mainmenu "ZMK Firmware"
menu "ZMK"
config ZMK_BOARD_COMPAT
bool
help
Hidden symbol used to hint that a board has been specifically
set up with various ZMK requirements in mind, e.g. settings
storage, bootloader integration, etc.
Failure to set this will warn users they may want to verify they
used a ZMK variant of an upstream board, or are using a board
properly migrated to a newer ZMK version.
menu "Basic Keyboard Setup"
config ZMK_KEYBOARD_NAME
@ -42,10 +31,10 @@ config BT_DIS_PNP_VID
config BT_DIS_PNP_PID
default 0x615E
config BT_DIS_MODEL_NUMBER_STR
config BT_DIS_MODEL
default ZMK_KEYBOARD_NAME
config BT_DIS_MANUF_NAME_STR
config BT_DIS_MANUF
default "ZMK Project"
# Hardware specific overrides
@ -121,8 +110,6 @@ config ZMK_HID_INDICATORS
Enable HID indicators, used for detecting state of Caps/Scroll/Num Lock,
Kata, and Compose.
rsource "src/indicators/Kconfig"
config ZMK_HID_SEPARATE_MOD_RELEASE_REPORT
bool "Release Modifiers Separately"
help
@ -142,9 +129,7 @@ config ZMK_USB_BOOT
bool "USB Boot Protocol Support"
depends on ZMK_USB
select USB_HID_BOOT_PROTOCOL
config USB_DEVICE_INITIALIZE_AT_BOOT
default n
select USB_DEVICE_SOF
if ZMK_USB
@ -200,6 +185,10 @@ config BT_SMP_ALLOW_UNAUTH_OVERWRITE
config BT_CTLR_PHY_2M
default n if ZMK_BLE_EXPERIMENTAL_CONN
# BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY when using HCI
config BT_TINYCRYPT_ECC
default y if BT_HCI && !BT_CTLR
config ZMK_BLE_THREAD_STACK_SIZE
int "BLE notify thread stack size"
default 768
@ -230,6 +219,9 @@ config BT_GATT_NOTIFY_MULTIPLE
config BT_GATT_AUTO_SEC_REQ
default (ZMK_SPLIT_BLE && !ZMK_SPLIT_ROLE_CENTRAL)
config BT_DEVICE_APPEARANCE
default 961
config BT_PERIPHERAL_PREF_MIN_INT
default 6
@ -330,8 +322,8 @@ config ZMK_RGB_UNDERGLOW_SPD_START
range 1 5
config ZMK_RGB_UNDERGLOW_EFF_START
int "RGB underglow start effect int value related to the effect enum list"
range 0 3
int "RGB underglow start effect index (clamped to available effects at runtime)"
range 0 15
config ZMK_RGB_UNDERGLOW_ON_START
bool "RGB underglow starts on by default"
@ -443,6 +435,16 @@ config ZMK_GPIO_KEY_WAKEUP_TRIGGER
depends on DT_HAS_ZMK_GPIO_KEY_WAKEUP_TRIGGER_ENABLED && ZMK_PM_SOFT_OFF
# Power Management
if ZMK_EXT_POWER
config ZMK_EXT_POWER_START
bool "Enable external power output by default"
default y
#ZMK_EXT_POWER
endif
#Power Management
endmenu
menu "Combo options"
@ -486,15 +488,13 @@ endmenu
menu "Advanced"
rsource "src/boot/Kconfig"
menu "Initialization Priorities"
if USB_DEVICE_STACK
config ZMK_USB_INIT_PRIORITY
int "USB Init Priority"
default 96
default 94
config ZMK_USB_HID_INIT_PRIORITY
int "USB HID Init Priority"
@ -663,13 +663,6 @@ endmenu # Advanced
endmenu # ZMK
if SOC_FAMILY_NORDIC_NRF
config NRF_SOC_VALIDATE_HEADERS_DISABLED
default y
endif
config KERNEL_BIN_NAME
default "zmk"
@ -704,6 +697,11 @@ config ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION
endif # ZMK_KEYMAP_SENSORS
choice CBPRINTF_IMPLEMENTATION
default CBPRINTF_NANO
endchoice
module = ZMK
module-str = zmk
source "subsys/logging/Kconfig.template.log_config"
@ -717,6 +715,8 @@ rsource "boards/shields/*/Kconfig.shield"
# Duplicated from Kconfig.zephyr
osource "$(KCONFIG_BINARY_DIR)/Kconfig.shield.defconfig"
source "$(BOARD_DIR)/Kconfig.defconfig"
# This loads board and shield Kconfigs found under zmk-config/config/
osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.defconfig"
osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.shield"

View file

@ -2,12 +2,8 @@
# SPDX-License-Identifier: MIT
config SYSTEM_WORKQUEUE_STACK_SIZE
default 3072 if ZMK_DISPLAY
default 2048
# Basic
config BT_DEVICE_APPEARANCE
default 961
default 2048 if SOC_RP2040
default 2048 if ZMK_BLE
# HID
if ZMK_HID_REPORT_TYPE_HKRO
@ -114,5 +110,4 @@ config ZMK_BATTERY_REPORT_INTERVAL
default 60
# Imports
rsource "src/boot/Kconfig.defaults"
rsource "src/split/Kconfig.defaults"
rsource "src/split/Kconfig.defaults"

View file

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

View file

@ -0,0 +1,7 @@
/*
* Copyright (c) 2023 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
&xiao_serial { status = "disabled"; };

View file

@ -1,9 +0,0 @@
# Copyright (c) 2026 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD_ADAFRUIT_KB2040
select ZMK_BOARD_COMPAT if BOARD_ADAFRUIT_KB2040_RP2040_ZMK
imply RETAINED_MEM if BOARD_ADAFRUIT_KB2040_RP2040_ZMK
imply RETENTION if BOARD_ADAFRUIT_KB2040_RP2040_ZMK
imply RETENTION_BOOT_MODE if BOARD_ADAFRUIT_KB2040_RP2040_ZMK

View file

@ -1,23 +0,0 @@
# SPDX-License-Identifier: MIT
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000
# Enable reset by default
CONFIG_RESET=y
# Enable clock control by default
CONFIG_CLOCK_CONTROL=y
# Code partition needed to target the correct flash range
CONFIG_USE_DT_CODE_PARTITION=y
# Output UF2 by default, native bootloader supports it.
CONFIG_BUILD_OUTPUT_UF2=y
# USB HID
CONFIG_ZMK_USB=y
# Bootloader Support
CONFIG_RETAINED_MEM=y
CONFIG_RETENTION=y
CONFIG_RETENTION_BOOT_MODE=y

View file

@ -1,5 +0,0 @@
board:
extend: adafruit_kb2040
variants:
- name: zmk
qualifier: rp2040

View file

@ -1,9 +0,0 @@
# Copyright (c) 2026 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD_ADAFRUIT_QT_PY_RP2040
select ZMK_BOARD_COMPAT if BOARD_ADAFRUIT_QT_PY_RP2040_RP2040_ZMK
imply RETAINED_MEM if BOARD_ADAFRUIT_QT_PY_RP2040_RP2040_ZMK
imply RETENTION if BOARD_ADAFRUIT_QT_PY_RP2040_RP2040_ZMK
imply RETENTION_BOOT_MODE if BOARD_ADAFRUIT_QT_PY_RP2040_RP2040_ZMK

View file

@ -1,10 +0,0 @@
/*
* Copyright (c) 2023 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <../boards/adafruit/qt_py_rp2040/adafruit_qt_py_rp2040.dts>
#include <arm/raspberrypi/rp2040-boot-mode-retention.dtsi>
&xiao_serial { status = "disabled"; };

View file

@ -1,23 +0,0 @@
# SPDX-License-Identifier: MIT
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000
# Enable reset by default
CONFIG_RESET=y
# Enable clock control by default
CONFIG_CLOCK_CONTROL=y
# Code partition needed to target the correct flash range
CONFIG_USE_DT_CODE_PARTITION=y
# Output UF2 by default, native bootloader supports it.
CONFIG_BUILD_OUTPUT_UF2=y
# USB HID
CONFIG_ZMK_USB=y
# Bootloader Support
CONFIG_RETAINED_MEM=y
CONFIG_RETENTION=y
CONFIG_RETENTION_BOOT_MODE=y

View file

@ -1,5 +0,0 @@
board:
extend: adafruit_qt_py_rp2040
variants:
- name: zmk
qualifier: rp2040

View file

@ -0,0 +1,4 @@
CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_ZMK_USB=y

View file

@ -4,7 +4,4 @@
* SPDX-License-Identifier: MIT
*/
#include <../boards/adafruit/kb2040/adafruit_kb2040.dts>
#include <arm/raspberrypi/rp2040-boot-mode-retention.dtsi>
&pro_micro_serial { status = "disabled"; };

View file

@ -0,0 +1,4 @@
CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_ZMK_USB=y

View file

@ -0,0 +1,7 @@
/*
* Copyright (c) 2023 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
&xiao_serial { status = "disabled"; };

View file

@ -1,5 +1,5 @@
file_format: "1"
id: adafruit_kb2040//zmk
id: adafruit_kb2040
name: Adafruit KB2040
type: board
arch: arm

View file

@ -1,5 +1,5 @@
file_format: "1"
id: adafruit_qt_py_rp2040//zmk
id: adafruit_qt_py_rp2040
name: Adafruit QT Py RP2040
type: board
arch: arm

View file

@ -0,0 +1,7 @@
# SPDX-License-Identifier: MIT
config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT

View file

@ -0,0 +1,12 @@
#
# Copyright (c) 2023 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
config BOARD_ADV360PRO_LEFT
bool "adv360pro_left"
depends on SOC_NRF52840_QIAA
config BOARD_ADV360PRO_RIGHT
bool "adv360pro_right"
depends on SOC_NRF52840_QIAA

View file

@ -7,7 +7,6 @@
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include <common/nordic/nrf52840_uf2_boot_mode.dtsi>
#include <dt-bindings/led/led.h>
#include <dt-bindings/zmk/matrix_transform.h>
@ -72,10 +71,6 @@
};
&reg1 {
regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
};
&pwm0 {
status = "okay";
pinctrl-0 = <&pwm0_default>;

View file

@ -13,5 +13,5 @@ outputs:
- usb
- ble
siblings:
- adv360pro_left//zmk
- adv360pro_right//zmk
- adv360pro_left
- adv360pro_right

View file

@ -3,6 +3,10 @@
# SPDX-License-Identifier: MIT
#
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_ADV360PRO_LEFT=y
# Enable MPU
CONFIG_ARM_MPU=y
@ -28,6 +32,7 @@ CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y
#RGB leds config
CONFIG_WS2812_STRIP=y
CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n

View file

@ -3,6 +3,10 @@
# SPDX-License-Identifier: MIT
#
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_ADV360PRO_RIGHT=y
# Enable MPU
CONFIG_ARM_MPU=y
@ -28,6 +32,7 @@ CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y
#RGB leds config
CONFIG_WS2812_STRIP=y
CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n

View file

@ -0,0 +1,8 @@
# keeb.io BDN9 board configuration
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD_BDN9
bool "BDN9 rev2"
depends on SOC_STM32F072XB

View file

@ -11,4 +11,8 @@ config BOARD
config ZMK_KEYBOARD_NAME
default "BDN9 Rev2"
config ZMK_RGB_UNDERGLOW
select SPI
select WS2812_STRIP
endif # BOARD_BDN9

View file

@ -11,7 +11,7 @@
#include <dt-bindings/zmk/matrix_transform.h>
#include "bdn9-layouts.dtsi"
#include "bdn9_rev2-layouts.dtsi"
&physical_layout0 {
transform = <&matrix_transform0>;

View file

@ -0,0 +1,11 @@
file_format: "1"
id: bdn9_rev2
name: BDN9 Rev2
type: board
arch: arm
features:
- keys
- encoder
outputs:
- usb
url: https://keeb.io/products/bdn9-rev-2-3x3-9-key-macropad-rotary-encoder-and-rgb

View file

@ -1,6 +1,6 @@
file_format: "1"
id: bdn9//zmk
name: BDN9 (Rev2)
id: bdn9_rev2
name: BDN9 Rev2
type: board
arch: arm
outputs:
@ -9,6 +9,3 @@ features:
- keys
- encoder
url: https://keeb.io/collections/bdn9-collection/products/bdn9-rev-2-3x3-9-key-macropad-rotary-encoder-and-rgb
revisions:
- "2.0.0"
default_revision: "2.0.0"

View file

@ -1,5 +1,7 @@
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_STM32F0X=y
CONFIG_SOC_STM32F072XB=y
# 72MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
@ -12,7 +14,6 @@ CONFIG_PINCTRL=y
# Poll to avoid interrupt overlap issues
CONFIG_ZMK_KSCAN_DIRECT_POLLING=y
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536
CONFIG_ISR_STACK_SIZE=1024
# clock configuration

View file

@ -1,5 +1,5 @@
file_format: "1"
id: blackpill_f401cc//zmk
id: blackpill_f401cc
name: BlackPill F401CC
type: board
arch: arm

View file

@ -1,5 +1,5 @@
file_format: "1"
id: blackpill_f401ce//zmk
id: blackpill_f401ce
name: BlackPill F401CE
type: board
arch: arm

View file

@ -1,5 +1,5 @@
file_format: "1"
id: blackpill_f411ce//zmk
id: blackpill_f411ce
name: BlackPill F411CE
type: board
arch: arm

View file

@ -4,5 +4,5 @@ config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on BOARD_BLUEMICRO840
depends on BOARD_BLUEMICRO840_V1

View file

@ -0,0 +1,8 @@
# BlueMicro840 board configuration
# Copyright (c) 2020 Pete Johanson, Derek Schmell
# SPDX-License-Identifier: MIT
config BOARD_BLUEMICRO840_V1
bool "BlueMicro840_V1"
depends on SOC_NRF52840_QIAA

View file

@ -3,7 +3,10 @@
# Copyright (c) 2020 Pete Johanson, Derek Schmell
# SPDX-License-Identifier: MIT
if BOARD_BLUEMICRO840
if BOARD_BLUEMICRO840_V1
config BOARD
default "bluemicro840_v1"
if USB_DEVICE_STACK
@ -15,4 +18,4 @@ endif # USB_DEVICE_STACK
config BT_CTLR
default BT
endif # BOARD_BLUEMICRO840
endif # BOARD_BLUEMICRO840_V1

View file

@ -6,9 +6,8 @@
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins.dtsi"
#include "bluemicro840-pinctrl.dtsi"
#include "bluemicro840_v1-pinctrl.dtsi"
/ {
model = "BlueMicro840_V1";
@ -18,6 +17,7 @@
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zmk,battery = &vbatt;
};
leds {
@ -26,6 +26,21 @@
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
};
};
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
init-delay-ms = <20>;
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
};
vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
io-channels = <&adc 7>;
output-ohms = <2000000>;
full-ohms = <(2000000 + 806000)>;
};
};
&adc {

View file

@ -1,4 +1,4 @@
identifier: bluemicro840
identifier: bluemicro840_v1
name: BlueMicro840_V1
type: mcu
arch: arm

View file

@ -1,5 +1,5 @@
file_format: "1"
id: bluemicro840//zmk
id: bluemicro840_v1
name: BlueMicro840 v1
type: board
arch: arm

View file

@ -1,5 +1,9 @@
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_BLUEMICRO840_V1=y
# Enable MPU
CONFIG_ARM_MPU=y
@ -17,8 +21,6 @@ CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_CLOCK_CONTROL_NRF=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_ZMK_USB=y
CONFIG_ZMK_BLE=y

View file

@ -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]

View file

@ -0,0 +1,7 @@
# SPDX-License-Identifier: MIT
config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on (BOARD_BT60_V1_HS || BOARD_BT60_V1)

View file

@ -0,0 +1,12 @@
# BT60 board configuration
# Copyright (c) 2021 Polarity Works
# SPDX-License-Identifier: MIT
config BOARD_BT60_V1
bool "bt60"
depends on SOC_NRF52840_QIAA
config BOARD_BT60_V1_HS
bool "bt60 hotswap"
depends on SOC_NRF52840_QIAA

View file

@ -1,10 +1,10 @@
# Copyright (c) 2022 The ZMK Contributors
# Copyright (c) 2021 Polarity Works
# SPDX-License-Identifier: MIT
config ZMK_KEYBOARD_NAME
default "BT65" if BOARD_BT65
if BOARD_BT60_V1_HS || BOARD_BT60_V1
if BOARD_BT65
config BOARD
default "bt60"
if USB
@ -19,4 +19,7 @@ endif # USB
config BT_CTLR
default BT
endif # BOARD_BT65
config ZMK_KEYBOARD_NAME
default "BT60"
endif # BOARD_BT60

View file

@ -1,14 +1,17 @@
/*
* Copyright (c) 2022 The ZMK Contributors
* Copyright (c) 2021 Polarity Works
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include <common/nordic/nrf52840_uf2_boot_mode.dtsi>
#include <dt-bindings/zmk/matrix_transform.h>
/ {
model = "BT60";
compatible = "polarityworks,bt60";
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
@ -16,9 +19,35 @@
zmk,battery = &vbatt;
};
sensors: sensors {
compatible = "zmk,keymap-sensors";
sensors = <&left_encoder>;
triggers-per-rotation = <20>;
};
left_encoder: encoder_left {
compatible = "alps,ec11";
a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
steps = <80>;
status = "okay";
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
};
};
vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
io-channels = <&adc 2>;
output-ohms = <2000000>;
full-ohms = <(2000000 + 806000)>;
};
};
@ -42,6 +71,7 @@ zephyr_udc0: &usbd {
status = "okay";
};
&flash0 {
/*
* For more information, see:

View file

@ -4,7 +4,8 @@
* SPDX-License-Identifier: MIT
*/
#include "bt60_1_0_0.dtsi"
/dts-v1/;
#include "bt60.dtsi"
#include <layouts/common/60percent/all1u.dtsi>
#include <layouts/common/60percent/ansi.dtsi>
#include <layouts/common/60percent/hhkb.dtsi>

View file

@ -20,7 +20,7 @@
#elif defined(HHKB)
zmk,physical-layout = &layout_60_hhkb;
#else
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60.keymap"
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v1.keymap"
#endif
};
@ -147,7 +147,7 @@
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
#else
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60.keymap"
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap"
#endif
};
};

View file

@ -1,5 +1,5 @@
identifier: puchi_ble
name: puchi_ble
identifier: bt60_v1
name: BT60 V1 Soldered
type: mcu
arch: arm
toolchain:

View file

@ -0,0 +1,13 @@
file_format: "1"
id: bt60_v1
name: BT60 V1 Soldered
type: board
arch: arm
features:
- keys
- encoder
- studio
outputs:
- usb
- ble
url: https://polarityworks.com

View file

@ -1,5 +1,9 @@
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_BT60_V1=y
# Enable MPU
CONFIG_ARM_MPU=y
@ -21,4 +25,4 @@ CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_ZMK_USB=y
CONFIG_ZMK_BLE=y
CONFIG_ZMK_BLE=y

View file

@ -4,8 +4,8 @@
* SPDX-License-Identifier: MIT
*/
#include "bt60_nrf52840_zmk.dts"
#include "bt60_1_0_0.dtsi"
/dts-v1/;
#include "bt60.dtsi"
#include <layouts/common/60percent/ansi.dtsi>
/ {

View file

@ -0,0 +1,15 @@
identifier: bt60_v1_hs
name: BT60 V1 Hotswap
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- usb_device
- ble
- ieee802154
- pwm
- watchdog

View file

@ -1,5 +1,5 @@
file_format: "1"
id: bt60_hs//zmk
id: bt60_v1_hs
name: BT60 V1 Hotswap
type: board
arch: arm

View file

@ -1,5 +1,9 @@
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_BT60_V1_HS=y
# Enable MPU
CONFIG_ARM_MPU=y
@ -21,4 +25,4 @@ CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_ZMK_USB=y
CONFIG_ZMK_BLE=y
CONFIG_ZMK_BLE=y

View file

@ -0,0 +1,8 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1

View file

@ -0,0 +1,16 @@
# CKP boards configuration
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD_BT60_V2
bool "bt60_v2"
depends on SOC_NRF52840_QIAA
config BOARD_BT65_V1
bool "bt65_v1"
depends on SOC_NRF52840_QIAA
config BOARD_BT75_V1
bool "bt75_v1"
depends on SOC_NRF52840_QIAA

View file

@ -0,0 +1,28 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD
default "bt60_v2" if BOARD_BT60_V2
default "bt65_v1" if BOARD_BT65_V1
default "bt75_v1" if BOARD_BT75_V1
config ZMK_KEYBOARD_NAME
default "BT60 V2" if BOARD_BT60_V2
default "BT65" if BOARD_BT65_V1
default "BT75" if BOARD_BT75_V1
if BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1
if USB
config USB_NRFX
default y
config USB_DEVICE_STACK
default y
endif # USB
config BT_CTLR
default BT
endif # BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1

View file

@ -4,7 +4,8 @@
* SPDX-License-Identifier: MIT
*/
#include "../common/ckp.dtsi"
/dts-v1/;
#include "ckp.dtsi"
#include <layouts/common/60percent/all1u.dtsi>
#include <layouts/common/60percent/ansi.dtsi>
#include <layouts/common/60percent/hhkb.dtsi>
@ -13,7 +14,7 @@
/ {
model = "BT60_V2";
compatible = "polarityworks,bt60";
compatible = "polarityworks,bt60_v2";
chosen {
zmk,physical-layout = &layout_60_ansi;

View file

@ -20,7 +20,7 @@
#elif defined(HHKB)
zmk,physical-layout = &layout_60_hhkb;
#else
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60.keymap"
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap"
#endif
};
@ -170,7 +170,7 @@
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
#else
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60.keymap"
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap"
#endif
};

View file

@ -1,4 +1,4 @@
identifier: bt60
identifier: bt60_v2
name: BT60 V2
type: mcu
arch: arm

View file

@ -1,5 +1,5 @@
file_format: "1"
id: bt60//zmk
id: bt60_v2
name: BT60 V2
type: board
arch: arm
@ -12,7 +12,4 @@ features:
outputs:
- usb
- ble
revisions:
- 2.0.0
- 1.0.0
url: https://polarityworks.com/btckp

View file

@ -1,5 +1,9 @@
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_BT60_V2=y
# Enable MPU
CONFIG_ARM_MPU=y
@ -28,6 +32,8 @@ CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262
CONFIG_WS2812_STRIP=y
CONFIG_SPI=y
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

View file

@ -5,11 +5,7 @@
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include <common/nordic/nrf52840_uf2_boot_mode.dtsi>
#include "../common/ckp-base.dtsi"
#include "../common/ckp.dtsi"
#include "ckp.dtsi"
#include <layouts/common/65percent/all1u.dtsi>
#include <layouts/common/65percent/ansi.dtsi>
#include <layouts/common/65percent/iso.dtsi>
@ -18,7 +14,7 @@
/ {
model = "BT65_V1";
compatible = "polarityworks,bt65";
compatible = "polarityworks,bt65_v1";
chosen {
zmk,physical-layout = &layout_65_ansi;

View file

@ -20,7 +20,7 @@
#elif defined(HHKB)
zmk,physical-layout = &layout_65_hhkb;
#else
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65.keymap"
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65_v1.keymap"
#endif
};
@ -170,7 +170,7 @@
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
#else
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65.keymap"
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65_v1.keymap"
#endif
};

View file

@ -1,4 +1,4 @@
identifier: bt65
identifier: bt65_v1
name: BT65_V1
type: mcu
arch: arm

Some files were not shown because too many files have changed in this diff Show more