mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 13:05:20 -05:00
Compare commits
1 Commits
v0.2-branc
...
docs/codes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c48bc87c8 |
@@ -6,8 +6,3 @@ fi
|
|||||||
if [ -f "$WORKSPACE_DIR/zephyr/zephyr-env.sh" ]; then
|
if [ -f "$WORKSPACE_DIR/zephyr/zephyr-env.sh" ]; then
|
||||||
source "$WORKSPACE_DIR/zephyr/zephyr-env.sh"
|
source "$WORKSPACE_DIR/zephyr/zephyr-env.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$WORKSPACE_DIR/tools/bsim" ]; then
|
|
||||||
export BSIM_OUT_PATH="$WORKSPACE_DIR/tools/bsim/"
|
|
||||||
export BSIM_COMPONENTS_PATH="$WORKSPACE_DIR/tools/bsim/components/"
|
|
||||||
fi
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM docker.io/zmkfirmware/zmk-dev-arm:3.5
|
FROM docker.io/zmkfirmware/zmk-dev-arm:2.5
|
||||||
|
|
||||||
COPY .bashrc tmp
|
COPY .bashrc tmp
|
||||||
RUN mv /tmp/.bashrc ~/.bashrc
|
RUN mv /tmp/.bashrc ~/.bashrc
|
||||||
|
|||||||
@@ -9,18 +9,13 @@
|
|||||||
"mounts": [
|
"mounts": [
|
||||||
"type=volume,source=zmk-root-user,target=/root",
|
"type=volume,source=zmk-root-user,target=/root",
|
||||||
"type=volume,source=zmk-config,target=/workspaces/zmk-config",
|
"type=volume,source=zmk-config,target=/workspaces/zmk-config",
|
||||||
"type=volume,source=zmk-modules,target=/workspaces/zmk-modules",
|
|
||||||
"type=volume,source=zmk-zephyr,target=${containerWorkspaceFolder}/zephyr",
|
"type=volume,source=zmk-zephyr,target=${containerWorkspaceFolder}/zephyr",
|
||||||
"type=volume,source=zmk-zephyr-modules,target=${containerWorkspaceFolder}/modules",
|
"type=volume,source=zmk-zephyr-modules,target=${containerWorkspaceFolder}/modules",
|
||||||
"type=volume,source=zmk-zephyr-tools,target=${containerWorkspaceFolder}/tools"
|
"type=volume,source=zmk-zephyr-tools,target=${containerWorkspaceFolder}/tools"
|
||||||
],
|
],
|
||||||
"customizations": {
|
"extensions": ["ms-vscode.cpptools"],
|
||||||
"vscode": {
|
"settings": {
|
||||||
"extensions": ["ms-vscode.cpptools"],
|
"terminal.integrated.shell.linux": "/bin/bash"
|
||||||
"settings": {
|
|
||||||
"terminal.integrated.shell.linux": "/bin/bash"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"forwardPorts": [3000]
|
"forwardPorts": [3000]
|
||||||
}
|
}
|
||||||
|
|||||||
47
.github/dependabot.yml
vendored
47
.github/dependabot.yml
vendored
@@ -8,50 +8,3 @@ updates:
|
|||||||
directory: "/docs"
|
directory: "/docs"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
groups:
|
|
||||||
docusaurus-major:
|
|
||||||
applies-to: "version-updates"
|
|
||||||
dependency-type: "production"
|
|
||||||
patterns:
|
|
||||||
- "@docusaurus/*"
|
|
||||||
update-types:
|
|
||||||
- "major"
|
|
||||||
docusaurus-minor-patch:
|
|
||||||
applies-to: "version-updates"
|
|
||||||
dependency-type: "production"
|
|
||||||
patterns:
|
|
||||||
- "@docusaurus/*"
|
|
||||||
update-types:
|
|
||||||
- "minor"
|
|
||||||
- "patch"
|
|
||||||
tree-sitter:
|
|
||||||
applies-to: "version-updates"
|
|
||||||
dependency-type: "production"
|
|
||||||
patterns:
|
|
||||||
- "tree-sitter-devicetree"
|
|
||||||
- "web-tree-sitter"
|
|
||||||
prod-other-major:
|
|
||||||
applies-to: "version-updates"
|
|
||||||
dependency-type: "production"
|
|
||||||
exclude-patterns:
|
|
||||||
- "@docusaurus/*"
|
|
||||||
- "tree-sitter-devicetree"
|
|
||||||
- "web-tree-sitter"
|
|
||||||
update-types:
|
|
||||||
- "major"
|
|
||||||
prod-other-minor-patch:
|
|
||||||
applies-to: "version-updates"
|
|
||||||
dependency-type: "production"
|
|
||||||
exclude-patterns:
|
|
||||||
- "@docusaurus/*"
|
|
||||||
- "tree-sitter-devicetree"
|
|
||||||
- "web-tree-sitter"
|
|
||||||
update-types:
|
|
||||||
- "minor"
|
|
||||||
- "patch"
|
|
||||||
development:
|
|
||||||
applies-to: "version-updates"
|
|
||||||
dependency-type: "development"
|
|
||||||
update-types:
|
|
||||||
- "minor"
|
|
||||||
- "patch"
|
|
||||||
|
|||||||
20
.github/pull_request_template.md
vendored
20
.github/pull_request_template.md
vendored
@@ -1,9 +1,11 @@
|
|||||||
<!-- Note: ZMK is generally not accepting PRs for new keyboards. New generic controller PRs *may* still be accepted, please discuss on the Discord server first. -->
|
<!-- If you're adding a board/shield please fill out this check-list, otherwise you can delete it -->
|
||||||
|
## Board/Shield Check-list
|
||||||
## PR 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))
|
||||||
- [ ] Branch has a [clean commit history](https://zmk.dev/docs/development/contributing/pull-requests#clean-commit-history)
|
- [ ] `.zmk.yml` metadata file added
|
||||||
- [ ] Additional tests are included, if changing behaviors/core code that is testable.
|
- [ ] 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)
|
||||||
- [ ] 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
|
||||||
- [ ] [Pre-commit](https://zmk.dev/docs/development/local-toolchain/pre-commit) used to check formatting of files, commit messages, etc.
|
- [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader))
|
||||||
- [ ] Includes any necessary [documentation changes](https://zmk.dev/docs/development/contributing/documentation).
|
- [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable
|
||||||
|
- [ ] If split, no name added for the right/peripheral half
|
||||||
|
- [ ] `.conf` file has optional extra features commented out
|
||||||
|
|||||||
78
.github/workflows/ble-test.yml
vendored
78
.github/workflows/ble-test.yml
vendored
@@ -1,78 +0,0 @@
|
|||||||
name: BLE Tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- ".github/workflows/ble-test.yml"
|
|
||||||
- "app/tests/ble/**"
|
|
||||||
- "app/src/**"
|
|
||||||
- "app/run-ble-test.sh"
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- ".github/workflows/ble-test.yml"
|
|
||||||
- "app/tests/ble/**"
|
|
||||||
- "app/src/**"
|
|
||||||
- "app/run-ble-test.sh"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
collect-tests:
|
|
||||||
outputs:
|
|
||||||
test-dirs: ${{ steps.test-dirs.outputs.test-dirs }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Find test directories
|
|
||||||
id: test-dirs
|
|
||||||
run: |
|
|
||||||
cd app/tests/ble
|
|
||||||
export TESTS=$(ls -d * | grep -v central | jq -R -s -c 'split("\n")[:-1]')
|
|
||||||
echo "test-dirs=${TESTS}" > $GITHUB_OUTPUT
|
|
||||||
run-tests:
|
|
||||||
needs: collect-tests
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: docker.io/zmkfirmware/zmk-build-arm:3.5
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Cache west modules
|
|
||||||
uses: actions/cache@v4
|
|
||||||
env:
|
|
||||||
cache-name: cache-zephyr-modules
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
modules/
|
|
||||||
tools/
|
|
||||||
zephyr/
|
|
||||||
bootloader/
|
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
||||||
${{ runner.os }}-build-
|
|
||||||
${{ runner.os }}-
|
|
||||||
timeout-minutes: 2
|
|
||||||
continue-on-error: true
|
|
||||||
- name: Initialize workspace (west init)
|
|
||||||
run: west init -l app
|
|
||||||
- name: Enable babblesim group filter
|
|
||||||
run: west config manifest.group-filter -- +babblesim
|
|
||||||
- name: Update modules (west update)
|
|
||||||
run: west update
|
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
|
||||||
run: west zephyr-export
|
|
||||||
- name: Build BabbleSim components
|
|
||||||
working-directory: tools/bsim
|
|
||||||
run: make everything
|
|
||||||
- name: Test ${{ matrix.test }}
|
|
||||||
working-directory: app
|
|
||||||
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@v4
|
|
||||||
with:
|
|
||||||
name: "${{ matrix.test }}-log-files"
|
|
||||||
path: app/build/**/*.log
|
|
||||||
182
.github/workflows/build-user-config.yml
vendored
182
.github/workflows/build-user-config.yml
vendored
@@ -1,182 +0,0 @@
|
|||||||
name: Reusable user config build
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
build_matrix_path:
|
|
||||||
description: "Path to the build matrix file"
|
|
||||||
default: "build.yaml"
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
config_path:
|
|
||||||
description: "Path to the config directory"
|
|
||||||
default: "config"
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
fallback_binary:
|
|
||||||
description: "Fallback binary format, if no *.uf2 file was built"
|
|
||||||
default: "bin"
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
archive_name:
|
|
||||||
description: "Archive output file name"
|
|
||||||
default: "firmware"
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
matrix:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
name: Fetch Build Keyboards
|
|
||||||
outputs:
|
|
||||||
build_matrix: ${{ env.build_matrix }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install yaml2json
|
|
||||||
run: python3 -m pip install remarshal
|
|
||||||
|
|
||||||
- name: Fetch Build Matrix
|
|
||||||
run: |
|
|
||||||
echo "build_matrix=$(yaml2json '${{ inputs.build_matrix_path }}' | jq -c .)" >> $GITHUB_ENV
|
|
||||||
yaml2json "${{ inputs.build_matrix_path }}" | jq
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: zmkfirmware/zmk-build-arm:stable
|
|
||||||
needs: matrix
|
|
||||||
name: Build
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix: ${{ fromJson(needs.matrix.outputs.build_matrix) }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Create build directory
|
|
||||||
run: |
|
|
||||||
echo "build_dir=$(mktemp -d)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Prepare variables
|
|
||||||
shell: sh -x {0}
|
|
||||||
env:
|
|
||||||
board: ${{ matrix.board }}
|
|
||||||
shield: ${{ matrix.shield }}
|
|
||||||
artifact_name: ${{ matrix.artifact-name }}
|
|
||||||
snippet: ${{ matrix.snippet }}
|
|
||||||
run: |
|
|
||||||
if [ -e zephyr/module.yml ]; then
|
|
||||||
export zmk_load_arg=" -DZMK_EXTRA_MODULES='${GITHUB_WORKSPACE}'"
|
|
||||||
new_tmp_dir="${TMPDIR:-/tmp}/zmk-config"
|
|
||||||
mkdir -p "${new_tmp_dir}"
|
|
||||||
echo "base_dir=${new_tmp_dir}" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "base_dir=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${snippet}" ]; then
|
|
||||||
extra_west_args="-S \"${snippet}\""
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV
|
|
||||||
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
|
|
||||||
|
|
||||||
- name: Copy config files to isolated temporary directory
|
|
||||||
run: |
|
|
||||||
if [ "${{ env.base_dir }}" != "${GITHUB_WORKSPACE}" ]; then
|
|
||||||
mkdir "${{ env.base_dir }}/${{ inputs.config_path }}"
|
|
||||||
cp -R ${{ inputs.config_path }}/* "${{ env.base_dir }}/${{ inputs.config_path }}/"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Cache west modules
|
|
||||||
uses: actions/cache@v4
|
|
||||||
continue-on-error: true
|
|
||||||
env:
|
|
||||||
cache_name: cache-zephyr-${{ env.zephyr_version }}-modules
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
${{ env.base_dir }}/modules/
|
|
||||||
${{ env.base_dir }}/tools/
|
|
||||||
${{ env.base_dir }}/zephyr/
|
|
||||||
${{ env.base_dir }}/bootloader/
|
|
||||||
${{ env.base_dir }}/zmk/
|
|
||||||
key: ${{ runner.os }}-build-${{ env.cache_name }}-${{ hashFiles('**/west.yml', '**/build.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-build-${{ env.cache_name }}-
|
|
||||||
${{ runner.os }}-build-
|
|
||||||
${{ runner.os }}-
|
|
||||||
|
|
||||||
- name: West Init
|
|
||||||
working-directory: ${{ env.base_dir }}
|
|
||||||
run: west init -l "${{ env.base_dir }}/${{ inputs.config_path }}"
|
|
||||||
|
|
||||||
- name: West Update
|
|
||||||
working-directory: ${{ env.base_dir }}
|
|
||||||
run: west update
|
|
||||||
|
|
||||||
- name: West Zephyr export
|
|
||||||
working-directory: ${{ env.base_dir }}
|
|
||||||
run: west zephyr-export
|
|
||||||
|
|
||||||
- name: West Build (${{ env.display_name }})
|
|
||||||
working-directory: ${{ env.base_dir }}
|
|
||||||
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: ${{ env.display_name }} Kconfig file
|
|
||||||
run: |
|
|
||||||
if [ -f "${{ env.build_dir }}/zephyr/.config" ]
|
|
||||||
then
|
|
||||||
grep -v -e "^#" -e "^$" "${{ env.build_dir }}/zephyr/.config" | sort
|
|
||||||
else
|
|
||||||
echo "No Kconfig output"
|
|
||||||
fi
|
|
||||||
if: ${{ !cancelled() }}
|
|
||||||
|
|
||||||
- name: ${{ env.display_name }} Devicetree file
|
|
||||||
run: |
|
|
||||||
if [ -f "${{ env.build_dir }}/zephyr/zephyr.dts" ]
|
|
||||||
then
|
|
||||||
cat "${{ env.build_dir }}/zephyr/zephyr.dts"
|
|
||||||
elif [ -f "${{ env.build_dir }}/zephyr/zephyr.dts.pre" ]
|
|
||||||
then
|
|
||||||
cat -s "${{ env.build_dir }}/zephyr/zephyr.dts.pre"
|
|
||||||
else
|
|
||||||
echo "No Devicetree output"
|
|
||||||
fi
|
|
||||||
if: ${{ !cancelled() }}
|
|
||||||
|
|
||||||
- name: Rename artifacts
|
|
||||||
shell: sh -x {0}
|
|
||||||
run: |
|
|
||||||
mkdir "${{ env.build_dir }}/artifacts"
|
|
||||||
if [ -f "${{ env.build_dir }}/zephyr/zmk.uf2" ]
|
|
||||||
then
|
|
||||||
cp "${{ env.build_dir }}/zephyr/zmk.uf2" "${{ env.build_dir }}/artifacts/${{ env.artifact_name }}.uf2"
|
|
||||||
elif [ -f "${{ env.build_dir }}/zephyr/zmk.${{ inputs.fallback_binary }}" ]
|
|
||||||
then
|
|
||||||
cp "${{ env.build_dir }}/zephyr/zmk.${{ inputs.fallback_binary }}" "${{ env.build_dir }}/artifacts/${{ env.artifact_name }}.${{ inputs.fallback_binary }}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Archive (${{ env.display_name }})
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: artifact-${{ env.artifact_name }}
|
|
||||||
path: ${{ env.build_dir }}/artifacts
|
|
||||||
|
|
||||||
merge:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: build
|
|
||||||
name: Merge Output Artifacts
|
|
||||||
steps:
|
|
||||||
- name: Merge Artifacts
|
|
||||||
uses: actions/upload-artifact/merge@v4
|
|
||||||
with:
|
|
||||||
name: ${{ inputs.archive_name }}
|
|
||||||
pattern: artifact-*
|
|
||||||
delete-merged: true
|
|
||||||
509
.github/workflows/build.yml
vendored
509
.github/workflows/build.yml
vendored
@@ -9,32 +9,80 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- ".github/workflows/build.yml"
|
- ".github/workflows/build.yml"
|
||||||
- "app/**"
|
- "app/**"
|
||||||
schedule:
|
|
||||||
- cron: "22 4 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'schedule' }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: ${{ always() }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker.io/zmkfirmware/zmk-build-arm:3.5
|
image: docker.io/zmkfirmware/zmk-build-arm:2.5
|
||||||
needs: compile-matrix
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include: ${{ fromJSON(needs.compile-matrix.outputs.include-list) }}
|
board:
|
||||||
|
- bluemicro840_v1
|
||||||
|
- nice_nano
|
||||||
|
- nice_nano_v2
|
||||||
|
- nrfmicro_13
|
||||||
|
- proton_c
|
||||||
|
shield:
|
||||||
|
- bfo9000_left
|
||||||
|
- bfo9000_right
|
||||||
|
- boardsource3x4
|
||||||
|
- corne_left
|
||||||
|
- corne_right
|
||||||
|
- cradio_left
|
||||||
|
- cradio_right
|
||||||
|
- crbn
|
||||||
|
- eek
|
||||||
|
- helix_left
|
||||||
|
- helix_right
|
||||||
|
- iris_left
|
||||||
|
- iris_right
|
||||||
|
- jian_left
|
||||||
|
- jian_right
|
||||||
|
- jorne_left
|
||||||
|
- jorne_right
|
||||||
|
- kyria_left
|
||||||
|
- kyria_right
|
||||||
|
- lily58_left
|
||||||
|
- lily58_right
|
||||||
|
- microdox_left
|
||||||
|
- microdox_right
|
||||||
|
- nibble
|
||||||
|
- qaz
|
||||||
|
- quefrency_left
|
||||||
|
- quefrency_right
|
||||||
|
- reviung41
|
||||||
|
- romac
|
||||||
|
- romac_plus
|
||||||
|
- settings_reset
|
||||||
|
- sofle_left
|
||||||
|
- sofle_right
|
||||||
|
- splitreus62_left
|
||||||
|
- splitreus62_right
|
||||||
|
- tg4x
|
||||||
|
- tidbit
|
||||||
|
cmake-args: [""]
|
||||||
|
include:
|
||||||
|
- board: bdn9_rev2
|
||||||
|
- board: dz60rgb_rev1
|
||||||
|
- 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
|
||||||
|
skip-archive: true
|
||||||
|
- board: nice_nano_v2
|
||||||
|
shield: kyria_right
|
||||||
|
cmake-args: -DCONFIG_ZMK_DISPLAY=y
|
||||||
|
skip-archive: true
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Cache west modules
|
- name: Cache west modules
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: cache-zephyr-modules
|
cache-name: cache-zephyr-modules
|
||||||
with:
|
with:
|
||||||
@@ -43,11 +91,11 @@ jobs:
|
|||||||
tools/
|
tools/
|
||||||
zephyr/
|
zephyr/
|
||||||
bootloader/
|
bootloader/
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
|
key: 4-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
4-${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
${{ runner.os }}-build-
|
4-${{ runner.os }}-build-
|
||||||
${{ runner.os }}-
|
4-${{ runner.os }}-
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Initialize workspace (west init)
|
- name: Initialize workspace (west init)
|
||||||
@@ -56,400 +104,29 @@ jobs:
|
|||||||
run: west update
|
run: west update
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Use Node.js
|
- name: Prepare variables
|
||||||
uses: actions/setup-node@v4
|
id: variables
|
||||||
|
run: |
|
||||||
|
SHIELD_ARG=
|
||||||
|
ARTIFACT_NAME="${{ matrix.board }}"
|
||||||
|
|
||||||
|
if [ -n "${{ matrix.shield }}" ]; then
|
||||||
|
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
|
||||||
|
ARTIFACT_NAME="${ARTIFACT_NAME}-${{ matrix.shield }}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ARTIFACT_NAME="${ARTIFACT_NAME}-zmk"
|
||||||
|
|
||||||
|
echo ::set-output name=shield-arg::${SHIELD_ARG}
|
||||||
|
echo ::set-output name=artifact-name::${ARTIFACT_NAME}
|
||||||
|
- name: Build (west build)
|
||||||
|
run: west build -s app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} ${{ matrix.cmake-args }}
|
||||||
|
- name: Archive artifacts
|
||||||
|
if: ${{ !matrix.skip-archive }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
node-version: "14.x"
|
name: "${{ steps.variables.outputs.artifact-name }}"
|
||||||
- name: Install @actions/artifact
|
path: |
|
||||||
run: npm install @actions/artifact
|
build/zephyr/zmk.hex
|
||||||
- name: Build
|
build/zephyr/zmk.uf2
|
||||||
uses: actions/github-script@v7
|
continue-on-error: true
|
||||||
id: boards-list
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
const execSync = require('child_process').execSync;
|
|
||||||
|
|
||||||
const buildShieldArgs = JSON.parse(`${{ matrix.shieldArgs }}`);
|
|
||||||
|
|
||||||
let error = false;
|
|
||||||
|
|
||||||
for (const shieldArgs of buildShieldArgs) {
|
|
||||||
try {
|
|
||||||
console.log(`::group::${{ matrix.board}} ${shieldArgs.shield} Build`)
|
|
||||||
|
|
||||||
const output = execSync(`west build -s app -p -b ${{ matrix.board }} ${shieldArgs.snippet ? '-S ' + shieldArgs.snippet : ''} -- ${shieldArgs.shield ? '-DSHIELD="' + shieldArgs.shield + '"' : ''} ${shieldArgs['cmake-args'] || ''}`);
|
|
||||||
|
|
||||||
console.log(output.toString());
|
|
||||||
} catch (e) {
|
|
||||||
console.error(`::error::Failed to build ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
|
|
||||||
console.error(e);
|
|
||||||
error = true;
|
|
||||||
} finally {
|
|
||||||
console.log('::endgroup::');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error) {
|
|
||||||
throw new Error('Failed to build one or more configurations');
|
|
||||||
}
|
|
||||||
- name: Upload artifacts
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
continue-on-error: ${{ github.event_name == 'pull_request' }}
|
|
||||||
id: boards-upload
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
const {default: artifact} = require('@actions/artifact');
|
|
||||||
|
|
||||||
const buildShieldArgs = JSON.parse(`${{ matrix.shieldArgs }}`);
|
|
||||||
|
|
||||||
let error = false;
|
|
||||||
|
|
||||||
for (const shieldArgs of buildShieldArgs) {
|
|
||||||
try {
|
|
||||||
console.log(`::group::${{ matrix.board}} ${shieldArgs.shield} Upload`)
|
|
||||||
|
|
||||||
const fileExtensions = ["hex", "uf2"];
|
|
||||||
|
|
||||||
const files = fileExtensions
|
|
||||||
.map(extension => "build/zephyr/zmk." + extension)
|
|
||||||
.filter(path => fs.existsSync(path));
|
|
||||||
|
|
||||||
const rootDirectory = 'build/zephyr';
|
|
||||||
const options = {
|
|
||||||
continueOnError: true
|
|
||||||
}
|
|
||||||
|
|
||||||
const cmakeName = shieldArgs['cmake-args'] ? '-' + (shieldArgs.nickname || shieldArgs['cmake-args'].split(' ').join('')) : '';
|
|
||||||
const artifactName = `${{ matrix.board }}${shieldArgs.shield ? '-' + shieldArgs.shield : ''}${cmakeName}-zmk`;
|
|
||||||
|
|
||||||
await artifact.uploadArtifact(artifactName, files, rootDirectory, options);
|
|
||||||
} catch (e) {
|
|
||||||
console.error(`::error::Failed to upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
|
|
||||||
console.error(e);
|
|
||||||
error = true;
|
|
||||||
} finally {
|
|
||||||
console.log('::endgroup::');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error) {
|
|
||||||
throw new Error('Failed to build one or more configurations');
|
|
||||||
}
|
|
||||||
compile-matrix:
|
|
||||||
if: ${{ !cancelled() }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [core-coverage, board-changes, nightly]
|
|
||||||
outputs:
|
|
||||||
include-list: ${{ steps.compile-list.outputs.result }}
|
|
||||||
steps:
|
|
||||||
- name: Join build lists
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
id: compile-list
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const coreCoverage = `${{ needs.core-coverage.outputs.core-include }}` || "[]";
|
|
||||||
const boardChanges = `${{ needs.board-changes.outputs.boards-include }}` || "[]";
|
|
||||||
const nightly = `${{ needs.nightly.outputs.nightly-include }}` || "[]";
|
|
||||||
|
|
||||||
const combined = [
|
|
||||||
...JSON.parse(coreCoverage),
|
|
||||||
...JSON.parse(boardChanges),
|
|
||||||
...JSON.parse(nightly)
|
|
||||||
];
|
|
||||||
const combinedUnique = [...new Map(combined.map(el => [JSON.stringify(el), el])).values()];
|
|
||||||
|
|
||||||
const perBoard = {};
|
|
||||||
|
|
||||||
for (const configuration of combinedUnique) {
|
|
||||||
if (!perBoard[configuration.board])
|
|
||||||
perBoard[configuration.board] = [];
|
|
||||||
|
|
||||||
perBoard[configuration.board].push({
|
|
||||||
shield: configuration.shield,
|
|
||||||
'cmake-args': configuration['cmake-args'],
|
|
||||||
snippet: configuration.snippet,
|
|
||||||
nickname: configuration.nickname
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
return Object.entries(perBoard).map(([board, shieldArgs]) => ({
|
|
||||||
board,
|
|
||||||
shieldArgs: JSON.stringify(shieldArgs),
|
|
||||||
}));
|
|
||||||
core-coverage:
|
|
||||||
if: ${{ needs.get-changed-files.outputs.core-changes == 'true' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: get-changed-files
|
|
||||||
outputs:
|
|
||||||
core-include: ${{ steps.core-list.outputs.result }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Use Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: "14.x"
|
|
||||||
- name: Install js-yaml
|
|
||||||
run: npm install js-yaml
|
|
||||||
- uses: actions/github-script@v7
|
|
||||||
id: core-list
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
const yaml = require('js-yaml');
|
|
||||||
|
|
||||||
const coreCoverage = yaml.load(fs.readFileSync('app/core-coverage.yml', 'utf8'));
|
|
||||||
|
|
||||||
let include = coreCoverage.board.flatMap(board =>
|
|
||||||
coreCoverage.shield.map(shield => ({ board, shield }))
|
|
||||||
);
|
|
||||||
|
|
||||||
return [...include, ...coreCoverage.include];
|
|
||||||
board-changes:
|
|
||||||
if: ${{ needs.get-changed-files.outputs.board-changes == 'true' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [get-grouped-hardware, get-changed-files]
|
|
||||||
outputs:
|
|
||||||
boards-include: ${{ steps.boards-list.outputs.result }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Use Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: "14.x"
|
|
||||||
- name: Install js-yaml
|
|
||||||
run: npm install js-yaml
|
|
||||||
- uses: actions/github-script@v7
|
|
||||||
id: boards-list
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
const yaml = require('js-yaml');
|
|
||||||
|
|
||||||
const changedFiles = JSON.parse(`${{ needs.get-changed-files.outputs.changed-files }}`);
|
|
||||||
const metadata = JSON.parse(`${{ needs.get-grouped-hardware.outputs.organized-metadata }}`);
|
|
||||||
const boardChanges = new Set(changedFiles.filter(f => f.startsWith('app/boards')).map(f => f.split('/').slice(0, 4).join('/')));
|
|
||||||
|
|
||||||
return (await Promise.all([...boardChanges].flatMap(async bc => {
|
|
||||||
const globber = await glob.create(bc + "/*.zmk.yml");
|
|
||||||
const files = await globber.glob();
|
|
||||||
|
|
||||||
const aggregated = files.flatMap((f) =>
|
|
||||||
yaml.loadAll(fs.readFileSync(f, "utf8"))
|
|
||||||
);
|
|
||||||
|
|
||||||
const boardAndShield = (b, s) => {
|
|
||||||
if (s.siblings) {
|
|
||||||
return s.siblings.map(shield => ({
|
|
||||||
board: b.id,
|
|
||||||
shield,
|
|
||||||
}));
|
|
||||||
} else {
|
|
||||||
return {
|
|
||||||
board: b.id,
|
|
||||||
shield: s.id
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return aggregated.flatMap(hm => {
|
|
||||||
switch (hm.type) {
|
|
||||||
case "board":
|
|
||||||
if (hm.features && hm.features.includes("keys")) {
|
|
||||||
if (hm.siblings) {
|
|
||||||
return hm.siblings.map(board => ({
|
|
||||||
board,
|
|
||||||
}));
|
|
||||||
} else {
|
|
||||||
return {
|
|
||||||
board: hm.id
|
|
||||||
};
|
|
||||||
}
|
|
||||||
} else if (hm.exposes) {
|
|
||||||
return hm.exposes.flatMap(i =>
|
|
||||||
metadata.interconnects[i].shields.flatMap(s => boardAndShield(hm, s))
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
console.error("Board without keys or interconnect");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "shield":
|
|
||||||
if (hm.features && hm.features.includes("keys")) {
|
|
||||||
return hm.requires.flatMap(i =>
|
|
||||||
metadata.interconnects[i].boards.flatMap(b => boardAndShield(b, hm))
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
console.warn("Unhandled shield without keys");
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "interconnect":
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}))).flat();
|
|
||||||
nightly:
|
|
||||||
if: ${{ github.event_name == 'schedule' && github.repository_owner == 'zmkfirmware' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: get-grouped-hardware
|
|
||||||
outputs:
|
|
||||||
nightly-include: ${{ steps.nightly-list.outputs.result }}
|
|
||||||
steps:
|
|
||||||
- name: Create nightly list
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
id: nightly-list
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const metadata = JSON.parse(`${{ needs.get-grouped-hardware.outputs.organized-metadata }}`);
|
|
||||||
|
|
||||||
let includeOnboard = metadata.onboard.flatMap(b => {
|
|
||||||
if (b.siblings) {
|
|
||||||
return b.siblings.map(board => ({
|
|
||||||
board,
|
|
||||||
}));
|
|
||||||
} else {
|
|
||||||
return {
|
|
||||||
board: b.id,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
let includeInterconnect = Object.values(metadata.interconnects).flatMap(i =>
|
|
||||||
i.boards.flatMap(b =>
|
|
||||||
i.shields.flatMap(s => {
|
|
||||||
if (s.siblings) {
|
|
||||||
return s.siblings.map(shield => ({
|
|
||||||
board: b.id,
|
|
||||||
shield,
|
|
||||||
}));
|
|
||||||
} else {
|
|
||||||
return {
|
|
||||||
board: b.id,
|
|
||||||
shield: s.id,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
return [...includeOnboard, ...includeInterconnect];
|
|
||||||
get-grouped-hardware:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
organized-metadata: ${{ steps.organize-metadata.outputs.result }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Use Node.js
|
|
||||||
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@v7
|
|
||||||
id: aggregate-metadata
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
const yaml = require('js-yaml');
|
|
||||||
|
|
||||||
const globber = await glob.create("app/boards/**/*.zmk.yml");
|
|
||||||
const files = await globber.glob();
|
|
||||||
|
|
||||||
const aggregated = files.flatMap((f) =>
|
|
||||||
yaml.loadAll(fs.readFileSync(f, "utf8"))
|
|
||||||
);
|
|
||||||
|
|
||||||
return JSON.stringify(aggregated).replace(/\\/g,"\\\\").replace(/`/g,"\\`");
|
|
||||||
result-encoding: string
|
|
||||||
|
|
||||||
- name: Organize Metadata
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
id: organize-metadata
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const hardware = JSON.parse(`${{ steps.aggregate-metadata.outputs.result }}`);
|
|
||||||
|
|
||||||
const grouped = hardware.reduce((agg, hm) => {
|
|
||||||
switch (hm.type) {
|
|
||||||
case "board":
|
|
||||||
if (hm.features && hm.features.includes("keys")) {
|
|
||||||
agg.onboard.push(hm);
|
|
||||||
} else if (hm.exposes) {
|
|
||||||
hm.exposes.forEach((element) => {
|
|
||||||
let ic = agg.interconnects[element] || {
|
|
||||||
boards: [],
|
|
||||||
shields: [],
|
|
||||||
};
|
|
||||||
ic.boards.push(hm);
|
|
||||||
agg.interconnects[element] = ic;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
console.error("Board without keys or interconnect");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "shield":
|
|
||||||
if (hm.features && hm.features.includes("keys")) {
|
|
||||||
hm.requires.forEach((id) => {
|
|
||||||
let ic = agg.interconnects[id] || { boards: [], shields: [] };
|
|
||||||
ic.shields.push(hm);
|
|
||||||
agg.interconnects[id] = ic;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "interconnect":
|
|
||||||
let ic = agg.interconnects[hm.id] || { boards: [], shields: [] };
|
|
||||||
ic.interconnect = hm;
|
|
||||||
agg.interconnects[hm.id] = ic;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return agg;
|
|
||||||
},
|
|
||||||
{ onboard: [], interconnects: {} });
|
|
||||||
|
|
||||||
return JSON.stringify(grouped).replace(/\\/g,"\\\\").replace(/`/g,"\\`");
|
|
||||||
result-encoding: string
|
|
||||||
get-changed-files:
|
|
||||||
if: ${{ github.event_name != 'schedule' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
changed-files: ${{ steps.changed-files.outputs.all_changed_files }}
|
|
||||||
board-changes: ${{ steps.board-changes.outputs.result }}
|
|
||||||
core-changes: ${{ steps.core-changes.outputs.result }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- uses: tj-actions/changed-files@v45
|
|
||||||
id: changed-files
|
|
||||||
with:
|
|
||||||
json: true
|
|
||||||
escape_json: false
|
|
||||||
- uses: actions/github-script@v7
|
|
||||||
id: board-changes
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all_changed_files }}`);
|
|
||||||
const boardChanges = changedFiles.filter(f => f.startsWith('app/boards'));
|
|
||||||
return boardChanges.length ? 'true' : 'false';
|
|
||||||
result-encoding: string
|
|
||||||
- uses: actions/github-script@v7
|
|
||||||
id: core-changes
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all_changed_files }}`);
|
|
||||||
const boardChanges = changedFiles.filter(f => f.startsWith('app/boards'));
|
|
||||||
const appChanges = changedFiles.filter(f => f.startsWith('app'));
|
|
||||||
const ymlChanges = changedFiles.includes('.github/workflows/build.yml');
|
|
||||||
return boardChanges.length < appChanges.length || ymlChanges ? 'true' : 'false';
|
|
||||||
result-encoding: string
|
|
||||||
|
|||||||
29
.github/workflows/clang-format-lint.yml
vendored
Normal file
29
.github/workflows/clang-format-lint.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
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@v2
|
||||||
|
- uses: DoozyX/clang-format-lint-action@v0.13
|
||||||
|
with:
|
||||||
|
source: "./app"
|
||||||
|
extensions: "h,c"
|
||||||
14
.github/workflows/doc-checks.yml
vendored
14
.github/workflows/doc-checks.yml
vendored
@@ -14,17 +14,27 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- uses: bahmutov/npm-install@v1
|
- uses: bahmutov/npm-install@v1
|
||||||
with:
|
with:
|
||||||
working-directory: docs
|
working-directory: docs
|
||||||
- name: ESLint
|
- name: ESLint
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
working-directory: docs
|
working-directory: docs
|
||||||
|
prettier:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: bahmutov/npm-install@v1
|
||||||
|
with:
|
||||||
|
working-directory: docs
|
||||||
|
- name: Prettier check
|
||||||
|
run: npm run prettier:check
|
||||||
|
working-directory: docs
|
||||||
typecheck:
|
typecheck:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- uses: bahmutov/npm-install@v1
|
- uses: bahmutov/npm-install@v1
|
||||||
with:
|
with:
|
||||||
working-directory: docs
|
working-directory: docs
|
||||||
|
|||||||
@@ -15,14 +15,25 @@ on:
|
|||||||
- "app/scripts/west_commands/metadata.py"
|
- "app/scripts/west_commands/metadata.py"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check-metadata-format:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: bahmutov/npm-install@v1
|
||||||
|
with:
|
||||||
|
working-directory: app
|
||||||
|
- name: Prettier Check
|
||||||
|
run: npm run prettier:check
|
||||||
|
working-directory: app
|
||||||
validate-metadata:
|
validate-metadata:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker.io/zmkfirmware/zmk-dev-arm:3.5
|
image: docker.io/zmkfirmware/zmk-dev-arm:2.5
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install --break-system-packages -r app/scripts/requirements.txt
|
run: pip install -r app/scripts/requirements.txt
|
||||||
- name: West init
|
- name: West init
|
||||||
run: west init -l app
|
run: west init -l app
|
||||||
- name: Update modules (west update)
|
- name: Update modules (west update)
|
||||||
|
|||||||
15
.github/workflows/pre-commit.yml
vendored
15
.github/workflows/pre-commit.yml
vendored
@@ -1,15 +0,0 @@
|
|||||||
name: pre-commit
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pre-commit:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
- uses: pre-commit/action@v3.0.1
|
|
||||||
38
.github/workflows/release-please.yml
vendored
38
.github/workflows/release-please.yml
vendored
@@ -1,38 +0,0 @@
|
|||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- "v*.*-branch"
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
name: release-please
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release-please:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: googleapis/release-please-action@v4
|
|
||||||
id: release
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.ZMK_RELEASE_PLEASE_TOKEN }}
|
|
||||||
target-branch: ${{ github.ref_name }}
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
if: ${{ steps.release.outputs.release_created }}
|
|
||||||
- name: create major, minor branch
|
|
||||||
if: ${{ steps.release.outputs.release_created && steps.release.outputs.patch == '0' }}
|
|
||||||
run: |
|
|
||||||
git remote add gh-token-branch "https://x-access-token:${{ secrets.ZMK_RELEASE_PLEASE_TOKEN }}@github.com/${{ github.repository }}.git"
|
|
||||||
git checkout -b v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}-branch
|
|
||||||
git push gh-token-branch v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}-branch
|
|
||||||
- name: tag major and minor versions
|
|
||||||
if: ${{ steps.release.outputs.release_created }}
|
|
||||||
run: |
|
|
||||||
git config user.name github-actions[bot]
|
|
||||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
||||||
git remote add gh-token "https://x-access-token:${{ secrets.ZMK_RELEASE_PLEASE_TOKEN }}@github.com/${{ github.repository }}.git"
|
|
||||||
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
|
|
||||||
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
|
|
||||||
git push --force gh-token v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
|
|
||||||
46
.github/workflows/test.yml
vendored
46
.github/workflows/test.yml
vendored
@@ -4,45 +4,24 @@ on:
|
|||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- ".github/workflows/test.yml"
|
- ".github/workflows/test.yml"
|
||||||
- "app/run-test.sh"
|
|
||||||
- "app/tests/**"
|
- "app/tests/**"
|
||||||
- "app/src/**"
|
- "app/src/**"
|
||||||
- "app/include/**"
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- ".github/workflows/test.yml"
|
- ".github/workflows/test.yml"
|
||||||
- "app/run-test.sh"
|
|
||||||
- "app/tests/**"
|
- "app/tests/**"
|
||||||
- "app/src/**"
|
- "app/src/**"
|
||||||
- "app/include/**"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
collect-tests:
|
integration_test:
|
||||||
outputs:
|
|
||||||
test-dirs: ${{ steps.test-dirs.outputs.test-dirs }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Find test directories
|
|
||||||
id: test-dirs
|
|
||||||
run: |
|
|
||||||
cd app/tests/
|
|
||||||
export TESTS=$(ls -d * | grep -v ble | jq -R -s -c 'split("\n")[:-1]')
|
|
||||||
echo "test-dirs=${TESTS}" >> $GITHUB_OUTPUT
|
|
||||||
run-tests:
|
|
||||||
needs: collect-tests
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker.io/zmkfirmware/zmk-build-arm:3.5
|
image: docker.io/zmkfirmware/zmk-build-arm:2.5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
- name: Cache west modules
|
- name: Cache west modules
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: cache-zephyr-modules
|
cache-name: cache-zephyr-modules
|
||||||
with:
|
with:
|
||||||
@@ -51,11 +30,11 @@ jobs:
|
|||||||
tools/
|
tools/
|
||||||
zephyr/
|
zephyr/
|
||||||
bootloader/
|
bootloader/
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
|
key: 4-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
4-${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
${{ runner.os }}-build-
|
4-${{ runner.os }}-build-
|
||||||
${{ runner.os }}-
|
4-${{ runner.os }}-
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Initialize workspace (west init)
|
- name: Initialize workspace (west init)
|
||||||
@@ -64,12 +43,11 @@ jobs:
|
|||||||
run: west update
|
run: west update
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Test ${{ matrix.test }}
|
- name: Test all
|
||||||
working-directory: app
|
run: west test
|
||||||
run: west test tests/${{ matrix.test }}
|
|
||||||
- name: Archive artifacts
|
- name: Archive artifacts
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: "${{ matrix.test }}-log-files"
|
name: "log-files"
|
||||||
path: app/build/**/*.log
|
path: app/build/**/*.log
|
||||||
|
|||||||
11
.gitignore
vendored
11
.gitignore
vendored
@@ -5,14 +5,5 @@
|
|||||||
/zephyr
|
/zephyr
|
||||||
/zmk-config
|
/zmk-config
|
||||||
/build
|
/build
|
||||||
|
|
||||||
# macOS
|
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
|
__pycache__
|
||||||
# Python
|
|
||||||
__pycache__
|
|
||||||
.python-version
|
|
||||||
.venv
|
|
||||||
|
|
||||||
# clangd
|
|
||||||
app/.cache/
|
|
||||||
138
.gitlint
138
.gitlint
@@ -1,138 +0,0 @@
|
|||||||
# Edit this file as you like.
|
|
||||||
#
|
|
||||||
# All these sections are optional. Each section with the exception of [general] represents
|
|
||||||
# one rule and each key in it is an option for that specific rule.
|
|
||||||
#
|
|
||||||
# Rules and sections can be referenced by their full name or by id. For example
|
|
||||||
# section "[body-max-line-length]" could also be written as "[B1]". Full section names are
|
|
||||||
# used in here for clarity.
|
|
||||||
#
|
|
||||||
[general]
|
|
||||||
# Ignore certain rules, this example uses both full name and id
|
|
||||||
# ignore=title-trailing-punctuation, T3
|
|
||||||
|
|
||||||
# verbosity should be a value between 1 and 3, the commandline -v flags take precedence over this
|
|
||||||
# verbosity = 2
|
|
||||||
|
|
||||||
# By default gitlint will ignore merge, revert, fixup, fixup=amend, and squash commits.
|
|
||||||
# ignore-merge-commits=true
|
|
||||||
# ignore-revert-commits=true
|
|
||||||
# ignore-fixup-commits=true
|
|
||||||
# ignore-fixup-amend-commits=true
|
|
||||||
# ignore-squash-commits=true
|
|
||||||
|
|
||||||
# Ignore any data sent to gitlint via stdin
|
|
||||||
# ignore-stdin=true
|
|
||||||
|
|
||||||
# Fetch additional meta-data from the local repository when manually passing a
|
|
||||||
# commit message to gitlint via stdin or --commit-msg. Disabled by default.
|
|
||||||
# staged=true
|
|
||||||
|
|
||||||
# Hard fail when the target commit range is empty. Note that gitlint will
|
|
||||||
# already fail by default on invalid commit ranges. This option is specifically
|
|
||||||
# to tell gitlint to fail on *valid but empty* commit ranges.
|
|
||||||
# Disabled by default.
|
|
||||||
# fail-without-commits=true
|
|
||||||
|
|
||||||
# Whether to use Python `search` instead of `match` semantics in rules that use
|
|
||||||
# regexes. Context: https://github.com/jorisroovers/gitlint/issues/254
|
|
||||||
# Disabled by default, but will be enabled by default in the future.
|
|
||||||
# regex-style-search=true
|
|
||||||
|
|
||||||
# Enable debug mode (prints more output). Disabled by default.
|
|
||||||
# debug=true
|
|
||||||
|
|
||||||
# Enable community contributed rules
|
|
||||||
# See http://jorisroovers.github.io/gitlint/contrib_rules for details
|
|
||||||
contrib=contrib-title-conventional-commits,CT1,contrib-disallow-cleanup-commits,CC2
|
|
||||||
|
|
||||||
# Set the extra-path where gitlint will search for user defined rules
|
|
||||||
# See http://jorisroovers.github.io/gitlint/user_defined_rules for details
|
|
||||||
# extra-path=examples/
|
|
||||||
|
|
||||||
[title-max-length]
|
|
||||||
line-length=80
|
|
||||||
|
|
||||||
# Conversely, you can also enforce minimal length of a title with the
|
|
||||||
# "title-min-length" rule:
|
|
||||||
# [title-min-length]
|
|
||||||
# min-length=5
|
|
||||||
|
|
||||||
# [title-must-not-contain-word]
|
|
||||||
# Comma-separated list of words that should not occur in the title. Matching is case
|
|
||||||
# insensitive. It's fine if the keyword occurs as part of a larger word (so "WIPING"
|
|
||||||
# will not cause a violation, but "WIP: my title" will.
|
|
||||||
# words=wip
|
|
||||||
|
|
||||||
# [title-match-regex]
|
|
||||||
# python-style regex that the commit-msg title must match
|
|
||||||
# Note that the regex can contradict with other rules if not used correctly
|
|
||||||
# (e.g. title-must-not-contain-word).
|
|
||||||
# regex=^US[0-9]*
|
|
||||||
|
|
||||||
# [body-max-line-length]
|
|
||||||
# line-length=72
|
|
||||||
|
|
||||||
# [body-min-length]
|
|
||||||
# min-length=5
|
|
||||||
|
|
||||||
# [body-is-missing]
|
|
||||||
# Whether to ignore this rule on merge commits (which typically only have a title)
|
|
||||||
# default = True
|
|
||||||
# ignore-merge-commits=false
|
|
||||||
|
|
||||||
# [body-changed-file-mention]
|
|
||||||
# List of files that need to be explicitly mentioned in the body when they are changed
|
|
||||||
# This is useful for when developers often erroneously edit certain files or git submodules.
|
|
||||||
# By specifying this rule, developers can only change the file when they explicitly reference
|
|
||||||
# it in the commit message.
|
|
||||||
# files=gitlint-core/gitlint/rules.py,README.md
|
|
||||||
|
|
||||||
# [body-match-regex]
|
|
||||||
# python-style regex that the commit-msg body must match.
|
|
||||||
# E.g. body must end in My-Commit-Tag: foo
|
|
||||||
# regex=My-Commit-Tag: foo$
|
|
||||||
|
|
||||||
# [author-valid-email]
|
|
||||||
# python-style regex that the commit author email address must match.
|
|
||||||
# For example, use the following regex if you only want to allow email addresses from foo.com
|
|
||||||
# regex=[^@]+@foo.com
|
|
||||||
|
|
||||||
# [ignore-by-title]
|
|
||||||
# Ignore certain rules for commits of which the title matches a regex
|
|
||||||
# E.g. Match commit titles that start with "Release"
|
|
||||||
# regex=^Release(.*)
|
|
||||||
|
|
||||||
# Ignore certain rules, you can reference them by their id or by their full name
|
|
||||||
# Use 'all' to ignore all rules
|
|
||||||
# ignore=T1,body-min-length
|
|
||||||
|
|
||||||
# [ignore-by-body]
|
|
||||||
# Ignore certain rules for commits of which the body has a line that matches a regex
|
|
||||||
# E.g. Match bodies that have a line that that contain "release"
|
|
||||||
# regex=(.*)release(.*)
|
|
||||||
#
|
|
||||||
# Ignore certain rules, you can reference them by their id or by their full name
|
|
||||||
# Use 'all' to ignore all rules
|
|
||||||
# ignore=T1,body-min-length
|
|
||||||
|
|
||||||
# [ignore-body-lines]
|
|
||||||
# Ignore certain lines in a commit body that match a regex.
|
|
||||||
# E.g. Ignore all lines that start with 'Co-Authored-By'
|
|
||||||
# regex=^Co-Authored-By
|
|
||||||
|
|
||||||
# [ignore-by-author-name]
|
|
||||||
# Ignore certain rules for commits of which the author name matches a regex
|
|
||||||
# E.g. Match commits made by dependabot
|
|
||||||
# regex=(.*)dependabot(.*)
|
|
||||||
#
|
|
||||||
# Ignore certain rules, you can reference them by their id or by their full name
|
|
||||||
# Use 'all' to ignore all rules
|
|
||||||
# ignore=T1,body-min-length
|
|
||||||
|
|
||||||
# This is a contrib rule - a community contributed rule. These are disabled by default.
|
|
||||||
# You need to explicitly enable them one-by-one by adding them to the "contrib" option
|
|
||||||
# under [general] section above.
|
|
||||||
# [contrib-title-conventional-commits]
|
|
||||||
# Specify allowed commit types. For details see: https://www.conventionalcommits.org/
|
|
||||||
# types = bugfix,user-story,epic
|
|
||||||
@@ -1,39 +1,12 @@
|
|||||||
fail_fast: false
|
fail_fast: false
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
- repo: https://github.com/pocc/pre-commit-hooks
|
||||||
rev: v1.5.1
|
rev: v1.1.1
|
||||||
hooks:
|
|
||||||
- id: remove-tabs
|
|
||||||
exclude: "vendor-prefixes\\.txt$|.git/COMMIT_EDITMSG"
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
|
||||||
rev: v18.1.8
|
|
||||||
hooks:
|
hooks:
|
||||||
- id: clang-format
|
- id: clang-format
|
||||||
types_or: [c++, c]
|
|
||||||
args:
|
args:
|
||||||
- -i
|
- -i
|
||||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||||
rev: v2.7.1
|
rev: v2.2.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: prettier
|
- id: prettier
|
||||||
exclude: |
|
|
||||||
(?x)^(
|
|
||||||
.git/COMMIT_EDITMSG|
|
|
||||||
CHANGELOG.md|
|
|
||||||
.release-please-manifest.json
|
|
||||||
)$
|
|
||||||
# Workaround for https://github.com/pre-commit/mirrors-prettier/issues/29
|
|
||||||
additional_dependencies:
|
|
||||||
- prettier@2.8.7
|
|
||||||
- repo: https://github.com/jorisroovers/gitlint
|
|
||||||
rev: v0.19.1
|
|
||||||
hooks:
|
|
||||||
- id: gitlint
|
|
||||||
- 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$"
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
{".":"0.2.0"}
|
|
||||||
10
.vscode/extensions.json
vendored
10
.vscode/extensions.json
vendored
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"recommendations": [
|
|
||||||
"esbenp.prettier-vscode",
|
|
||||||
"ms-python.python",
|
|
||||||
"ms-vscode.cpptools",
|
|
||||||
"plorefice.devicetree",
|
|
||||||
"twxs.cmake",
|
|
||||||
"unifiedjs.vscode-mdx"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
18
.vscode/settings.json
vendored
18
.vscode/settings.json
vendored
@@ -2,21 +2,5 @@
|
|||||||
"files.associations": {
|
"files.associations": {
|
||||||
"*.overlay": "dts",
|
"*.overlay": "dts",
|
||||||
"*.keymap": "dts"
|
"*.keymap": "dts"
|
||||||
},
|
|
||||||
"python.formatting.provider": "black",
|
|
||||||
"[c]": {
|
|
||||||
"editor.formatOnSave": true
|
|
||||||
},
|
|
||||||
"[javascript][javascriptreact][typescript][typescriptreact]": {
|
|
||||||
"editor.formatOnSave": true,
|
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
||||||
},
|
|
||||||
"[python]": {
|
|
||||||
"editor.formatOnSave": true,
|
|
||||||
"editor.defaultFormatter": "ms-python.python"
|
|
||||||
},
|
|
||||||
"[css][json][jsonc][html][markdown][yaml]": {
|
|
||||||
"editor.formatOnSave": true,
|
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
62
CHANGELOG.md
62
CHANGELOG.md
@@ -1,62 +0,0 @@
|
|||||||
# Changelog
|
|
||||||
|
|
||||||
## [0.2.0](https://github.com/zmkfirmware/zmk/compare/v0.1.0...v0.2.0) (2025-03-01)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* Added `toggle-mode`, allowing toggle-on and toggle-off ([#2555](https://github.com/zmkfirmware/zmk/issues/2555)) ([4ef231f](https://github.com/zmkfirmware/zmk/commit/4ef231f4bba87151acfbd1cf3babd83b69813e45))
|
|
||||||
* added toggle mode to key and layer toggles ([4ef231f](https://github.com/zmkfirmware/zmk/commit/4ef231f4bba87151acfbd1cf3babd83b69813e45))
|
|
||||||
* **boards:** Update for mikoto board definition ([#1946](https://github.com/zmkfirmware/zmk/issues/1946)) ([b26058b](https://github.com/zmkfirmware/zmk/commit/b26058b6c7c83f8d1f095d2f9c6c3998b391a61b))
|
|
||||||
* **core:** Make physical layout key rotation optional ([#2770](https://github.com/zmkfirmware/zmk/issues/2770)) ([c367d8f](https://github.com/zmkfirmware/zmk/commit/c367d8f636f0842b414c2b58df6101761cdd676d))
|
|
||||||
* **display:** Add ability to set display on/off pin. ([#2814](https://github.com/zmkfirmware/zmk/issues/2814)) ([627e6db](https://github.com/zmkfirmware/zmk/commit/627e6dbec99211b3d7cce55904fb1c824ed87bf3))
|
|
||||||
* **display:** Add config for display update period ([#2819](https://github.com/zmkfirmware/zmk/issues/2819)) ([aa3e5dd](https://github.com/zmkfirmware/zmk/commit/aa3e5dd70fdd1b364fa9ad26f14425be613d180c))
|
|
||||||
* input processor behavior invocation ([#2714](https://github.com/zmkfirmware/zmk/issues/2714)) ([cb867f9](https://github.com/zmkfirmware/zmk/commit/cb867f92dbe4e32675c2137fc6aa914a44ecc8dc))
|
|
||||||
* **Kconfig:** Allow overriding ZMK Kconfig defaults ([#2537](https://github.com/zmkfirmware/zmk/issues/2537)) ([40925d4](https://github.com/zmkfirmware/zmk/commit/40925d48e67b3eeaeb3e848a2287ed628de9f674))
|
|
||||||
* **mouse:** Add mouse move and scroll support ([#2477](https://github.com/zmkfirmware/zmk/issues/2477)) ([6b40bfd](https://github.com/zmkfirmware/zmk/commit/6b40bfda53571f7a960ccc448aa87f29da7496ac))
|
|
||||||
* **pointing:** Add behavior input processor ([cb867f9](https://github.com/zmkfirmware/zmk/commit/cb867f92dbe4e32675c2137fc6aa914a44ecc8dc))
|
|
||||||
* **pointing:** Add pre-defined scroll scaler ([0f7c112](https://github.com/zmkfirmware/zmk/commit/0f7c11248a1ddb7c6559064c2a1e7a3c446d5d55))
|
|
||||||
* **pointing:** Add pre-defined scroll scaler and mouse scroll tests ([#2759](https://github.com/zmkfirmware/zmk/issues/2759)) ([0f7c112](https://github.com/zmkfirmware/zmk/commit/0f7c11248a1ddb7c6559064c2a1e7a3c446d5d55))
|
|
||||||
* **shields:** Add physical layout for Lotus58 ([#2753](https://github.com/zmkfirmware/zmk/issues/2753)) ([424e532](https://github.com/zmkfirmware/zmk/commit/424e53210ea16c2287abaf770ebf45be432d841a))
|
|
||||||
* **studio:** Add ortho_4x10 grid layout ([#2651](https://github.com/zmkfirmware/zmk/issues/2651)) ([7e8c542](https://github.com/zmkfirmware/zmk/commit/7e8c542c94908ac011ec7272a5f8ab10d2102632))
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* allow kscan-composite to wake up device. ([#2682](https://github.com/zmkfirmware/zmk/issues/2682)) ([a8f5ab6](https://github.com/zmkfirmware/zmk/commit/a8f5ab67b5d449a2624e2de7ddfb264da778ea6c))
|
|
||||||
* **behaviors:** Make multiple sticky keys work on same key position ([7186528](https://github.com/zmkfirmware/zmk/commit/7186528f77bf077173927c1c8506b4d434e5c371))
|
|
||||||
* **behaviors:** Make multiple sticky keys work on same key position ([#2758](https://github.com/zmkfirmware/zmk/issues/2758)) ([7186528](https://github.com/zmkfirmware/zmk/commit/7186528f77bf077173927c1c8506b4d434e5c371))
|
|
||||||
* **ble:** enforce maximum length for dynamic device name ([#2784](https://github.com/zmkfirmware/zmk/issues/2784)) ([ea267b0](https://github.com/zmkfirmware/zmk/commit/ea267b0f35f862b882ac568dde6365c3a0c85099))
|
|
||||||
* **combos:** Properly report combos len with emply block ([#2739](https://github.com/zmkfirmware/zmk/issues/2739)) ([f0a77b8](https://github.com/zmkfirmware/zmk/commit/f0a77b888ac482a863386ced08e04660ddacb026))
|
|
||||||
* **display:** Only default mono theme when 1bpp ([#2804](https://github.com/zmkfirmware/zmk/issues/2804)) ([425256b](https://github.com/zmkfirmware/zmk/commit/425256bc0de7ed08802533b170abba78ee90f546))
|
|
||||||
* **display:** POSIX lvgl fixes ([#2812](https://github.com/zmkfirmware/zmk/issues/2812)) ([4b4a8a3](https://github.com/zmkfirmware/zmk/commit/4b4a8a35f3f90f1af75cdf5d9c26b47d4b8dcabb))
|
|
||||||
* **drivers:** Proper static/const for data/config ([#2769](https://github.com/zmkfirmware/zmk/issues/2769)) ([6941abc](https://github.com/zmkfirmware/zmk/commit/6941abc2afab16502cff9c5149d8dc0fcd5112c9))
|
|
||||||
* Fix warnings in nanopb encoding code ([#2643](https://github.com/zmkfirmware/zmk/issues/2643)) ([7013158](https://github.com/zmkfirmware/zmk/commit/7013158a6715d94b34e8c471ce25bb5005f3bb49))
|
|
||||||
* Kconfig refactor now works correctly with external modules ([#2711](https://github.com/zmkfirmware/zmk/issues/2711)) ([bb48661](https://github.com/zmkfirmware/zmk/commit/bb486619a183f6df7fbb4620c80164555a22da0b))
|
|
||||||
* **Kconfig:** Added a name to EC11's trigger mode choice ([40925d4](https://github.com/zmkfirmware/zmk/commit/40925d48e67b3eeaeb3e848a2287ed628de9f674))
|
|
||||||
* **kscan:** Remove warning when keyboard is built without CONFIG_PM_DEVICE ([#2808](https://github.com/zmkfirmware/zmk/issues/2808)) ([8e065d5](https://github.com/zmkfirmware/zmk/commit/8e065d55b916481ef06ce37cddedb84cf1d15d99))
|
|
||||||
* **pointing:** Complete header rename missed in refactor ([#2702](https://github.com/zmkfirmware/zmk/issues/2702)) ([84baf92](https://github.com/zmkfirmware/zmk/commit/84baf929c9bb95f255d4bafd0e57f2ec47455fca))
|
|
||||||
* **pointing:** Temp layer threading protection. ([#2729](https://github.com/zmkfirmware/zmk/issues/2729)) ([1e3e62c](https://github.com/zmkfirmware/zmk/commit/1e3e62c13d0666d98831ee302ae2fb17e68196c9))
|
|
||||||
* **studio:** Allow adding layers after a layer move ([#2748](https://github.com/zmkfirmware/zmk/issues/2748)) ([36508c2](https://github.com/zmkfirmware/zmk/commit/36508c27fddfb84d912e0122e313ad3904ceb946))
|
|
||||||
* **studio:** Properly return complete keymap from RPC ([#2696](https://github.com/zmkfirmware/zmk/issues/2696)) ([0820991](https://github.com/zmkfirmware/zmk/commit/0820991901a95ab7a0eb1f1cc608a631d514e26c))
|
|
||||||
|
|
||||||
## 0.1.0 (2024-11-29)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **boards:** Add glove80 nexus node for extension GPIO. ([#2594](https://github.com/zmkfirmware/zmk/issues/2594)) ([fb359f5](https://github.com/zmkfirmware/zmk/commit/fb359f576619940164ca2e770b49b7b34f13428e))
|
|
||||||
* **boards:** add nrf52833-nosd snippet ([63af296](https://github.com/zmkfirmware/zmk/commit/63af296b6efd8d677d584f372c9da9a4fedaa496))
|
|
||||||
* **boards:** add nrf52840-nosd snippet ([4438b7b](https://github.com/zmkfirmware/zmk/commit/4438b7b835bfd1d4e89cdd955a4ab0fd2e2ae3bf))
|
|
||||||
* **ci:** Add release-please automation with VERSION ([#2622](https://github.com/zmkfirmware/zmk/issues/2622)) ([ffa485c](https://github.com/zmkfirmware/zmk/commit/ffa485c11b48444acf3adf1e3c1cb3eed16fad94))
|
|
||||||
* **drivers:** Support init high/low in 595 driver ([888c0d9](https://github.com/zmkfirmware/zmk/commit/888c0d966cd52f3ab5145992f61b14d6262c1951))
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **boards:** Disable uart serial node in Xiao BLE by default ([#2672](https://github.com/zmkfirmware/zmk/issues/2672)) ([230b860](https://github.com/zmkfirmware/zmk/commit/230b860f31063774c3bcc19afb6f92479462de24))
|
|
||||||
* **boards:** Fix typo in BT75 metadata ([c9553c3](https://github.com/zmkfirmware/zmk/commit/c9553c31e3a3f39964391b006492995b5bb09c39))
|
|
||||||
* Disable display feature for settings_reset ([b0f5789](https://github.com/zmkfirmware/zmk/commit/b0f5789b128f0f5599341398898fdb0e0407b2d3))
|
|
||||||
* Fix inconsistent column offset property ([c7473fc](https://github.com/zmkfirmware/zmk/commit/c7473fc32557d2d384ab78d3acf51a05488f0214))
|
|
||||||
* include a header file for RC macros ([#2649](https://github.com/zmkfirmware/zmk/issues/2649)) ([f8eff2f](https://github.com/zmkfirmware/zmk/commit/f8eff2fe34609c91211c25113f9d7db09f7d1689))
|
|
||||||
* **studio:** Improved error message when keyboard is missing a physical layout. ([fed66a9](https://github.com/zmkfirmware/zmk/commit/fed66a92d000f4c8e0019d9ccdd167271324e8e9))
|
|
||||||
@@ -86,12 +86,6 @@ documentation to areas not currently covered are greatly appreciated.
|
|||||||
ZMK uses `prettier` to format documentation files. You can run prettier with `npm run prettier:format`.
|
ZMK uses `prettier` to format documentation files. You can run prettier with `npm run prettier:format`.
|
||||||
You can setup git to run prettier automatically when you commit by installing the pre-commit hooks: `pip3 install pre-commit`, `pre-commit install`.
|
You can setup git to run prettier automatically when you commit by installing the pre-commit hooks: `pip3 install pre-commit`, `pre-commit install`.
|
||||||
|
|
||||||
### Linting
|
|
||||||
|
|
||||||
This repository utilizes ESLint for code linting to ensure consistent code style and identify potential errors or bugs early in the development process.
|
|
||||||
|
|
||||||
You can run ESLint with `npm run lint` to verify your changes.
|
|
||||||
|
|
||||||
## Code Contributions
|
## Code Contributions
|
||||||
|
|
||||||
### Development Setup
|
### Development Setup
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
[](https://github.com/zmkfirmware/zmk/actions)
|
[](https://github.com/zmkfirmware/zmk/actions)
|
||||||
[](CODE_OF_CONDUCT.md)
|
[](CODE_OF_CONDUCT.md)
|
||||||
|
|
||||||
[ZMK Firmware](https://zmk.dev/) is an open source ([MIT](LICENSE)) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues.
|
[ZMK Firmware](https://zmk.dev/) is an open source (MIT) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues.
|
||||||
|
|
||||||
Check out the website to learn more: https://zmk.dev/.
|
Check out the website to learn more: https://zmk.dev/
|
||||||
|
|
||||||
You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite).
|
You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite)
|
||||||
|
|
||||||
To review features, check out the [feature overview](https://zmk.dev/docs/). ZMK is under active development, and new features are listed with the [enhancement label](https://github.com/zmkfirmware/zmk/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature.
|
To review features, check out the [feature overview](https://zmk.dev/docs/). ZMK is under active development, and new features are listed with the [enhancement label](https://github.com/zmkfirmware/zmk/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature.
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
endOfLine: "auto",
|
endOfLine: "auto",
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,58 +1,53 @@
|
|||||||
cmake_minimum_required(VERSION 3.13.1)
|
cmake_minimum_required(VERSION 3.13.1)
|
||||||
|
|
||||||
set(CONFIG_APPLICATION_DEFINED_SYSCALL true)
|
set(CONFIG_APPLICATION_DEFINED_SYSCALL true)
|
||||||
|
list(APPEND BOARD_ROOT ${CMAKE_SOURCE_DIR})
|
||||||
|
list(APPEND DTS_ROOT ${CMAKE_SOURCE_DIR})
|
||||||
|
|
||||||
set(ZEPHYR_BOARD_ALIASES "boards/aliases.cmake")
|
# Add our custom Zephyr module for drivers w/ syscalls, etc.
|
||||||
set(ZEPHYR_EXTRA_MODULES "${ZMK_EXTRA_MODULES};${CMAKE_CURRENT_SOURCE_DIR}/module;${CMAKE_CURRENT_SOURCE_DIR}/keymap-module")
|
list(APPEND DTS_ROOT ${CMAKE_SOURCE_DIR}/drivers/zephyr)
|
||||||
|
|
||||||
|
list(APPEND ZEPHYR_EXTRA_MODULES
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/drivers
|
||||||
|
)
|
||||||
|
|
||||||
|
include(cmake/zmk_config.cmake)
|
||||||
|
|
||||||
# Find Zephyr. This also loads Zephyr's build system.
|
# Find Zephyr. This also loads Zephyr's build system.
|
||||||
find_package(Zephyr REQUIRED HINTS ../zephyr)
|
find_package(Zephyr REQUIRED HINTS ../zephyr)
|
||||||
project(zmk)
|
project(zmk)
|
||||||
|
|
||||||
zephyr_linker_sources(SECTIONS include/linker/zmk-behaviors.ld)
|
|
||||||
zephyr_linker_sources(RODATA include/linker/zmk-events.ld)
|
zephyr_linker_sources(RODATA include/linker/zmk-events.ld)
|
||||||
|
|
||||||
if(CONFIG_ZMK_BEHAVIOR_LOCAL_IDS)
|
|
||||||
zephyr_linker_sources(DATA_SECTIONS include/linker/zmk-behavior-local-id-map.ld)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/behavior.h)
|
|
||||||
zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/input_processor.h)
|
|
||||||
zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/ext_power.h)
|
|
||||||
|
|
||||||
# Add your source file to the "app" target. This must come after
|
# Add your source file to the "app" target. This must come after
|
||||||
# find_package(Zephyr) which defines the target.
|
# find_package(Zephyr) which defines the target.
|
||||||
target_include_directories(app PRIVATE include)
|
target_include_directories(app PRIVATE include)
|
||||||
target_sources(app PRIVATE src/stdlib.c)
|
target_sources_ifdef(CONFIG_ZMK_SLEEP app PRIVATE src/power.c)
|
||||||
target_sources(app PRIVATE src/activity.c)
|
target_sources(app PRIVATE src/activity.c)
|
||||||
target_sources(app PRIVATE src/behavior.c)
|
target_sources(app PRIVATE src/kscan.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_KSCAN_SIDEBAND_BEHAVIORS app PRIVATE src/kscan_sideband_behaviors.c)
|
|
||||||
target_sources(app PRIVATE src/matrix_transform.c)
|
target_sources(app PRIVATE src/matrix_transform.c)
|
||||||
target_sources(app PRIVATE src/physical_layouts.c)
|
target_sources(app PRIVATE src/hid.c)
|
||||||
target_sources(app PRIVATE src/sensors.c)
|
target_sources(app PRIVATE src/sensors.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/wpm.c)
|
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/wpm.c)
|
||||||
target_sources(app PRIVATE src/event_manager.c)
|
target_sources(app PRIVATE src/event_manager.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_PM app PRIVATE src/pm.c)
|
|
||||||
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/ext_power_generic.c)
|
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/ext_power_generic.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_GPIO_KEY_WAKEUP_TRIGGER app PRIVATE src/gpio_key_wakeup_trigger.c)
|
|
||||||
target_sources(app PRIVATE src/events/activity_state_changed.c)
|
target_sources(app PRIVATE src/events/activity_state_changed.c)
|
||||||
target_sources(app PRIVATE src/events/position_state_changed.c)
|
target_sources(app PRIVATE src/events/position_state_changed.c)
|
||||||
|
target_sources(app PRIVATE src/events/layer_state_changed.c)
|
||||||
|
target_sources(app PRIVATE src/events/keycode_state_changed.c)
|
||||||
|
target_sources(app PRIVATE src/events/modifiers_state_changed.c)
|
||||||
|
target_sources(app PRIVATE src/events/endpoint_selection_changed.c)
|
||||||
target_sources(app PRIVATE src/events/sensor_event.c)
|
target_sources(app PRIVATE src/events/sensor_event.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c)
|
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c)
|
||||||
target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/events/usb_conn_state_changed.c)
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/ble_active_profile_changed.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_reset.c)
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/battery_state_changed.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c)
|
target_sources_ifdef(CONFIG_USB app PRIVATE src/events/usb_conn_state_changed.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SOFT_OFF app PRIVATE src/behaviors/behavior_soft_off.c)
|
if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
|
||||||
add_subdirectory_ifdef(CONFIG_ZMK_POINTING src/pointing/)
|
|
||||||
if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
|
||||||
target_sources(app PRIVATE src/hid.c)
|
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_key_press.c)
|
target_sources(app PRIVATE src/behaviors/behavior_key_press.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_KEY_TOGGLE app PRIVATE src/behaviors/behavior_key_toggle.c)
|
target_sources(app PRIVATE src/behaviors/behavior_reset.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_HOLD_TAP app PRIVATE src/behaviors/behavior_hold_tap.c)
|
target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_STICKY_KEY app PRIVATE src/behaviors/behavior_sticky_key.c)
|
target_sources(app PRIVATE src/behaviors/behavior_sticky_key.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_caps_word.c)
|
target_sources(app PRIVATE src/behaviors/behavior_caps_word.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_key_repeat.c)
|
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_MACRO app PRIVATE src/behaviors/behavior_macro.c)
|
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_momentary_layer.c)
|
target_sources(app PRIVATE src/behaviors/behavior_momentary_layer.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_mod_morph.c)
|
target_sources(app PRIVATE src/behaviors/behavior_mod_morph.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_outputs.c)
|
target_sources(app PRIVATE src/behaviors/behavior_outputs.c)
|
||||||
@@ -60,75 +55,30 @@ 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_to_layer.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_transparent.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_none.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE app PRIVATE src/behaviors/behavior_sensor_rotate.c)
|
target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_VAR app PRIVATE src/behaviors/behavior_sensor_rotate_var.c)
|
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON app PRIVATE src/behaviors/behavior_sensor_rotate_common.c)
|
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_MOUSE_KEY_PRESS app PRIVATE src/behaviors/behavior_mouse_key_press.c)
|
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_STUDIO_UNLOCK app PRIVATE src/behaviors/behavior_studio_unlock.c)
|
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_INPUT_TWO_AXIS app PRIVATE src/behaviors/behavior_input_two_axis.c)
|
|
||||||
target_sources(app PRIVATE src/combo.c)
|
target_sources(app PRIVATE src/combo.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_TAP_DANCE app PRIVATE src/behaviors/behavior_tap_dance.c)
|
|
||||||
target_sources(app PRIVATE src/behavior_queue.c)
|
|
||||||
target_sources(app PRIVATE src/conditional_layer.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/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)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c)
|
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/behaviors/behavior_backlight.c)
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/behaviors/behavior_bt.c)
|
||||||
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/ble.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/events/battery_state_changed.c)
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/battery.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/battery.c)
|
if (CONFIG_ZMK_SPLIT_BLE AND (NOT CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL))
|
||||||
|
target_sources(app PRIVATE src/split_listener.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE src/events/hid_indicators_changed.c)
|
target_sources(app PRIVATE src/split/bluetooth/service.c)
|
||||||
|
endif()
|
||||||
target_sources_ifdef(CONFIG_ZMK_SPLIT app PRIVATE src/events/split_peripheral_status_changed.c)
|
if (CONFIG_ZMK_SPLIT_BLE AND CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
|
||||||
add_subdirectory(src/split)
|
target_sources(app PRIVATE src/split/bluetooth/central.c)
|
||||||
|
endif()
|
||||||
target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/usb.c)
|
target_sources_ifdef(CONFIG_USB app PRIVATE src/usb.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_USB app PRIVATE src/usb_hid.c)
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/hog.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/rgb_underglow.c)
|
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/rgb_underglow.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/backlight.c)
|
target_sources(app PRIVATE src/endpoints.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_LOW_PRIORITY_WORK_QUEUE app PRIVATE src/workqueue.c)
|
target_sources(app PRIVATE src/hid_listener.c)
|
||||||
target_sources(app PRIVATE src/main.c)
|
target_sources(app PRIVATE src/main.c)
|
||||||
|
|
||||||
add_subdirectory(src/display/)
|
add_subdirectory(src/display/)
|
||||||
add_subdirectory_ifdef(CONFIG_SETTINGS src/settings/)
|
|
||||||
|
|
||||||
if (CONFIG_ZMK_STUDIO_RPC)
|
|
||||||
# For some reason this is failing if run from a different sub-file.
|
|
||||||
list(APPEND CMAKE_MODULE_PATH ${ZEPHYR_BASE}/modules/nanopb)
|
|
||||||
|
|
||||||
include(nanopb)
|
|
||||||
|
|
||||||
# Turn off the default nanopb behavior
|
|
||||||
set(NANOPB_GENERATE_CPP_STANDALONE OFF)
|
|
||||||
|
|
||||||
nanopb_generate_cpp(proto_srcs proto_hdrs RELPATH ${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}
|
|
||||||
${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}/proto/zmk/studio.proto
|
|
||||||
${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}/proto/zmk/meta.proto
|
|
||||||
${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}/proto/zmk/core.proto
|
|
||||||
${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}/proto/zmk/behaviors.proto
|
|
||||||
${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}/proto/zmk/keymap.proto
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(app PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
target_sources(app PRIVATE ${proto_srcs} ${proto_hdrs})
|
|
||||||
|
|
||||||
add_subdirectory(src/studio)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
zephyr_cc_option(-Wfatal-errors)
|
zephyr_cc_option(-Wfatal-errors)
|
||||||
|
|||||||
797
app/Kconfig
797
app/Kconfig
File diff suppressed because it is too large
Load Diff
@@ -1,136 +0,0 @@
|
|||||||
# Copyright (c) 2023 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_METADATA
|
|
||||||
bool "Metadata"
|
|
||||||
help
|
|
||||||
Enabling this option adds APIs for documenting and fetching
|
|
||||||
metadata describing a behaviors name, and supported parameters.
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_LOCAL_IDS
|
|
||||||
bool "Local IDs"
|
|
||||||
|
|
||||||
if ZMK_BEHAVIOR_LOCAL_IDS
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_LOCAL_IDS_IN_BINDINGS
|
|
||||||
bool "Track in behavior bindings"
|
|
||||||
|
|
||||||
choice ZMK_BEHAVIOR_LOCAL_ID_TYPE
|
|
||||||
prompt "Local ID Type"
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_LOCAL_ID_TYPE_SETTINGS_TABLE
|
|
||||||
bool "Settings Table"
|
|
||||||
depends on SETTINGS
|
|
||||||
select ZMK_BEHAVIOR_LOCAL_IDS_IN_BINDINGS
|
|
||||||
help
|
|
||||||
Use persistent entries in the settings subsystem to identify
|
|
||||||
behaviors by local ID, which uses the device name to generate
|
|
||||||
a new settings entry tying a presistant local ID to that name.
|
|
||||||
This guarantees stable, colllision-free local IDs at the expense
|
|
||||||
of settings storage used.
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_LOCAL_ID_TYPE_CRC16
|
|
||||||
bool "CRC16 Hash"
|
|
||||||
select CRC
|
|
||||||
help
|
|
||||||
Use the CRC16-ANSI hash of behavior device names to generate
|
|
||||||
stable behavior local IDs. This saves on settings storage at
|
|
||||||
the expense of (highly unlikely) risk of collisions.
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_HOLD_TAP
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
depends on DT_HAS_ZMK_BEHAVIOR_HOLD_TAP_ENABLED
|
|
||||||
|
|
||||||
if ZMK_BEHAVIOR_HOLD_TAP
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_HOLD_TAP_MAX_HELD
|
|
||||||
int "Hold Tap Max Held"
|
|
||||||
help
|
|
||||||
Max number of simultaneously held hold-taps
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_HOLD_TAP_MAX_CAPTURED_EVENTS
|
|
||||||
int "Hold Tap Max Captured Events"
|
|
||||||
help
|
|
||||||
Max number of captured system events while waiting to resolve hold taps
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_KEY_TOGGLE
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
depends on DT_HAS_ZMK_BEHAVIOR_KEY_TOGGLE_ENABLED
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_MOUSE_KEY_PRESS
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
depends on DT_HAS_ZMK_BEHAVIOR_MOUSE_KEY_PRESS_ENABLED && ZMK_POINTING
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_STICKY_KEY
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
depends on DT_HAS_ZMK_BEHAVIOR_STICKY_KEY_ENABLED
|
|
||||||
|
|
||||||
if ZMK_BEHAVIOR_STICKY_KEY
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_STICKY_KEY_MAX_HELD
|
|
||||||
int "Sticky Key Max Held"
|
|
||||||
help
|
|
||||||
Max number of simultaneously held sticky keys
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_SOFT_OFF
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
depends on DT_HAS_ZMK_BEHAVIOR_SOFT_OFF_ENABLED && ZMK_PM_SOFT_OFF
|
|
||||||
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_TAP_DANCE
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
depends on DT_HAS_ZMK_BEHAVIOR_TAP_DANCE_ENABLED
|
|
||||||
|
|
||||||
if ZMK_BEHAVIOR_TAP_DANCE
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_TAP_DANCE_MAX_HELD
|
|
||||||
int "Tap-Dance Max Held"
|
|
||||||
help
|
|
||||||
Max number of simultaneously held taps-dances
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_INPUT_TWO_AXIS
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
depends on DT_HAS_ZMK_BEHAVIOR_INPUT_TWO_AXIS_ENABLED && ZMK_POINTING
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
|
|
||||||
bool
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_STUDIO_UNLOCK
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
depends on DT_HAS_ZMK_BEHAVIOR_STUDIO_UNLOCK_ENABLED && ZMK_STUDIO
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_MACRO
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
depends on DT_HAS_ZMK_BEHAVIOR_MACRO_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_ONE_PARAM_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_TWO_PARAM_ENABLED
|
|
||||||
@@ -1,109 +0,0 @@
|
|||||||
# Copyright (c) 2024 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
# HID
|
|
||||||
if ZMK_HID_REPORT_TYPE_HKRO
|
|
||||||
|
|
||||||
config ZMK_HID_KEYBOARD_REPORT_SIZE
|
|
||||||
default 6
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
config ZMK_HID_CONSUMER_REPORT_SIZE
|
|
||||||
default 6
|
|
||||||
|
|
||||||
# Behaviors
|
|
||||||
|
|
||||||
if ZMK_BEHAVIOR_HOLD_TAP
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_HOLD_TAP_MAX_HELD
|
|
||||||
default 10
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_HOLD_TAP_MAX_CAPTURED_EVENTS
|
|
||||||
default 40
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ZMK_BEHAVIOR_STICKY_KEY
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_STICKY_KEY_MAX_HELD
|
|
||||||
default 10
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ZMK_BEHAVIOR_TAP_DANCE
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_TAP_DANCE_MAX_HELD
|
|
||||||
default 10
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Underglow
|
|
||||||
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
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_EXT_POWER
|
|
||||||
default y
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_BRT_MIN
|
|
||||||
default 0
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_BRT_MAX
|
|
||||||
default 100
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_HUE_STEP
|
|
||||||
default 10
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_SAT_STEP
|
|
||||||
default 10
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_BRT_STEP
|
|
||||||
default 10
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_HUE_START
|
|
||||||
default 0
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_SAT_START
|
|
||||||
default 100
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_BRT_START
|
|
||||||
default ZMK_RGB_UNDERGLOW_BRT_MAX
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_SPD_START
|
|
||||||
default 3
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_EFF_START
|
|
||||||
default 0
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_ON_START
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # ZMK_RGB_UNDERGLOW
|
|
||||||
|
|
||||||
# Backlight
|
|
||||||
if ZMK_BACKLIGHT
|
|
||||||
|
|
||||||
config ZMK_BACKLIGHT_BRT_STEP
|
|
||||||
default 20
|
|
||||||
|
|
||||||
config ZMK_BACKLIGHT_BRT_START
|
|
||||||
default 40
|
|
||||||
|
|
||||||
config ZMK_BACKLIGHT_ON_START
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # ZMK_BACKLIGHT
|
|
||||||
|
|
||||||
# Ext_power
|
|
||||||
config ZMK_EXT_POWER
|
|
||||||
default y
|
|
||||||
|
|
||||||
# Battery
|
|
||||||
config ZMK_BATTERY_REPORT_INTERVAL
|
|
||||||
default 60
|
|
||||||
|
|
||||||
# Imports
|
|
||||||
rsource "src/split/Kconfig.defaults"
|
|
||||||
13
app/VERSION
13
app/VERSION
@@ -1,13 +0,0 @@
|
|||||||
# x-release-please-start-major
|
|
||||||
VERSION_MAJOR = 0
|
|
||||||
# x-release-please-end
|
|
||||||
|
|
||||||
# x-release-please-start-minor
|
|
||||||
VERSION_MINOR = 2
|
|
||||||
# x-release-please-end
|
|
||||||
|
|
||||||
# x-release-please-start-patch
|
|
||||||
PATCHLEVEL = 0
|
|
||||||
# x-release-please-end
|
|
||||||
|
|
||||||
VERSION_TWEAK = 0
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2023 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
&xiao_serial { status = "disabled"; };
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
CONFIG_CONSOLE=n
|
|
||||||
CONFIG_SERIAL=n
|
|
||||||
CONFIG_UART_CONSOLE=n
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2023 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
&pro_micro_serial { status = "disabled"; };
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
CONFIG_CONSOLE=n
|
|
||||||
CONFIG_SERIAL=n
|
|
||||||
CONFIG_UART_CONSOLE=n
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2023 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
&xiao_serial { status = "disabled"; };
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# defines board aliases for shorter names (or for renaming boards)
|
|
||||||
set(mikoto_520_BOARD_ALIAS "mikoto")
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
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]
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
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]
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# 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
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#
|
|
||||||
# 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
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2023 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
if BOARD_ADV360PRO_LEFT
|
|
||||||
|
|
||||||
config ZMK_KEYBOARD_NAME
|
|
||||||
default "Adv360 Pro"
|
|
||||||
|
|
||||||
config ZMK_SPLIT_ROLE_CENTRAL
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_ADV360PRO_LEFT
|
|
||||||
|
|
||||||
if BOARD_ADV360PRO_RIGHT
|
|
||||||
|
|
||||||
config ZMK_KEYBOARD_NAME
|
|
||||||
default "Adv360 Pro rt"
|
|
||||||
|
|
||||||
endif # BOARD_ADV360PRO_RIGHT
|
|
||||||
|
|
||||||
|
|
||||||
if BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT
|
|
||||||
|
|
||||||
config BOARD
|
|
||||||
default "adv360pro"
|
|
||||||
|
|
||||||
config ZMK_SPLIT
|
|
||||||
default y
|
|
||||||
|
|
||||||
config SPI
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
|
|
||||||
config BT_CTLR
|
|
||||||
default BT
|
|
||||||
|
|
||||||
if USB
|
|
||||||
|
|
||||||
config USB_NRFX
|
|
||||||
default y
|
|
||||||
|
|
||||||
config USB_DEVICE_STACK
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # USB
|
|
||||||
|
|
||||||
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
|
||||||
default y
|
|
||||||
|
|
||||||
config SPI
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# Kinesis Advantage 360 Professional
|
|
||||||
|
|
||||||
This board definition provides upstream support for the [Kinesis Advantage 360 Professional](https://kinesis-ergo.com/keyboards/advantage360/)
|
|
||||||
|
|
||||||
Kinesis offer a specific [custom configuration](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/) for the 360 Pro that references [a customised version of ZMK](https://github.com/ReFil/zmk/tree/adv360-z3.2-2) with Advantage 360 Pro specific functionality and changes over base ZMK. The Kinesis fork is regularly updated to bring the latest updates and changes from base ZMK however will not always be completely up to date, some features such as new keycodes will not be immediately available on the 360 Pro after they are implemented in base ZMK.
|
|
||||||
|
|
||||||
When using this board definition some of the more advanced features (the indicator RGB leds) will not work, and Kinesis cannot provide customer service for usage of base ZMK. Likewise the ZMK community cannot provide support for either the Kinesis keymap editor, nor any usage of the Kinesis custom fork.
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
#include <physical_layouts.dtsi>
|
|
||||||
|
|
||||||
/ {
|
|
||||||
physical_layout0: physical_layout_0 {
|
|
||||||
compatible = "zmk,physical-layout";
|
|
||||||
display-name = "Default";
|
|
||||||
|
|
||||||
keys // w h x y rot rx ry
|
|
||||||
= <&key_physical_attrs 125 100 0 25 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 125 25 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 225 0 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 325 0 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 425 0 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 525 0 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 625 0 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1075 0 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1175 0 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1275 0 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1375 0 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1475 0 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1575 25 0 0 0>
|
|
||||||
, <&key_physical_attrs 125 100 1675 25 0 0 0>
|
|
||||||
, <&key_physical_attrs 125 100 0 125 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 125 125 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 225 100 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 325 100 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 425 100 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 525 100 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 625 100 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1075 100 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1175 100 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1275 100 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1375 100 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1475 100 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1575 125 0 0 0>
|
|
||||||
, <&key_physical_attrs 125 100 1675 125 0 0 0>
|
|
||||||
, <&key_physical_attrs 125 100 0 225 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 125 225 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 225 200 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 325 200 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 425 200 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 525 200 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 625 200 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 675 400 1500 525 400>
|
|
||||||
, <&key_physical_attrs 100 100 775 400 1500 525 400>
|
|
||||||
, <&key_physical_attrs 100 100 925 400 (-1500) 1275 400>
|
|
||||||
, <&key_physical_attrs 100 100 1025 400 (-1500) 1275 400>
|
|
||||||
, <&key_physical_attrs 100 100 1075 200 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1175 200 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1275 200 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1375 200 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1475 200 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1575 225 0 0 0>
|
|
||||||
, <&key_physical_attrs 125 100 1675 225 0 0 0>
|
|
||||||
, <&key_physical_attrs 125 100 0 325 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 125 325 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 225 300 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 325 300 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 425 300 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 525 300 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 775 500 1500 525 400>
|
|
||||||
, <&key_physical_attrs 100 100 925 500 (-1500) 1275 400>
|
|
||||||
, <&key_physical_attrs 100 100 1175 300 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1275 300 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1375 300 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1475 300 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1575 325 0 0 0>
|
|
||||||
, <&key_physical_attrs 125 100 1675 325 0 0 0>
|
|
||||||
, <&key_physical_attrs 125 100 0 425 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 125 425 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 225 400 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 325 400 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 425 400 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 200 575 500 1500 525 400>
|
|
||||||
, <&key_physical_attrs 100 200 675 500 1500 525 400>
|
|
||||||
, <&key_physical_attrs 100 100 775 600 1500 525 400>
|
|
||||||
, <&key_physical_attrs 100 100 925 600 (-1500) 1275 400>
|
|
||||||
, <&key_physical_attrs 100 200 1025 500 (-1500) 1275 400>
|
|
||||||
, <&key_physical_attrs 100 200 1125 500 (-1500) 1275 400>
|
|
||||||
, <&key_physical_attrs 100 100 1275 400 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1375 400 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1475 400 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 1575 425 0 0 0>
|
|
||||||
, <&key_physical_attrs 125 100 1675 425 0 0 0>
|
|
||||||
;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2023 The ZMK Contributors
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
&pinctrl {
|
|
||||||
spi3_default: spi3_default {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
spi3_sleep: spi3_sleep {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>;
|
|
||||||
low-power-enable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
pwm0_default: pwm0_default {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
pwm0_sleep: pwm0_sleep {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>;
|
|
||||||
low-power-enable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,160 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2023 The ZMK Contributors
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
|
||||||
|
|
||||||
#include <dt-bindings/led/led.h>
|
|
||||||
#include <dt-bindings/zmk/matrix_transform.h>
|
|
||||||
|
|
||||||
#include "adv360pro-layouts.dtsi"
|
|
||||||
#include "adv360pro-pinctrl.dtsi"
|
|
||||||
|
|
||||||
&physical_layout0 {
|
|
||||||
transform = <&matrix_transform0>;
|
|
||||||
};
|
|
||||||
|
|
||||||
/ {
|
|
||||||
model = "Adv360 Pro";
|
|
||||||
compatible = "kinesis,adv360pro";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
zephyr,code-partition = &code_partition;
|
|
||||||
zephyr,sram = &sram0;
|
|
||||||
zephyr,flash = &flash0;
|
|
||||||
zmk,backlight = &backlight;
|
|
||||||
zmk,battery = &vbatt;
|
|
||||||
zmk,physical-layout = &physical_layout0;
|
|
||||||
zmk,kscan = &kscan0;
|
|
||||||
zmk,underglow = &led_strip;
|
|
||||||
};
|
|
||||||
|
|
||||||
matrix_transform0: keymap_transform_0 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <20>;
|
|
||||||
rows = <5>;
|
|
||||||
|
|
||||||
|
|
||||||
map = <
|
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,13) RC(4,14) RC(4,15) RC(4,16) RC(4,17) RC(4,18) RC(4,19)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,13) RC(3,14) RC(3,15) RC(3,16) RC(3,17) RC(3,18) RC(3,19)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) RC(2,14) RC(2,15) RC(2,16) RC(2,17) RC(2,18) RC(2,19)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,9) RC(1,10) RC(1,14) RC(1,15) RC(1,16) RC(1,17) RC(1,18) RC(1,19)
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,15) RC(0,16) RC(0,17) RC(0,18) RC(0,19)
|
|
||||||
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Node name must match original "EXT_POWER" label to preserve user settings.
|
|
||||||
EXT_POWER {
|
|
||||||
compatible = "zmk,ext-power-generic";
|
|
||||||
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
|
|
||||||
};
|
|
||||||
|
|
||||||
vbatt: vbatt {
|
|
||||||
compatible = "zmk,battery-voltage-divider";
|
|
||||||
io-channels = <&adc 2>;
|
|
||||||
output-ohms = <100000>;
|
|
||||||
full-ohms = <(100000 + 100000)>;
|
|
||||||
};
|
|
||||||
|
|
||||||
backlight: pwmleds {
|
|
||||||
compatible = "pwm-leds";
|
|
||||||
pwm_led_0 {
|
|
||||||
pwms = <&pwm0 0 10000 PWM_POLARITY_NORMAL>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
&pwm0 {
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-0 = <&pwm0_default>;
|
|
||||||
pinctrl-1 = <&pwm0_sleep>;
|
|
||||||
pinctrl-names = "default", "sleep";
|
|
||||||
};
|
|
||||||
|
|
||||||
&adc {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpiote {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio0 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio1 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
zephyr_udc0: &usbd {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&flash0 {
|
|
||||||
/*
|
|
||||||
* For more information, see:
|
|
||||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
|
||||||
*/
|
|
||||||
partitions {
|
|
||||||
compatible = "fixed-partitions";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
sd_partition: partition@0 {
|
|
||||||
reg = <0x00000000 0x00026000>;
|
|
||||||
};
|
|
||||||
code_partition: partition@26000 {
|
|
||||||
reg = <0x00026000 0x000c6000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The flash starting at 0x000ec000 and ending at
|
|
||||||
* 0x000f3fff is reserved for use by the application.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Storage partition will be used by FCB/LittleFS/NVS
|
|
||||||
* if enabled.
|
|
||||||
*/
|
|
||||||
storage_partition: partition@ec000 {
|
|
||||||
reg = <0x000ec000 0x00008000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
boot_partition: partition@f4000 {
|
|
||||||
reg = <0x000f4000 0x0000c000>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&spi3 {
|
|
||||||
compatible = "nordic,nrf-spim";
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-0 = <&spi3_default>;
|
|
||||||
pinctrl-1 = <&spi3_sleep>;
|
|
||||||
pinctrl-names = "default", "sleep";
|
|
||||||
|
|
||||||
led_strip: ws2812@0 {
|
|
||||||
compatible = "worldsemi,ws2812-spi";
|
|
||||||
|
|
||||||
/* SPI */
|
|
||||||
reg = <0>;
|
|
||||||
spi-max-frequency = <4000000>;
|
|
||||||
|
|
||||||
/* WS2812 */
|
|
||||||
chain-length = <3>; /* number of LEDs */
|
|
||||||
spi-one-frame = <0x70>;
|
|
||||||
spi-zero-frame = <0x40>;
|
|
||||||
|
|
||||||
color-mapping = <LED_COLOR_ID_GREEN
|
|
||||||
LED_COLOR_ID_RED
|
|
||||||
LED_COLOR_ID_BLUE>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
#include <behaviors.dtsi>
|
|
||||||
#include <dt-bindings/zmk/keys.h>
|
|
||||||
#include <dt-bindings/zmk/bt.h>
|
|
||||||
#include <dt-bindings/zmk/rgb.h>
|
|
||||||
#include <dt-bindings/zmk/backlight.h>
|
|
||||||
|
|
||||||
/ {
|
|
||||||
keymap {
|
|
||||||
compatible = "zmk,keymap";
|
|
||||||
|
|
||||||
default_layer {
|
|
||||||
bindings = <
|
|
||||||
&kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &tog 1 &mo 3 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &none &none &kp Y &kp U &kp I &kp O &kp P &kp BSLH
|
|
||||||
&kp ESC &kp A &kp S &kp D &kp F &kp G &none &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &none &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
|
|
||||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp HOME &kp PG_UP &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
|
|
||||||
&mo 2 &kp GRAVE &kp CAPS &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp END &kp PG_DN &kp ENTER &kp SPACE &kp UP &kp DOWN &kp LBKT &kp RBKT &mo 2
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
keypad {
|
|
||||||
bindings = <
|
|
||||||
&kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &mo 3 &kp N6 &kp KP_NUM &kp KP_EQUAL &kp KP_DIVIDE &kp KP_MULTIPLY &kp MINUS
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &none &none &kp Y &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp BSLH
|
|
||||||
&kp ESC &kp A &kp S &kp D &kp F &kp G &none &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &none &kp H &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp SQT
|
|
||||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp HOME &kp PG_UP &kp N &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER &kp RSHFT
|
|
||||||
&mo 2 &kp GRAVE &kp CAPS &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp END &kp PG_DN &kp ENTER &kp KP_N0 &kp UP &kp DOWN &kp KP_DOT &kp RBKT &mo 2
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
fn {
|
|
||||||
bindings = <
|
|
||||||
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &tog 1 &mo 3 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12
|
|
||||||
&trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans
|
|
||||||
&trans &trans &trans &trans &trans &trans &none &trans &trans &trans &trans &none &trans &trans &trans &trans &trans &trans
|
|
||||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
||||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
mod {
|
|
||||||
bindings = <
|
|
||||||
&none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &trans &none &none &none &none &none &none
|
|
||||||
&none &none &none &none &none &none &bootloader &bootloader &none &none &none &none &none &none
|
|
||||||
&none &none &none &none &none &none &none &none &none &bt BT_CLR &none &none &none &none &none &none &none &none
|
|
||||||
&none &none &none &none &none &none &none &none &none &none &none &none &none &none
|
|
||||||
&none &none &none &none &none &none &none &none &none &bl BL_TOG &rgb_ug RGB_TOG &bl BL_INC &bl BL_DEC &none &none &none
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
identifier: adv360pro
|
|
||||||
name: Advantage 360 Pro
|
|
||||||
type: keyboard
|
|
||||||
arch: arm
|
|
||||||
toolchain:
|
|
||||||
- zephyr
|
|
||||||
- gnuarmemb
|
|
||||||
- xtools
|
|
||||||
supported:
|
|
||||||
- gpio
|
|
||||||
- i2c
|
|
||||||
- counter
|
|
||||||
- spi
|
|
||||||
- usb_device
|
|
||||||
- nvs
|
|
||||||
- can
|
|
||||||
- kscan
|
|
||||||
- ble
|
|
||||||
- pwm
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: adv360pro
|
|
||||||
name: Advantage 360 Pro
|
|
||||||
type: board
|
|
||||||
url: https://kinesis-ergo.com/keyboards/advantage360
|
|
||||||
arch: arm
|
|
||||||
features:
|
|
||||||
- keys
|
|
||||||
- underglow
|
|
||||||
- backlight
|
|
||||||
- studio
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
siblings:
|
|
||||||
- adv360pro_left
|
|
||||||
- adv360pro_right
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2023 The ZMK Contributors
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "adv360pro.dtsi"
|
|
||||||
|
|
||||||
/{
|
|
||||||
kscan0: kscan {
|
|
||||||
compatible = "zmk,kscan-gpio-matrix";
|
|
||||||
wakeup-source;
|
|
||||||
|
|
||||||
diode-direction = "col2row";
|
|
||||||
row-gpios
|
|
||||||
= <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
;
|
|
||||||
|
|
||||||
col-gpios
|
|
||||||
= <&gpio0 25 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 11 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 2 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 28 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 29 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 30 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 31 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
|
||||||
;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2023 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_NRF52X=y
|
|
||||||
CONFIG_SOC_NRF52840_QIAA=y
|
|
||||||
CONFIG_BOARD_ADV360PRO_LEFT=y
|
|
||||||
|
|
||||||
# Enable MPU
|
|
||||||
CONFIG_ARM_MPU=y
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
|
|
||||||
# Enable SPI for LEDS
|
|
||||||
CONFIG_PINCTRL=y
|
|
||||||
CONFIG_SPI=y
|
|
||||||
CONFIG_SPI_NRFX=y
|
|
||||||
|
|
||||||
# Enable writing to flash
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
|
||||||
CONFIG_NVS=y
|
|
||||||
CONFIG_SETTINGS_NVS=y
|
|
||||||
CONFIG_FLASH=y
|
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
||||||
CONFIG_FLASH_MAP=y
|
|
||||||
|
|
||||||
# Enable 32kHz crystal
|
|
||||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
|
||||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y
|
|
||||||
|
|
||||||
#RGB leds config
|
|
||||||
CONFIG_WS2812_STRIP=y
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW=y
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=0
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
|
|
||||||
|
|
||||||
#Backlighting configuration
|
|
||||||
CONFIG_PWM=y
|
|
||||||
CONFIG_LED_PWM=y
|
|
||||||
CONFIG_ZMK_BACKLIGHT=y
|
|
||||||
CONFIG_ZMK_BACKLIGHT_BRT_START=20
|
|
||||||
CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y
|
|
||||||
|
|
||||||
#Misc configuration
|
|
||||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
|
||||||
CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
|
|
||||||
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
|
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
CONFIG_ZMK_BLE=y
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2023 The ZMK Contributors
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "adv360pro.dtsi"
|
|
||||||
|
|
||||||
/{
|
|
||||||
kscan0: kscan {
|
|
||||||
compatible = "zmk,kscan-gpio-matrix";
|
|
||||||
wakeup-source;
|
|
||||||
|
|
||||||
diode-direction = "col2row";
|
|
||||||
row-gpios
|
|
||||||
= <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
;
|
|
||||||
|
|
||||||
col-gpios
|
|
||||||
= <&gpio0 12 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 11 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 10 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 13 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 15 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 3 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 2 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 28 GPIO_ACTIVE_HIGH>
|
|
||||||
;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&matrix_transform0 {
|
|
||||||
col-offset = <10>;
|
|
||||||
};
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2023 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_NRF52X=y
|
|
||||||
CONFIG_SOC_NRF52840_QIAA=y
|
|
||||||
CONFIG_BOARD_ADV360PRO_RIGHT=y
|
|
||||||
|
|
||||||
# Enable MPU
|
|
||||||
CONFIG_ARM_MPU=y
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
|
|
||||||
# Enable SPI for LEDS
|
|
||||||
CONFIG_PINCTRL=y
|
|
||||||
CONFIG_SPI=y
|
|
||||||
CONFIG_SPI_NRFX=y
|
|
||||||
|
|
||||||
# Enable writing to flash
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
|
||||||
CONFIG_NVS=y
|
|
||||||
CONFIG_SETTINGS_NVS=y
|
|
||||||
CONFIG_FLASH=y
|
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
||||||
CONFIG_FLASH_MAP=y
|
|
||||||
|
|
||||||
# Enable 32kHz crystal
|
|
||||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
|
||||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y
|
|
||||||
|
|
||||||
#RGB leds config
|
|
||||||
CONFIG_WS2812_STRIP=y
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW=y
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=0
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
|
|
||||||
|
|
||||||
#Backlighting configuration
|
|
||||||
CONFIG_PWM=y
|
|
||||||
CONFIG_LED_PWM=y
|
|
||||||
CONFIG_ZMK_BACKLIGHT=y
|
|
||||||
CONFIG_ZMK_BACKLIGHT_BRT_START=20
|
|
||||||
CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y
|
|
||||||
|
|
||||||
#Misc configuration
|
|
||||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
|
||||||
CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
|
|
||||||
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
|
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
CONFIG_ZMK_BLE=y
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2023 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
|
||||||
|
|
||||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
|
||||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2024 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
|
|
||||||
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html
|
|
||||||
|
|
||||||
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
|
|
||||||
@@ -4,5 +4,5 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
config BOARD_BDN9
|
config BOARD_BDN9
|
||||||
bool "BDN9 rev2"
|
bool "BDN9 rev2"
|
||||||
depends on SOC_STM32F072XB
|
depends on SOC_STM32F072XB
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
# keeb.io BDN9 board configuration
|
# keeb.io BDN9 board configuration
|
||||||
|
|
||||||
# Copyright (c) 2020 The ZMK Contributors
|
# Copyright (c) 2020 Pete Johanson
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
if BOARD_BDN9
|
if BOARD_BDN9
|
||||||
|
|
||||||
config BOARD
|
config BOARD
|
||||||
default "bdn9_rev2"
|
default "bdn9_rev2"
|
||||||
|
|
||||||
config ZMK_KEYBOARD_NAME
|
config ZMK_KEYBOARD_NAME
|
||||||
default "BDN9 Rev2"
|
default "BDN9 Rev2"
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW
|
config ZMK_USB
|
||||||
select SPI
|
default y
|
||||||
select WS2812_STRIP
|
|
||||||
|
|
||||||
endif # BOARD_BDN9
|
endif # BOARD_BDN9
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
#include <physical_layouts.dtsi>
|
|
||||||
|
|
||||||
/ {
|
|
||||||
physical_layout0: physical_layout_0 {
|
|
||||||
compatible = "zmk,physical-layout";
|
|
||||||
display-name = "BDN9";
|
|
||||||
|
|
||||||
keys // w h x y rot rx ry
|
|
||||||
= <&key_physical_attrs 100 100 0 0 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 100 0 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 200 0 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 0 100 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 100 100 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 200 100 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 0 200 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 100 200 0 0 0>
|
|
||||||
, <&key_physical_attrs 100 100 200 200 0 0 0>
|
|
||||||
;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# Copyright (c) 2022 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
# Uncomment these lines below to enable encoders.
|
|
||||||
# CONFIG_EC11=y
|
|
||||||
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
|
||||||
|
|
||||||
# Uncomment the line below to enable RGB.
|
|
||||||
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
|
||||||
@@ -6,151 +6,102 @@
|
|||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <st/f0/stm32f072Xb.dtsi>
|
#include <st/f0/stm32f072Xb.dtsi>
|
||||||
#include <st/f0/stm32f072c(8-b)tx-pinctrl.dtsi>
|
|
||||||
#include <dt-bindings/led/led.h>
|
|
||||||
|
|
||||||
#include <dt-bindings/zmk/matrix_transform.h>
|
|
||||||
|
|
||||||
#include "bdn9_rev2-layouts.dtsi"
|
|
||||||
|
|
||||||
&physical_layout0 {
|
|
||||||
transform = <&matrix_transform0>;
|
|
||||||
};
|
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "Keeb.io BDN9 rev2";
|
model = "Keeb.io BDN9 rev2";
|
||||||
compatible = "keebio,bdn9", "st,stm32f072";
|
compatible = "keebio,bdn9", "st,stm32f072";
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
zmk,underglow = &led_strip;
|
zmk,kscan = &kscan;
|
||||||
zmk,physical-layout = &physical_layout0;
|
/* TODO: Enable once the GPIO bitbanging driver supports STM32
|
||||||
zmk,kscan = &kscan0;
|
zmk,underglow = &led_strip;
|
||||||
};
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
kscan: kscan {
|
||||||
|
compatible = "zmk,kscan-gpio-direct";
|
||||||
|
label = "KSCAN";
|
||||||
|
|
||||||
matrix_transform0: matrix_transform_0 {
|
input-gpios
|
||||||
compatible = "zmk,matrix-transform";
|
= <&gpiob 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
columns = <3>;
|
, <&gpiob 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
rows = <3>;
|
, <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
map = <
|
, <&gpiob 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
RC(0,0) RC(0,1) RC(0,2)
|
, <&gpiob 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
RC(0,3) RC(0,4) RC(0,5)
|
, <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
RC(0,6) RC(0,7) RC(0,8)
|
, <&gpioa 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
>;
|
, <&gpiof 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
};
|
, <&gpiof 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
kscan0: kscan_0 {
|
/*
|
||||||
compatible = "zmk,kscan-gpio-direct";
|
led_strip: ws2812 {
|
||||||
|
compatible = "worldsemi,ws2812-gpio";
|
||||||
|
label = "WS2812";
|
||||||
|
|
||||||
input-gpios
|
in-gpios = <&gpiob 15 0>;
|
||||||
= <&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 {
|
chain-length = <9>;
|
||||||
compatible = "alps,ec11";
|
};
|
||||||
a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
*/
|
||||||
b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
|
||||||
steps = <80>;
|
|
||||||
status = "disabled";
|
|
||||||
};
|
|
||||||
mid_encoder: encoder_mid {
|
|
||||||
compatible = "alps,ec11";
|
|
||||||
a-gpios = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
|
||||||
b-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
|
||||||
steps = <80>;
|
|
||||||
status = "disabled";
|
|
||||||
};
|
|
||||||
right_encoder: encoder_right {
|
|
||||||
compatible = "alps,ec11";
|
|
||||||
a-gpios = <&gpioa 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
|
||||||
b-gpios = <&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
|
||||||
steps = <80>;
|
|
||||||
status = "disabled";
|
|
||||||
};
|
|
||||||
|
|
||||||
sensors: sensors {
|
left_encoder: encoder_left {
|
||||||
compatible = "zmk,keymap-sensors";
|
compatible = "alps,ec11";
|
||||||
status = "disabled";
|
label = "LEFT_ENCODER";
|
||||||
sensors = <>;
|
a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
triggers-per-rotation = <20>;
|
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 = <>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&spi2 {
|
&usb {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
pinctrl-0 = <&spi2_sck_pb13 &spi2_mosi_pb15>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
|
|
||||||
led_strip: ws2812@0 {
|
|
||||||
compatible = "worldsemi,ws2812-spi";
|
|
||||||
|
|
||||||
/* 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>;
|
|
||||||
|
|
||||||
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&clk_hsi {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&pll {
|
|
||||||
status = "okay";
|
|
||||||
prediv = <1>;
|
|
||||||
mul = <6>;
|
|
||||||
clocks = <&clk_hsi>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&rcc {
|
|
||||||
clocks = <&pll>;
|
|
||||||
clock-frequency = <DT_FREQ_M(48)>;
|
|
||||||
ahb-prescaler = <1>;
|
|
||||||
apb1-prescaler = <1>;
|
|
||||||
};
|
|
||||||
|
|
||||||
zephyr_udc0: &usb {
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
|
|
||||||
// Overridden to lower RAM usage.
|
|
||||||
num-bidir-endpoints = <4>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&rtc {
|
&rtc {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&flash0 {
|
&flash0 {
|
||||||
/*
|
/*
|
||||||
* For more information, see:
|
* For more information, see:
|
||||||
* http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
|
* http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
|
||||||
*/
|
*/
|
||||||
partitions {
|
partitions {
|
||||||
compatible = "fixed-partitions";
|
compatible = "fixed-partitions";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
|
||||||
/* Set 6Kb of storage at the end of the 128Kb of flash */
|
/* Set 6Kb of storage at the end of the 128Kb of flash */
|
||||||
storage_partition: partition@1e800 {
|
storage_partition: partition@3e800 {
|
||||||
reg = <0x0001e800 0x00001800>;
|
label = "storage";
|
||||||
};
|
reg = <0x0001e800 0x00001800>;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,15 +4,13 @@
|
|||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#undef ZMK_BEHAVIORS_KEEP_ALL
|
|
||||||
|
|
||||||
#include <behaviors.dtsi>
|
#include <behaviors.dtsi>
|
||||||
#include <dt-bindings/zmk/keys.h>
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
|
||||||
/* Uncomment and keep whatever encoders are on your BDN9
|
/* Uncomment and keep whatever encoders are on your BDN9
|
||||||
&sensors {
|
&sensors {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
sensors = <&left_encoder &mid_encoder &right_encoder>;
|
sensors = <&left_encoder &mid_encoder &right_encoder>;
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -22,19 +20,19 @@
|
|||||||
// &right_encoder { status = "okay"; };
|
// &right_encoder { status = "okay"; };
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
keymap {
|
keymap {
|
||||||
compatible = "zmk,keymap";
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
default_layer {
|
default_layer {
|
||||||
bindings = <
|
bindings = <
|
||||||
&kp HOME &kp K_PP &kp END
|
&kp HOME &kp K_PP &kp END
|
||||||
&kp PG_UP &kp UP &kp PG_DN
|
&kp PG_UP &kp UP &kp PG_DN
|
||||||
&kp LEFT &kp DOWN &kp RIGHT
|
&kp LEFT &kp DOWN &kp RIGHT
|
||||||
>;
|
>;
|
||||||
/* Uncomment and add necessary bindings. This examples is for one encoder
|
/* Uncomment and add necessary bindings. This examples is for one encoder
|
||||||
sensor-bindings = <&inc_dec_kp PG_UP PG_DN>;
|
sensor-bindings = <&inc_dec_kp PG_UP PG_DN>;
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -5,18 +5,28 @@ CONFIG_SOC_STM32F072XB=y
|
|||||||
# 72MHz system clock
|
# 72MHz system clock
|
||||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
|
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
|
||||||
|
|
||||||
|
# Floating Point Options
|
||||||
|
CONFIG_FPU=y
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
# Enable pinctrl
|
# Enable pinmux
|
||||||
CONFIG_PINCTRL=y
|
CONFIG_PINMUX=y
|
||||||
|
|
||||||
# Poll to avoid interrupt overlap issues
|
# Needed to reduce this to size that will fit on F072
|
||||||
CONFIG_ZMK_KSCAN_DIRECT_POLLING=y
|
CONFIG_HEAP_MEM_POOL_SIZE=1024
|
||||||
|
|
||||||
CONFIG_ISR_STACK_SIZE=1024
|
|
||||||
|
|
||||||
# clock configuration
|
# clock configuration
|
||||||
CONFIG_CLOCK_CONTROL=y
|
CONFIG_CLOCK_CONTROL=y
|
||||||
|
|
||||||
CONFIG_ZMK_USB=y
|
# Clock configuration for Cube Clock control driver
|
||||||
|
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
|
||||||
|
# use HSI as PLL input
|
||||||
|
CONFIG_CLOCK_STM32_PLL_SRC_HSI=y
|
||||||
|
# produce 72MHz clock at PLL output
|
||||||
|
CONFIG_CLOCK_STM32_PLL_PREDIV=1
|
||||||
|
CONFIG_CLOCK_STM32_PLL_MULTIPLIER=12
|
||||||
|
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
|
||||||
|
CONFIG_CLOCK_STM32_APB1_PRESCALER=2
|
||||||
|
CONFIG_CLOCK_STM32_APB2_PRESCALER=1
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: blackpill_f401cc
|
|
||||||
name: BlackPill F401CC
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
|
|
||||||
exposes: [blackpill]
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: blackpill_f401ce
|
|
||||||
name: BlackPill F401CE
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
|
|
||||||
exposes: [blackpill]
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: blackpill_f411ce
|
|
||||||
name: BlackPill F411CE
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
|
|
||||||
exposes: [blackpill]
|
|
||||||
8
app/boards/arm/bluemicro840/CMakeLists.txt
Normal file
8
app/boards/arm/bluemicro840/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
||||||
|
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
||||||
|
-c
|
||||||
|
-b 0x26000
|
||||||
|
-f 0xADA52840
|
||||||
|
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
||||||
|
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
||||||
|
)
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
config BOARD_ENABLE_DCDC
|
config BOARD_ENABLE_DCDC
|
||||||
bool "Enable DCDC mode"
|
bool "Enable DCDC mode"
|
||||||
select SOC_DCDC_NRF52X
|
select SOC_DCDC_NRF52X
|
||||||
default y
|
default y
|
||||||
depends on BOARD_BLUEMICRO840_V1
|
depends on BOARD_BLUEMICRO840_V1
|
||||||
|
|
||||||
|
|||||||
@@ -4,5 +4,5 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
config BOARD_BLUEMICRO840_V1
|
config BOARD_BLUEMICRO840_V1
|
||||||
bool "BlueMicro840_V1"
|
bool "BlueMicro840_V1"
|
||||||
depends on SOC_NRF52840_QIAA
|
depends on SOC_NRF52840_QIAA
|
||||||
|
|||||||
@@ -6,16 +6,28 @@
|
|||||||
if BOARD_BLUEMICRO840_V1
|
if BOARD_BLUEMICRO840_V1
|
||||||
|
|
||||||
config BOARD
|
config BOARD
|
||||||
default "bluemicro840_v1"
|
default "bluemicro840_v1"
|
||||||
|
|
||||||
if USB_DEVICE_STACK
|
if USB
|
||||||
|
|
||||||
config USB_NRFX
|
config USB_NRFX
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif # USB_DEVICE_STACK
|
config USB_DEVICE_STACK
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # USB
|
||||||
|
|
||||||
config BT_CTLR
|
config BT_CTLR
|
||||||
default BT
|
default BT
|
||||||
|
|
||||||
|
config ZMK_BLE
|
||||||
|
default y
|
||||||
|
|
||||||
|
config ZMK_USB
|
||||||
|
default y
|
||||||
|
|
||||||
|
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
||||||
|
default y
|
||||||
|
|
||||||
endif # BOARD_BLUEMICRO840_V1
|
endif # BOARD_BLUEMICRO840_V1
|
||||||
|
|||||||
@@ -5,53 +5,53 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
pro_micro: connector {
|
pro_micro: connector {
|
||||||
compatible = "arduino-pro-micro";
|
compatible = "arduino-pro-micro";
|
||||||
#gpio-cells = <2>;
|
#gpio-cells = <2>;
|
||||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
gpio-map-pass-thru = <0 0x3f>;
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
gpio-map
|
gpio-map
|
||||||
= <0 0 &gpio0 8 0> /* D0 D2 */
|
= <0 0 &gpio0 8 0> /* D0 D2 */
|
||||||
, <1 0 &gpio0 6 0> /* D1 D3*/
|
, <1 0 &gpio0 6 0> /* D1 D3*/
|
||||||
, <2 0 &gpio0 15 0> /* D2 D1*/
|
, <2 0 &gpio0 15 0> /* D2 D1*/
|
||||||
, <3 0 &gpio0 17 0> /* D3 D0*/
|
, <3 0 &gpio0 17 0> /* D3 D0*/
|
||||||
, <4 0 &gpio0 20 0> /* D4/A6 D4*/
|
, <4 0 &gpio0 20 0> /* D4/A6 D4*/
|
||||||
, <5 0 &gpio0 13 0> /* D5 C6*/
|
, <5 0 &gpio0 13 0> /* D5 C6*/
|
||||||
, <6 0 &gpio0 24 0> /* D6/A7 D7*/
|
, <6 0 &gpio0 24 0> /* D6/A7 D7*/
|
||||||
, <7 0 &gpio0 9 0> /* D7 E6*/
|
, <7 0 &gpio0 9 0> /* D7 E6*/
|
||||||
, <8 0 &gpio0 10 0> /* D8/A8 B4*/
|
, <8 0 &gpio0 10 0> /* D8/A8 B4*/
|
||||||
, <9 0 &gpio1 6 0> /* D9/A9 B5*/
|
, <9 0 &gpio1 6 0> /* D9/A9 B5*/
|
||||||
, <10 0 &gpio1 11 0> /* D10/A10 B6*/
|
, <10 0 &gpio1 11 0> /* D10/A10 B6*/
|
||||||
, <16 0 &gpio0 28 0> /* D16 B2*/
|
, <16 0 &gpio0 28 0> /* D16 B2*/
|
||||||
, <14 0 &gpio0 3 0> /* D14 B3*/
|
, <14 0 &gpio0 3 0> /* D14 B3*/
|
||||||
, <15 0 &gpio1 13 0> /* D15 B1*/
|
, <15 0 &gpio1 13 0> /* D15 B1*/
|
||||||
, <18 0 &gpio0 2 0> /* D18/A0 F7*/
|
, <18 0 &gpio0 2 0> /* D18/A0 F7*/
|
||||||
, <19 0 &gpio0 29 0> /* D19/A1 F6*/
|
, <19 0 &gpio0 29 0> /* D19/A1 F6*/
|
||||||
, <20 0 &gpio0 26 0> /* D20/A2 F5*/
|
, <20 0 &gpio0 26 0> /* D20/A2 F5*/
|
||||||
, <21 0 &gpio0 30 0> /* D21/A3 F4*/
|
, <21 0 &gpio0 30 0> /* D21/A3 F4*/
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
pro_micro_a: connector_a {
|
pro_micro_a: connector_a {
|
||||||
compatible = "arduino-pro-micro";
|
compatible = "arduino-pro-micro";
|
||||||
#gpio-cells = <2>;
|
#gpio-cells = <2>;
|
||||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
gpio-map-pass-thru = <0 0x3f>;
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
gpio-map
|
gpio-map
|
||||||
= <0 0 &gpio0 2 0> /* D18/A0 F7*/
|
= <0 0 &gpio0 2 0> /* D18/A0 F7*/
|
||||||
, <1 0 &gpio0 29 0> /* D19/A1 F6*/
|
, <1 0 &gpio0 29 0> /* D19/A1 F6*/
|
||||||
, <2 0 &gpio0 26 0> /* D20/A2 F5*/
|
, <2 0 &gpio0 26 0> /* D20/A2 F5*/
|
||||||
, <3 0 &gpio0 30 0> /* D21/A3 F4*/
|
, <3 0 &gpio0 30 0> /* D21/A3 F4*/
|
||||||
, <6 0 &gpio0 20 0> /* D4/A6 D4*/
|
, <6 0 &gpio0 20 0> /* D4/A6 D4*/
|
||||||
, <7 0 &gpio0 24 0> /* D6/A7 D7*/
|
, <7 0 &gpio0 24 0> /* D6/A7 D7*/
|
||||||
, <8 0 &gpio0 10 0> /* D8/A8 B4*/
|
, <8 0 &gpio0 10 0> /* D8/A8 B4*/
|
||||||
, <9 0 &gpio1 6 0> /* D9/A9 B5*/
|
, <9 0 &gpio1 6 0> /* D9/A9 B5*/
|
||||||
, <10 0 &gpio1 11 0> /* D10/A10 B6*/
|
, <10 0 &gpio1 11 0> /* D10/A10 B6*/
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pro_micro_d: &pro_micro {};
|
pro_micro_d: &pro_micro {};
|
||||||
pro_micro_i2c: &i2c0 {};
|
pro_micro_i2c: &i2c0 {};
|
||||||
pro_micro_spi: &spi1 {};
|
pro_micro_spi: &spi0 {};
|
||||||
pro_micro_serial: &uart0 {};
|
pro_micro_serial: &uart0 {};
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
&pinctrl {
|
|
||||||
uart0_default: uart0_default {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(UART_RX, 0, 8)>;
|
|
||||||
bias-pull-up;
|
|
||||||
};
|
|
||||||
group2 {
|
|
||||||
psels = <NRF_PSEL(UART_TX, 0, 6)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
uart0_sleep: uart0_sleep {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(UART_RX, 0, 8)>,
|
|
||||||
<NRF_PSEL(UART_TX, 0, 6)>;
|
|
||||||
low-power-enable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c0_default: i2c0_default {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
|
|
||||||
<NRF_PSEL(TWIM_SCL, 0, 17)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c0_sleep: i2c0_sleep {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
|
|
||||||
<NRF_PSEL(TWIM_SCL, 0, 17)>;
|
|
||||||
low-power-enable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
spi1_default: spi1_default {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
|
|
||||||
<NRF_PSEL(SPIM_MOSI, 0, 28)>,
|
|
||||||
<NRF_PSEL(SPIM_MISO, 0, 3)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
spi1_sleep: spi1_sleep {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
|
|
||||||
<NRF_PSEL(SPIM_MOSI, 0, 28)>,
|
|
||||||
<NRF_PSEL(SPIM_MISO, 0, 3)>;
|
|
||||||
low-power-enable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -7,117 +7,111 @@
|
|||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
#include "arduino_pro_micro_pins.dtsi"
|
#include "arduino_pro_micro_pins.dtsi"
|
||||||
#include "bluemicro840_v1-pinctrl.dtsi"
|
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "BlueMicro840_V1";
|
model = "BlueMicro840_V1";
|
||||||
compatible = "bluemicro840,v1";
|
compatible = "bluemicro840,v1";
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
zephyr,code-partition = &code_partition;
|
zephyr,code-partition = &code_partition;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
zmk,battery = &vbatt;
|
};
|
||||||
};
|
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
blue_led: led_0 {
|
blue_led: led_0 {
|
||||||
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
label = "Blue LED";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
// Node name must match original "EXT_POWER" label to preserve user settings.
|
ext-power {
|
||||||
EXT_POWER {
|
compatible = "zmk,ext-power-generic";
|
||||||
compatible = "zmk,ext-power-generic";
|
label = "EXT_POWER";
|
||||||
init-delay-ms = <20>;
|
init-delay-ms = <20>;
|
||||||
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
|
|
||||||
vbatt: vbatt {
|
vbatt {
|
||||||
compatible = "zmk,battery-voltage-divider";
|
compatible = "zmk,battery-voltage-divider";
|
||||||
io-channels = <&adc 7>;
|
label = "BATTERY";
|
||||||
output-ohms = <2000000>;
|
io-channels = <&adc 7>;
|
||||||
full-ohms = <(2000000 + 806000)>;
|
output-ohms = <2000000>;
|
||||||
};
|
full-ohms = <(2000000 + 806000)>;
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&adc {
|
&adc {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&gpiote {
|
&gpiote {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&gpio0 {
|
&gpio0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&gpio1 {
|
&gpio1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&i2c0 {
|
&i2c0 {
|
||||||
compatible = "nordic,nrf-twi";
|
compatible = "nordic,nrf-twi";
|
||||||
pinctrl-0 = <&i2c0_default>;
|
sda-pin = <15>;
|
||||||
pinctrl-1 = <&i2c0_sleep>;
|
scl-pin = <17>;
|
||||||
pinctrl-names = "default", "sleep";
|
|
||||||
};
|
|
||||||
|
|
||||||
&spi1 {
|
|
||||||
compatible = "nordic,nrf-spim";
|
|
||||||
pinctrl-0 = <&spi1_default>;
|
|
||||||
pinctrl-1 = <&spi1_sleep>;
|
|
||||||
pinctrl-names = "default", "sleep";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
compatible = "nordic,nrf-uarte";
|
compatible = "nordic,nrf-uarte";
|
||||||
current-speed = <115200>;
|
tx-pin = <6>;
|
||||||
pinctrl-0 = <&uart0_default>;
|
rx-pin = <8>;
|
||||||
pinctrl-1 = <&uart0_sleep>;
|
|
||||||
pinctrl-names = "default", "sleep";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
zephyr_udc0: &usbd {
|
&usbd {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
&flash0 {
|
&flash0 {
|
||||||
/*
|
/*
|
||||||
* For more information, see:
|
* For more information, see:
|
||||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
||||||
*/
|
*/
|
||||||
partitions {
|
partitions {
|
||||||
compatible = "fixed-partitions";
|
compatible = "fixed-partitions";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
|
||||||
sd_partition: partition@0 {
|
sd_partition: partition@0 {
|
||||||
reg = <0x00000000 0x00026000>;
|
label = "softdevice";
|
||||||
};
|
reg = <0x00000000 0x00026000>;
|
||||||
code_partition: partition@26000 {
|
};
|
||||||
reg = <0x00026000 0x000c6000>;
|
code_partition: partition@26000 {
|
||||||
};
|
label = "code_partition";
|
||||||
|
reg = <0x00026000 0x000c6000>;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The flash starting at 0x000ec000 and ending at
|
* The flash starting at 0x000ec000 and ending at
|
||||||
* 0x000f3fff is reserved for use by the application.
|
* 0x000f3fff is reserved for use by the application.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Storage partition will be used by FCB/LittleFS/NVS
|
* Storage partition will be used by FCB/LittleFS/NVS
|
||||||
* if enabled.
|
* if enabled.
|
||||||
*/
|
*/
|
||||||
storage_partition: partition@ec000 {
|
storage_partition: partition@ec000 {
|
||||||
reg = <0x000ec000 0x00008000>;
|
label = "storage";
|
||||||
};
|
reg = <0x000ec000 0x00008000>;
|
||||||
|
};
|
||||||
|
|
||||||
boot_partition: partition@f4000 {
|
boot_partition: partition@f4000 {
|
||||||
reg = <0x000f4000 0x0000c000>;
|
label = "adafruit_boot";
|
||||||
};
|
reg = <0x000f4000 0x0000c000>;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,20 +7,14 @@ CONFIG_BOARD_BLUEMICRO840_V1=y
|
|||||||
# Enable MPU
|
# Enable MPU
|
||||||
CONFIG_ARM_MPU=y
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
CONFIG_PINCTRL=y
|
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
CONFIG_SETTINGS_NVS=y
|
CONFIG_SETTINGS_NVS=y
|
||||||
CONFIG_FLASH=y
|
CONFIG_FLASH=y
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||||
CONFIG_FLASH_MAP=y
|
CONFIG_FLASH_MAP=y
|
||||||
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
CONFIG_ZMK_BLE=y
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
|
||||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2024 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
|
|
||||||
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html
|
|
||||||
|
|
||||||
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: boardsource_blok
|
|
||||||
name: BoardSource blok
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
url: https://peg.software/docs/blok
|
|
||||||
exposes: [pro_micro]
|
|
||||||
8
app/boards/arm/bt60/CMakeLists.txt
Normal file
8
app/boards/arm/bt60/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
||||||
|
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
||||||
|
-c
|
||||||
|
-b 0x26000
|
||||||
|
-f 0xADA52840
|
||||||
|
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
||||||
|
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
||||||
|
)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
config BOARD_ENABLE_DCDC
|
config BOARD_ENABLE_DCDC
|
||||||
bool "Enable DCDC mode"
|
bool "Enable DCDC mode"
|
||||||
select SOC_DCDC_NRF52X
|
select SOC_DCDC_NRF52X
|
||||||
default y
|
default y
|
||||||
depends on (BOARD_BT60_V1_HS || BOARD_BT60_V1)
|
depends on (BOARD_BT60_V1_HS || BOARD_BT60_V1)
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
config BOARD_BT60_V1
|
config BOARD_BT60_V1
|
||||||
bool "bt60"
|
bool "bt60"
|
||||||
depends on SOC_NRF52840_QIAA
|
depends on SOC_NRF52840_QIAA
|
||||||
|
|
||||||
config BOARD_BT60_V1_HS
|
config BOARD_BT60_V1_HS
|
||||||
bool "bt60 hotswap"
|
bool "bt60 hotswap"
|
||||||
depends on SOC_NRF52840_QIAA
|
depends on SOC_NRF52840_QIAA
|
||||||
|
|||||||
@@ -4,22 +4,31 @@
|
|||||||
if BOARD_BT60_V1_HS || BOARD_BT60_V1
|
if BOARD_BT60_V1_HS || BOARD_BT60_V1
|
||||||
|
|
||||||
config BOARD
|
config BOARD
|
||||||
default "bt60"
|
default "bt60"
|
||||||
|
|
||||||
if USB
|
if USB
|
||||||
|
|
||||||
config USB_NRFX
|
config USB_NRFX
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config USB_DEVICE_STACK
|
config USB_DEVICE_STACK
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif # USB
|
endif # USB
|
||||||
|
|
||||||
config BT_CTLR
|
config BT_CTLR
|
||||||
default BT
|
default BT
|
||||||
|
|
||||||
|
config ZMK_BLE
|
||||||
|
default y
|
||||||
|
|
||||||
|
config ZMK_USB
|
||||||
|
default y
|
||||||
|
|
||||||
|
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
||||||
|
default y
|
||||||
|
|
||||||
config ZMK_KEYBOARD_NAME
|
config ZMK_KEYBOARD_NAME
|
||||||
default "BT60"
|
default "BT60"
|
||||||
|
|
||||||
endif # BOARD_BT60
|
endif # BOARD_BT60
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
|
||||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||||
|
|||||||
@@ -9,101 +9,120 @@
|
|||||||
#include <dt-bindings/zmk/matrix_transform.h>
|
#include <dt-bindings/zmk/matrix_transform.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "BT60";
|
model = "BT60";
|
||||||
compatible = "polarityworks,bt60";
|
compatible = "polarityworks,bt60";
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
zephyr,code-partition = &code_partition;
|
zephyr,code-partition = &code_partition;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
zmk,battery = &vbatt;
|
zmk,kscan = &kscan0;
|
||||||
};
|
zmk,matrix_transform = &default_transform;
|
||||||
|
};
|
||||||
|
|
||||||
sensors: sensors {
|
sensors {
|
||||||
compatible = "zmk,keymap-sensors";
|
compatible = "zmk,keymap-sensors";
|
||||||
sensors = <&left_encoder>;
|
sensors = <&left_encoder>;
|
||||||
triggers-per-rotation = <20>;
|
};
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
left_encoder: encoder_left {
|
left_encoder: encoder_left {
|
||||||
compatible = "alps,ec11";
|
compatible = "alps,ec11";
|
||||||
a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
label = "LEFT_ENCODER";
|
||||||
b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
steps = <80>;
|
b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
status = "okay";
|
resolution = <4>;
|
||||||
};
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
blue_led: led_0 {
|
blue_led: led_0 {
|
||||||
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
label = "Blue LED";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
vbatt: vbatt {
|
vbatt {
|
||||||
compatible = "zmk,battery-voltage-divider";
|
compatible = "zmk,battery-voltage-divider";
|
||||||
io-channels = <&adc 2>;
|
label = "BATTERY";
|
||||||
output-ohms = <2000000>;
|
io-channels = <&adc 2>;
|
||||||
full-ohms = <(2000000 + 806000)>;
|
output-ohms = <2000000>;
|
||||||
};
|
full-ohms = <(2000000 + 806000)>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&adc {
|
&adc {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&gpiote {
|
&gpiote {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&gpio0 {
|
&gpio0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&gpio1 {
|
&gpio1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
zephyr_udc0: &usbd {
|
&i2c0 {
|
||||||
status = "okay";
|
compatible = "nordic,nrf-twi";
|
||||||
|
sda-pin = <17>;
|
||||||
|
scl-pin = <20>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
compatible = "nordic,nrf-uarte";
|
||||||
|
tx-pin = <6>;
|
||||||
|
rx-pin = <8>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&usbd {
|
||||||
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
&flash0 {
|
&flash0 {
|
||||||
/*
|
/*
|
||||||
* For more information, see:
|
* For more information, see:
|
||||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
||||||
*/
|
*/
|
||||||
partitions {
|
partitions {
|
||||||
compatible = "fixed-partitions";
|
compatible = "fixed-partitions";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
|
||||||
sd_partition: partition@0 {
|
sd_partition: partition@0 {
|
||||||
reg = <0x00000000 0x00026000>;
|
label = "softdevice";
|
||||||
};
|
reg = <0x00000000 0x00026000>;
|
||||||
code_partition: partition@26000 {
|
};
|
||||||
reg = <0x00026000 0x000c6000>;
|
code_partition: partition@26000 {
|
||||||
};
|
label = "code_partition";
|
||||||
|
reg = <0x00026000 0x000c6000>;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The flash starting at 0x000ec000 and ending at
|
* The flash starting at 0x000ec000 and ending at
|
||||||
* 0x000f3fff is reserved for use by the application.
|
* 0x000f3fff is reserved for use by the application.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Storage partition will be used by FCB/LittleFS/NVS
|
* Storage partition will be used by FCB/LittleFS/NVS
|
||||||
* if enabled.
|
* if enabled.
|
||||||
*/
|
*/
|
||||||
storage_partition: partition@ec000 {
|
storage_partition: partition@ec000 {
|
||||||
reg = <0x000ec000 0x00008000>;
|
label = "storage";
|
||||||
};
|
reg = <0x000ec000 0x00008000>;
|
||||||
|
};
|
||||||
|
|
||||||
boot_partition: partition@f4000 {
|
boot_partition: partition@f4000 {
|
||||||
reg = <0x000f4000 0x0000c000>;
|
label = "adafruit_boot";
|
||||||
};
|
reg = <0x000f4000 0x0000c000>;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,116 +6,108 @@
|
|||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include "bt60.dtsi"
|
#include "bt60.dtsi"
|
||||||
#include <layouts/common/60percent/all1u.dtsi>
|
|
||||||
#include <layouts/common/60percent/ansi.dtsi>
|
|
||||||
#include <layouts/common/60percent/hhkb.dtsi>
|
|
||||||
#include <layouts/common/60percent/iso.dtsi>
|
|
||||||
|
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
chosen {
|
chosen {
|
||||||
zmk,kscan = &kscan0;
|
zmk,kscan = &kscan0;
|
||||||
zmk,physical-layout = &layout_60_ansi;
|
zmk,matrix_transform = &ansi_transform;
|
||||||
};
|
};
|
||||||
|
|
||||||
ansi_transform: keymap_transform_0 {
|
ansi_transform: keymap_transform_0 {
|
||||||
compatible = "zmk,matrix-transform";
|
compatible = "zmk,matrix-transform";
|
||||||
columns = <15>;
|
columns = <15>;
|
||||||
rows = <5>;
|
rows = <5>;
|
||||||
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(0,12) RC(0,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,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(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(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,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,13)
|
||||||
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)
|
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 {
|
hhkb_transform: keymap_transform_1 {
|
||||||
compatible = "zmk,matrix-transform";
|
compatible = "zmk,matrix-transform";
|
||||||
columns = <15>;
|
columns = <15>;
|
||||||
rows = <5>;
|
rows = <5>;
|
||||||
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(0,12) RC(0,13) RC(0,14)
|
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14)
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
RC(1,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(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(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)
|
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 {
|
iso_transform: keymap_transform_2 {
|
||||||
compatible = "zmk,matrix-transform";
|
compatible = "zmk,matrix-transform";
|
||||||
columns = <15>;
|
columns = <15>;
|
||||||
rows = <5>;
|
rows = <5>;
|
||||||
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(0,12) RC(0,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,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,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(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(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)
|
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 {
|
all_1u_transform: keymap_transform_3 {
|
||||||
compatible = "zmk,matrix-transform";
|
compatible = "zmk,matrix-transform";
|
||||||
columns = <15>;
|
columns = <15>;
|
||||||
rows = <5>;
|
rows = <5>;
|
||||||
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(0,12) RC(0,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,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(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(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(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)
|
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)
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
kscan0: kscan_0 {
|
split_transform: keymap_transform_4 {
|
||||||
compatible = "zmk,kscan-gpio-matrix";
|
compatible = "zmk,matrix-transform";
|
||||||
wakeup-source;
|
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)
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
diode-direction = "col2row";
|
kscan0: kscan_0 {
|
||||||
|
compatible = "zmk,kscan-gpio-matrix";
|
||||||
|
label = "KSCAN";
|
||||||
|
diode-direction = "col2row";
|
||||||
|
|
||||||
col-gpios
|
col-gpios
|
||||||
= <&gpio1 13 GPIO_ACTIVE_HIGH>
|
= <&gpio1 13 GPIO_ACTIVE_HIGH>
|
||||||
, <&gpio1 10 GPIO_ACTIVE_HIGH>
|
, <&gpio1 10 GPIO_ACTIVE_HIGH>
|
||||||
, <&gpio1 11 GPIO_ACTIVE_HIGH>
|
, <&gpio1 11 GPIO_ACTIVE_HIGH>
|
||||||
, <&gpio1 15 GPIO_ACTIVE_HIGH>
|
, <&gpio1 15 GPIO_ACTIVE_HIGH>
|
||||||
, <&gpio0 3 GPIO_ACTIVE_HIGH>
|
, <&gpio0 3 GPIO_ACTIVE_HIGH>
|
||||||
, <&gpio0 2 GPIO_ACTIVE_HIGH>
|
, <&gpio0 2 GPIO_ACTIVE_HIGH>
|
||||||
, <&gpio0 28 GPIO_ACTIVE_HIGH>
|
, <&gpio0 28 GPIO_ACTIVE_HIGH>
|
||||||
, <&gpio0 29 GPIO_ACTIVE_HIGH>
|
, <&gpio0 29 GPIO_ACTIVE_HIGH>
|
||||||
, <&gpio0 30 GPIO_ACTIVE_HIGH>
|
, <&gpio0 30 GPIO_ACTIVE_HIGH>
|
||||||
, <&gpio0 31 GPIO_ACTIVE_HIGH>
|
, <&gpio0 31 GPIO_ACTIVE_HIGH>
|
||||||
, <&gpio0 5 GPIO_ACTIVE_HIGH>
|
, <&gpio0 5 GPIO_ACTIVE_HIGH>
|
||||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
||||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
||||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
||||||
, <&gpio0 23 GPIO_ACTIVE_HIGH>
|
, <&gpio0 23 GPIO_ACTIVE_HIGH>
|
||||||
;
|
;
|
||||||
|
|
||||||
row-gpios
|
row-gpios
|
||||||
= <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
= <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
, <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
, <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
, <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
, <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
, <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
, <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
, <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
, <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
&layout_60_ansi {
|
|
||||||
transform = <&ansi_transform>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&layout_60_iso {
|
|
||||||
transform = <&iso_transform>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&layout_60_all1u {
|
|
||||||
transform = <&all_1u_transform>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&layout_60_hhkb {
|
|
||||||
transform = <&hhkb_transform>;
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,152 +2,179 @@
|
|||||||
#include <dt-bindings/zmk/keys.h>
|
#include <dt-bindings/zmk/keys.h>
|
||||||
#include <dt-bindings/zmk/bt.h>
|
#include <dt-bindings/zmk/bt.h>
|
||||||
|
|
||||||
#define ANSI
|
#define ANSI true
|
||||||
//#define HHKB
|
//#define HHKB true
|
||||||
//#define ISO
|
//#define ISO true
|
||||||
//#define ALL_1U
|
//#define ALL_1U true
|
||||||
|
//#define SPLIT_BKSP_RSHFT true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
chosen {
|
chosen {
|
||||||
#ifdef ANSI
|
#ifdef ANSI
|
||||||
zmk,physical-layout = &layout_60_ansi;
|
zmk,matrix_transform = &ansi_transform;
|
||||||
#elif defined(ISO)
|
#elif defined(HHKB)
|
||||||
zmk,physical-layout = &layout_60_iso;
|
zmk,matrix_transform = &hhkb_transform;
|
||||||
#elif defined(ALL_1U)
|
#elif defined(ISO)
|
||||||
zmk,physical-layout = &layout_60_all1u;
|
zmk,matrix_transform = &iso_transform;
|
||||||
#elif defined(HHKB)
|
#elif defined(ALL_1U)
|
||||||
zmk,physical-layout = &layout_60_hhkb;
|
zmk,matrix_transform = &all_1u_transform;
|
||||||
#else
|
#else
|
||||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v1.keymap"
|
zmk,matrix_transform = &split_transform;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
keymap {
|
keymap {
|
||||||
compatible = "zmk,keymap";
|
compatible = "zmk,keymap";
|
||||||
#ifdef ANSI
|
#ifdef ANSI
|
||||||
default_layer {
|
default_layer {
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC |
|
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | |
|
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | |
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
|
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
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 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 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 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 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
|
&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>;
|
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||||
};
|
};
|
||||||
raise {
|
raise {
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
// |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 |
|
// | 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 |
|
// | CAPS |LEFT |DOWN |RIGHT| F | G | H | J | K | L |HOME |PGUP | BOOTLOADER |
|
||||||
// | PREV |VOLUP |VOLDN|MUTE | V | B | N | M | , | END | PGDN | NEXT |
|
// | PREV |VOLUP |VOLDN|MUTE | V | B | N | M | , | END | PGDN | NEXT |
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | BT_CLR |
|
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | BT_CLR |
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
bindings = <
|
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
|
&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 &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
&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
|
&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
|
&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>;
|
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||||
};
|
};
|
||||||
#elif defined(HHKB)
|
#elif defined(HHKB)
|
||||||
default_layer {
|
default_layer {
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | BSPC |
|
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | BSPC |
|
||||||
// | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
// | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | 1 |
|
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | 1 |
|
||||||
// | CAPS | ALT | WIN | SPACE | WIN | ALT | CTRL |
|
// | CAPS | ALT | WIN | SPACE | WIN | ALT | CTRL |
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
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 BSLH &kp GRAVE
|
&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 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 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 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
|
&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>;
|
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||||
};
|
};
|
||||||
raise {
|
raise {
|
||||||
bindings = <
|
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
|
&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
|
&kp CLCK &bt BT_PRV &bt BT_NXT &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &kp UP &trans &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 &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 &trans &trans &trans &trans &trans &trans &trans &kp DOWN &trans &trans
|
||||||
&trans &trans &trans &bootloader &trans &trans &trans
|
&trans &trans &trans &bootloader &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>;
|
||||||
};
|
};
|
||||||
#elif defined(ISO)
|
#elif defined(ISO)
|
||||||
default_layer {
|
default_layer {
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC |
|
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | |
|
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | |
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER |
|
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER |
|
||||||
// | SHIFT | | | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
// | SHIFT | | | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
|
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
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 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 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 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 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
|
&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>;
|
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||||
};
|
};
|
||||||
raise {
|
raise {
|
||||||
bindings = <
|
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
|
&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
|
&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
|
&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
|
&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
|
&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>;
|
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||||
};
|
};
|
||||||
#elif defined(ALL_1U)
|
#elif defined(ALL_1U)
|
||||||
default_layer {
|
default_layer {
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC |
|
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" |
|
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" |
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHFT | UP | 1 |
|
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHFT | UP | 1 |
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | CTRL | LEFT | DOWN | RIGHT |
|
// | CTL | WIN | ALT | SPACE | ALT | CTRL | LEFT | DOWN | RIGHT |
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
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 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 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 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 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
|
&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>;
|
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||||
};
|
};
|
||||||
raise {
|
raise {
|
||||||
bindings = <
|
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
|
&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 &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
&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
|
&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
|
&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>;
|
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap"
|
default_layer {
|
||||||
#endif
|
// ------------------------------------------------------------------------------------------
|
||||||
};
|
// | 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 &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
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ arch: arm
|
|||||||
features:
|
features:
|
||||||
- keys
|
- keys
|
||||||
- encoder
|
- encoder
|
||||||
- studio
|
|
||||||
outputs:
|
outputs:
|
||||||
- usb
|
- usb
|
||||||
- ble
|
- ble
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ CONFIG_EC11=y
|
|||||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
@@ -23,6 +22,3 @@ CONFIG_SETTINGS_NVS=y
|
|||||||
CONFIG_FLASH=y
|
CONFIG_FLASH=y
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||||
CONFIG_FLASH_MAP=y
|
CONFIG_FLASH_MAP=y
|
||||||
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
CONFIG_ZMK_BLE=y
|
|
||||||
@@ -6,61 +6,56 @@
|
|||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include "bt60.dtsi"
|
#include "bt60.dtsi"
|
||||||
#include <layouts/common/60percent/ansi.dtsi>
|
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
chosen {
|
chosen {
|
||||||
zmk,kscan = &kscan0;
|
zmk,kscan = &kscan0;
|
||||||
zmk,physical-layout = &layout_60_ansi;
|
zmk,matrix_transform = &default_transform;
|
||||||
};
|
};
|
||||||
|
|
||||||
default_transform: keymap_transform_0 {
|
default_transform: keymap_transform_0 {
|
||||||
compatible = "zmk,matrix-transform";
|
compatible = "zmk,matrix-transform";
|
||||||
columns = <15>;
|
columns = <15>;
|
||||||
rows = <5>;
|
rows = <5>;
|
||||||
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(0,12) RC(0,13) RC(2,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,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(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(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(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)
|
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 {
|
kscan0: kscan_0 {
|
||||||
compatible = "zmk,kscan-gpio-matrix";
|
compatible = "zmk,kscan-gpio-matrix";
|
||||||
wakeup-source;
|
label = "KSCAN";
|
||||||
|
diode-direction = "col2row";
|
||||||
|
|
||||||
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
|
row-gpios
|
||||||
= <&gpio1 11 GPIO_ACTIVE_HIGH>
|
= <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
, <&gpio1 10 GPIO_ACTIVE_HIGH>
|
, <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
, <&gpio1 13 GPIO_ACTIVE_HIGH>
|
, <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
, <&gpio1 15 GPIO_ACTIVE_HIGH>
|
, <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
, <&gpio0 3 GPIO_ACTIVE_HIGH>
|
, <&gpio0 23 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
, <&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)>
|
|
||||||
;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&layout_60_ansi {
|
|
||||||
transform = <&default_transform>;
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,35 +3,35 @@
|
|||||||
#include <dt-bindings/zmk/bt.h>
|
#include <dt-bindings/zmk/bt.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
keymap {
|
keymap {
|
||||||
compatible = "zmk,keymap";
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
default_layer {
|
default_layer {
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC |
|
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | DEL
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | |
|
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | |
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
|
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
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 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 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 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 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
|
&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>;
|
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||||
};
|
};
|
||||||
raise {
|
raise {
|
||||||
bindings = <
|
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
|
&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 &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
&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
|
&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
|
&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>;
|
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ arch: arm
|
|||||||
features:
|
features:
|
||||||
- keys
|
- keys
|
||||||
- encoder
|
- encoder
|
||||||
- studio
|
|
||||||
outputs:
|
outputs:
|
||||||
- usb
|
- usb
|
||||||
- ble
|
- ble
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ CONFIG_EC11=y
|
|||||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
@@ -23,6 +22,3 @@ CONFIG_SETTINGS_NVS=y
|
|||||||
CONFIG_FLASH=y
|
CONFIG_FLASH=y
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||||
CONFIG_FLASH_MAP=y
|
CONFIG_FLASH_MAP=y
|
||||||
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
CONFIG_ZMK_BLE=y
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2024 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
|
|
||||||
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html
|
|
||||||
|
|
||||||
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# 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
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# 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
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# 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
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
|
||||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
|
||||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
#include "ckp.dtsi"
|
|
||||||
#include <layouts/common/60percent/all1u.dtsi>
|
|
||||||
#include <layouts/common/60percent/ansi.dtsi>
|
|
||||||
#include <layouts/common/60percent/hhkb.dtsi>
|
|
||||||
#include <layouts/common/60percent/iso.dtsi>
|
|
||||||
|
|
||||||
|
|
||||||
/ {
|
|
||||||
model = "BT60_V2";
|
|
||||||
compatible = "polarityworks,bt60_v2";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
zmk,physical-layout = &layout_60_ansi;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
ansi_transform: keymap_transform_0 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <15>;
|
|
||||||
rows = <5>;
|
|
||||||
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(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,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,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(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
iso_transform: keymap_transform_1 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <15>;
|
|
||||||
rows = <5>;
|
|
||||||
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(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(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(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
all_1u_transform: keymap_transform_2 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <15>;
|
|
||||||
rows = <5>;
|
|
||||||
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(1,12) RC(1,13) RC(1,14)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,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,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(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
hhkb_transform: keymap_transform_3 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <15>;
|
|
||||||
rows = <5>;
|
|
||||||
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(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,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,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(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,11) RC(5,12) RC(5,13)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&layout_60_ansi {
|
|
||||||
transform = <&ansi_transform>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&layout_60_iso {
|
|
||||||
transform = <&iso_transform>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&layout_60_all1u {
|
|
||||||
transform = <&all_1u_transform>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&layout_60_hhkb {
|
|
||||||
transform = <&hhkb_transform>;
|
|
||||||
};
|
|
||||||
@@ -1,177 +0,0 @@
|
|||||||
#include <behaviors.dtsi>
|
|
||||||
#include <dt-bindings/zmk/keys.h>
|
|
||||||
#include <dt-bindings/zmk/bt.h>
|
|
||||||
#include <dt-bindings/zmk/rgb.h>
|
|
||||||
#include <dt-bindings/zmk/backlight.h>
|
|
||||||
|
|
||||||
#define ANSI
|
|
||||||
//#define ISO
|
|
||||||
//#define ALL_1U
|
|
||||||
//#define HHKB
|
|
||||||
|
|
||||||
/ {
|
|
||||||
chosen {
|
|
||||||
#ifdef ANSI
|
|
||||||
zmk,physical-layout = &layout_60_ansi;
|
|
||||||
#elif defined(ISO)
|
|
||||||
zmk,physical-layout = &layout_60_iso;
|
|
||||||
#elif defined(ALL_1U)
|
|
||||||
zmk,physical-layout = &layout_60_all1u;
|
|
||||||
#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_v2.keymap"
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
keymap {
|
|
||||||
compatible = "zmk,keymap";
|
|
||||||
#ifdef ANSI
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC |
|
|
||||||
// | 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 CAPS &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 {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
|
||||||
// | TAB | Q | UP | E | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | RGB_TOG|
|
|
||||||
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | HOME| PGUP| BOOT |
|
|
||||||
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | END | PGDN | BL_TOG |
|
|
||||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | RESET | 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 &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &rgb_ug RGB_TOG
|
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &kp END &kp PG_DN &bl BL_TOG
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &sys_reset &bt BT_CLR
|
|
||||||
>;
|
|
||||||
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 | - | = | BSPC |
|
|
||||||
// | 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 CAPS &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 {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
|
||||||
// | TAB | Q | UP | E | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | |
|
|
||||||
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | HOME| PGUP|RGB_TOG| BOOT |
|
|
||||||
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| B | N | M | , | END | PGDN | BL_TOG |
|
|
||||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | RESET |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 &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK
|
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &rgb_ug RGB_TOG &bootloader
|
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &kp END &kp PG_DN &bl BL_TOG
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &sys_reset &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 | - | = |BSPC | DEL |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
|
||||||
// | SHFT |NONE| Z | X | C | V | B | N | M | , | . | / | SHFT | UP | 1 |
|
|
||||||
// | CTL | WIN | ALT | SPACE | RALT| 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 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 &none &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 {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |BSPC | DEL |
|
|
||||||
// | TAB | Q | W | E | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | RGB_TOG |
|
|
||||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | HOME| PGUP| BOOT |
|
|
||||||
// | SHFT |NONE|VOLDN|VOLUP|MUTE|BLINC|BLDEC| N | M | , | END | PGDN | SHFT|BL_TOG| 1 |
|
|
||||||
// | BT_PRV| BT_NXT| ALT | SPACE | RALT| CTRL | LEFT |RESET| 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 &trans &trans
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &rgb_ug RGB_TOG
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
|
||||||
&trans &none &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &kp END &kp PG_DN &trans &bl BL_TOG &trans
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &sys_reset &bt BT_CLR
|
|
||||||
>;
|
|
||||||
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 | - | = | BSPC |
|
|
||||||
// | 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 | 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 CAPS &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 RCTRL
|
|
||||||
>;
|
|
||||||
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 | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | RGB_TOG|
|
|
||||||
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | HOME| PGUP| BOOT |
|
|
||||||
// | SHFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | END | PGDN | BL_TOG |
|
|
||||||
// | BT_PRV | BT_NXT | ALT | SPACE | RESET | 1 | 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 &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &rgb_ug RGB_TOG
|
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &kp END &kp PG_DN &bl BL_TOG
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &sys_reset &trans &bt BT_CLR
|
|
||||||
>;
|
|
||||||
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_v2.keymap"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: bt60_v2
|
|
||||||
name: BT60 V2
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
features:
|
|
||||||
- keys
|
|
||||||
- encoder
|
|
||||||
- underglow
|
|
||||||
- backlight
|
|
||||||
- studio
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
url: https://polarityworks.com/btckp
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
# 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
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
CONFIG_PINCTRL=y
|
|
||||||
|
|
||||||
# encoder
|
|
||||||
CONFIG_EC11=y
|
|
||||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
|
||||||
CONFIG_PWM=y
|
|
||||||
CONFIG_LED_PWM=y
|
|
||||||
CONFIG_ZMK_BACKLIGHT=y
|
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
|
||||||
CONFIG_NVS=y
|
|
||||||
CONFIG_SETTINGS_NVS=y
|
|
||||||
CONFIG_FLASH=y
|
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
||||||
CONFIG_FLASH_MAP=y
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
CONFIG_ZMK_BLE=y
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
#include "ckp.dtsi"
|
|
||||||
#include <layouts/common/65percent/all1u.dtsi>
|
|
||||||
#include <layouts/common/65percent/ansi.dtsi>
|
|
||||||
#include <layouts/common/65percent/iso.dtsi>
|
|
||||||
#include <layouts/common/65percent/hhkb.dtsi>
|
|
||||||
|
|
||||||
|
|
||||||
/ {
|
|
||||||
model = "BT65_V1";
|
|
||||||
compatible = "polarityworks,bt65_v1";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
zmk,physical-layout = &layout_65_ansi;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
ansi_transform: keymap_transform_0 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <16>;
|
|
||||||
rows = <5>;
|
|
||||||
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(1,12) RC(1,13) 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,15)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
|
|
||||||
RC(4,0) 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,14) RC(4,15)
|
|
||||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
iso_transform: keymap_transform_1 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <16>;
|
|
||||||
rows = <5>;
|
|
||||||
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(1,12) RC(1,13) 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,15)
|
|
||||||
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,15)
|
|
||||||
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,14) RC(4,15)
|
|
||||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
all_1u_transform: keymap_transform_2 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <16>;
|
|
||||||
rows = <5>;
|
|
||||||
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(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,15)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
|
|
||||||
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(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
hhkb_transform: keymap_transform_3 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <16>;
|
|
||||||
rows = <5>;
|
|
||||||
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(1,12) RC(1,13) 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,15)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
|
|
||||||
RC(4,0) 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,15)
|
|
||||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,11) RC(5,12) RC(5,13) RC(5,15)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&layout_65_ansi {
|
|
||||||
transform = <&ansi_transform>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&layout_65_iso {
|
|
||||||
transform = <&iso_transform>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&layout_65_all1u {
|
|
||||||
transform = <&all_1u_transform>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&layout_65_hhkb {
|
|
||||||
transform = <&hhkb_transform>;
|
|
||||||
};
|
|
||||||
@@ -1,177 +0,0 @@
|
|||||||
#include <behaviors.dtsi>
|
|
||||||
#include <dt-bindings/zmk/keys.h>
|
|
||||||
#include <dt-bindings/zmk/bt.h>
|
|
||||||
#include <dt-bindings/zmk/rgb.h>
|
|
||||||
#include <dt-bindings/zmk/backlight.h>
|
|
||||||
|
|
||||||
#define ANSI
|
|
||||||
//#define ISO
|
|
||||||
//#define ALL_1U
|
|
||||||
//#define HHKB
|
|
||||||
|
|
||||||
/ {
|
|
||||||
chosen {
|
|
||||||
#ifdef ANSI
|
|
||||||
zmk,physical-layout = &layout_65_ansi;
|
|
||||||
#elif defined(ISO)
|
|
||||||
zmk,physical-layout = &layout_65_iso;
|
|
||||||
#elif defined(ALL_1U)
|
|
||||||
zmk,physical-layout = &layout_65_all1u;
|
|
||||||
#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_v1.keymap"
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
keymap {
|
|
||||||
compatible = "zmk,keymap";
|
|
||||||
#ifdef ANSI
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | DEL |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | INS |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PGUP|
|
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PGDN|
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| 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 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 INS
|
|
||||||
&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 LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp PG_DN
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
|
||||||
>;
|
|
||||||
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 | BL_TOG |RGB_TOG|
|
|
||||||
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | PSCRN|
|
|
||||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' | BOOT | P_BRK|
|
|
||||||
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / | SHIFT | HOME | END |
|
|
||||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL | LEFT | DOWN |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 &bl BL_TOG &rgb_ug RGB_TOG
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PSCRN
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &kp PAUSE_BREAK
|
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &kp HOME &kp END
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
|
||||||
>;
|
|
||||||
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 | - | = | BSPC | DEL |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | INS |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER | PGUP|
|
|
||||||
// |SHIFT | \ | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PGDN|
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| 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 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 INS
|
|
||||||
&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 PG_UP
|
|
||||||
&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 UP &kp PG_DN
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
|
||||||
>;
|
|
||||||
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 | BL_TOG |RGB_TOG|
|
|
||||||
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | | PSCRN|
|
|
||||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' |RESET| BOOT | P_BRK|
|
|
||||||
// |SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| B | N | M | , | . | / | SHIFT | HOME | END |
|
|
||||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL | LEFT | DOWN |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 &bl BL_TOG &rgb_ug RGB_TOG
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &kp PSCRN
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &sys_reset &bootloader &kp PAUSE_BREAK
|
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &kp HOME &kp END
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &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 | - | = |BSPC | DEL | HOME|
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | END |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PGUP|
|
|
||||||
// |SHIFT|NONE | Z | X | C | V | B | N | M | , | . | / |SHIFT|NONE | UP | PGDN|
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| 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 DEL &kp HOME
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp END
|
|
||||||
&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 LSHFT &none &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &none &kp UP &kp PG_DN
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp LALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
|
||||||
>;
|
|
||||||
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 |BL_TOG|RGB_TOG|HOME|
|
|
||||||
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | PSCRN|
|
|
||||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' | BOOT | P_BRK|
|
|
||||||
// |SHIFT| NONE|VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / |SHIFT| NONE| UP | INS |
|
|
||||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL| LEFT| DOWN |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 &bl BL_TOG &rgb_ug RGB_TOG &trans
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PSCRN
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &kp PAUSE_BREAK
|
|
||||||
&trans &none &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans &kp INS
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
|
||||||
>;
|
|
||||||
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 | - | = | BSPC | DEL |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | HOME|
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | END |
|
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | PGUP|
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | CTRL | PGDN|
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
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 HOME
|
|
||||||
&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 END
|
|
||||||
&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 PG_UP
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp PG_DN
|
|
||||||
>;
|
|
||||||
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 | BL_TOG |RGB_TOG|
|
|
||||||
// | TAB | Q | UP | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | PSCRN|
|
|
||||||
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | ; | ' | BOOT | P_BRK|
|
|
||||||
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / | SHIFT | INS |
|
|
||||||
// | BT_PRV | BT_NXT | ALT | SPACE | ALT | 1 | CTRL |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 &bl BL_TOG &rgb_ug RGB_TOG
|
|
||||||
&trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PSCRN
|
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &kp PAUSE_BREAK
|
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &kp INS
|
|
||||||
&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>;
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65_v1.keymap"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user