mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-19 20:45:18 -05:00
Compare commits
1 Commits
revert-213
...
docs/recip
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51503629c7 |
@@ -6,8 +6,3 @@ fi
|
||||
if [ -f "$WORKSPACE_DIR/zephyr/zephyr-env.sh" ]; then
|
||||
source "$WORKSPACE_DIR/zephyr/zephyr-env.sh"
|
||||
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
|
||||
@@ -13,13 +13,9 @@
|
||||
"type=volume,source=zmk-zephyr-modules,target=${containerWorkspaceFolder}/modules",
|
||||
"type=volume,source=zmk-zephyr-tools,target=${containerWorkspaceFolder}/tools"
|
||||
],
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": ["ms-vscode.cpptools"],
|
||||
"settings": {
|
||||
"terminal.integrated.shell.linux": "/bin/bash"
|
||||
}
|
||||
}
|
||||
"extensions": ["ms-vscode.cpptools"],
|
||||
"settings": {
|
||||
"terminal.integrated.shell.linux": "/bin/bash"
|
||||
},
|
||||
"forwardPorts": [3000]
|
||||
}
|
||||
|
||||
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.2
|
||||
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
|
||||
87
.github/workflows/build-user-config.yml
vendored
87
.github/workflows/build-user-config.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
||||
build_matrix: ${{ env.build_matrix }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install yaml2json
|
||||
run: python3 -m pip install remarshal
|
||||
@@ -52,52 +52,31 @@ jobs:
|
||||
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 }}
|
||||
run: |
|
||||
if [ -e zephyr/module.yml ]; then
|
||||
export zmk_load_arg=" -DZMK_EXTRA_MODULES='${GITHUB_WORKSPACE}'"
|
||||
export new_tmp_dir=$(mktemp -d)
|
||||
echo "base_dir=${new_tmp_dir}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "base_dir=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV
|
||||
echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}${zmk_load_arg}" >> $GITHUB_ENV
|
||||
echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV
|
||||
echo "artifact_name=${artifact_name:-${shield:+$shield-}${board}-zmk}" >> $GITHUB_ENV
|
||||
echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}" >> $GITHUB_ENV
|
||||
echo "display_name=${shield:+$shield - }${{ matrix.board }}" >> $GITHUB_ENV
|
||||
echo "artifact_name=${shield:+$shield-}${{ matrix.board }}-zmk" >> $GITHUB_ENV
|
||||
|
||||
- name: 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: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Cache west modules
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3.0.11
|
||||
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/
|
||||
modules/
|
||||
tools/
|
||||
zephyr/
|
||||
bootloader/
|
||||
zmk/
|
||||
key: ${{ runner.os }}-build-${{ env.cache_name }}-${{ hashFiles('**/west.yml', '**/build.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache_name }}-
|
||||
@@ -105,59 +84,35 @@ jobs:
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: West Init
|
||||
working-directory: ${{ env.base_dir }}
|
||||
run: west init -l "${{ env.base_dir }}/${{ inputs.config_path }}"
|
||||
run: west init -l "${{ 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 }}" -- -DZMK_CONFIG=${{ env.base_dir }}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}
|
||||
run: west build -s zmk/app -b "${{ matrix.board }}" -- -DZMK_CONFIG="${GITHUB_WORKSPACE}/${{ inputs.config_path }}" ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}
|
||||
|
||||
- name: ${{ env.display_name }} Kconfig file
|
||||
run: |
|
||||
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() }}
|
||||
run: grep -v -e "^#" -e "^$" build/zephyr/.config | sort
|
||||
|
||||
- name: Rename artifacts
|
||||
shell: sh -x {0}
|
||||
run: |
|
||||
mkdir "${{ env.build_dir }}/artifacts"
|
||||
if [ -f "${{ env.build_dir }}/zephyr/zmk.uf2" ]
|
||||
mkdir build/artifacts
|
||||
if [ -f build/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 }}" ]
|
||||
cp build/zephyr/zmk.uf2 "build/artifacts/${{ env.artifact_name }}.uf2"
|
||||
elif [ -f build/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 }}"
|
||||
cp "build/zephyr/zmk.${{ inputs.fallback_binary }}" "build/artifacts/${{ env.artifact_name }}.${{ inputs.fallback_binary }}"
|
||||
fi
|
||||
|
||||
- name: Archive (${{ env.display_name }})
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.archive_name }}
|
||||
path: ${{ env.build_dir }}/artifacts
|
||||
path: build/artifacts
|
||||
|
||||
86
.github/workflows/build.yml
vendored
86
.github/workflows/build.yml
vendored
@@ -24,9 +24,9 @@ jobs:
|
||||
include: ${{ fromJSON(needs.compile-matrix.outputs.include-list) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
- name: Cache west modules
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3.0.2
|
||||
env:
|
||||
cache-name: cache-zephyr-modules
|
||||
with:
|
||||
@@ -49,17 +49,19 @@ jobs:
|
||||
- name: Export Zephyr CMake package (west zephyr-export)
|
||||
run: west zephyr-export
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "14.x"
|
||||
- name: Install @actions/artifact
|
||||
run: npm install @actions/artifact
|
||||
- name: Build
|
||||
uses: actions/github-script@v7
|
||||
- name: Build and upload artifacts
|
||||
uses: actions/github-script@v4
|
||||
id: boards-list
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const artifact = require('@actions/artifact');
|
||||
const artifactClient = artifact.create();
|
||||
|
||||
const execSync = require('child_process').execSync;
|
||||
|
||||
@@ -69,39 +71,10 @@ jobs:
|
||||
|
||||
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.shield ? '-DSHIELD="' + shieldArgs.shield + '"' : ''} ${shieldArgs['cmake-args'] || ''}`);
|
||||
|
||||
console.log(`::group::${{ matrix.board}} ${shieldArgs.shield} Build`)
|
||||
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"];
|
||||
|
||||
@@ -117,9 +90,9 @@ jobs:
|
||||
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);
|
||||
await artifactClient.uploadArtifact(artifactName, files, rootDirectory, options);
|
||||
} catch (e) {
|
||||
console.error(`::error::Failed to upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
|
||||
console.error(`::error::Failed to build or upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
|
||||
console.error(e);
|
||||
error = true;
|
||||
} finally {
|
||||
@@ -138,7 +111,7 @@ jobs:
|
||||
include-list: ${{ steps.compile-list.outputs.result }}
|
||||
steps:
|
||||
- name: Join build lists
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v4
|
||||
id: compile-list
|
||||
with:
|
||||
script: |
|
||||
@@ -178,14 +151,14 @@ jobs:
|
||||
core-include: ${{ steps.core-list.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "14.x"
|
||||
- name: Install js-yaml
|
||||
run: npm install js-yaml
|
||||
- uses: actions/github-script@v7
|
||||
- uses: actions/github-script@v4
|
||||
id: core-list
|
||||
with:
|
||||
script: |
|
||||
@@ -207,14 +180,14 @@ jobs:
|
||||
boards-include: ${{ steps.boards-list.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "14.x"
|
||||
- name: Install js-yaml
|
||||
run: npm install js-yaml
|
||||
- uses: actions/github-script@v7
|
||||
- uses: actions/github-script@v4
|
||||
id: boards-list
|
||||
with:
|
||||
script: |
|
||||
@@ -291,7 +264,7 @@ jobs:
|
||||
nightly-include: ${{ steps.nightly-list.outputs.result }}
|
||||
steps:
|
||||
- name: Create nightly list
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v4
|
||||
id: nightly-list
|
||||
with:
|
||||
script: |
|
||||
@@ -334,15 +307,15 @@ jobs:
|
||||
organized-metadata: ${{ steps.organize-metadata.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "14.x"
|
||||
- name: Install js-yaml
|
||||
run: npm install js-yaml
|
||||
- name: Aggregate Metadata
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v4
|
||||
id: aggregate-metadata
|
||||
with:
|
||||
script: |
|
||||
@@ -360,7 +333,7 @@ jobs:
|
||||
result-encoding: string
|
||||
|
||||
- name: Organize Metadata
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v4
|
||||
id: organize-metadata
|
||||
with:
|
||||
script: |
|
||||
@@ -409,28 +382,27 @@ jobs:
|
||||
if: ${{ github.event_name != 'schedule' }}
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
changed-files: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
changed-files: ${{ steps.changed-files.outputs.all }}
|
||||
board-changes: ${{ steps.board-changes.outputs.result }}
|
||||
core-changes: ${{ steps.core-changes.outputs.result }}
|
||||
steps:
|
||||
- uses: tj-actions/changed-files@v42
|
||||
- uses: Ana06/get-changed-files@v2.0.0
|
||||
id: changed-files
|
||||
with:
|
||||
json: true
|
||||
escape_json: false
|
||||
- uses: actions/github-script@v7
|
||||
format: "json"
|
||||
- uses: actions/github-script@v4
|
||||
id: board-changes
|
||||
with:
|
||||
script: |
|
||||
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all_changed_files }}`);
|
||||
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all }}`);
|
||||
const boardChanges = changedFiles.filter(f => f.startsWith('app/boards'));
|
||||
return boardChanges.length ? 'true' : 'false';
|
||||
result-encoding: string
|
||||
- uses: actions/github-script@v7
|
||||
- uses: actions/github-script@v4
|
||||
id: core-changes
|
||||
with:
|
||||
script: |
|
||||
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all_changed_files }}`);
|
||||
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all }}`);
|
||||
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');
|
||||
|
||||
4
.github/workflows/doc-checks.yml
vendored
4
.github/workflows/doc-checks.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
- uses: bahmutov/npm-install@v1
|
||||
with:
|
||||
working-directory: docs
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
typecheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
- uses: bahmutov/npm-install@v1
|
||||
with:
|
||||
working-directory: docs
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
container:
|
||||
image: docker.io/zmkfirmware/zmk-dev-arm:3.2
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install dependencies
|
||||
run: pip install -r app/scripts/requirements.txt
|
||||
- name: West init
|
||||
|
||||
4
.github/workflows/pre-commit.yml
vendored
4
.github/workflows/pre-commit.yml
vendored
@@ -8,8 +8,8 @@ jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.x
|
||||
- uses: pre-commit/action@v3.0.0
|
||||
|
||||
16
.github/workflows/test.yml
vendored
16
.github/workflows/test.yml
vendored
@@ -6,13 +6,11 @@ on:
|
||||
- ".github/workflows/test.yml"
|
||||
- "app/tests/**"
|
||||
- "app/src/**"
|
||||
- "app/include/**"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/test.yml"
|
||||
- "app/tests/**"
|
||||
- "app/src/**"
|
||||
- "app/include/**"
|
||||
|
||||
jobs:
|
||||
collect-tests:
|
||||
@@ -21,13 +19,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
- 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
|
||||
export TESTS=$(ls -d * | jq -R -s -c 'split("\n")[:-1]')
|
||||
echo "::set-output name=test-dirs::${TESTS}"
|
||||
run-tests:
|
||||
needs: collect-tests
|
||||
strategy:
|
||||
@@ -38,9 +36,9 @@ jobs:
|
||||
image: docker.io/zmkfirmware/zmk-build-arm:3.2
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
- name: Cache west modules
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3.0.2
|
||||
env:
|
||||
cache-name: cache-zephyr-modules
|
||||
with:
|
||||
@@ -67,7 +65,7 @@ jobs:
|
||||
run: west test tests/${{ matrix.test }}
|
||||
- name: Archive artifacts
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: "${{ matrix.test }}-log-files"
|
||||
name: "log-files"
|
||||
path: app/build/**/*.log
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -6,6 +6,4 @@
|
||||
/zmk-config
|
||||
/build
|
||||
*.DS_Store
|
||||
__pycache__
|
||||
.python-version
|
||||
.venv
|
||||
__pycache__
|
||||
@@ -2,13 +2,19 @@ cmake_minimum_required(VERSION 3.13.1)
|
||||
|
||||
set(CONFIG_APPLICATION_DEFINED_SYSCALL true)
|
||||
|
||||
set(ZEPHYR_EXTRA_MODULES "${ZMK_EXTRA_MODULES};${CMAKE_CURRENT_SOURCE_DIR}/module;${CMAKE_CURRENT_SOURCE_DIR}/keymap-module")
|
||||
# Add our custom Zephyr module for drivers w/ syscalls, etc.
|
||||
list(APPEND DTS_ROOT ${CMAKE_SOURCE_DIR}/drivers/zephyr)
|
||||
|
||||
set(ZephyrBuildConfiguration_ROOT ${CMAKE_SOURCE_DIR}/cmake)
|
||||
|
||||
list(APPEND ZEPHYR_EXTRA_MODULES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/module
|
||||
)
|
||||
|
||||
# Find Zephyr. This also loads Zephyr's build system.
|
||||
find_package(Zephyr REQUIRED HINTS ../zephyr)
|
||||
project(zmk)
|
||||
|
||||
zephyr_linker_sources(SECTIONS include/linker/zmk-behaviors.ld)
|
||||
zephyr_linker_sources(RODATA include/linker/zmk-events.ld)
|
||||
|
||||
# Add your source file to the "app" target. This must come after
|
||||
@@ -16,7 +22,6 @@ zephyr_linker_sources(RODATA include/linker/zmk-events.ld)
|
||||
target_include_directories(app PRIVATE include)
|
||||
target_sources(app PRIVATE src/stdlib.c)
|
||||
target_sources(app PRIVATE src/activity.c)
|
||||
target_sources(app PRIVATE src/behavior.c)
|
||||
target_sources(app PRIVATE src/kscan.c)
|
||||
target_sources(app PRIVATE src/matrix_transform.c)
|
||||
target_sources(app PRIVATE src/sensors.c)
|
||||
@@ -26,14 +31,12 @@ target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/ext_power_generic.c)
|
||||
target_sources(app PRIVATE src/events/activity_state_changed.c)
|
||||
target_sources(app PRIVATE src/events/position_state_changed.c)
|
||||
target_sources(app PRIVATE src/events/sensor_event.c)
|
||||
target_sources(app PRIVATE src/events/mouse_button_state_changed.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c)
|
||||
target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/events/usb_conn_state_changed.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_reset.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c)
|
||||
if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||
target_sources(app PRIVATE src/hid.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_MOUSE app PRIVATE src/mouse.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_key_press.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_KEY_TOGGLE app PRIVATE src/behaviors/behavior_key_toggle.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c)
|
||||
@@ -51,7 +54,6 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE app PRIVATE src/behaviors/behavior_sensor_rotate.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_VAR app PRIVATE src/behaviors/behavior_sensor_rotate_var.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON app PRIVATE src/behaviors/behavior_sensor_rotate_common.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_MOUSE_KEY_PRESS app PRIVATE src/behaviors/behavior_mouse_key_press.c)
|
||||
target_sources(app PRIVATE src/combo.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_tap_dance.c)
|
||||
target_sources(app PRIVATE src/behavior_queue.c)
|
||||
@@ -63,7 +65,6 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||
target_sources(app PRIVATE src/events/layer_state_changed.c)
|
||||
target_sources(app PRIVATE src/events/modifiers_state_changed.c)
|
||||
target_sources(app PRIVATE src/events/keycode_state_changed.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE src/hid_indicators.c)
|
||||
|
||||
if (CONFIG_ZMK_BLE)
|
||||
target_sources(app PRIVATE src/events/ble_active_profile_changed.c)
|
||||
@@ -79,8 +80,6 @@ target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/behaviors/behavior_bac
|
||||
target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/events/battery_state_changed.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/battery.c)
|
||||
|
||||
target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE src/events/hid_indicators_changed.c)
|
||||
|
||||
target_sources_ifdef(CONFIG_ZMK_SPLIT app PRIVATE src/events/split_peripheral_status_changed.c)
|
||||
add_subdirectory(src/split)
|
||||
|
||||
@@ -88,7 +87,7 @@ target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/usb.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_USB app PRIVATE src/usb_hid.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/rgb_underglow.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/backlight.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_LOW_PRIORITY_WORK_QUEUE app PRIVATE src/workqueue.c)
|
||||
target_sources(app PRIVATE src/workqueue.c)
|
||||
target_sources(app PRIVATE src/main.c)
|
||||
|
||||
add_subdirectory(src/display/)
|
||||
|
||||
107
app/Kconfig
107
app/Kconfig
@@ -53,19 +53,10 @@ config ZMK_HID_REPORT_TYPE_NKRO
|
||||
help
|
||||
Enable full N-Key Roll Over for HID output. This selection will prevent the keyboard
|
||||
from working with some BIOS/UEFI versions that only support "boot keyboard" support.
|
||||
This option also prevents using some infrequently used higher range HID usages (notably F13-F24 and INTL1-9)
|
||||
These usages can be re enabled with ZMK_HID_KEYBOARD_NKRO_EXTENDED_REPORT.
|
||||
This option also prevents using some infrequently used higher range HID usages.
|
||||
|
||||
endchoice
|
||||
|
||||
config ZMK_HID_KEYBOARD_NKRO_EXTENDED_REPORT
|
||||
bool "Enable extended NKRO reporting"
|
||||
depends on ZMK_HID_REPORT_TYPE_NKRO
|
||||
help
|
||||
Enables higher usage range for NKRO (F13-F24 and INTL1-9).
|
||||
Please note this is not compatible with Android currently and you will get no input
|
||||
|
||||
|
||||
if ZMK_HID_REPORT_TYPE_HKRO
|
||||
|
||||
config ZMK_HID_KEYBOARD_REPORT_SIZE
|
||||
@@ -96,27 +87,14 @@ config ZMK_HID_CONSUMER_REPORT_USAGES_BASIC
|
||||
|
||||
endchoice
|
||||
|
||||
config ZMK_HID_INDICATORS
|
||||
bool "HID Indicators"
|
||||
help
|
||||
Enable HID indicators, used for detecting state of Caps/Scroll/Num Lock,
|
||||
Kata, and Compose.
|
||||
|
||||
menu "Output Types"
|
||||
|
||||
config ZMK_USB
|
||||
bool "USB"
|
||||
depends on (!ZMK_SPLIT || (ZMK_SPLIT && ZMK_SPLIT_ROLE_CENTRAL))
|
||||
select USB
|
||||
select USB_DEVICE_STACK
|
||||
select USB_DEVICE_HID
|
||||
|
||||
config ZMK_USB_BOOT
|
||||
bool "USB Boot Protocol Support"
|
||||
depends on ZMK_USB
|
||||
select USB_HID_BOOT_PROTOCOL
|
||||
select USB_DEVICE_SOF
|
||||
|
||||
if ZMK_USB
|
||||
|
||||
config USB_NUMOF_EP_WRITE_RETRIES
|
||||
@@ -136,54 +114,21 @@ menuconfig ZMK_BLE
|
||||
select BT_SMP_APP_PAIRING_ACCEPT
|
||||
select BT_PERIPHERAL
|
||||
select BT_DIS
|
||||
imply BT_SETTINGS if !ARCH_POSIX
|
||||
imply SETTINGS if !ARCH_POSIX
|
||||
imply ZMK_BATTERY_REPORTING if !ARCH_POSIX
|
||||
select BT_SETTINGS
|
||||
select SETTINGS
|
||||
imply ZMK_BATTERY_REPORTING
|
||||
|
||||
if ZMK_BLE
|
||||
|
||||
config ZMK_BLE_EXPERIMENTAL_CONN
|
||||
bool "Experimental BLE connection changes"
|
||||
help
|
||||
Enables a combination of settings that are planned to be default in future versions of ZMK
|
||||
to improve connection stability. This includes changes to timing on BLE pairing initation,
|
||||
restores use of the updated/new LLCP implementation, and disables 2M PHY support.
|
||||
|
||||
config ZMK_BLE_EXPERIMENTAL_SEC
|
||||
bool "Experimental BLE security changes"
|
||||
imply BT_SMP_ALLOW_UNAUTH_OVERWRITE
|
||||
help
|
||||
Enables a combination of settings that are planned to be officially supported in the future.
|
||||
This includes enabling BT Secure Connection passkey entry, and allows overwrite of keys from
|
||||
previously paired hosts.
|
||||
|
||||
config ZMK_BLE_EXPERIMENTAL_FEATURES
|
||||
bool "Experimental BLE connection and security settings/features"
|
||||
select ZMK_BLE_EXPERIMENTAL_CONN
|
||||
select ZMK_BLE_EXPERIMENTAL_SEC
|
||||
help
|
||||
Enables experimental connection changes and security features.
|
||||
|
||||
config ZMK_BLE_PASSKEY_ENTRY
|
||||
bool "Require passkey entry on the keyboard to complete pairing"
|
||||
default n
|
||||
select RING_BUFFER
|
||||
|
||||
config BT_SMP_ALLOW_UNAUTH_OVERWRITE
|
||||
imply ZMK_BLE_PASSKEY_ENTRY
|
||||
|
||||
choice BT_LL_SW_LLCP_IMPL
|
||||
default BT_LL_SW_LLCP_LEGACY if !ZMK_BLE_EXPERIMENTAL_CONN
|
||||
|
||||
endchoice
|
||||
|
||||
config BT_CTLR_PHY_2M
|
||||
default n if ZMK_BLE_EXPERIMENTAL_CONN
|
||||
|
||||
# BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY when using HCI
|
||||
config BT_TINYCRYPT_ECC
|
||||
default y if BT_HCI && !BT_CTLR
|
||||
|
||||
choice BT_LL_SW_LLCP_IMPL
|
||||
default BT_LL_SW_LLCP_LEGACY
|
||||
|
||||
endchoice
|
||||
|
||||
config SYSTEM_WORKQUEUE_STACK_SIZE
|
||||
default 4096 if SOC_RP2040
|
||||
default 2048
|
||||
@@ -204,10 +149,6 @@ config ZMK_BLE_CONSUMER_REPORT_QUEUE_SIZE
|
||||
int "Max number of consumer HID reports to queue for sending over BLE"
|
||||
default 5
|
||||
|
||||
config ZMK_BLE_MOUSE_REPORT_QUEUE_SIZE
|
||||
int "Max number of mouse HID reports to queue for sending over BLE"
|
||||
default 20
|
||||
|
||||
config ZMK_BLE_CLEAR_BONDS_ON_START
|
||||
bool "Configuration that clears all bond information from the keyboard on startup."
|
||||
default n
|
||||
@@ -217,11 +158,16 @@ config BT_GATT_NOTIFY_MULTIPLE
|
||||
default n
|
||||
|
||||
config BT_GATT_AUTO_SEC_REQ
|
||||
default (ZMK_SPLIT_BLE && !ZMK_SPLIT_ROLE_CENTRAL)
|
||||
default n
|
||||
|
||||
config BT_DEVICE_APPEARANCE
|
||||
default 961
|
||||
|
||||
config ZMK_BLE_PASSKEY_ENTRY
|
||||
bool "Require passkey entry on the keyboard to complete pairing"
|
||||
default n
|
||||
select RING_BUFFER
|
||||
|
||||
config BT_PERIPHERAL_PREF_MIN_INT
|
||||
default 6
|
||||
|
||||
@@ -255,7 +201,6 @@ rsource "src/display/Kconfig"
|
||||
menuconfig ZMK_RGB_UNDERGLOW
|
||||
bool "RGB Adressable LED Underglow"
|
||||
select LED_STRIP
|
||||
select ZMK_LOW_PRIORITY_WORK_QUEUE
|
||||
|
||||
if ZMK_RGB_UNDERGLOW
|
||||
|
||||
@@ -363,23 +308,13 @@ endif
|
||||
#Display/LED Options
|
||||
endmenu
|
||||
|
||||
menu "Mouse Options"
|
||||
|
||||
config ZMK_MOUSE
|
||||
bool "Enable ZMK mouse emulation"
|
||||
default n
|
||||
|
||||
#Mouse Options
|
||||
endmenu
|
||||
|
||||
menu "Power Management"
|
||||
|
||||
config ZMK_BATTERY_REPORTING
|
||||
bool "Battery level detection/reporting"
|
||||
default n
|
||||
select SENSOR
|
||||
select ZMK_LOW_PRIORITY_WORK_QUEUE
|
||||
imply BT_BAS if ZMK_BLE
|
||||
select BT_BAS if ZMK_BLE
|
||||
|
||||
config ZMK_IDLE_TIMEOUT
|
||||
int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)"
|
||||
@@ -573,11 +508,6 @@ config ZMK_BATTERY_REPORT_INTERVAL
|
||||
int "Battery level report interval in seconds"
|
||||
default 60
|
||||
|
||||
config ZMK_LOW_PRIORITY_WORK_QUEUE
|
||||
bool "Work queue for low priority items"
|
||||
|
||||
if ZMK_LOW_PRIORITY_WORK_QUEUE
|
||||
|
||||
config ZMK_LOW_PRIORITY_THREAD_STACK_SIZE
|
||||
int "Low priority thread stack size"
|
||||
default 768
|
||||
@@ -586,8 +516,6 @@ config ZMK_LOW_PRIORITY_THREAD_PRIORITY
|
||||
int "Low priority thread priority"
|
||||
default 10
|
||||
|
||||
endif
|
||||
|
||||
#Advanced
|
||||
endmenu
|
||||
|
||||
@@ -595,7 +523,7 @@ endmenu
|
||||
endmenu
|
||||
|
||||
config HEAP_MEM_POOL_SIZE
|
||||
default 8192 if ZMK_DISPLAY
|
||||
default 8192
|
||||
|
||||
config KERNEL_BIN_NAME
|
||||
default "zmk"
|
||||
@@ -647,3 +575,4 @@ osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.shield"
|
||||
|
||||
|
||||
source "Kconfig.zephyr"
|
||||
|
||||
|
||||
@@ -6,11 +6,6 @@ config ZMK_BEHAVIOR_KEY_TOGGLE
|
||||
default y
|
||||
depends on DT_HAS_ZMK_BEHAVIOR_KEY_TOGGLE_ENABLED
|
||||
|
||||
config ZMK_BEHAVIOR_MOUSE_KEY_PRESS
|
||||
bool
|
||||
default y
|
||||
depends on DT_HAS_ZMK_BEHAVIOR_MOUSE_KEY_PRESS_ENABLED
|
||||
imply ZMK_MOUSE
|
||||
|
||||
config ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
|
||||
bool
|
||||
|
||||
@@ -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,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,159 +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-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Adv360 Pro";
|
||||
compatible = "kinesis,adv360pro";
|
||||
|
||||
chosen {
|
||||
zephyr,code-partition = &code_partition;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,backlight = &backlight;
|
||||
zmk,battery = &vbatt;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
zmk,underglow = &led_strip;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <20>;
|
||||
rows = <5>;
|
||||
|
||||
|
||||
map = <
|
||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,13) RC(4,14) RC(4,15) RC(4,16) RC(4,17) RC(4,18) RC(4,19)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,13) RC(3,14) RC(3,15) RC(3,16) RC(3,17) RC(3,18) RC(3,19)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) RC(2,14) RC(2,15) RC(2,16) RC(2,17) RC(2,18) RC(2,19)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,9) RC(1,10) RC(1,14) RC(1,15) RC(1,16) RC(1,17) RC(1,18) RC(1,19)
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,15) RC(0,16) RC(0,17) RC(0,18) RC(0,19)
|
||||
|
||||
>;
|
||||
};
|
||||
|
||||
// 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";
|
||||
};
|
||||
|
||||
&usbd {
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
};
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
/*
|
||||
* For more information, see:
|
||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
||||
*/
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
sd_partition: partition@0 {
|
||||
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,16 +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
|
||||
outputs:
|
||||
- usb
|
||||
- ble
|
||||
siblings:
|
||||
- adv360pro_left
|
||||
- adv360pro_right
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "adv360pro.dtsi"
|
||||
|
||||
/{
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
= <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
|
||||
col-gpios
|
||||
= <&gpio0 25 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 11 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 2 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 28 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 29 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 30 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 31 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
||||
};
|
||||
@@ -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,40 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "adv360pro.dtsi"
|
||||
|
||||
/{
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
= <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
|
||||
col-gpios
|
||||
= <&gpio0 12 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 11 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 10 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 13 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 15 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 3 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 2 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 28 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
&default_transform {
|
||||
col-offset = <10>;
|
||||
};
|
||||
@@ -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,8 +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/nrfjprog.board.cmake)
|
||||
@@ -11,6 +11,9 @@ config BOARD
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "BDN9 Rev2"
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
config ZMK_RGB_UNDERGLOW
|
||||
select SPI
|
||||
select WS2812_STRIP
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
kscan: kscan {
|
||||
compatible = "zmk,kscan-gpio-direct";
|
||||
label = "KSCAN";
|
||||
|
||||
input-gpios
|
||||
= <&gpiob 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||
@@ -39,23 +40,26 @@
|
||||
|
||||
left_encoder: encoder_left {
|
||||
compatible = "alps,ec11";
|
||||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
steps = <80>;
|
||||
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)>;
|
||||
steps = <80>;
|
||||
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)>;
|
||||
steps = <80>;
|
||||
resolution = <4>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -63,7 +67,6 @@
|
||||
compatible = "zmk,keymap-sensors";
|
||||
status = "disabled";
|
||||
sensors = <>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -74,6 +77,7 @@
|
||||
|
||||
led_strip: ws2812@0 {
|
||||
compatible = "worldsemi,ws2812-spi";
|
||||
label = "WS2812";
|
||||
|
||||
/* SPI */
|
||||
reg = <0>; /* ignored, but necessary for SPI bindings */
|
||||
@@ -112,6 +116,7 @@
|
||||
pinctrl-names = "default";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -131,6 +136,7 @@
|
||||
|
||||
/* Set 6Kb of storage at the end of the 128Kb of flash */
|
||||
storage_partition: partition@1e800 {
|
||||
label = "storage";
|
||||
reg = <0x0001e800 0x00001800>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -23,4 +23,3 @@ CONFIG_HEAP_MEM_POOL_SIZE=1024
|
||||
# clock configuration
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
@@ -18,4 +18,10 @@ endif # USB_DEVICE_STACK
|
||||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_BLUEMICRO840_V1
|
||||
|
||||
@@ -25,18 +25,20 @@
|
||||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
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";
|
||||
label = "EXT_POWER";
|
||||
init-delay-ms = <20>;
|
||||
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "BATTERY";
|
||||
io-channels = <&adc 7>;
|
||||
output-ohms = <2000000>;
|
||||
full-ohms = <(2000000 + 806000)>;
|
||||
@@ -79,6 +81,7 @@
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -94,9 +97,11 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
sd_partition: partition@0 {
|
||||
label = "softdevice";
|
||||
reg = <0x00000000 0x00026000>;
|
||||
};
|
||||
code_partition: partition@26000 {
|
||||
label = "code_partition";
|
||||
reg = <0x00026000 0x000c6000>;
|
||||
};
|
||||
|
||||
@@ -110,10 +115,12 @@
|
||||
* if enabled.
|
||||
*/
|
||||
storage_partition: partition@ec000 {
|
||||
label = "storage";
|
||||
reg = <0x000ec000 0x00008000>;
|
||||
};
|
||||
|
||||
boot_partition: partition@f4000 {
|
||||
label = "adafruit_boot";
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -21,6 +21,3 @@ CONFIG_SETTINGS_NVS=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
@@ -19,6 +19,12 @@ endif # USB
|
||||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "BT60"
|
||||
|
||||
|
||||
@@ -19,22 +19,22 @@
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,battery = &vbatt;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
};
|
||||
|
||||
sensors: sensors {
|
||||
sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
|
||||
|
||||
left_encoder: encoder_left {
|
||||
compatible = "alps,ec11";
|
||||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
steps = <80>;
|
||||
resolution = <4>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -43,11 +43,13 @@
|
||||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "BATTERY";
|
||||
io-channels = <&adc 2>;
|
||||
output-ohms = <2000000>;
|
||||
full-ohms = <(2000000 + 806000)>;
|
||||
@@ -86,6 +88,7 @@
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -101,9 +104,11 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
sd_partition: partition@0 {
|
||||
label = "softdevice";
|
||||
reg = <0x00000000 0x00026000>;
|
||||
};
|
||||
code_partition: partition@26000 {
|
||||
label = "code_partition";
|
||||
reg = <0x00026000 0x000c6000>;
|
||||
};
|
||||
|
||||
@@ -117,10 +122,12 @@
|
||||
* if enabled.
|
||||
*/
|
||||
storage_partition: partition@ec000 {
|
||||
label = "storage";
|
||||
reg = <0x000ec000 0x00008000>;
|
||||
};
|
||||
|
||||
boot_partition: partition@f4000 {
|
||||
label = "adafruit_boot";
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
};
|
||||
|
||||
ansi_transform: keymap_transform_0 {
|
||||
@@ -81,6 +81,7 @@
|
||||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
|
||||
@@ -13,15 +13,15 @@
|
||||
/ {
|
||||
chosen {
|
||||
#ifdef ANSI
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
#elif defined(HHKB)
|
||||
zmk,matrix-transform = &hhkb_transform;
|
||||
zmk,matrix_transform = &hhkb_transform;
|
||||
#elif defined(ISO)
|
||||
zmk,matrix-transform = &iso_transform;
|
||||
zmk,matrix_transform = &iso_transform;
|
||||
#elif defined(ALL_1U)
|
||||
zmk,matrix-transform = &all_1u_transform;
|
||||
zmk,matrix_transform = &all_1u_transform;
|
||||
#else
|
||||
zmk,matrix-transform = &split_transform;
|
||||
zmk,matrix_transform = &split_transform;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -23,6 +23,3 @@ CONFIG_SETTINGS_NVS=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
@@ -11,7 +11,7 @@
|
||||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
|
||||
@@ -23,6 +23,3 @@ CONFIG_SETTINGS_NVS=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
@@ -25,4 +25,10 @@ endif # USB
|
||||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
compatible = "polarityworks,bt60_v2";
|
||||
|
||||
chosen {
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
/ {
|
||||
chosen {
|
||||
#ifdef ANSI
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
#elif defined(ISO)
|
||||
zmk,matrix-transform = &iso_transform;
|
||||
zmk,matrix_transform = &iso_transform;
|
||||
#elif defined(ALL_1U)
|
||||
zmk,matrix-transform = &all_1u_transform;
|
||||
zmk,matrix_transform = &all_1u_transform;
|
||||
#elif defined(HHKB)
|
||||
zmk,matrix-transform = &hhkb_transform;
|
||||
zmk,matrix_transform = &hhkb_transform;
|
||||
#else
|
||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap"
|
||||
#endif
|
||||
|
||||
@@ -36,6 +36,3 @@ CONFIG_WS2812_STRIP=y
|
||||
CONFIG_SPI=y
|
||||
|
||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
compatible = "polarityworks,bt65_v1";
|
||||
|
||||
chosen {
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
/ {
|
||||
chosen {
|
||||
#ifdef ANSI
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
#elif defined(ISO)
|
||||
zmk,matrix-transform = &iso_transform;
|
||||
zmk,matrix_transform = &iso_transform;
|
||||
#elif defined(ALL_1U)
|
||||
zmk,matrix-transform = &all_1u_transform;
|
||||
zmk,matrix_transform = &all_1u_transform;
|
||||
#elif defined(HHKB)
|
||||
zmk,matrix-transform = &hhkb_transform;
|
||||
zmk,matrix_transform = &hhkb_transform;
|
||||
#else
|
||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65_v1.keymap"
|
||||
#endif
|
||||
|
||||
@@ -36,6 +36,3 @@ CONFIG_WS2812_STRIP=y
|
||||
CONFIG_SPI=y
|
||||
|
||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
@@ -13,7 +13,7 @@
|
||||
compatible = "polarityworks,bt75_v1";
|
||||
|
||||
chosen {
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
/ {
|
||||
chosen {
|
||||
#ifdef ANSI
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
#elif defined(ISO)
|
||||
zmk,matrix-transform = &iso_transform;
|
||||
zmk,matrix_transform = &iso_transform;
|
||||
#elif defined(ALL_1U)
|
||||
zmk,matrix-transform = &all_1u_transform;
|
||||
zmk,matrix_transform = &all_1u_transform;
|
||||
#else
|
||||
#error "Layout not defined, please define a layout using by uncommenting the appropriate line in bt75_v1.keymap"
|
||||
#endif
|
||||
|
||||
@@ -36,6 +36,3 @@ CONFIG_WS2812_STRIP=y
|
||||
CONFIG_SPI=y
|
||||
|
||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
@@ -26,14 +26,14 @@
|
||||
zmk,battery = &vbatt;
|
||||
};
|
||||
|
||||
sensors: sensors {
|
||||
sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&encoder_1>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
@@ -65,38 +65,42 @@
|
||||
;
|
||||
};
|
||||
|
||||
// Node name must match original "EXT_POWER" label to preserve user settings.
|
||||
EXT_POWER {
|
||||
ext-power {
|
||||
compatible = "zmk,ext-power-generic";
|
||||
label = "EXT_POWER";
|
||||
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
encoder_1: encoder_1 {
|
||||
compatible = "alps,ec11";
|
||||
label = "ENCODER_ONE";
|
||||
a-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
steps = <80>;
|
||||
resolution = <4>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
encoder_2: encoder_2 {
|
||||
compatible = "alps,ec11";
|
||||
label = "ENCODER_TWO";
|
||||
a-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
steps = <80>;
|
||||
resolution = <4>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
encoder_3: encoder_3 {
|
||||
compatible = "alps,ec11";
|
||||
label = "encoder_3";
|
||||
a-gpios = <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
steps = <80>;
|
||||
resolution = <4>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
backlight: pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
label = "Backlight LEDs";
|
||||
pwm_led_0 {
|
||||
pwms = <&pwm0 0 10000 PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
@@ -106,11 +110,13 @@
|
||||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "VBATT";
|
||||
io-channels = <&adc 2>;
|
||||
output-ohms = <100000>;
|
||||
full-ohms = <(100000 + 100000)>;
|
||||
@@ -156,9 +162,11 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
sd_partition: partition@0 {
|
||||
label = "softdevice";
|
||||
reg = <0x00000000 0x00026000>;
|
||||
};
|
||||
code_partition: partition@26000 {
|
||||
label = "code_partition";
|
||||
reg = <0x00026000 0x000c6000>;
|
||||
};
|
||||
|
||||
@@ -172,10 +180,12 @@
|
||||
* if enabled.
|
||||
*/
|
||||
storage_partition: partition@ec000 {
|
||||
label = "storage";
|
||||
reg = <0x000ec000 0x00008000>;
|
||||
};
|
||||
|
||||
boot_partition: partition@f4000 {
|
||||
label = "adafruit_boot";
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
@@ -190,6 +200,7 @@
|
||||
|
||||
led_strip: ws2812@0 {
|
||||
compatible = "worldsemi,ws2812-spi";
|
||||
label = "WS2812";
|
||||
|
||||
/* SPI */
|
||||
reg = <0>;
|
||||
|
||||
@@ -25,6 +25,12 @@ config ZMK_SPLIT
|
||||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
if USB
|
||||
|
||||
config USB_NRFX
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,display = &epd;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
@@ -80,6 +80,7 @@
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -94,9 +95,11 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
sd_partition: partition@0 {
|
||||
label = "softdevice";
|
||||
reg = <0x00000000 0x00026000>;
|
||||
};
|
||||
code_partition: partition@26000 {
|
||||
label = "code_partition";
|
||||
reg = <0x00026000 0x000c6000>;
|
||||
};
|
||||
|
||||
@@ -110,10 +113,12 @@
|
||||
* if enabled.
|
||||
*/
|
||||
storage_partition: partition@ec000 {
|
||||
label = "storage";
|
||||
reg = <0x000ec000 0x00008000>;
|
||||
};
|
||||
|
||||
boot_partition: partition@f4000 {
|
||||
label = "adafruit_boot";
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,matrix-transform = &default_transform;
|
||||
// zmk,matrix-transform = &five_column_transform;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
// zmk,matrix_transform = &five_column_transform;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
default_layer {
|
||||
display-name = "QWERTY";
|
||||
label = "QWERTY";
|
||||
// --------------------------------------------------------------------------------
|
||||
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP |
|
||||
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||
@@ -36,7 +36,7 @@
|
||||
};
|
||||
|
||||
lower_layer {
|
||||
display-name = "NUMBER";
|
||||
label = "NUMBER";
|
||||
// -----------------------------------------------------------------------------------------
|
||||
// | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP |
|
||||
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | |
|
||||
@@ -51,7 +51,7 @@
|
||||
};
|
||||
|
||||
raise_layer {
|
||||
display-name = "SYMBOL";
|
||||
label = "SYMBOL";
|
||||
// -----------------------------------------------------------------------------------------
|
||||
// | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP |
|
||||
// | CTRL | | | | | | | - | = | [ | ] | \ | ` |
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
@@ -38,6 +39,7 @@
|
||||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -86,6 +88,7 @@
|
||||
|
||||
fuelgauge: bq274xx@55 {
|
||||
compatible = "ti,bq274xx";
|
||||
label = "BATTERY";
|
||||
reg = <0x55>;
|
||||
design-voltage = <3700>; //Battery Design Volatge in mV
|
||||
design-capacity = <180>; //Battery Design Capacity in mAh
|
||||
@@ -106,6 +109,7 @@
|
||||
epd: il0323@0 {
|
||||
compatible = "gooddisplay,il0323";
|
||||
reg = <0>;
|
||||
label = "DISPLAY";
|
||||
width = <80>;
|
||||
height = <128>;
|
||||
spi-max-frequency = <4000000>;
|
||||
|
||||
@@ -39,9 +39,6 @@ CONFIG_FLASH_MAP=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
@@ -38,6 +39,7 @@
|
||||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -94,6 +96,7 @@
|
||||
|
||||
fuelgauge: bq274xx@55 {
|
||||
compatible = "ti,bq274xx";
|
||||
label = "BATTERY";
|
||||
reg = <0x55>;
|
||||
design-voltage = <3700>; //Battery Design Volatge in mV
|
||||
design-capacity = <180>; //Battery Design Capacity in mAh
|
||||
@@ -114,6 +117,7 @@
|
||||
epd: il0323@0 {
|
||||
compatible = "gooddisplay,il0323";
|
||||
reg = <0>;
|
||||
label = "DISPLAY";
|
||||
width = <80>;
|
||||
height = <128>;
|
||||
spi-max-frequency = <4000000>;
|
||||
|
||||
@@ -39,9 +39,6 @@ CONFIG_FLASH_MAP=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
@@ -38,11 +39,13 @@
|
||||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "BATTERY";
|
||||
io-channels = <&adc 0>;
|
||||
output-ohms = <1960000>;
|
||||
full-ohms = <(1960000 + 810000)>;
|
||||
@@ -80,6 +83,7 @@
|
||||
epd: il0323@0 {
|
||||
compatible = "gooddisplay,il0323";
|
||||
reg = <0>;
|
||||
label = "DISPLAY";
|
||||
width = <80>;
|
||||
height = <128>;
|
||||
spi-max-frequency = <4000000>;
|
||||
|
||||
@@ -35,9 +35,6 @@ CONFIG_FLASH_MAP=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
@@ -38,11 +39,13 @@
|
||||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "BATTERY";
|
||||
io-channels = <&adc 0>;
|
||||
output-ohms = <1960000>;
|
||||
full-ohms = <(1960000 + 810000)>;
|
||||
@@ -87,6 +90,7 @@
|
||||
epd: il0323@0 {
|
||||
compatible = "gooddisplay,il0323";
|
||||
reg = <0>;
|
||||
label = "DISPLAY";
|
||||
width = <80>;
|
||||
height = <128>;
|
||||
spi-max-frequency = <4000000>;
|
||||
|
||||
@@ -35,9 +35,6 @@ CONFIG_FLASH_MAP=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
||||
|
||||
@@ -67,7 +67,7 @@ void battery_status_update_cb(struct battery_status_state state) {
|
||||
|
||||
static struct battery_status_state battery_status_get_state(const zmk_event_t *eh) {
|
||||
return (struct battery_status_state) {
|
||||
.level = zmk_battery_state_of_charge(),
|
||||
.level = bt_bas_get_battery_level(),
|
||||
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
|
||||
.usb_present = zmk_usb_is_powered(),
|
||||
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
|
||||
|
||||
@@ -45,7 +45,7 @@ static void layer_status_update_cb(struct layer_status_state state) {
|
||||
|
||||
static struct layer_status_state layer_status_get_state(const zmk_event_t *eh) {
|
||||
uint8_t index = zmk_keymap_highest_layer_active();
|
||||
return (struct layer_status_state){.index = index, .label = zmk_keymap_layer_name(index)};
|
||||
return (struct layer_status_state){.index = index, .label = zmk_keymap_layer_label(index)};
|
||||
}
|
||||
|
||||
ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, layer_status_update_cb,
|
||||
|
||||
@@ -8,4 +8,7 @@ if BOARD_DZ60RGB_REV1
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "DZ60RGB Rev 1"
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_DZ60RGB_REV1
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
@@ -36,6 +36,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
@@ -69,6 +70,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -84,6 +86,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(
|
||||
|
||||
/* Set 6Kb of storage at the end of the 256Kb of flash */
|
||||
storage_partition: partition@3e800 {
|
||||
label = "storage";
|
||||
reg = <0x0003e800 0x00001800>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -25,5 +25,3 @@ CONFIG_CLOCK_STM32_PLL_MULTIPLIER=9
|
||||
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
|
||||
CONFIG_CLOCK_STM32_APB1_PRESCALER=2
|
||||
CONFIG_CLOCK_STM32_APB2_PRESCALER=1
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
@@ -11,6 +11,9 @@ config BOARD
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Ferris rev 0.2"
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
config ZMK_KSCAN_MATRIX_POLLING
|
||||
default y
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,kscan = &kscan;
|
||||
zmk,matrix-transform = &transform;
|
||||
zmk,matrix_transform = &transform;
|
||||
/* TODO: Enable once we support the IC for underglow
|
||||
zmk,underglow = &led_strip;
|
||||
*/
|
||||
@@ -40,6 +40,7 @@
|
||||
|
||||
kscan: kscan {
|
||||
compatible = "zmk,kscan-composite";
|
||||
label = "KSCAN";
|
||||
rows = <4>;
|
||||
columns = <10>;
|
||||
|
||||
@@ -55,6 +56,7 @@
|
||||
|
||||
kscan_left: kscan_left {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN_LEFT";
|
||||
|
||||
diode-direction = "col2row";
|
||||
|
||||
@@ -75,6 +77,7 @@
|
||||
|
||||
kscan_right: kscan_right {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN_RIGHT";
|
||||
|
||||
diode-direction = "row2col";
|
||||
|
||||
@@ -114,6 +117,7 @@
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -152,6 +156,7 @@
|
||||
|
||||
/* Set 6Kb of storage at the end of the 128Kb of flash */
|
||||
storage_partition: partition@3e800 {
|
||||
label = "storage";
|
||||
reg = <0x0001e800 0x00001800>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
behaviors {
|
||||
hm: homerow_mods {
|
||||
compatible = "zmk,behavior-hold-tap";
|
||||
label = "homerow mods";
|
||||
#binding-cells = <2>;
|
||||
tapping_term_ms = <200>;
|
||||
flavor = "tap-preferred";
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
zephyr_library()
|
||||
zephyr_library_sources(usb_serial_number.c)
|
||||
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
||||
@@ -1,8 +0,0 @@
|
||||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_ENABLE_DCDC
|
||||
bool "Enable DCDC mode"
|
||||
select SOC_DCDC_NRF52X
|
||||
default y
|
||||
depends on (BOARD_GLOVE80_LH || BOARD_GLOVE80_RH)
|
||||
@@ -1,10 +0,0 @@
|
||||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_GLOVE80_LH
|
||||
bool "Glove80 LH"
|
||||
depends on SOC_NRF52840_QIAA
|
||||
|
||||
config BOARD_GLOVE80_RH
|
||||
bool "Glove80 RH"
|
||||
depends on SOC_NRF52840_QIAA
|
||||
@@ -1,65 +0,0 @@
|
||||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if BOARD_GLOVE80_LH
|
||||
|
||||
config BOARD
|
||||
default "glove80 lh"
|
||||
|
||||
config ZMK_SPLIT_BLE_ROLE_CENTRAL
|
||||
default y
|
||||
|
||||
endif # BOARD_GLOVE80_LH
|
||||
|
||||
if BOARD_GLOVE80_RH
|
||||
|
||||
config BOARD
|
||||
default "glove80 rh"
|
||||
|
||||
endif # BOARD_GLOVE80_RH
|
||||
|
||||
if BOARD_GLOVE80_LH || BOARD_GLOVE80_RH
|
||||
|
||||
config ZMK_SPLIT
|
||||
default y
|
||||
|
||||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_KSCAN_MATRIX_WAIT_BETWEEN_OUTPUTS
|
||||
default 5
|
||||
|
||||
config PINCTRL
|
||||
default y
|
||||
|
||||
if USB
|
||||
|
||||
config USB_NRFX
|
||||
default y
|
||||
|
||||
config USB_DEVICE_STACK
|
||||
default y
|
||||
|
||||
endif # USB
|
||||
|
||||
if ZMK_BACKLIGHT
|
||||
|
||||
config PWM
|
||||
default y
|
||||
|
||||
config LED_PWM
|
||||
default y
|
||||
|
||||
endif # ZMK_BACKLIGHT
|
||||
|
||||
if ZMK_RGB_UNDERGLOW
|
||||
|
||||
config SPI
|
||||
default y
|
||||
|
||||
config WS2812_STRIP
|
||||
default y
|
||||
|
||||
endif # ZMK_RGB_UNDERGLOW
|
||||
|
||||
endif # BOARD_GLOVE80_LH || BOARD_GLOVE80_RH
|
||||
@@ -1,6 +0,0 @@
|
||||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
@@ -1,101 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
zephyr,code-partition = &code_partition;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <14>;
|
||||
rows = <6>;
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13)
|
||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(0,6) RC(1,6) RC(2,6) RC(2,7) RC(1,7) RC(0,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13)
|
||||
RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(3,6) RC(4,6) RC(5,6) RC(5,7) RC(4,7) RC(3,7) RC(5,9) RC(5,10) RC(5,11) RC(5,12) RC(5,13)
|
||||
>;
|
||||
};
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
diode-direction = "col2row";
|
||||
debounce-press-ms = <4>;
|
||||
debounce-release-ms = <20>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&adc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpiote {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbd {
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
};
|
||||
};
|
||||
|
||||
&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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1,109 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/ext_power.h>
|
||||
#include <dt-bindings/zmk/outputs.h>
|
||||
#include <dt-bindings/zmk/rgb.h>
|
||||
|
||||
// layers
|
||||
#define DEFAULT 0
|
||||
#define LOWER 1
|
||||
#define MAGIC 2
|
||||
|
||||
/ {
|
||||
behaviors {
|
||||
// For the "layer" key, it'd nice to be able to use it as either a shift or a toggle.
|
||||
// Configure it as a tap dance, so the first tap (or hold) is a &mo and the second tap is a &to
|
||||
layer_td: tap_dance_0 {
|
||||
compatible = "zmk,behavior-tap-dance";
|
||||
#binding-cells = <0>;
|
||||
tapping-term-ms = <200>;
|
||||
bindings = <&mo LOWER>, <&to LOWER>;
|
||||
};
|
||||
};
|
||||
|
||||
macros {
|
||||
bt_0: bt_profile_macro_0 {
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <&out OUT_BLE>,
|
||||
<&bt BT_SEL 0>;
|
||||
};
|
||||
|
||||
bt_1: bt_profile_macro_1 {
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <&out OUT_BLE>,
|
||||
<&bt BT_SEL 1>;
|
||||
};
|
||||
|
||||
bt_2: bt_profile_macro_2 {
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <&out OUT_BLE>,
|
||||
<&bt BT_SEL 2>;
|
||||
};
|
||||
|
||||
bt_3: bt_profile_macro_3 {
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <&out OUT_BLE>,
|
||||
<&bt BT_SEL 3>;
|
||||
};
|
||||
};
|
||||
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
default_layer {
|
||||
// ---------------------------------------------------------------------------------------------------------------------------------
|
||||
// | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 |
|
||||
// | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
|
||||
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | \ |
|
||||
// | ESC | A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||
// | ` | Z | X | C | V | B | LSHFT | LCTRL | LOWER | | LGUI | RCTRL | RSHFT | N | M | , | . | / | PGUP |
|
||||
// | MAGIC | HOME| END | LEFT | RIGHT| | BSPC | DEL | LALT | | RALT | RET | SPACE | | UP | DOWN | [ | ] | PGDN |
|
||||
|
||||
bindings = <
|
||||
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10
|
||||
&kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH
|
||||
&kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
|
||||
&kp GRAVE &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LCTRL &layer_td &kp LGUI &kp RCTRL &kp RSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp PG_UP
|
||||
&mo MAGIC &kp HOME &kp END &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp LALT &kp RALT &kp RET &kp SPACE &kp UP &kp DOWN &kp LBKT &kp RBKT &kp PG_DN
|
||||
>;
|
||||
};
|
||||
|
||||
lower_layer {
|
||||
bindings = <
|
||||
&kp C_BRI_DN &kp C_BRI_UP &kp C_PREV &kp C_NEXT &kp C_PP &kp C_MUTE &kp C_VOL_DN &kp C_VOL_UP &none &kp PAUSE_BREAK
|
||||
&trans &none &none &none &none &kp HOME &kp LPAR &kp KP_NUM &kp KP_EQUAL &kp KP_DIVIDE &kp KP_MULTIPLY &kp PSCRN
|
||||
&trans &none &none &kp UP &none &kp END &kp RPAR &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp SLCK
|
||||
&trans &none &kp LEFT &kp DOWN &kp RIGHT &kp PG_UP &kp PRCNT &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &none
|
||||
&trans &kp K_CMENU &none &kp F11 &kp F12 &kp PG_DN &trans &trans &to DEFAULT &trans &trans &trans &kp COMMA &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER &trans
|
||||
&trans &kp CAPS &kp INS &kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &kp KP_N0 &kp KP_N0 &kp KP_DOT &kp KP_ENTER &trans
|
||||
>;
|
||||
};
|
||||
|
||||
magic_layer {
|
||||
bindings = <
|
||||
&bt BT_CLR &none &none &none &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &none &none &none &none &none &none
|
||||
&none &rgb_ug RGB_SPI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_BRI &rgb_ug RGB_TOG &none &none &none &none &none &none
|
||||
&bootloader &rgb_ug RGB_SPD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_BRD &rgb_ug RGB_EFF &none &none &none &none &none &bootloader
|
||||
&sys_reset &none &none &none &none &none &bt_2 &bt_3 &none &none &none &none &none &none &none &none &none &sys_reset
|
||||
&none &none &none &none &none &bt_0 &bt_1 &out OUT_USB &none &none &none &none &none &none &none &none
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
identifier: glove80
|
||||
name: Glove80
|
||||
url: https://www.moergo.com/
|
||||
type: mcu
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
supported:
|
||||
- adc
|
||||
- usb_device
|
||||
- ble
|
||||
- ieee802154
|
||||
- pwm
|
||||
- watchdog
|
||||
- gpio
|
||||
- i2c
|
||||
- spi
|
||||
@@ -1,16 +0,0 @@
|
||||
file_format: "1"
|
||||
id: glove80
|
||||
name: Glove80
|
||||
type: board
|
||||
arch: arm
|
||||
url: https://www.moergo.com/
|
||||
features:
|
||||
- keys
|
||||
- underglow
|
||||
- backlight
|
||||
outputs:
|
||||
- usb
|
||||
- ble
|
||||
siblings:
|
||||
- glove80_lh
|
||||
- glove80_rh
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
&pinctrl {
|
||||
spi3_default: spi3_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 27)>; // WS2812_VEXT_DATA
|
||||
};
|
||||
};
|
||||
|
||||
spi3_sleep: spi3_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 27)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
pwm0_default: pwm0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(PWM_OUT0, 1, 15)>; // rear LED
|
||||
};
|
||||
};
|
||||
|
||||
pwm0_sleep: pwm0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(PWM_OUT0, 1, 15)>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
uart0_default: uart0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(UART_TX, 0, 22)>, // EXT1
|
||||
<NRF_PSEL(UART_RX, 0, 21)>; // EXT2
|
||||
};
|
||||
};
|
||||
|
||||
uart0_sleep: uart0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(UART_TX, 0, 22)>,
|
||||
<NRF_PSEL(UART_RX, 0, 21)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1,97 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "glove80.dtsi"
|
||||
#include "glove80_lh-pinctrl.dtsi"
|
||||
|
||||
#include <dt-bindings/led/led.h>
|
||||
|
||||
/ {
|
||||
model = "glove80_lh";
|
||||
compatible = "glove80_lh";
|
||||
|
||||
chosen {
|
||||
zmk,underglow = &led_strip;
|
||||
zmk,backlight = &back_led_backlight;
|
||||
zmk,battery = &vbatt;
|
||||
};
|
||||
|
||||
back_led_backlight: pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
pwm_led_0 {
|
||||
pwms = <&pwm0 0 PWM_USEC(20) PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
};
|
||||
|
||||
// Node name must match original "EXT_POWER" label to preserve user settings.
|
||||
EXT_POWER {
|
||||
compatible = "zmk,ext-power-generic";
|
||||
control-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; /* WS2812_CE */
|
||||
init-delay-ms = <100>;
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-nrf-vddh";
|
||||
};
|
||||
};
|
||||
|
||||
&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>; /* ignored, but necessary for SPI bindings */
|
||||
spi-max-frequency = <4000000>;
|
||||
|
||||
/* WS2812 */
|
||||
chain-length = <40>; /* 40 keys have underglow at the moment */
|
||||
spi-one-frame = <0x70>;
|
||||
spi-zero-frame = <0x40>;
|
||||
|
||||
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||
};
|
||||
};
|
||||
|
||||
&pwm0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm0_default>;
|
||||
pinctrl-1 = <&pwm0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
compatible = "nordic,nrf-uarte";
|
||||
pinctrl-0 = <&uart0_default>;
|
||||
pinctrl-1 = <&uart0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&kscan0 {
|
||||
row-gpios
|
||||
= <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW1
|
||||
, <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW2
|
||||
, <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW3
|
||||
, <&gpio0 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW4
|
||||
, <&gpio0 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW5
|
||||
, <&gpio1 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW6
|
||||
;
|
||||
col-gpios
|
||||
= <&gpio1 8 GPIO_ACTIVE_HIGH> // LH COL6
|
||||
, <&gpio1 4 GPIO_ACTIVE_HIGH> // LH COL5
|
||||
, <&gpio1 6 GPIO_ACTIVE_HIGH> // LH COL4
|
||||
, <&gpio1 7 GPIO_ACTIVE_HIGH> // LH COL3
|
||||
, <&gpio1 5 GPIO_ACTIVE_HIGH> // LH COL2
|
||||
, <&gpio1 3 GPIO_ACTIVE_HIGH> // LH COL1
|
||||
, <&gpio1 1 GPIO_ACTIVE_HIGH> // LH Thumb
|
||||
;
|
||||
};
|
||||
@@ -1,7 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "glove80.keymap"
|
||||
@@ -1,92 +0,0 @@
|
||||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
CONFIG_SOC_SERIES_NRF52X=y
|
||||
CONFIG_SOC_NRF52840_QIAA=y
|
||||
CONFIG_BOARD_GLOVE80_LH=y
|
||||
|
||||
# Enable both USB and BLE
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# Keyboard IDs
|
||||
CONFIG_ZMK_KEYBOARD_NAME="Glove80 Left"
|
||||
CONFIG_USB_DEVICE_PID=0x27db
|
||||
CONFIG_USB_DEVICE_VID=0x16c0
|
||||
CONFIG_USB_DEVICE_MANUFACTURER="MoErgo"
|
||||
CONFIG_USB_DEVICE_SN="moergo.com:GLV80-0123456789ABCDEF"
|
||||
|
||||
CONFIG_BT_DIS_PNP_PID=0x27db
|
||||
CONFIG_BT_DIS_PNP_VID=0x16c0
|
||||
CONFIG_BT_DIS_MANUF="MoErgo"
|
||||
CONFIG_BT_DIS_MODEL="Glove80"
|
||||
|
||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
||||
|
||||
# Work-around for Windows bug with battery notifications
|
||||
CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# Enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# Build configurations
|
||||
CONFIG_BUILD_OUTPUT_UF2=y
|
||||
CONFIG_BUILD_OUTPUT_UF2_FAMILY_ID="0x9807B007"
|
||||
CONFIG_USE_DT_CODE_PARTITION=y
|
||||
|
||||
# Flash configuration
|
||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||
CONFIG_NVS=y
|
||||
CONFIG_SETTINGS_NVS=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
# Enable 32kHz crystal
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
|
||||
# Enable RGB underglow
|
||||
CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_BRT_STEP=4
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_BRT_MIN=4
|
||||
|
||||
# DO NOT CHANGE CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX TO ABOVE 80. Configuring
|
||||
# BRT_MAX above 80% will draw additional current and can potentially damage your
|
||||
# computer. WARRANTY IS VOID IF BRT_MAX SET ABOVE 80.
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX=80
|
||||
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=285
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_SAT_START=75
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=16
|
||||
|
||||
# The power LED is implemented as a backlight
|
||||
# For now, the power LED is acting as a "USB connected" indicator
|
||||
CONFIG_ZMK_BACKLIGHT=y
|
||||
CONFIG_ZMK_BACKLIGHT_ON_START=y
|
||||
CONFIG_ZMK_BACKLIGHT_BRT_START=5
|
||||
CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y
|
||||
CONFIG_ZMK_BACKLIGHT_AUTO_OFF_USB=y
|
||||
|
||||
# The full two-byte consumer report space has compatibility issues with some
|
||||
# operating systems, most notably macOS. Use the more basic single-byte usage
|
||||
# space.
|
||||
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
|
||||
|
||||
# Turn on debugging to disable optimization. Debug messages can result in larger
|
||||
# stacks, so enable stack protection and particularly a larger BLE peripheral stack.
|
||||
# CONFIG_DEBUG=y
|
||||
# CONFIG_DEBUG_THREAD_INFO=y
|
||||
# CONFIG_EXCEPTION_STACK_TRACE=y
|
||||
# CONFIG_HW_STACK_PROTECTION=y
|
||||
# CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE=1300
|
||||
|
||||
# Log via USB or Segger RTT
|
||||
CONFIG_ZMK_USB_LOGGING=n
|
||||
CONFIG_ZMK_RTT_LOGGING=n
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
&pinctrl {
|
||||
spi3_default: spi3_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 13)>; // WS2812_VEXT_DATA
|
||||
};
|
||||
};
|
||||
|
||||
spi3_sleep: spi3_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 13)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
pwm0_default: pwm0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(PWM_OUT0, 0, 16)>; // Rear LED
|
||||
};
|
||||
};
|
||||
|
||||
pwm0_sleep: pwm0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(PWM_OUT0, 0, 16)>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
uart0_default: uart0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(UART_TX, 0, 21)>, // EXT1
|
||||
<NRF_PSEL(UART_RX, 0, 24)>; // EXT2
|
||||
};
|
||||
};
|
||||
|
||||
uart0_sleep: uart0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(UART_TX, 0, 21)>,
|
||||
<NRF_PSEL(UART_RX, 0, 24)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
@@ -1,104 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
|
||||
#include "glove80.dtsi"
|
||||
#include "glove80_rh-pinctrl.dtsi"
|
||||
|
||||
#include <dt-bindings/led/led.h>
|
||||
|
||||
/ {
|
||||
model = "glove80_rh";
|
||||
compatible = "glove80_rh";
|
||||
|
||||
chosen {
|
||||
zmk,underglow = &led_strip;
|
||||
zmk,backlight = &back_led_backlight;
|
||||
zmk,battery = &vbatt;
|
||||
};
|
||||
|
||||
back_led_backlight: pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
pwm_led_0 {
|
||||
pwms = <&pwm0 0 PWM_USEC(20) PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
};
|
||||
|
||||
// Node name must match original "EXT_POWER" label to preserve user settings.
|
||||
EXT_POWER {
|
||||
compatible = "zmk,ext-power-generic";
|
||||
control-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; /* WS2812_CE */
|
||||
init-delay-ms = <100>;
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-nrf-vddh";
|
||||
};
|
||||
};
|
||||
|
||||
&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>; /* ignored, but necessary for SPI bindings */
|
||||
spi-max-frequency = <4000000>;
|
||||
|
||||
/* WS2812 */
|
||||
chain-length = <40>; /* 40 keys have underglow at the moment */
|
||||
spi-one-frame = <0x70>;
|
||||
spi-zero-frame = <0x40>;
|
||||
|
||||
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||
};
|
||||
};
|
||||
|
||||
&pwm0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm0_default>;
|
||||
pinctrl-1 = <&pwm0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
|
||||
&uart0 {
|
||||
compatible = "nordic,nrf-uarte";
|
||||
pinctrl-0 = <&uart0_default>;
|
||||
pinctrl-1 = <&uart0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
/* For right hand, the columns are offset by 7 */
|
||||
&default_transform {
|
||||
col-offset = <7>;
|
||||
};
|
||||
|
||||
&kscan0 {
|
||||
row-gpios
|
||||
= <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW1
|
||||
, <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW2
|
||||
, <&gpio0 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW3
|
||||
, <&gpio1 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW4
|
||||
, <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW5
|
||||
, <&gpio0 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW6
|
||||
;
|
||||
col-gpios
|
||||
= <&gpio1 6 GPIO_ACTIVE_HIGH> // RH Thumb
|
||||
, <&gpio1 4 GPIO_ACTIVE_HIGH> // RH COL1
|
||||
, <&gpio0 2 GPIO_ACTIVE_HIGH> // RH COL2
|
||||
, <&gpio1 7 GPIO_ACTIVE_HIGH> // RH COL3
|
||||
, <&gpio1 5 GPIO_ACTIVE_HIGH> // RH COL4
|
||||
, <&gpio1 3 GPIO_ACTIVE_HIGH> // RH COL5
|
||||
, <&gpio1 1 GPIO_ACTIVE_HIGH> // RH COL6
|
||||
;
|
||||
};
|
||||
@@ -1,7 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "glove80.keymap"
|
||||
@@ -1,89 +0,0 @@
|
||||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
CONFIG_SOC_SERIES_NRF52X=y
|
||||
CONFIG_SOC_NRF52840_QIAA=y
|
||||
CONFIG_BOARD_GLOVE80_RH=y
|
||||
|
||||
# Enable both USB and BLE
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# Keyboard IDs
|
||||
CONFIG_ZMK_KEYBOARD_NAME="Glove80 Right"
|
||||
CONFIG_USB_DEVICE_PID=0x27d9
|
||||
CONFIG_USB_DEVICE_VID=0x16c0
|
||||
CONFIG_USB_DEVICE_MANUFACTURER="MoErgo"
|
||||
CONFIG_USB_DEVICE_SN="moergo.com:GLV80-0123456789ABCDEF"
|
||||
|
||||
CONFIG_BT_DIS_PNP_PID=0x27d9
|
||||
CONFIG_BT_DIS_PNP_VID=0x16c0
|
||||
CONFIG_BT_DIS_MANUF="MoErgo"
|
||||
CONFIG_BT_DIS_MODEL="Glove80 Right"
|
||||
|
||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# Enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# Build configurations
|
||||
CONFIG_BUILD_OUTPUT_UF2=y
|
||||
CONFIG_BUILD_OUTPUT_UF2_FAMILY_ID="0x9808B007"
|
||||
CONFIG_USE_DT_CODE_PARTITION=y
|
||||
|
||||
# Flash configuration
|
||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||
CONFIG_NVS=y
|
||||
CONFIG_SETTINGS_NVS=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
# Enable 32kHz crystal
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
|
||||
# Enable RGB underglow
|
||||
CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_BRT_STEP=4
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_BRT_MIN=4
|
||||
|
||||
# DO NOT CHANGE CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX TO ABOVE 80. Configuring
|
||||
# BRT_MAX above 80% will draw additional current and can potentially damage your
|
||||
# computer. WARRANTY IS VOID IF BRT_MAX SET ABOVE 80.
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX=80
|
||||
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=285
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_SAT_START=75
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=16
|
||||
|
||||
# The power LED is implemented as a backlight
|
||||
# For now, the power LED is acting as a "USB connected" indicator
|
||||
CONFIG_ZMK_BACKLIGHT=y
|
||||
CONFIG_ZMK_BACKLIGHT_ON_START=y
|
||||
CONFIG_ZMK_BACKLIGHT_BRT_START=5
|
||||
CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y
|
||||
CONFIG_ZMK_BACKLIGHT_AUTO_OFF_USB=y
|
||||
|
||||
# The full two-byte consumer report space has compatibility issues with some
|
||||
# operating systems, most notably macOS. Use the more basic single-byte usage
|
||||
# space.
|
||||
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
|
||||
|
||||
# Turn on debugging to disable optimization. Debug messages can result in larger
|
||||
# stacks, so enable stack protection and particularly a larger BLE peripheral stack.
|
||||
# CONFIG_DEBUG=y
|
||||
# CONFIG_DEBUG_THREAD_INFO=y
|
||||
# CONFIG_EXCEPTION_STACK_TRACE=y
|
||||
# CONFIG_HW_STACK_PROTECTION=y
|
||||
# CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE=1300
|
||||
|
||||
# Log via USB or Segger RTT
|
||||
CONFIG_ZMK_USB_LOGGING=n
|
||||
CONFIG_ZMK_RTT_LOGGING=n
|
||||
@@ -1,13 +0,0 @@
|
||||
## MoErgo Glove80
|
||||
|
||||
This board definition provides ZMK support for the [MoErgo Glove80](https://www.moergo.com)
|
||||
keyboard.
|
||||
|
||||
MoErgo additionally offers a customized version of ZMK which adds additional functionality such as
|
||||
RGB status indicators, available on GitHub at [moergo-sc/zmk](https://github.com/moergo-sc/zmk). The
|
||||
MoErgo customized ZMK fork is regularly updated to include the latest changes from mainline ZMK, but
|
||||
will not always be completely up-to-date. MoErgo also offers an online layout configurator and
|
||||
firmware builder application using the customized fork at [my.glove80.com](https://my.glove80.com).
|
||||
|
||||
While mainline ZMK is expected to work well with Glove80, MoErgo only provides support for use of
|
||||
their customized fork. Likewise, the ZMK community cannot directly provide support for MoErgo's fork.
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <zephyr/usb/usb_device.h>
|
||||
#include <zephyr/drivers/hwinfo.h>
|
||||
#include "usb_descriptor.h"
|
||||
|
||||
#define LOG_LEVEL CONFIG_USB_DEVICE_LOG_LEVEL
|
||||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_DECLARE(usb_descriptor);
|
||||
|
||||
int base16_encode(const uint8_t *data, int length, uint8_t *result, int bufSize);
|
||||
|
||||
uint8_t *usb_update_sn_string_descriptor(void) {
|
||||
/*
|
||||
* nrf52840 hwinfo returns a 64-bit hardware id. Glove80 uses this as a
|
||||
* serial number, encoded as base16 into the last 16 characters of the
|
||||
* CONFIG_USB_DEVICE_SN template. If insufficient template space is
|
||||
* available, instead return the static serial number string.
|
||||
*/
|
||||
const uint8_t template_len = sizeof(CONFIG_USB_DEVICE_SN);
|
||||
const uint8_t sn_len = 16;
|
||||
|
||||
if (template_len < sn_len + 1) {
|
||||
LOG_DBG("Serial number template too short");
|
||||
return CONFIG_USB_DEVICE_SN;
|
||||
}
|
||||
|
||||
static uint8_t serial[sizeof(CONFIG_USB_DEVICE_SN)];
|
||||
strncpy(serial, CONFIG_USB_DEVICE_SN, template_len);
|
||||
|
||||
uint8_t hwid[8];
|
||||
memset(hwid, 0, sizeof(hwid));
|
||||
uint8_t hwlen = hwinfo_get_device_id(hwid, sizeof(hwid));
|
||||
|
||||
if (hwlen > 0) {
|
||||
const uint8_t offset = template_len - sn_len - 1;
|
||||
LOG_HEXDUMP_DBG(&hwid, sn_len, "Serial Number");
|
||||
base16_encode(hwid, hwlen, serial + offset, sn_len + 1);
|
||||
}
|
||||
|
||||
return serial;
|
||||
}
|
||||
|
||||
int base16_encode(const uint8_t *data, int length, uint8_t *result, int bufSize) {
|
||||
const char hex[] = "0123456789ABCDEF";
|
||||
|
||||
int i = 0;
|
||||
while (i < bufSize && i < length * 2) {
|
||||
uint8_t nibble;
|
||||
if (i % 2 == 0) {
|
||||
nibble = data[i / 2] >> 4;
|
||||
} else {
|
||||
nibble = data[i / 2] & 0xF;
|
||||
}
|
||||
result[i] = hex[nibble];
|
||||
++i;
|
||||
}
|
||||
if (i < bufSize) {
|
||||
result[i] = '\0';
|
||||
}
|
||||
return i;
|
||||
}
|
||||
@@ -9,4 +9,7 @@ config ZMK_KEYBOARD_NAME
|
||||
config RP2_FLASH_W25Q080
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_KBDFANS_TOFU65_V2
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
zephyr,shell-uart = &cdc_acm_uart;
|
||||
zephyr,code-partition = &code_partition;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
};
|
||||
|
||||
xtal_clk: xtal-clk {
|
||||
@@ -53,6 +53,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,8) RC(4,9)
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
@@ -92,6 +93,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,8) RC(4,9)
|
||||
|
||||
/* Reserved memory for the second stage bootloader */
|
||||
second_stage_bootloader: partition@0 {
|
||||
label = "second_stage_bootloader";
|
||||
reg = <0x00000000 0x100>;
|
||||
read-only;
|
||||
};
|
||||
@@ -101,6 +103,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,8) RC(4,9)
|
||||
* size is 16MB minus the 0x100 bytes taken by the bootloader.
|
||||
*/
|
||||
code_partition: partition@100 {
|
||||
label = "code";
|
||||
reg = <0x100 (DT_SIZE_M(16) - 0x100)>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@@ -18,5 +18,3 @@ CONFIG_USE_DT_CODE_PARTITION=y
|
||||
|
||||
# Output UF2 by default, native bootloader supports it.
|
||||
CONFIG_BUILD_OUTPUT_UF2=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
@@ -21,6 +21,12 @@ endif # USB
|
||||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
config PINMUX
|
||||
default y
|
||||
|
||||
|
||||
@@ -25,18 +25,20 @@
|
||||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 15 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";
|
||||
label = "EXT_POWER";
|
||||
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
|
||||
init-delay-ms = <50>;
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "BATTERY";
|
||||
io-channels = <&adc 1>;
|
||||
output-ohms = <10000000>;
|
||||
full-ohms = <(10000000 + 4000000)>;
|
||||
@@ -78,6 +80,7 @@
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -93,9 +96,11 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
sd_partition: partition@0 {
|
||||
label = "softdevice";
|
||||
reg = <0x00000000 0x00026000>;
|
||||
};
|
||||
code_partition: partition@26000 {
|
||||
label = "code_partition";
|
||||
reg = <0x00026000 0x000c6000>;
|
||||
};
|
||||
|
||||
@@ -109,10 +114,12 @@
|
||||
* if enabled.
|
||||
*/
|
||||
storage_partition: partition@ec000 {
|
||||
label = "storage";
|
||||
reg = <0x000ec000 0x00008000>;
|
||||
};
|
||||
|
||||
boot_partition: partition@f4000 {
|
||||
label = "adafruit_boot";
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -21,6 +21,3 @@ CONFIG_SETTINGS_NVS=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
@@ -16,4 +16,10 @@ endif # USB_DEVICE_STACK
|
||||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_NICE60
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,battery = &vbatt;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,underglow = &led_strip;
|
||||
};
|
||||
|
||||
@@ -42,6 +42,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
@@ -73,17 +74,19 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R
|
||||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 26 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";
|
||||
label = "EXT_POWER";
|
||||
control-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "BATTERY";
|
||||
io-channels = <&adc 2>;
|
||||
output-ohms = <2000000>;
|
||||
full-ohms = <(2000000 + 806000)>;
|
||||
@@ -115,6 +118,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R
|
||||
|
||||
led_strip: ws2812@0 {
|
||||
compatible = "worldsemi,ws2812-spi";
|
||||
label = "WS2812";
|
||||
|
||||
/* SPI */
|
||||
reg = <0>; /* ignored, but necessary for SPI bindings */
|
||||
@@ -132,6 +136,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -146,10 +151,12 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R
|
||||
#size-cells = <1>;
|
||||
|
||||
sd_partition: partition@0 {
|
||||
label = "mbr";
|
||||
reg = <0x00000000 0x00001000>;
|
||||
};
|
||||
|
||||
code_partition: partition@1000 {
|
||||
label = "code_partition";
|
||||
reg = <0x00001000 0x000d3000>;
|
||||
};
|
||||
|
||||
@@ -163,10 +170,12 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R
|
||||
* if enabled.
|
||||
*/
|
||||
storage_partition: partition@d4000 {
|
||||
label = "storage";
|
||||
reg = <0x000d4000 0x00020000>;
|
||||
};
|
||||
|
||||
boot_partition: partition@f4000 {
|
||||
label = "adafruit_boot";
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -28,7 +28,3 @@ CONFIG_WS2812_STRIP=y
|
||||
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=160
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
|
||||
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
@@ -16,4 +16,10 @@ endif # USB_DEVICE_STACK
|
||||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_NICE_NANO || BOARD_NICE_NANO_V2
|
||||
|
||||
@@ -12,14 +12,15 @@
|
||||
zmk,battery = &vbatt;
|
||||
};
|
||||
|
||||
// Node name must match original "EXT_POWER" label to preserve user settings.
|
||||
EXT_POWER {
|
||||
ext-power {
|
||||
compatible = "zmk,ext-power-generic";
|
||||
label = "EXT_POWER";
|
||||
control-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "BATTERY";
|
||||
io-channels = <&adc 2>;
|
||||
output-ohms = <2000000>;
|
||||
full-ohms = <(2000000 + 806000)>;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user