mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 04:55:20 -05:00
Compare commits
1 Commits
revert-200
...
docs/codes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c48bc87c8 |
@@ -1,4 +1,4 @@
|
|||||||
FROM docker.io/zmkfirmware/zmk-dev-arm:3.2
|
FROM docker.io/zmkfirmware/zmk-dev-arm:2.5
|
||||||
|
|
||||||
COPY .bashrc tmp
|
COPY .bashrc tmp
|
||||||
RUN mv /tmp/.bashrc ~/.bashrc
|
RUN mv /tmp/.bashrc ~/.bashrc
|
||||||
|
|||||||
22
.github/pull_request_template.md
vendored
22
.github/pull_request_template.md
vendored
@@ -1,15 +1,11 @@
|
|||||||
<!-- If you're adding a board/shield please fill out this check-list, otherwise you can delete it -->
|
<!-- If you're adding a board/shield please fill out this check-list, otherwise you can delete it -->
|
||||||
|
|
||||||
## Board/Shield Check-list
|
## Board/Shield Check-list
|
||||||
|
- [ ] This board/shield is tested working on real hardware
|
||||||
- [ ] This board/shield is tested working on real hardware
|
- [ ] Definitions follow the general style of other shields/boards upstream ([Reference](https://zmk.dev/docs/development/new-shield))
|
||||||
- [ ] Definitions follow the general style of other shields/boards upstream ([Reference](https://zmk.dev/docs/development/new-shield))
|
- [ ] `.zmk.yml` metadata file added
|
||||||
- [ ] `.zmk.yml` metadata file added
|
- [ ] Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
|
||||||
- [ ] Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
|
- [ ] General consistent formatting of DeviceTree files
|
||||||
- [ ] General consistent formatting of DeviceTree files
|
- [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader))
|
||||||
- [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader))
|
- [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable
|
||||||
- [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable
|
- [ ] If split, no name added for the right/peripheral half
|
||||||
- [ ] If split, no name added for the right/peripheral half
|
- [ ] `.conf` file has optional extra features commented out
|
||||||
- [ ] Kconfig.defconfig file correctly wraps _all_ configuration in conditional on the shield symbol
|
|
||||||
- [ ] `.conf` file has optional extra features commented out
|
|
||||||
- [ ] Keyboard/PCB is part of a shipped group buy or is generally available in stock to purchase (OSH/personal projects without general availability should create a zmk-config repo instead)
|
|
||||||
|
|||||||
138
.github/workflows/build-user-config.yml
vendored
138
.github/workflows/build-user-config.yml
vendored
@@ -1,138 +0,0 @@
|
|||||||
name: Reusable user config build
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
build_matrix_path:
|
|
||||||
description: "Path to the build matrix file"
|
|
||||||
default: "build.yaml"
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
config_path:
|
|
||||||
description: "Path to the config directory"
|
|
||||||
default: "config"
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
fallback_binary:
|
|
||||||
description: "Fallback binary format, if no *.uf2 file was built"
|
|
||||||
default: "bin"
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
archive_name:
|
|
||||||
description: "Archive output file name"
|
|
||||||
default: "firmware"
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
matrix:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Fetch Build Keyboards
|
|
||||||
outputs:
|
|
||||||
build_matrix: ${{ env.build_matrix }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install yaml2json
|
|
||||||
run: python3 -m pip install remarshal
|
|
||||||
|
|
||||||
- name: Fetch Build Matrix
|
|
||||||
run: |
|
|
||||||
echo "build_matrix=$(yaml2json '${{ inputs.build_matrix_path }}' | jq -c .)" >> $GITHUB_ENV
|
|
||||||
yaml2json "${{ inputs.build_matrix_path }}" | jq
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: zmkfirmware/zmk-build-arm:stable
|
|
||||||
needs: matrix
|
|
||||||
name: Build
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix: ${{ fromJson(needs.matrix.outputs.build_matrix) }}
|
|
||||||
steps:
|
|
||||||
- name: Prepare variables
|
|
||||||
shell: sh -x {0}
|
|
||||||
env:
|
|
||||||
shield: ${{ matrix.shield }}
|
|
||||||
run: |
|
|
||||||
echo "zephyr_version=${ZEPHYR_VERSION}" >> $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: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Cache west modules
|
|
||||||
uses: actions/cache@v3.0.11
|
|
||||||
continue-on-error: true
|
|
||||||
env:
|
|
||||||
cache_name: cache-zephyr-${{ env.zephyr_version }}-modules
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
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 }}-
|
|
||||||
${{ runner.os }}-build-
|
|
||||||
${{ runner.os }}-
|
|
||||||
|
|
||||||
- name: West Init
|
|
||||||
run: west init -l "${{ inputs.config_path }}"
|
|
||||||
|
|
||||||
- name: West Update
|
|
||||||
run: west update
|
|
||||||
|
|
||||||
- name: West Zephyr export
|
|
||||||
run: west zephyr-export
|
|
||||||
|
|
||||||
- name: West Build (${{ env.display_name }})
|
|
||||||
shell: sh -x {0}
|
|
||||||
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 build/zephyr/.config ]
|
|
||||||
then
|
|
||||||
grep -v -e "^#" -e "^$" build/zephyr/.config | sort
|
|
||||||
else
|
|
||||||
echo "No Kconfig output"
|
|
||||||
fi
|
|
||||||
if: ${{ !cancelled() }}
|
|
||||||
|
|
||||||
- name: ${{ env.display_name }} Devicetree file
|
|
||||||
run: |
|
|
||||||
if [ -f build/zephyr/zephyr.dts ]
|
|
||||||
then
|
|
||||||
cat build/zephyr/zephyr.dts
|
|
||||||
elif [ -f build/zephyr/zephyr.dts.pre ]
|
|
||||||
then
|
|
||||||
cat -s build/zephyr/zephyr.dts.pre
|
|
||||||
else
|
|
||||||
echo "No Devicetree output"
|
|
||||||
fi
|
|
||||||
if: ${{ !cancelled() }}
|
|
||||||
|
|
||||||
- name: Rename artifacts
|
|
||||||
shell: sh -x {0}
|
|
||||||
run: |
|
|
||||||
mkdir build/artifacts
|
|
||||||
if [ -f build/zephyr/zmk.uf2 ]
|
|
||||||
then
|
|
||||||
cp build/zephyr/zmk.uf2 "build/artifacts/${{ env.artifact_name }}.uf2"
|
|
||||||
elif [ -f build/zephyr/zmk.${{ inputs.fallback_binary }} ]
|
|
||||||
then
|
|
||||||
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: build/artifacts
|
|
||||||
464
.github/workflows/build.yml
vendored
464
.github/workflows/build.yml
vendored
@@ -9,24 +9,80 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- ".github/workflows/build.yml"
|
- ".github/workflows/build.yml"
|
||||||
- "app/**"
|
- "app/**"
|
||||||
schedule:
|
|
||||||
- cron: "22 4 * * *"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: ${{ always() }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker.io/zmkfirmware/zmk-build-arm:3.2
|
image: docker.io/zmkfirmware/zmk-build-arm:2.5
|
||||||
needs: compile-matrix
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include: ${{ fromJSON(needs.compile-matrix.outputs.include-list) }}
|
board:
|
||||||
|
- bluemicro840_v1
|
||||||
|
- nice_nano
|
||||||
|
- nice_nano_v2
|
||||||
|
- nrfmicro_13
|
||||||
|
- proton_c
|
||||||
|
shield:
|
||||||
|
- bfo9000_left
|
||||||
|
- bfo9000_right
|
||||||
|
- boardsource3x4
|
||||||
|
- corne_left
|
||||||
|
- corne_right
|
||||||
|
- cradio_left
|
||||||
|
- cradio_right
|
||||||
|
- crbn
|
||||||
|
- eek
|
||||||
|
- helix_left
|
||||||
|
- helix_right
|
||||||
|
- iris_left
|
||||||
|
- iris_right
|
||||||
|
- jian_left
|
||||||
|
- jian_right
|
||||||
|
- jorne_left
|
||||||
|
- jorne_right
|
||||||
|
- kyria_left
|
||||||
|
- kyria_right
|
||||||
|
- lily58_left
|
||||||
|
- lily58_right
|
||||||
|
- microdox_left
|
||||||
|
- microdox_right
|
||||||
|
- nibble
|
||||||
|
- qaz
|
||||||
|
- quefrency_left
|
||||||
|
- quefrency_right
|
||||||
|
- reviung41
|
||||||
|
- romac
|
||||||
|
- romac_plus
|
||||||
|
- settings_reset
|
||||||
|
- sofle_left
|
||||||
|
- sofle_right
|
||||||
|
- splitreus62_left
|
||||||
|
- splitreus62_right
|
||||||
|
- tg4x
|
||||||
|
- tidbit
|
||||||
|
cmake-args: [""]
|
||||||
|
include:
|
||||||
|
- board: bdn9_rev2
|
||||||
|
- board: dz60rgb_rev1
|
||||||
|
- board: nrf52840_m2
|
||||||
|
shield: m60
|
||||||
|
- board: planck_rev6
|
||||||
|
- board: proton_c
|
||||||
|
shield: clueboard_california
|
||||||
|
- board: nice_nano_v2
|
||||||
|
shield: kyria_left
|
||||||
|
cmake-args: -DCONFIG_ZMK_DISPLAY=y
|
||||||
|
skip-archive: true
|
||||||
|
- board: nice_nano_v2
|
||||||
|
shield: kyria_right
|
||||||
|
cmake-args: -DCONFIG_ZMK_DISPLAY=y
|
||||||
|
skip-archive: true
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
- name: Cache west modules
|
- name: Cache west modules
|
||||||
uses: actions/cache@v3.0.2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: cache-zephyr-modules
|
cache-name: cache-zephyr-modules
|
||||||
with:
|
with:
|
||||||
@@ -35,11 +91,11 @@ jobs:
|
|||||||
tools/
|
tools/
|
||||||
zephyr/
|
zephyr/
|
||||||
bootloader/
|
bootloader/
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
|
key: 4-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
4-${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
${{ runner.os }}-build-
|
4-${{ runner.os }}-build-
|
||||||
${{ runner.os }}-
|
4-${{ runner.os }}-
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Initialize workspace (west init)
|
- name: Initialize workspace (west init)
|
||||||
@@ -48,363 +104,29 @@ jobs:
|
|||||||
run: west update
|
run: west update
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Use Node.js
|
- name: Prepare variables
|
||||||
uses: actions/setup-node@v2
|
id: variables
|
||||||
|
run: |
|
||||||
|
SHIELD_ARG=
|
||||||
|
ARTIFACT_NAME="${{ matrix.board }}"
|
||||||
|
|
||||||
|
if [ -n "${{ matrix.shield }}" ]; then
|
||||||
|
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
|
||||||
|
ARTIFACT_NAME="${ARTIFACT_NAME}-${{ matrix.shield }}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ARTIFACT_NAME="${ARTIFACT_NAME}-zmk"
|
||||||
|
|
||||||
|
echo ::set-output name=shield-arg::${SHIELD_ARG}
|
||||||
|
echo ::set-output name=artifact-name::${ARTIFACT_NAME}
|
||||||
|
- name: Build (west build)
|
||||||
|
run: west build -s app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} ${{ matrix.cmake-args }}
|
||||||
|
- name: Archive artifacts
|
||||||
|
if: ${{ !matrix.skip-archive }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
node-version: "14.x"
|
name: "${{ steps.variables.outputs.artifact-name }}"
|
||||||
- name: Install @actions/artifact
|
path: |
|
||||||
run: npm install @actions/artifact
|
build/zephyr/zmk.hex
|
||||||
- name: Build and upload artifacts
|
build/zephyr/zmk.uf2
|
||||||
uses: actions/github-script@v4
|
continue-on-error: true
|
||||||
id: boards-list
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
const artifact = require('@actions/artifact');
|
|
||||||
const artifactClient = artifact.create();
|
|
||||||
|
|
||||||
const execSync = require('child_process').execSync;
|
|
||||||
|
|
||||||
const buildShieldArgs = JSON.parse(`${{ matrix.shieldArgs }}`);
|
|
||||||
|
|
||||||
let error = false;
|
|
||||||
|
|
||||||
for (const shieldArgs of buildShieldArgs) {
|
|
||||||
try {
|
|
||||||
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());
|
|
||||||
|
|
||||||
const fileExtensions = ["hex", "uf2"];
|
|
||||||
|
|
||||||
const files = fileExtensions
|
|
||||||
.map(extension => "build/zephyr/zmk." + extension)
|
|
||||||
.filter(path => fs.existsSync(path));
|
|
||||||
|
|
||||||
const rootDirectory = 'build/zephyr';
|
|
||||||
const options = {
|
|
||||||
continueOnError: true
|
|
||||||
}
|
|
||||||
|
|
||||||
const cmakeName = shieldArgs['cmake-args'] ? '-' + (shieldArgs.nickname || shieldArgs['cmake-args'].split(' ').join('')) : '';
|
|
||||||
const artifactName = `${{ matrix.board }}${shieldArgs.shield ? '-' + shieldArgs.shield : ''}${cmakeName}-zmk`;
|
|
||||||
|
|
||||||
await artifactClient.uploadArtifact(artifactName, files, rootDirectory, options);
|
|
||||||
} catch (e) {
|
|
||||||
console.error(`::error::Failed to build or upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
|
|
||||||
console.error(e);
|
|
||||||
error = true;
|
|
||||||
} finally {
|
|
||||||
console.log('::endgroup::');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error) {
|
|
||||||
throw new Error('Failed to build one or more configurations');
|
|
||||||
}
|
|
||||||
compile-matrix:
|
|
||||||
if: ${{ always() }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [core-coverage, board-changes, nightly]
|
|
||||||
outputs:
|
|
||||||
include-list: ${{ steps.compile-list.outputs.result }}
|
|
||||||
steps:
|
|
||||||
- name: Join build lists
|
|
||||||
uses: actions/github-script@v4
|
|
||||||
id: compile-list
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const coreCoverage = `${{ needs.core-coverage.outputs.core-include }}` || "[]";
|
|
||||||
const boardChanges = `${{ needs.board-changes.outputs.boards-include }}` || "[]";
|
|
||||||
const nightly = `${{ needs.nightly.outputs.nightly-include }}` || "[]";
|
|
||||||
|
|
||||||
const combined = [
|
|
||||||
...JSON.parse(coreCoverage),
|
|
||||||
...JSON.parse(boardChanges),
|
|
||||||
...JSON.parse(nightly)
|
|
||||||
];
|
|
||||||
const combinedUnique = [...new Map(combined.map(el => [JSON.stringify(el), el])).values()];
|
|
||||||
|
|
||||||
const perBoard = {};
|
|
||||||
|
|
||||||
for (const configuration of combinedUnique) {
|
|
||||||
if (!perBoard[configuration.board])
|
|
||||||
perBoard[configuration.board] = [];
|
|
||||||
|
|
||||||
perBoard[configuration.board].push({
|
|
||||||
shield: configuration.shield,
|
|
||||||
'cmake-args': configuration['cmake-args'],
|
|
||||||
nickname: configuration.nickname
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
return Object.entries(perBoard).map(([board, shieldArgs]) => ({
|
|
||||||
board,
|
|
||||||
shieldArgs: JSON.stringify(shieldArgs),
|
|
||||||
}));
|
|
||||||
core-coverage:
|
|
||||||
if: ${{ needs.get-changed-files.outputs.core-changes == 'true' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: get-changed-files
|
|
||||||
outputs:
|
|
||||||
core-include: ${{ steps.core-list.outputs.result }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Use Node.js
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: "14.x"
|
|
||||||
- name: Install js-yaml
|
|
||||||
run: npm install js-yaml
|
|
||||||
- uses: actions/github-script@v4
|
|
||||||
id: core-list
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
const yaml = require('js-yaml');
|
|
||||||
|
|
||||||
const coreCoverage = yaml.load(fs.readFileSync('app/core-coverage.yml', 'utf8'));
|
|
||||||
|
|
||||||
let include = coreCoverage.board.flatMap(board =>
|
|
||||||
coreCoverage.shield.map(shield => ({ board, shield }))
|
|
||||||
);
|
|
||||||
|
|
||||||
return [...include, ...coreCoverage.include];
|
|
||||||
board-changes:
|
|
||||||
if: ${{ needs.get-changed-files.outputs.board-changes == 'true' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [get-grouped-hardware, get-changed-files]
|
|
||||||
outputs:
|
|
||||||
boards-include: ${{ steps.boards-list.outputs.result }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Use Node.js
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: "14.x"
|
|
||||||
- name: Install js-yaml
|
|
||||||
run: npm install js-yaml
|
|
||||||
- uses: actions/github-script@v4
|
|
||||||
id: boards-list
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
const yaml = require('js-yaml');
|
|
||||||
|
|
||||||
const changedFiles = JSON.parse(`${{ needs.get-changed-files.outputs.changed-files }}`);
|
|
||||||
const metadata = JSON.parse(`${{ needs.get-grouped-hardware.outputs.organized-metadata }}`);
|
|
||||||
const boardChanges = new Set(changedFiles.filter(f => f.startsWith('app/boards')).map(f => f.split('/').slice(0, 4).join('/')));
|
|
||||||
|
|
||||||
return (await Promise.all([...boardChanges].flatMap(async bc => {
|
|
||||||
const globber = await glob.create(bc + "/*.zmk.yml");
|
|
||||||
const files = await globber.glob();
|
|
||||||
|
|
||||||
const aggregated = files.flatMap((f) =>
|
|
||||||
yaml.loadAll(fs.readFileSync(f, "utf8"))
|
|
||||||
);
|
|
||||||
|
|
||||||
const boardAndShield = (b, s) => {
|
|
||||||
if (s.siblings) {
|
|
||||||
return s.siblings.map(shield => ({
|
|
||||||
board: b.id,
|
|
||||||
shield,
|
|
||||||
}));
|
|
||||||
} else {
|
|
||||||
return {
|
|
||||||
board: b.id,
|
|
||||||
shield: s.id
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return aggregated.flatMap(hm => {
|
|
||||||
switch (hm.type) {
|
|
||||||
case "board":
|
|
||||||
if (hm.features && hm.features.includes("keys")) {
|
|
||||||
if (hm.siblings) {
|
|
||||||
return hm.siblings.map(board => ({
|
|
||||||
board,
|
|
||||||
}));
|
|
||||||
} else {
|
|
||||||
return {
|
|
||||||
board: hm.id
|
|
||||||
};
|
|
||||||
}
|
|
||||||
} else if (hm.exposes) {
|
|
||||||
return hm.exposes.flatMap(i =>
|
|
||||||
metadata.interconnects[i].shields.flatMap(s => boardAndShield(hm, s))
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
console.error("Board without keys or interconnect");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "shield":
|
|
||||||
if (hm.features && hm.features.includes("keys")) {
|
|
||||||
return hm.requires.flatMap(i =>
|
|
||||||
metadata.interconnects[i].boards.flatMap(b => boardAndShield(b, hm))
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
console.warn("Unhandled shield without keys");
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "interconnect":
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}))).flat();
|
|
||||||
nightly:
|
|
||||||
if: ${{ github.event_name == 'schedule' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: get-grouped-hardware
|
|
||||||
outputs:
|
|
||||||
nightly-include: ${{ steps.nightly-list.outputs.result }}
|
|
||||||
steps:
|
|
||||||
- name: Create nightly list
|
|
||||||
uses: actions/github-script@v4
|
|
||||||
id: nightly-list
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const metadata = JSON.parse(`${{ needs.get-grouped-hardware.outputs.organized-metadata }}`);
|
|
||||||
|
|
||||||
let includeOnboard = metadata.onboard.flatMap(b => {
|
|
||||||
if (b.siblings) {
|
|
||||||
return b.siblings.map(board => ({
|
|
||||||
board,
|
|
||||||
}));
|
|
||||||
} else {
|
|
||||||
return {
|
|
||||||
board: b.id,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
let includeInterconnect = Object.values(metadata.interconnects).flatMap(i =>
|
|
||||||
i.boards.flatMap(b =>
|
|
||||||
i.shields.flatMap(s => {
|
|
||||||
if (s.siblings) {
|
|
||||||
return s.siblings.map(shield => ({
|
|
||||||
board: b.id,
|
|
||||||
shield,
|
|
||||||
}));
|
|
||||||
} else {
|
|
||||||
return {
|
|
||||||
board: b.id,
|
|
||||||
shield: s.id,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
return [...includeOnboard, ...includeInterconnect];
|
|
||||||
get-grouped-hardware:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
organized-metadata: ${{ steps.organize-metadata.outputs.result }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Use Node.js
|
|
||||||
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@v4
|
|
||||||
id: aggregate-metadata
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
const yaml = require('js-yaml');
|
|
||||||
|
|
||||||
const globber = await glob.create("app/boards/**/*.zmk.yml");
|
|
||||||
const files = await globber.glob();
|
|
||||||
|
|
||||||
const aggregated = files.flatMap((f) =>
|
|
||||||
yaml.loadAll(fs.readFileSync(f, "utf8"))
|
|
||||||
);
|
|
||||||
|
|
||||||
return JSON.stringify(aggregated).replace(/\\/g,"\\\\").replace(/`/g,"\\`");
|
|
||||||
result-encoding: string
|
|
||||||
|
|
||||||
- name: Organize Metadata
|
|
||||||
uses: actions/github-script@v4
|
|
||||||
id: organize-metadata
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const hardware = JSON.parse(`${{ steps.aggregate-metadata.outputs.result }}`);
|
|
||||||
|
|
||||||
const grouped = hardware.reduce((agg, hm) => {
|
|
||||||
switch (hm.type) {
|
|
||||||
case "board":
|
|
||||||
if (hm.features && hm.features.includes("keys")) {
|
|
||||||
agg.onboard.push(hm);
|
|
||||||
} else if (hm.exposes) {
|
|
||||||
hm.exposes.forEach((element) => {
|
|
||||||
let ic = agg.interconnects[element] || {
|
|
||||||
boards: [],
|
|
||||||
shields: [],
|
|
||||||
};
|
|
||||||
ic.boards.push(hm);
|
|
||||||
agg.interconnects[element] = ic;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
console.error("Board without keys or interconnect");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "shield":
|
|
||||||
if (hm.features && hm.features.includes("keys")) {
|
|
||||||
hm.requires.forEach((id) => {
|
|
||||||
let ic = agg.interconnects[id] || { boards: [], shields: [] };
|
|
||||||
ic.shields.push(hm);
|
|
||||||
agg.interconnects[id] = ic;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "interconnect":
|
|
||||||
let ic = agg.interconnects[hm.id] || { boards: [], shields: [] };
|
|
||||||
ic.interconnect = hm;
|
|
||||||
agg.interconnects[hm.id] = ic;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return agg;
|
|
||||||
},
|
|
||||||
{ onboard: [], interconnects: {} });
|
|
||||||
|
|
||||||
return JSON.stringify(grouped).replace(/\\/g,"\\\\").replace(/`/g,"\\`");
|
|
||||||
result-encoding: string
|
|
||||||
get-changed-files:
|
|
||||||
if: ${{ github.event_name != 'schedule' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
changed-files: ${{ steps.changed-files.outputs.all }}
|
|
||||||
board-changes: ${{ steps.board-changes.outputs.result }}
|
|
||||||
core-changes: ${{ steps.core-changes.outputs.result }}
|
|
||||||
steps:
|
|
||||||
- uses: Ana06/get-changed-files@v2.0.0
|
|
||||||
id: changed-files
|
|
||||||
with:
|
|
||||||
format: "json"
|
|
||||||
- uses: actions/github-script@v4
|
|
||||||
id: board-changes
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
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@v4
|
|
||||||
id: core-changes
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
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');
|
|
||||||
return boardChanges.length < appChanges.length || ymlChanges ? 'true' : 'false';
|
|
||||||
result-encoding: string
|
|
||||||
|
|||||||
29
.github/workflows/clang-format-lint.yml
vendored
Normal file
29
.github/workflows/clang-format-lint.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
name: Clang Format
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- ".github/workflows/clang-format-lint.yml"
|
||||||
|
- "app/boards/**/*.c"
|
||||||
|
- "app/include/**/*.h"
|
||||||
|
- "app/src/**"
|
||||||
|
- "app/drivers/**/*.c"
|
||||||
|
- "app/drivers/**/*.h"
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- ".github/workflows/clang-format-lint.yml"
|
||||||
|
- "app/boards/**/*.c"
|
||||||
|
- "app/include/**/*.h"
|
||||||
|
- "app/src/**"
|
||||||
|
- "app/drivers/**/*.c"
|
||||||
|
- "app/drivers/**/*.h"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: DoozyX/clang-format-lint-action@v0.13
|
||||||
|
with:
|
||||||
|
source: "./app"
|
||||||
|
extensions: "h,c"
|
||||||
14
.github/workflows/doc-checks.yml
vendored
14
.github/workflows/doc-checks.yml
vendored
@@ -14,17 +14,27 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- uses: bahmutov/npm-install@v1
|
- uses: bahmutov/npm-install@v1
|
||||||
with:
|
with:
|
||||||
working-directory: docs
|
working-directory: docs
|
||||||
- name: ESLint
|
- name: ESLint
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
working-directory: docs
|
working-directory: docs
|
||||||
|
prettier:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: bahmutov/npm-install@v1
|
||||||
|
with:
|
||||||
|
working-directory: docs
|
||||||
|
- name: Prettier check
|
||||||
|
run: npm run prettier:check
|
||||||
|
working-directory: docs
|
||||||
typecheck:
|
typecheck:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- uses: bahmutov/npm-install@v1
|
- uses: bahmutov/npm-install@v1
|
||||||
with:
|
with:
|
||||||
working-directory: docs
|
working-directory: docs
|
||||||
|
|||||||
@@ -15,12 +15,23 @@ on:
|
|||||||
- "app/scripts/west_commands/metadata.py"
|
- "app/scripts/west_commands/metadata.py"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check-metadata-format:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: bahmutov/npm-install@v1
|
||||||
|
with:
|
||||||
|
working-directory: app
|
||||||
|
- name: Prettier Check
|
||||||
|
run: npm run prettier:check
|
||||||
|
working-directory: app
|
||||||
validate-metadata:
|
validate-metadata:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker.io/zmkfirmware/zmk-dev-arm:3.2
|
image: docker.io/zmkfirmware/zmk-dev-arm:2.5
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install -r app/scripts/requirements.txt
|
run: pip install -r app/scripts/requirements.txt
|
||||||
- name: West init
|
- name: West init
|
||||||
|
|||||||
15
.github/workflows/pre-commit.yml
vendored
15
.github/workflows/pre-commit.yml
vendored
@@ -1,15 +0,0 @@
|
|||||||
name: pre-commit
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pre-commit:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
- uses: pre-commit/action@v3.0.0
|
|
||||||
38
.github/workflows/test.yml
vendored
38
.github/workflows/test.yml
vendored
@@ -13,32 +13,15 @@ on:
|
|||||||
- "app/src/**"
|
- "app/src/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
collect-tests:
|
integration_test:
|
||||||
outputs:
|
|
||||||
test-dirs: ${{ steps.test-dirs.outputs.test-dirs }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Find test directories
|
|
||||||
id: test-dirs
|
|
||||||
run: |
|
|
||||||
cd app/tests/
|
|
||||||
export TESTS=$(ls -d * | jq -R -s -c 'split("\n")[:-1]')
|
|
||||||
echo "::set-output name=test-dirs::${TESTS}"
|
|
||||||
run-tests:
|
|
||||||
needs: collect-tests
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker.io/zmkfirmware/zmk-build-arm:3.2
|
image: docker.io/zmkfirmware/zmk-build-arm:2.5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
- name: Cache west modules
|
- name: Cache west modules
|
||||||
uses: actions/cache@v3.0.2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: cache-zephyr-modules
|
cache-name: cache-zephyr-modules
|
||||||
with:
|
with:
|
||||||
@@ -47,11 +30,11 @@ jobs:
|
|||||||
tools/
|
tools/
|
||||||
zephyr/
|
zephyr/
|
||||||
bootloader/
|
bootloader/
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
|
key: 4-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
4-${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
${{ runner.os }}-build-
|
4-${{ runner.os }}-build-
|
||||||
${{ runner.os }}-
|
4-${{ runner.os }}-
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Initialize workspace (west init)
|
- name: Initialize workspace (west init)
|
||||||
@@ -60,9 +43,8 @@ jobs:
|
|||||||
run: west update
|
run: west update
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Test ${{ matrix.test }}
|
- name: Test all
|
||||||
working-directory: app
|
run: west test
|
||||||
run: west test tests/${{ matrix.test }}
|
|
||||||
- name: Archive artifacts
|
- name: Archive artifacts
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
|||||||
@@ -1,28 +1,12 @@
|
|||||||
fail_fast: false
|
fail_fast: false
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
|
||||||
rev: v1.5.1
|
|
||||||
hooks:
|
|
||||||
- id: remove-tabs
|
|
||||||
exclude: "vendor-prefixes\\.txt$"
|
|
||||||
- repo: https://github.com/pocc/pre-commit-hooks
|
- repo: https://github.com/pocc/pre-commit-hooks
|
||||||
rev: v1.3.5
|
rev: v1.1.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: clang-format
|
- id: clang-format
|
||||||
args:
|
args:
|
||||||
- -i
|
- -i
|
||||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||||
rev: v2.7.1
|
rev: v2.2.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: prettier
|
- id: prettier
|
||||||
# Workaround for https://github.com/pre-commit/mirrors-prettier/issues/29
|
|
||||||
additional_dependencies:
|
|
||||||
- prettier@2.8.7
|
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
||||||
rev: v4.4.0
|
|
||||||
hooks:
|
|
||||||
- id: trailing-whitespace
|
|
||||||
- id: check-yaml
|
|
||||||
- id: check-added-large-files
|
|
||||||
- id: check-shebang-scripts-are-executable
|
|
||||||
exclude: "\\.mustache$"
|
|
||||||
|
|||||||
9
.vscode/extensions.json
vendored
9
.vscode/extensions.json
vendored
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"recommendations": [
|
|
||||||
"esbenp.prettier-vscode",
|
|
||||||
"ms-python.python",
|
|
||||||
"ms-vscode.cpptools",
|
|
||||||
"plorefice.devicetree",
|
|
||||||
"twxs.cmake"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
16
.vscode/settings.json
vendored
16
.vscode/settings.json
vendored
@@ -2,21 +2,5 @@
|
|||||||
"files.associations": {
|
"files.associations": {
|
||||||
"*.overlay": "dts",
|
"*.overlay": "dts",
|
||||||
"*.keymap": "dts"
|
"*.keymap": "dts"
|
||||||
},
|
|
||||||
"python.formatting.provider": "black",
|
|
||||||
"[c]": {
|
|
||||||
"editor.formatOnSave": true
|
|
||||||
},
|
|
||||||
"[javascript][javascriptreact][typescript][typescriptreact]": {
|
|
||||||
"editor.formatOnSave": true,
|
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
||||||
},
|
|
||||||
"[python]": {
|
|
||||||
"editor.formatOnSave": true,
|
|
||||||
"editor.defaultFormatter": "ms-python.python"
|
|
||||||
},
|
|
||||||
"[css][json][jsonc][html][markdown][yaml]": {
|
|
||||||
"editor.formatOnSave": true,
|
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,10 +4,10 @@
|
|||||||
[](https://github.com/zmkfirmware/zmk/actions)
|
[](https://github.com/zmkfirmware/zmk/actions)
|
||||||
[](CODE_OF_CONDUCT.md)
|
[](CODE_OF_CONDUCT.md)
|
||||||
|
|
||||||
[ZMK Firmware](https://zmk.dev/) is an open source ([MIT](LICENSE)) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues.
|
[ZMK Firmware](https://zmk.dev/) is an open source (MIT) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues.
|
||||||
|
|
||||||
Check out the website to learn more: https://zmk.dev/.
|
Check out the website to learn more: https://zmk.dev/
|
||||||
|
|
||||||
You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite).
|
You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite)
|
||||||
|
|
||||||
To review features, check out the [feature overview](https://zmk.dev/docs/). ZMK is under active development, and new features are listed with the [enhancement label](https://github.com/zmkfirmware/zmk/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature.
|
To review features, check out the [feature overview](https://zmk.dev/docs/). ZMK is under active development, and new features are listed with the [enhancement label](https://github.com/zmkfirmware/zmk/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature.
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
cmake_minimum_required(VERSION 3.13.1)
|
cmake_minimum_required(VERSION 3.13.1)
|
||||||
|
|
||||||
set(CONFIG_APPLICATION_DEFINED_SYSCALL true)
|
set(CONFIG_APPLICATION_DEFINED_SYSCALL true)
|
||||||
|
list(APPEND BOARD_ROOT ${CMAKE_SOURCE_DIR})
|
||||||
|
list(APPEND DTS_ROOT ${CMAKE_SOURCE_DIR})
|
||||||
|
|
||||||
# Add our custom Zephyr module for drivers w/ syscalls, etc.
|
# Add our custom Zephyr module for drivers w/ syscalls, etc.
|
||||||
list(APPEND DTS_ROOT ${CMAKE_SOURCE_DIR}/drivers/zephyr)
|
list(APPEND DTS_ROOT ${CMAKE_SOURCE_DIR}/drivers/zephyr)
|
||||||
|
|
||||||
set(ZephyrBuildConfiguration_ROOT ${CMAKE_SOURCE_DIR}/cmake)
|
|
||||||
|
|
||||||
list(APPEND ZEPHYR_EXTRA_MODULES
|
list(APPEND ZEPHYR_EXTRA_MODULES
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/module
|
${CMAKE_CURRENT_SOURCE_DIR}/drivers
|
||||||
)
|
)
|
||||||
|
|
||||||
|
include(cmake/zmk_config.cmake)
|
||||||
|
|
||||||
# Find Zephyr. This also loads Zephyr's build system.
|
# Find Zephyr. This also loads Zephyr's build system.
|
||||||
find_package(Zephyr REQUIRED HINTS ../zephyr)
|
find_package(Zephyr REQUIRED HINTS ../zephyr)
|
||||||
project(zmk)
|
project(zmk)
|
||||||
@@ -20,30 +22,32 @@ zephyr_linker_sources(RODATA include/linker/zmk-events.ld)
|
|||||||
# Add your source file to the "app" target. This must come after
|
# Add your source file to the "app" target. This must come after
|
||||||
# find_package(Zephyr) which defines the target.
|
# find_package(Zephyr) which defines the target.
|
||||||
target_include_directories(app PRIVATE include)
|
target_include_directories(app PRIVATE include)
|
||||||
target_sources(app PRIVATE src/stdlib.c)
|
target_sources_ifdef(CONFIG_ZMK_SLEEP app PRIVATE src/power.c)
|
||||||
target_sources(app PRIVATE src/activity.c)
|
target_sources(app PRIVATE src/activity.c)
|
||||||
target_sources(app PRIVATE src/kscan.c)
|
target_sources(app PRIVATE src/kscan.c)
|
||||||
target_sources(app PRIVATE src/matrix_transform.c)
|
target_sources(app PRIVATE src/matrix_transform.c)
|
||||||
|
target_sources(app PRIVATE src/hid.c)
|
||||||
target_sources(app PRIVATE src/sensors.c)
|
target_sources(app PRIVATE src/sensors.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/wpm.c)
|
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/wpm.c)
|
||||||
target_sources(app PRIVATE src/event_manager.c)
|
target_sources(app PRIVATE src/event_manager.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/ext_power_generic.c)
|
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/ext_power_generic.c)
|
||||||
target_sources(app PRIVATE src/events/activity_state_changed.c)
|
target_sources(app PRIVATE src/events/activity_state_changed.c)
|
||||||
target_sources(app PRIVATE src/events/position_state_changed.c)
|
target_sources(app PRIVATE src/events/position_state_changed.c)
|
||||||
|
target_sources(app PRIVATE src/events/layer_state_changed.c)
|
||||||
|
target_sources(app PRIVATE src/events/keycode_state_changed.c)
|
||||||
|
target_sources(app PRIVATE src/events/modifiers_state_changed.c)
|
||||||
|
target_sources(app PRIVATE src/events/endpoint_selection_changed.c)
|
||||||
target_sources(app PRIVATE src/events/sensor_event.c)
|
target_sources(app PRIVATE src/events/sensor_event.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c)
|
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c)
|
||||||
target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/events/usb_conn_state_changed.c)
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/ble_active_profile_changed.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_reset.c)
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/battery_state_changed.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c)
|
target_sources_ifdef(CONFIG_USB app PRIVATE src/events/usb_conn_state_changed.c)
|
||||||
if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
|
||||||
target_sources(app PRIVATE src/hid.c)
|
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_key_press.c)
|
target_sources(app PRIVATE src/behaviors/behavior_key_press.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_KEY_TOGGLE app PRIVATE src/behaviors/behavior_key_toggle.c)
|
target_sources(app PRIVATE src/behaviors/behavior_reset.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c)
|
target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_sticky_key.c)
|
target_sources(app PRIVATE src/behaviors/behavior_sticky_key.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_caps_word.c)
|
target_sources(app PRIVATE src/behaviors/behavior_caps_word.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_key_repeat.c)
|
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_MACRO app PRIVATE src/behaviors/behavior_macro.c)
|
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_momentary_layer.c)
|
target_sources(app PRIVATE src/behaviors/behavior_momentary_layer.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_mod_morph.c)
|
target_sources(app PRIVATE src/behaviors/behavior_mod_morph.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_outputs.c)
|
target_sources(app PRIVATE src/behaviors/behavior_outputs.c)
|
||||||
@@ -51,43 +55,28 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
|||||||
target_sources(app PRIVATE src/behaviors/behavior_to_layer.c)
|
target_sources(app PRIVATE src/behaviors/behavior_to_layer.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_transparent.c)
|
target_sources(app PRIVATE src/behaviors/behavior_transparent.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_none.c)
|
target_sources(app PRIVATE src/behaviors/behavior_none.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE app PRIVATE src/behaviors/behavior_sensor_rotate.c)
|
target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_VAR app PRIVATE src/behaviors/behavior_sensor_rotate_var.c)
|
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON app PRIVATE src/behaviors/behavior_sensor_rotate_common.c)
|
|
||||||
target_sources(app PRIVATE src/combo.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)
|
|
||||||
target_sources(app PRIVATE src/conditional_layer.c)
|
target_sources(app PRIVATE src/conditional_layer.c)
|
||||||
target_sources(app PRIVATE src/endpoints.c)
|
|
||||||
target_sources(app PRIVATE src/events/endpoint_changed.c)
|
|
||||||
target_sources(app PRIVATE src/hid_listener.c)
|
|
||||||
target_sources(app PRIVATE src/keymap.c)
|
target_sources(app PRIVATE src/keymap.c)
|
||||||
target_sources(app PRIVATE src/events/layer_state_changed.c)
|
|
||||||
target_sources(app PRIVATE src/events/modifiers_state_changed.c)
|
|
||||||
target_sources(app PRIVATE src/events/keycode_state_changed.c)
|
|
||||||
|
|
||||||
if (CONFIG_ZMK_BLE)
|
|
||||||
target_sources(app PRIVATE src/events/ble_active_profile_changed.c)
|
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_bt.c)
|
|
||||||
target_sources(app PRIVATE src/ble.c)
|
|
||||||
target_sources(app PRIVATE src/hog.c)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c)
|
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/behaviors/behavior_backlight.c)
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/behaviors/behavior_bt.c)
|
||||||
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/ble.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/events/battery_state_changed.c)
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/battery.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/battery.c)
|
if (CONFIG_ZMK_SPLIT_BLE AND (NOT CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL))
|
||||||
|
target_sources(app PRIVATE src/split_listener.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_SPLIT app PRIVATE src/events/split_peripheral_status_changed.c)
|
target_sources(app PRIVATE src/split/bluetooth/service.c)
|
||||||
add_subdirectory(src/split)
|
endif()
|
||||||
|
if (CONFIG_ZMK_SPLIT_BLE AND CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
|
||||||
target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/usb.c)
|
target_sources(app PRIVATE src/split/bluetooth/central.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_USB app PRIVATE src/usb_hid.c)
|
endif()
|
||||||
|
target_sources_ifdef(CONFIG_USB app PRIVATE src/usb.c)
|
||||||
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/hog.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/rgb_underglow.c)
|
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/rgb_underglow.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/backlight.c)
|
target_sources(app PRIVATE src/endpoints.c)
|
||||||
target_sources(app PRIVATE src/workqueue.c)
|
target_sources(app PRIVATE src/hid_listener.c)
|
||||||
target_sources(app PRIVATE src/main.c)
|
target_sources(app PRIVATE src/main.c)
|
||||||
|
|
||||||
add_subdirectory(src/display/)
|
add_subdirectory(src/display/)
|
||||||
|
|||||||
325
app/Kconfig
325
app/Kconfig
@@ -25,18 +25,6 @@ config USB_DEVICE_PID
|
|||||||
config USB_DEVICE_MANUFACTURER
|
config USB_DEVICE_MANUFACTURER
|
||||||
default "ZMK Project"
|
default "ZMK Project"
|
||||||
|
|
||||||
config BT_DIS_PNP_VID
|
|
||||||
default 0x1D50
|
|
||||||
|
|
||||||
config BT_DIS_PNP_PID
|
|
||||||
default 0x615E
|
|
||||||
|
|
||||||
config BT_DIS_MODEL
|
|
||||||
default ZMK_KEYBOARD_NAME
|
|
||||||
|
|
||||||
config BT_DIS_MANUF
|
|
||||||
default "ZMK Project"
|
|
||||||
|
|
||||||
menu "HID"
|
menu "HID"
|
||||||
|
|
||||||
choice ZMK_HID_REPORT_TYPE
|
choice ZMK_HID_REPORT_TYPE
|
||||||
@@ -91,26 +79,15 @@ menu "Output Types"
|
|||||||
|
|
||||||
config ZMK_USB
|
config ZMK_USB
|
||||||
bool "USB"
|
bool "USB"
|
||||||
depends on (!ZMK_SPLIT || (ZMK_SPLIT && ZMK_SPLIT_ROLE_CENTRAL))
|
|
||||||
select USB
|
select USB
|
||||||
select USB_DEVICE_STACK
|
select USB_DEVICE_STACK
|
||||||
select USB_DEVICE_HID
|
select USB_DEVICE_HID
|
||||||
|
|
||||||
config ZMK_USB_BOOT
|
|
||||||
bool "USB Boot Protocol Support"
|
|
||||||
default y
|
|
||||||
depends on ZMK_USB
|
|
||||||
select USB_HID_BOOT_PROTOCOL
|
|
||||||
select USB_DEVICE_SOF
|
|
||||||
|
|
||||||
if ZMK_USB
|
if ZMK_USB
|
||||||
|
|
||||||
config USB_NUMOF_EP_WRITE_RETRIES
|
config USB_NUMOF_EP_WRITE_RETRIES
|
||||||
default 10
|
default 10
|
||||||
|
|
||||||
config USB_HID_POLL_INTERVAL_MS
|
|
||||||
default 1
|
|
||||||
|
|
||||||
#ZMK_USB
|
#ZMK_USB
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -122,28 +99,18 @@ menuconfig ZMK_BLE
|
|||||||
select BT_SMP_APP_PAIRING_ACCEPT
|
select BT_SMP_APP_PAIRING_ACCEPT
|
||||||
select BT_PERIPHERAL
|
select BT_PERIPHERAL
|
||||||
select BT_DIS
|
select BT_DIS
|
||||||
|
select BT_BAS
|
||||||
select BT_SETTINGS
|
select BT_SETTINGS
|
||||||
select SETTINGS
|
select SETTINGS
|
||||||
imply ZMK_BATTERY_REPORTING
|
|
||||||
|
|
||||||
if ZMK_BLE
|
if ZMK_BLE
|
||||||
|
|
||||||
# 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
|
config SYSTEM_WORKQUEUE_STACK_SIZE
|
||||||
default 4096 if SOC_RP2040
|
|
||||||
default 2048
|
default 2048
|
||||||
|
|
||||||
config ZMK_BLE_THREAD_STACK_SIZE
|
config ZMK_BLE_THREAD_STACK_SIZE
|
||||||
int "BLE notify thread stack size"
|
int "BLE notify thread stack size"
|
||||||
default 768
|
default 512
|
||||||
|
|
||||||
config ZMK_BLE_THREAD_PRIORITY
|
config ZMK_BLE_THREAD_PRIORITY
|
||||||
int "BLE notify thread priority"
|
int "BLE notify thread priority"
|
||||||
@@ -165,28 +132,12 @@ config ZMK_BLE_CLEAR_BONDS_ON_START
|
|||||||
config BT_GATT_NOTIFY_MULTIPLE
|
config BT_GATT_NOTIFY_MULTIPLE
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config BT_GATT_AUTO_SEC_REQ
|
|
||||||
default n
|
|
||||||
|
|
||||||
config BT_DEVICE_APPEARANCE
|
config BT_DEVICE_APPEARANCE
|
||||||
default 961
|
default 961
|
||||||
|
|
||||||
config ZMK_BLE_PASSKEY_ENTRY
|
config ZMK_BLE_PASSKEY_ENTRY
|
||||||
bool "Require passkey entry on the keyboard to complete pairing"
|
bool "Experimental: Requiring typing passkey from host to pair BLE connection"
|
||||||
default n
|
default n
|
||||||
select RING_BUFFER
|
|
||||||
|
|
||||||
config BT_PERIPHERAL_PREF_MIN_INT
|
|
||||||
default 6
|
|
||||||
|
|
||||||
config BT_PERIPHERAL_PREF_MAX_INT
|
|
||||||
default 12
|
|
||||||
|
|
||||||
config BT_PERIPHERAL_PREF_LATENCY
|
|
||||||
default 30
|
|
||||||
|
|
||||||
config BT_PERIPHERAL_PREF_TIMEOUT
|
|
||||||
default 400
|
|
||||||
|
|
||||||
#ZMK_BLE
|
#ZMK_BLE
|
||||||
endif
|
endif
|
||||||
@@ -197,7 +148,99 @@ endmenu
|
|||||||
# HID
|
# HID
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
rsource "src/split/Kconfig"
|
menu "Split Support"
|
||||||
|
|
||||||
|
config ZMK_SPLIT
|
||||||
|
bool "Split keyboard support"
|
||||||
|
|
||||||
|
if ZMK_SPLIT
|
||||||
|
|
||||||
|
menuconfig ZMK_SPLIT_BLE
|
||||||
|
bool "Split keyboard support via BLE transport"
|
||||||
|
depends on ZMK_BLE
|
||||||
|
default y
|
||||||
|
select BT_USER_PHY_UPDATE
|
||||||
|
|
||||||
|
if ZMK_SPLIT_BLE
|
||||||
|
|
||||||
|
menuconfig ZMK_SPLIT_BLE_ROLE_CENTRAL
|
||||||
|
bool "Central"
|
||||||
|
select BT_CENTRAL
|
||||||
|
select BT_GATT_CLIENT
|
||||||
|
select BT_GATT_AUTO_DISCOVER_CCC
|
||||||
|
|
||||||
|
if ZMK_SPLIT_BLE_ROLE_CENTRAL
|
||||||
|
|
||||||
|
config ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE
|
||||||
|
int "Max number of key position state events to queue when received from peripherals"
|
||||||
|
default 5
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !ZMK_SPLIT_BLE_ROLE_CENTRAL
|
||||||
|
|
||||||
|
config ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE
|
||||||
|
int "BLE split peripheral notify thread stack size"
|
||||||
|
default 512
|
||||||
|
|
||||||
|
config ZMK_SPLIT_BLE_PERIPHERAL_PRIORITY
|
||||||
|
int "BLE split peripheral notify thread priority"
|
||||||
|
default 5
|
||||||
|
|
||||||
|
config ZMK_SPLIT_BLE_PERIPHERAL_POSITION_QUEUE_SIZE
|
||||||
|
int "Max number of key position state events to queue to send to the central"
|
||||||
|
default 10
|
||||||
|
|
||||||
|
config ZMK_USB
|
||||||
|
default n
|
||||||
|
|
||||||
|
config BT_MAX_PAIRED
|
||||||
|
default 1
|
||||||
|
|
||||||
|
config BT_MAX_CONN
|
||||||
|
default 1
|
||||||
|
|
||||||
|
config BT_GAP_AUTO_UPDATE_CONN_PARAMS
|
||||||
|
default n
|
||||||
|
|
||||||
|
#!ZMK_SPLIT_BLE_ROLE_CENTRAL
|
||||||
|
endif
|
||||||
|
|
||||||
|
#ZMK_SPLIT_BLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
#ZMK_SPLIT
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ZMK_BLE
|
||||||
|
|
||||||
|
if ZMK_SPLIT_BLE && ZMK_SPLIT_BLE_ROLE_CENTRAL
|
||||||
|
|
||||||
|
config BT_MAX_CONN
|
||||||
|
default 6
|
||||||
|
|
||||||
|
config BT_MAX_PAIRED
|
||||||
|
default 6
|
||||||
|
|
||||||
|
#ZMK_SPLIT_BLE && ZMK_SPLIT_BLE_ROLE_CENTRAL
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !ZMK_SPLIT_BLE
|
||||||
|
|
||||||
|
config BT_MAX_CONN
|
||||||
|
default 5
|
||||||
|
|
||||||
|
config BT_MAX_PAIRED
|
||||||
|
default 5
|
||||||
|
|
||||||
|
#!ZMK_SPLIT_BLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
#ZMK_BLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
#Split Support
|
||||||
|
endmenu
|
||||||
|
|
||||||
#Basic Keyboard Setup
|
#Basic Keyboard Setup
|
||||||
endmenu
|
endmenu
|
||||||
@@ -206,7 +249,7 @@ menu "Display/LED Options"
|
|||||||
|
|
||||||
rsource "src/display/Kconfig"
|
rsource "src/display/Kconfig"
|
||||||
|
|
||||||
menuconfig ZMK_RGB_UNDERGLOW
|
config ZMK_RGB_UNDERGLOW
|
||||||
bool "RGB Adressable LED Underglow"
|
bool "RGB Adressable LED Underglow"
|
||||||
select LED_STRIP
|
select LED_STRIP
|
||||||
|
|
||||||
@@ -274,56 +317,14 @@ config ZMK_RGB_UNDERGLOW_ON_START
|
|||||||
bool "RGB underglow starts on by default"
|
bool "RGB underglow starts on by default"
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE
|
|
||||||
bool "Turn off RGB underglow when keyboard goes into idle state"
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_AUTO_OFF_USB
|
|
||||||
bool "Turn off RGB underglow when USB is disconnected"
|
|
||||||
depends on USB_DEVICE_STACK
|
|
||||||
|
|
||||||
#ZMK_RGB_UNDERGLOW
|
#ZMK_RGB_UNDERGLOW
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig ZMK_BACKLIGHT
|
|
||||||
bool "LED backlight"
|
|
||||||
select LED
|
|
||||||
|
|
||||||
if ZMK_BACKLIGHT
|
|
||||||
|
|
||||||
config ZMK_BACKLIGHT_BRT_STEP
|
|
||||||
int "Brightness step in percent"
|
|
||||||
range 1 100
|
|
||||||
default 20
|
|
||||||
|
|
||||||
config ZMK_BACKLIGHT_BRT_START
|
|
||||||
int "Default brightness in percent"
|
|
||||||
range 1 100
|
|
||||||
default 40
|
|
||||||
|
|
||||||
config ZMK_BACKLIGHT_ON_START
|
|
||||||
bool "Default backlight state"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config ZMK_BACKLIGHT_AUTO_OFF_IDLE
|
|
||||||
bool "Turn off backlight when keyboard goes into idle state"
|
|
||||||
|
|
||||||
config ZMK_BACKLIGHT_AUTO_OFF_USB
|
|
||||||
bool "Turn off backlight when USB is disconnected"
|
|
||||||
|
|
||||||
#ZMK_BACKLIGHT
|
|
||||||
endif
|
|
||||||
|
|
||||||
#Display/LED Options
|
#Display/LED Options
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "Power Management"
|
menu "Power Management"
|
||||||
|
|
||||||
config ZMK_BATTERY_REPORTING
|
|
||||||
bool "Battery level detection/reporting"
|
|
||||||
default n
|
|
||||||
select SENSOR
|
|
||||||
select BT_BAS if ZMK_BLE
|
|
||||||
|
|
||||||
config ZMK_IDLE_TIMEOUT
|
config ZMK_IDLE_TIMEOUT
|
||||||
int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)"
|
int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)"
|
||||||
default 30000
|
default 30000
|
||||||
@@ -334,6 +335,10 @@ config ZMK_SLEEP
|
|||||||
|
|
||||||
if ZMK_SLEEP
|
if ZMK_SLEEP
|
||||||
|
|
||||||
|
choice SYS_PM_POLICY
|
||||||
|
default PM_POLICY_APP
|
||||||
|
endchoice
|
||||||
|
|
||||||
config PM_DEVICE
|
config PM_DEVICE
|
||||||
default y
|
default y
|
||||||
|
|
||||||
@@ -365,32 +370,14 @@ config ZMK_COMBO_MAX_KEYS_PER_COMBO
|
|||||||
int "Maximum number of keys per combo"
|
int "Maximum number of keys per combo"
|
||||||
default 4
|
default 4
|
||||||
|
|
||||||
#Combo options
|
#Display/LED Options
|
||||||
endmenu
|
|
||||||
|
|
||||||
menu "Behavior Options"
|
|
||||||
|
|
||||||
config ZMK_BEHAVIORS_QUEUE_SIZE
|
|
||||||
int "Maximum number of behaviors to allow queueing from a macro or other complex behavior"
|
|
||||||
default 64
|
|
||||||
|
|
||||||
rsource "Kconfig.behaviors"
|
|
||||||
|
|
||||||
config ZMK_MACRO_DEFAULT_WAIT_MS
|
|
||||||
int "Default time to wait (in milliseconds) before triggering the next behavior in macros"
|
|
||||||
default 15
|
|
||||||
|
|
||||||
config ZMK_MACRO_DEFAULT_TAP_MS
|
|
||||||
int "Default time to wait (in milliseconds) between the press and release events of a tapped behavior in macros"
|
|
||||||
default 30
|
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "Advanced"
|
menu "Advanced"
|
||||||
|
|
||||||
menu "Initialization Priorities"
|
menu "Initialization Priorities"
|
||||||
|
|
||||||
if USB_DEVICE_STACK
|
if USB
|
||||||
|
|
||||||
config ZMK_USB_INIT_PRIORITY
|
config ZMK_USB_INIT_PRIORITY
|
||||||
int "USB Init Priority"
|
int "USB Init Priority"
|
||||||
@@ -411,31 +398,22 @@ endif
|
|||||||
#Initialization Priorities
|
#Initialization Priorities
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menuconfig ZMK_KSCAN
|
menu "KSCAN Settings"
|
||||||
bool "ZMK KScan Integration"
|
|
||||||
default y
|
|
||||||
select KSCAN
|
|
||||||
|
|
||||||
if ZMK_KSCAN
|
|
||||||
|
|
||||||
config ZMK_KSCAN_EVENT_QUEUE_SIZE
|
config ZMK_KSCAN_EVENT_QUEUE_SIZE
|
||||||
int "Size of the event queue for KSCAN events to buffer events"
|
int "Size of the event queue for KSCAN events to buffer events"
|
||||||
default 4
|
default 4
|
||||||
|
|
||||||
endif # ZMK_KSCAN
|
config ZMK_KSCAN_MOCK_DRIVER
|
||||||
|
bool "Enable mock kscan driver to simulate key presses"
|
||||||
|
|
||||||
menu "Logging"
|
config ZMK_KSCAN_COMPOSITE_DRIVER
|
||||||
|
bool "Enable composite kscan driver to combine kscan devices"
|
||||||
|
|
||||||
config ZMK_LOGGING_MINIMAL
|
#KSCAN Settings
|
||||||
bool "Suppress all ZMK debug log messages"
|
endmenu
|
||||||
default false
|
|
||||||
|
|
||||||
if !ZMK_LOGGING_MINIMAL
|
menu "USB Logging"
|
||||||
|
|
||||||
config ZMK_LOG_LEVEL
|
|
||||||
default 4
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
config ZMK_USB_LOGGING
|
config ZMK_USB_LOGGING
|
||||||
bool "Enable USB CDC ACM logging to help debug"
|
bool "Enable USB CDC ACM logging to help debug"
|
||||||
@@ -452,54 +430,31 @@ config ZMK_USB_LOGGING
|
|||||||
|
|
||||||
if ZMK_USB_LOGGING
|
if ZMK_USB_LOGGING
|
||||||
|
|
||||||
choice USB_CDC_ACM_LOG_LEVEL_CHOICE
|
config ZMK_LOG_LEVEL
|
||||||
default USB_CDC_ACM_LOG_LEVEL_OFF
|
default 4
|
||||||
endchoice
|
|
||||||
|
|
||||||
choice USB_DRIVER_LOG_LEVEL_CHOICE
|
|
||||||
default USB_DRIVER_LOG_LEVEL_OFF
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
# We do this to avoid log loop where logging to USB generates more log messages.
|
|
||||||
|
|
||||||
config USB_CDC_ACM_RINGBUF_SIZE
|
config USB_CDC_ACM_RINGBUF_SIZE
|
||||||
default 1024
|
default 1024
|
||||||
|
|
||||||
config LOG_PROCESS_THREAD_STARTUP_DELAY_MS
|
config USB_CDC_ACM_DEVICE_NAME
|
||||||
default 1000
|
default "CDC_ACM"
|
||||||
|
|
||||||
#ZMK_USB_LOGGING
|
config USB_CDC_ACM_DEVICE_COUNT
|
||||||
endif
|
default 1
|
||||||
|
|
||||||
config ZMK_RTT_LOGGING
|
config UART_CONSOLE_ON_DEV_NAME
|
||||||
bool "Enable RTT logging to help debug"
|
default "CDC_ACM_0"
|
||||||
select LOG
|
|
||||||
select DEBUG
|
|
||||||
select ASSERT
|
|
||||||
select USE_SEGGER_RTT
|
|
||||||
select CONSOLE
|
|
||||||
select RTT_CONSOLE
|
|
||||||
|
|
||||||
if ZMK_RTT_LOGGING
|
|
||||||
|
|
||||||
config SEGGER_RTT_BUFFER_SIZE_UP
|
|
||||||
default 8192
|
|
||||||
|
|
||||||
#ZMK_RTT_LOGGING
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ZMK_USB_LOGGING || ZMK_RTT_LOGGING
|
|
||||||
|
|
||||||
config LOG_BUFFER_SIZE
|
config LOG_BUFFER_SIZE
|
||||||
default 8192
|
default 8192
|
||||||
|
|
||||||
config LOG_PROCESS_THREAD_SLEEP_MS
|
config LOG_STRDUP_BUF_COUNT
|
||||||
default 100
|
default 16
|
||||||
|
|
||||||
#ZMK_USB_LOGGING || ZMK_RTT_LOGGING
|
#ZMK_USB_LOGGING
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#Logging
|
#USB Logging
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
if SETTINGS
|
if SETTINGS
|
||||||
@@ -511,19 +466,6 @@ config ZMK_SETTINGS_SAVE_DEBOUNCE
|
|||||||
#SETTINGS
|
#SETTINGS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
config ZMK_BATTERY_REPORT_INTERVAL
|
|
||||||
depends on ZMK_BATTERY_REPORTING
|
|
||||||
int "Battery level report interval in seconds"
|
|
||||||
default 60
|
|
||||||
|
|
||||||
config ZMK_LOW_PRIORITY_THREAD_STACK_SIZE
|
|
||||||
int "Low priority thread stack size"
|
|
||||||
default 768
|
|
||||||
|
|
||||||
config ZMK_LOW_PRIORITY_THREAD_PRIORITY
|
|
||||||
int "Low priority thread priority"
|
|
||||||
default 10
|
|
||||||
|
|
||||||
#Advanced
|
#Advanced
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
@@ -539,31 +481,15 @@ config KERNEL_BIN_NAME
|
|||||||
config REBOOT
|
config REBOOT
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config USB_DEVICE_STACK
|
config USB
|
||||||
default y if HAS_HW_NRF_USBD
|
default y if HAS_HW_NRF_USBD
|
||||||
|
|
||||||
config ZMK_WPM
|
config ZMK_WPM
|
||||||
bool "Calculate WPM"
|
bool "Calculate WPM"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config ZMK_KEYMAP_SENSORS
|
config SENSOR
|
||||||
bool "Enable Keymap Sensors support"
|
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ZMK_KEYMAP_SENSORS_ENABLED
|
|
||||||
select SENSOR
|
|
||||||
|
|
||||||
if ZMK_KEYMAP_SENSORS
|
|
||||||
|
|
||||||
config ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION
|
|
||||||
int "Default triggers per rotation"
|
|
||||||
help
|
|
||||||
Unless overridden for a sensor in the board/shield/devicetree, this value
|
|
||||||
determines how many times to trigger the bound behavior per full rotation.
|
|
||||||
For tactile encoders with detents, this usually should match the number of
|
|
||||||
detents per rotation of the encoder.
|
|
||||||
default 20
|
|
||||||
|
|
||||||
endif # ZMK_KEYMAP_SENSORS
|
|
||||||
|
|
||||||
choice CBPRINTF_IMPLEMENTATION
|
choice CBPRINTF_IMPLEMENTATION
|
||||||
default CBPRINTF_NANO
|
default CBPRINTF_NANO
|
||||||
@@ -583,3 +509,4 @@ osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.shield"
|
|||||||
|
|
||||||
|
|
||||||
source "Kconfig.zephyr"
|
source "Kconfig.zephyr"
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
# Copyright (c) 2023 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_KEY_TOGGLE
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
depends on DT_HAS_ZMK_BEHAVIOR_KEY_TOGGLE_ENABLED
|
|
||||||
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
|
|
||||||
bool
|
|
||||||
default n
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_SENSOR_ROTATE
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
depends on DT_HAS_ZMK_BEHAVIOR_SENSOR_ROTATE_ENABLED
|
|
||||||
select ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_SENSOR_ROTATE_VAR
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
depends on DT_HAS_ZMK_BEHAVIOR_SENSOR_ROTATE_VAR_ENABLED
|
|
||||||
select ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
|
|
||||||
|
|
||||||
config ZMK_BEHAVIOR_MACRO
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
depends on DT_HAS_ZMK_BEHAVIOR_MACRO_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_ONE_PARAM_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_TWO_PARAM_ENABLED
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
CONFIG_ZMK_DISPLAY=y
|
|
||||||
CONFIG_LV_FONT_UNSCII_8=n
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
CONFIG_I2C=y
|
|
||||||
CONFIG_I2C_DW=y
|
|
||||||
CONFIG_LV_Z_VDB_SIZE=50
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2023 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "usb_console.dtsi"
|
|
||||||
|
|
||||||
&xiao_serial { status = "disabled"; };
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
CONFIG_CONSOLE=n
|
|
||||||
CONFIG_SERIAL=n
|
|
||||||
CONFIG_UART_CONSOLE=n
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2023 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "usb_console.dtsi"
|
|
||||||
|
|
||||||
&pro_micro_serial { status = "disabled"; };
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
CONFIG_CONSOLE=n
|
|
||||||
CONFIG_SERIAL=n
|
|
||||||
CONFIG_UART_CONSOLE=n
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2023 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "usb_console.dtsi"
|
|
||||||
|
|
||||||
&xiao_serial { status = "disabled"; };
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: adafruit_kb2040
|
|
||||||
name: Adafruit KB2040
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
url: https://www.adafruit.com/product/5302
|
|
||||||
exposes: [pro_micro]
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: adafruit_qt_py_rp2040
|
|
||||||
name: Adafruit QT Py RP2040
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
url: https://www.adafruit.com/product/4900
|
|
||||||
exposes: [seeed_xiao]
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# keeb.io BDN9 board configuration
|
# keeb.io BDN9 board configuration
|
||||||
|
|
||||||
# Copyright (c) 2020 The ZMK Contributors
|
# Copyright (c) 2020 Pete Johanson
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
if BOARD_BDN9
|
if BOARD_BDN9
|
||||||
@@ -11,8 +11,7 @@ config BOARD
|
|||||||
config ZMK_KEYBOARD_NAME
|
config ZMK_KEYBOARD_NAME
|
||||||
default "BDN9 Rev2"
|
default "BDN9 Rev2"
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW
|
config ZMK_USB
|
||||||
select SPI
|
default y
|
||||||
select WS2812_STRIP
|
|
||||||
|
|
||||||
endif # BOARD_BDN9
|
endif # BOARD_BDN9
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
# Copyright (c) 2022 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
# Uncomment these lines below to enable encoders.
|
|
||||||
# CONFIG_EC11=y
|
|
||||||
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
|
||||||
|
|
||||||
# Uncomment the line below to enable RGB.
|
|
||||||
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
|
||||||
@@ -6,8 +6,6 @@
|
|||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <st/f0/stm32f072Xb.dtsi>
|
#include <st/f0/stm32f072Xb.dtsi>
|
||||||
#include <st/f0/stm32f072c(8-b)tx-pinctrl.dtsi>
|
|
||||||
#include <dt-bindings/led/led.h>
|
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "Keeb.io BDN9 rev2";
|
model = "Keeb.io BDN9 rev2";
|
||||||
@@ -16,9 +14,10 @@
|
|||||||
chosen {
|
chosen {
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
zephyr,console = &cdc_acm_uart;
|
|
||||||
zmk,kscan = &kscan;
|
zmk,kscan = &kscan;
|
||||||
|
/* TODO: Enable once the GPIO bitbanging driver supports STM32
|
||||||
zmk,underglow = &led_strip;
|
zmk,underglow = &led_strip;
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
kscan: kscan {
|
kscan: kscan {
|
||||||
@@ -38,12 +37,23 @@
|
|||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
led_strip: ws2812 {
|
||||||
|
compatible = "worldsemi,ws2812-gpio";
|
||||||
|
label = "WS2812";
|
||||||
|
|
||||||
|
in-gpios = <&gpiob 15 0>;
|
||||||
|
|
||||||
|
chain-length = <9>;
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
left_encoder: encoder_left {
|
left_encoder: encoder_left {
|
||||||
compatible = "alps,ec11";
|
compatible = "alps,ec11";
|
||||||
label = "LEFT_ENCODER";
|
label = "LEFT_ENCODER";
|
||||||
a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
steps = <80>;
|
resolution = <4>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
mid_encoder: encoder_mid {
|
mid_encoder: encoder_mid {
|
||||||
@@ -51,7 +61,7 @@
|
|||||||
label = "MID_ENCODER";
|
label = "MID_ENCODER";
|
||||||
a-gpios = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
a-gpios = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
b-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
b-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
steps = <80>;
|
resolution = <4>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
right_encoder: encoder_right {
|
right_encoder: encoder_right {
|
||||||
@@ -59,7 +69,7 @@
|
|||||||
label = "RIGHT_ENCODER";
|
label = "RIGHT_ENCODER";
|
||||||
a-gpios = <&gpioa 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
a-gpios = <&gpioa 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
b-gpios = <&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
b-gpios = <&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
steps = <80>;
|
resolution = <4>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -67,58 +77,11 @@
|
|||||||
compatible = "zmk,keymap-sensors";
|
compatible = "zmk,keymap-sensors";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
sensors = <>;
|
sensors = <>;
|
||||||
triggers-per-rotation = <20>;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&spi2 {
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-0 = <&spi2_sck_pb13 &spi2_mosi_pb15>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
|
|
||||||
led_strip: ws2812@0 {
|
|
||||||
compatible = "worldsemi,ws2812-spi";
|
|
||||||
label = "WS2812";
|
|
||||||
|
|
||||||
/* SPI */
|
|
||||||
reg = <0>; /* ignored, but necessary for SPI bindings */
|
|
||||||
spi-max-frequency = <4000000>;
|
|
||||||
|
|
||||||
/* WS2812 */
|
|
||||||
chain-length = <9>;
|
|
||||||
spi-one-frame = <0x70>;
|
|
||||||
spi-zero-frame = <0x40>;
|
|
||||||
|
|
||||||
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&clk_hsi {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&pll {
|
|
||||||
status = "okay";
|
|
||||||
prediv = <1>;
|
|
||||||
mul = <6>;
|
|
||||||
clocks = <&clk_hsi>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&rcc {
|
|
||||||
clocks = <&pll>;
|
|
||||||
clock-frequency = <DT_FREQ_M(48)>;
|
|
||||||
ahb-prescaler = <1>;
|
|
||||||
apb1-prescaler = <1>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&usb {
|
&usb {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
cdc_acm_uart: cdc_acm_uart {
|
|
||||||
compatible = "zephyr,cdc-acm-uart";
|
|
||||||
label = "CDC_ACM_0";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&rtc {
|
&rtc {
|
||||||
@@ -136,7 +99,7 @@
|
|||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
|
||||||
/* Set 6Kb of storage at the end of the 128Kb of flash */
|
/* Set 6Kb of storage at the end of the 128Kb of flash */
|
||||||
storage_partition: partition@1e800 {
|
storage_partition: partition@3e800 {
|
||||||
label = "storage";
|
label = "storage";
|
||||||
reg = <0x0001e800 0x00001800>;
|
reg = <0x0001e800 0x00001800>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,11 +11,8 @@ CONFIG_FPU=y
|
|||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
# Enable pinctrl
|
# Enable pinmux
|
||||||
CONFIG_PINCTRL=y
|
CONFIG_PINMUX=y
|
||||||
|
|
||||||
# Poll to avoid interrupt overlap issues
|
|
||||||
CONFIG_ZMK_KSCAN_DIRECT_POLLING=y
|
|
||||||
|
|
||||||
# Needed to reduce this to size that will fit on F072
|
# Needed to reduce this to size that will fit on F072
|
||||||
CONFIG_HEAP_MEM_POOL_SIZE=1024
|
CONFIG_HEAP_MEM_POOL_SIZE=1024
|
||||||
@@ -23,4 +20,13 @@ CONFIG_HEAP_MEM_POOL_SIZE=1024
|
|||||||
# clock configuration
|
# clock configuration
|
||||||
CONFIG_CLOCK_CONTROL=y
|
CONFIG_CLOCK_CONTROL=y
|
||||||
|
|
||||||
CONFIG_ZMK_USB=y
|
# Clock configuration for Cube Clock control driver
|
||||||
|
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
|
||||||
|
# use HSI as PLL input
|
||||||
|
CONFIG_CLOCK_STM32_PLL_SRC_HSI=y
|
||||||
|
# produce 72MHz clock at PLL output
|
||||||
|
CONFIG_CLOCK_STM32_PLL_PREDIV=1
|
||||||
|
CONFIG_CLOCK_STM32_PLL_MULTIPLIER=12
|
||||||
|
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
|
||||||
|
CONFIG_CLOCK_STM32_APB1_PRESCALER=2
|
||||||
|
CONFIG_CLOCK_STM32_APB2_PRESCALER=1
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: blackpill_f401ce
|
|
||||||
name: BlackPill F401CE
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
|
|
||||||
exposes: [blackpill]
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: blackpill_f411ce
|
|
||||||
name: BlackPill F411CE
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
|
|
||||||
exposes: [blackpill]
|
|
||||||
8
app/boards/arm/bluemicro840/CMakeLists.txt
Normal file
8
app/boards/arm/bluemicro840/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
||||||
|
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
||||||
|
-c
|
||||||
|
-b 0x26000
|
||||||
|
-f 0xADA52840
|
||||||
|
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
||||||
|
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
||||||
|
)
|
||||||
@@ -8,14 +8,26 @@ if BOARD_BLUEMICRO840_V1
|
|||||||
config BOARD
|
config BOARD
|
||||||
default "bluemicro840_v1"
|
default "bluemicro840_v1"
|
||||||
|
|
||||||
if USB_DEVICE_STACK
|
if USB
|
||||||
|
|
||||||
config USB_NRFX
|
config USB_NRFX
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif # USB_DEVICE_STACK
|
config USB_DEVICE_STACK
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # USB
|
||||||
|
|
||||||
config BT_CTLR
|
config BT_CTLR
|
||||||
default BT
|
default BT
|
||||||
|
|
||||||
|
config ZMK_BLE
|
||||||
|
default y
|
||||||
|
|
||||||
|
config ZMK_USB
|
||||||
|
default y
|
||||||
|
|
||||||
|
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
||||||
|
default y
|
||||||
|
|
||||||
endif # BOARD_BLUEMICRO840_V1
|
endif # BOARD_BLUEMICRO840_V1
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
&pinctrl {
|
|
||||||
uart0_default: uart0_default {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(UART_RX, 0, 8)>;
|
|
||||||
bias-pull-up;
|
|
||||||
};
|
|
||||||
group2 {
|
|
||||||
psels = <NRF_PSEL(UART_TX, 0, 6)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
uart0_sleep: uart0_sleep {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(UART_RX, 0, 8)>,
|
|
||||||
<NRF_PSEL(UART_TX, 0, 6)>;
|
|
||||||
low-power-enable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c0_default: i2c0_default {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
|
|
||||||
<NRF_PSEL(TWIM_SCL, 0, 17)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c0_sleep: i2c0_sleep {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
|
|
||||||
<NRF_PSEL(TWIM_SCL, 0, 17)>;
|
|
||||||
low-power-enable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -7,7 +7,6 @@
|
|||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
#include "arduino_pro_micro_pins.dtsi"
|
#include "arduino_pro_micro_pins.dtsi"
|
||||||
#include "bluemicro840_v1-pinctrl.dtsi"
|
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "BlueMicro840_V1";
|
model = "BlueMicro840_V1";
|
||||||
@@ -17,8 +16,6 @@
|
|||||||
zephyr,code-partition = &code_partition;
|
zephyr,code-partition = &code_partition;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
zephyr,console = &cdc_acm_uart;
|
|
||||||
zmk,battery = &vbatt;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
@@ -36,7 +33,7 @@
|
|||||||
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
|
|
||||||
vbatt: vbatt {
|
vbatt {
|
||||||
compatible = "zmk,battery-voltage-divider";
|
compatible = "zmk,battery-voltage-divider";
|
||||||
label = "BATTERY";
|
label = "BATTERY";
|
||||||
io-channels = <&adc 7>;
|
io-channels = <&adc 7>;
|
||||||
@@ -64,25 +61,18 @@
|
|||||||
|
|
||||||
&i2c0 {
|
&i2c0 {
|
||||||
compatible = "nordic,nrf-twi";
|
compatible = "nordic,nrf-twi";
|
||||||
pinctrl-0 = <&i2c0_default>;
|
sda-pin = <15>;
|
||||||
pinctrl-1 = <&i2c0_sleep>;
|
scl-pin = <17>;
|
||||||
pinctrl-names = "default", "sleep";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
compatible = "nordic,nrf-uarte";
|
compatible = "nordic,nrf-uarte";
|
||||||
current-speed = <115200>;
|
tx-pin = <6>;
|
||||||
pinctrl-0 = <&uart0_default>;
|
rx-pin = <8>;
|
||||||
pinctrl-1 = <&uart0_sleep>;
|
|
||||||
pinctrl-names = "default", "sleep";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
cdc_acm_uart: cdc_acm_uart {
|
|
||||||
compatible = "zephyr,cdc-acm-uart";
|
|
||||||
label = "CDC_ACM_0";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,13 +7,10 @@ CONFIG_BOARD_BLUEMICRO840_V1=y
|
|||||||
# Enable MPU
|
# Enable MPU
|
||||||
CONFIG_ARM_MPU=y
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
CONFIG_PINCTRL=y
|
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
@@ -21,6 +18,3 @@ CONFIG_SETTINGS_NVS=y
|
|||||||
CONFIG_FLASH=y
|
CONFIG_FLASH=y
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||||
CONFIG_FLASH_MAP=y
|
CONFIG_FLASH_MAP=y
|
||||||
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
CONFIG_ZMK_BLE=y
|
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: boardsource_blok
|
|
||||||
name: BoardSource blok
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
url: https://peg.software/docs/blok
|
|
||||||
exposes: [pro_micro]
|
|
||||||
8
app/boards/arm/bt60/CMakeLists.txt
Normal file
8
app/boards/arm/bt60/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
||||||
|
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
||||||
|
-c
|
||||||
|
-b 0x26000
|
||||||
|
-f 0xADA52840
|
||||||
|
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
||||||
|
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
||||||
|
)
|
||||||
@@ -19,6 +19,15 @@ endif # USB
|
|||||||
config BT_CTLR
|
config BT_CTLR
|
||||||
default BT
|
default BT
|
||||||
|
|
||||||
|
config ZMK_BLE
|
||||||
|
default y
|
||||||
|
|
||||||
|
config ZMK_USB
|
||||||
|
default y
|
||||||
|
|
||||||
|
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
||||||
|
default y
|
||||||
|
|
||||||
config ZMK_KEYBOARD_NAME
|
config ZMK_KEYBOARD_NAME
|
||||||
default "BT60"
|
default "BT60"
|
||||||
|
|
||||||
|
|||||||
@@ -16,16 +16,13 @@
|
|||||||
zephyr,code-partition = &code_partition;
|
zephyr,code-partition = &code_partition;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
zephyr,console = &cdc_acm_uart;
|
|
||||||
zmk,battery = &vbatt;
|
|
||||||
zmk,kscan = &kscan0;
|
zmk,kscan = &kscan0;
|
||||||
zmk,matrix_transform = &default_transform;
|
zmk,matrix_transform = &default_transform;
|
||||||
};
|
};
|
||||||
|
|
||||||
sensors: sensors {
|
sensors {
|
||||||
compatible = "zmk,keymap-sensors";
|
compatible = "zmk,keymap-sensors";
|
||||||
sensors = <&left_encoder>;
|
sensors = <&left_encoder>;
|
||||||
triggers-per-rotation = <20>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -35,7 +32,7 @@
|
|||||||
label = "LEFT_ENCODER";
|
label = "LEFT_ENCODER";
|
||||||
a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
steps = <80>;
|
resolution = <4>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -48,7 +45,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
vbatt: vbatt {
|
vbatt {
|
||||||
compatible = "zmk,battery-voltage-divider";
|
compatible = "zmk,battery-voltage-divider";
|
||||||
label = "BATTERY";
|
label = "BATTERY";
|
||||||
io-channels = <&adc 2>;
|
io-channels = <&adc 2>;
|
||||||
@@ -87,10 +84,6 @@
|
|||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
cdc_acm_uart: cdc_acm_uart {
|
|
||||||
compatible = "zephyr,cdc-acm-uart";
|
|
||||||
label = "CDC_ACM_0";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
|
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13)
|
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13)
|
||||||
RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12)
|
RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14)
|
RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14)
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
bindings = <
|
bindings = <
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
||||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
|
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
||||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR &trans
|
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR &trans
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
raise {
|
raise {
|
||||||
bindings = <
|
bindings = <
|
||||||
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp INS &kp DEL
|
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp INS &kp DEL
|
||||||
&kp CLCK &bt BT_PRV &bt BT_NXT &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &kp UP &trans &sys_reset
|
&kp CLCK &bt BT_PRV &bt BT_NXT &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &kp UP &trans &reset
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp LEFT &kp RIGHT &trans
|
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp LEFT &kp RIGHT &trans
|
||||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp DOWN &trans &trans
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp DOWN &trans &trans
|
||||||
&trans &trans &trans &bootloader &trans &trans &trans
|
&trans &trans &trans &bootloader &trans &trans &trans
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
raise {
|
raise {
|
||||||
bindings = <
|
bindings = <
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
||||||
&sys_reset &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK
|
&reset &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &trans &bootloader
|
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &trans &bootloader
|
||||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
raise {
|
raise {
|
||||||
bindings = <
|
bindings = <
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp F1
|
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp F1
|
||||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
|
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
||||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
raise {
|
raise {
|
||||||
bindings = <
|
bindings = <
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans
|
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans
|
||||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
|
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
||||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &trans
|
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &trans
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ CONFIG_EC11=y
|
|||||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
@@ -23,6 +22,3 @@ CONFIG_SETTINGS_NVS=y
|
|||||||
CONFIG_FLASH=y
|
CONFIG_FLASH=y
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||||
CONFIG_FLASH_MAP=y
|
CONFIG_FLASH_MAP=y
|
||||||
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
CONFIG_ZMK_BLE=y
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
raise {
|
raise {
|
||||||
bindings = <
|
bindings = <
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans
|
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans
|
||||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
|
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
||||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ CONFIG_EC11=y
|
|||||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
@@ -23,6 +22,3 @@ CONFIG_SETTINGS_NVS=y
|
|||||||
CONFIG_FLASH=y
|
CONFIG_FLASH=y
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||||
CONFIG_FLASH_MAP=y
|
CONFIG_FLASH_MAP=y
|
||||||
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
CONFIG_ZMK_BLE=y
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# Copyright (c) 2022 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
config BOARD_ENABLE_DCDC
|
|
||||||
bool "Enable DCDC mode"
|
|
||||||
select SOC_DCDC_NRF52X
|
|
||||||
default y
|
|
||||||
depends on BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# CKP boards configuration
|
|
||||||
|
|
||||||
# Copyright (c) 2022 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
config BOARD_BT60_V2
|
|
||||||
bool "bt60_v2"
|
|
||||||
depends on SOC_NRF52840_QIAA
|
|
||||||
|
|
||||||
config BOARD_BT65_V1
|
|
||||||
bool "bt65_v1"
|
|
||||||
depends on SOC_NRF52840_QIAA
|
|
||||||
|
|
||||||
config BOARD_BT75_V1
|
|
||||||
bool "bt75_v1"
|
|
||||||
depends on SOC_NRF52840_QIAA
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# Copyright (c) 2022 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
config BOARD
|
|
||||||
default "bt60_v2" if BOARD_BT60_V2
|
|
||||||
default "bt65_v1" if BOARD_BT65_V1
|
|
||||||
default "bt75_v1" if BOARD_BT75_V1
|
|
||||||
config ZMK_KEYBOARD_NAME
|
|
||||||
default "BT60 V2" if BOARD_BT60_V2
|
|
||||||
default "BT65" if BOARD_BT65_V1
|
|
||||||
default "BT75" if BOARD_BT75_V1
|
|
||||||
|
|
||||||
if BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1
|
|
||||||
|
|
||||||
if USB
|
|
||||||
|
|
||||||
config USB_NRFX
|
|
||||||
default y
|
|
||||||
|
|
||||||
config USB_DEVICE_STACK
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # USB
|
|
||||||
|
|
||||||
config BT_CTLR
|
|
||||||
default BT
|
|
||||||
|
|
||||||
endif # BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
|
||||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
#include "ckp.dtsi"
|
|
||||||
|
|
||||||
|
|
||||||
/ {
|
|
||||||
model = "BT60_V2";
|
|
||||||
compatible = "polarityworks,bt60_v2";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
zmk,matrix_transform = &ansi_transform;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
ansi_transform: keymap_transform_0 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <15>;
|
|
||||||
rows = <5>;
|
|
||||||
map = <
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
|
|
||||||
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12)
|
|
||||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
iso_transform: keymap_transform_1 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <15>;
|
|
||||||
rows = <5>;
|
|
||||||
map = <
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13)
|
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12)
|
|
||||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
all_1u_transform: keymap_transform_2 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <15>;
|
|
||||||
rows = <5>;
|
|
||||||
map = <
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
|
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14)
|
|
||||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
hhkb_transform: keymap_transform_3 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <15>;
|
|
||||||
rows = <5>;
|
|
||||||
map = <
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
|
|
||||||
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12)
|
|
||||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,11) RC(5,12) RC(5,13)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,177 +0,0 @@
|
|||||||
#include <behaviors.dtsi>
|
|
||||||
#include <dt-bindings/zmk/keys.h>
|
|
||||||
#include <dt-bindings/zmk/bt.h>
|
|
||||||
#include <dt-bindings/zmk/rgb.h>
|
|
||||||
#include <dt-bindings/zmk/backlight.h>
|
|
||||||
|
|
||||||
#define ANSI
|
|
||||||
//#define ISO
|
|
||||||
//#define ALL_1U
|
|
||||||
//#define HHKB
|
|
||||||
|
|
||||||
/ {
|
|
||||||
chosen {
|
|
||||||
#ifdef ANSI
|
|
||||||
zmk,matrix_transform = &ansi_transform;
|
|
||||||
#elif defined(ISO)
|
|
||||||
zmk,matrix_transform = &iso_transform;
|
|
||||||
#elif defined(ALL_1U)
|
|
||||||
zmk,matrix_transform = &all_1u_transform;
|
|
||||||
#elif defined(HHKB)
|
|
||||||
zmk,matrix_transform = &hhkb_transform;
|
|
||||||
#else
|
|
||||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap"
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
keymap {
|
|
||||||
compatible = "zmk,keymap";
|
|
||||||
#ifdef ANSI
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
|
|
||||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
|
|
||||||
&kp CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
|
|
||||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
|
||||||
// | TAB | Q | UP | E | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | RGB_TOG|
|
|
||||||
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | HOME| PGUP| BOOT |
|
|
||||||
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | END | PGDN | BL_TOG |
|
|
||||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | RESET | BT_CLR |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
|
||||||
&trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &rgb_ug RGB_TOG
|
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &kp END &kp PG_DN &bl BL_TOG
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &sys_reset &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#elif defined(ISO)
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER |
|
|
||||||
// | SHIFT | \ | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
|
|
||||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT
|
|
||||||
&kp CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp NON_US_HASH &kp RET
|
|
||||||
&kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
|
||||||
// | TAB | Q | UP | E | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | |
|
|
||||||
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | HOME| PGUP|RGB_TOG| BOOT |
|
|
||||||
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| B | N | M | , | END | PGDN | BL_TOG |
|
|
||||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | RESET |BT_CLR |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
|
||||||
&trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK
|
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &rgb_ug RGB_TOG &bootloader
|
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &kp END &kp PG_DN &bl BL_TOG
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &sys_reset &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#elif defined(ALL_1U)
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BKSP | DEL |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
|
||||||
// | SHFT |NONE| Z | X | C | V | B | N | M | , | . | / | SHFT | UP | 1 |
|
|
||||||
// | CTL | WIN | ALT | SPACE | RALT| CTRL | LEFT | DOWN | RIGHT |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
|
|
||||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
|
|
||||||
&kp LSHFT &none &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &mo 1
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |BKSP | DEL |
|
|
||||||
// | TAB | Q | W | E | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | RGB_TOG |
|
|
||||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | HOME| PGUP| BOOT |
|
|
||||||
// | SHFT |NONE|VOLDN|VOLUP|MUTE|BLINC|BLDEC| N | M | , | END | PGDN | SHFT|BL_TOG| 1 |
|
|
||||||
// | BT_PRV| BT_NXT| ALT | SPACE | RALT| CTRL | LEFT |RESET| BT_CLR |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &rgb_ug RGB_TOG
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
|
||||||
&trans &none &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &kp END &kp PG_DN &trans &bl BL_TOG &trans
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &sys_reset &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#elif defined(HHKB)
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | CTRL |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
|
|
||||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
|
|
||||||
&kp CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
|
|
||||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
|
||||||
// | TAB | Q | UP | E | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | RGB_TOG|
|
|
||||||
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | HOME| PGUP| BOOT |
|
|
||||||
// | SHFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | END | PGDN | BL_TOG |
|
|
||||||
// | BT_PRV | BT_NXT | ALT | SPACE | RESET | 1 | BT_CLR |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
|
||||||
&trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &rgb_ug RGB_TOG
|
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &kp END &kp PG_DN &bl BL_TOG
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &sys_reset &trans &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
identifier: bt60_v2
|
|
||||||
name: BT60 V2
|
|
||||||
type: mcu
|
|
||||||
arch: arm
|
|
||||||
toolchain:
|
|
||||||
- zephyr
|
|
||||||
- gnuarmemb
|
|
||||||
- xtools
|
|
||||||
supported:
|
|
||||||
- adc
|
|
||||||
- usb_device
|
|
||||||
- ble
|
|
||||||
- ieee802154
|
|
||||||
- pwm
|
|
||||||
- watchdog
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: bt60_v2
|
|
||||||
name: BT60 V2
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
features:
|
|
||||||
- keys
|
|
||||||
- encoder
|
|
||||||
- underglow
|
|
||||||
- backlight
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
url: https://polarityworks.com/btckp
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_NRF52X=y
|
|
||||||
CONFIG_SOC_NRF52840_QIAA=y
|
|
||||||
CONFIG_BOARD_BT60_V2=y
|
|
||||||
|
|
||||||
# Enable MPU
|
|
||||||
CONFIG_ARM_MPU=y
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
CONFIG_PINCTRL=y
|
|
||||||
|
|
||||||
# encoder
|
|
||||||
CONFIG_EC11=y
|
|
||||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
|
||||||
CONFIG_PWM=y
|
|
||||||
CONFIG_LED_PWM=y
|
|
||||||
CONFIG_ZMK_BACKLIGHT=y
|
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
|
||||||
CONFIG_NVS=y
|
|
||||||
CONFIG_SETTINGS_NVS=y
|
|
||||||
CONFIG_FLASH=y
|
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
||||||
CONFIG_FLASH_MAP=y
|
|
||||||
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW=y
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262
|
|
||||||
CONFIG_WS2812_STRIP=y
|
|
||||||
CONFIG_SPI=y
|
|
||||||
|
|
||||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
|
||||||
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
CONFIG_ZMK_BLE=y
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
#include "ckp.dtsi"
|
|
||||||
|
|
||||||
|
|
||||||
/ {
|
|
||||||
model = "BT65_V1";
|
|
||||||
compatible = "polarityworks,bt65_v1";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
zmk,matrix_transform = &ansi_transform;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
ansi_transform: keymap_transform_0 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <16>;
|
|
||||||
rows = <5>;
|
|
||||||
map = <
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
|
|
||||||
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15)
|
|
||||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
iso_transform: keymap_transform_1 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <16>;
|
|
||||||
rows = <5>;
|
|
||||||
map = <
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,15)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) RC(3,15)
|
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15)
|
|
||||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
all_1u_transform: keymap_transform_2 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <16>;
|
|
||||||
rows = <5>;
|
|
||||||
map = <
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14) RC(1,15)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
|
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) RC(4,15)
|
|
||||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
hhkb_transform: keymap_transform_3 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <16>;
|
|
||||||
rows = <5>;
|
|
||||||
map = <
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
|
|
||||||
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,15)
|
|
||||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,11) RC(5,12) RC(5,13) RC(5,15)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,177 +0,0 @@
|
|||||||
#include <behaviors.dtsi>
|
|
||||||
#include <dt-bindings/zmk/keys.h>
|
|
||||||
#include <dt-bindings/zmk/bt.h>
|
|
||||||
#include <dt-bindings/zmk/rgb.h>
|
|
||||||
#include <dt-bindings/zmk/backlight.h>
|
|
||||||
|
|
||||||
#define ANSI
|
|
||||||
//#define ISO
|
|
||||||
//#define ALL_1U
|
|
||||||
//#define HHKB
|
|
||||||
|
|
||||||
/ {
|
|
||||||
chosen {
|
|
||||||
#ifdef ANSI
|
|
||||||
zmk,matrix_transform = &ansi_transform;
|
|
||||||
#elif defined(ISO)
|
|
||||||
zmk,matrix_transform = &iso_transform;
|
|
||||||
#elif defined(ALL_1U)
|
|
||||||
zmk,matrix_transform = &all_1u_transform;
|
|
||||||
#elif defined(HHKB)
|
|
||||||
zmk,matrix_transform = &hhkb_transform;
|
|
||||||
#else
|
|
||||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65_v1.keymap"
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
keymap {
|
|
||||||
compatible = "zmk,keymap";
|
|
||||||
#ifdef ANSI
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | DEL |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | INS |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PGUP|
|
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PGDN|
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
|
|
||||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BKSP &kp DEL
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp INS
|
|
||||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp PG_UP
|
|
||||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp PG_DN
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
// --------------------------------------------------------------------------------------------------
|
|
||||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | BL_TOG |RGB_TOG|
|
|
||||||
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | PSCRN|
|
|
||||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' | BOOT | P_BRK|
|
|
||||||
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / | SHIFT | HOME | END |
|
|
||||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL | LEFT | DOWN |BT_CLR|
|
|
||||||
// --------------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PSCRN
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &kp PAUSE_BREAK
|
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &kp HOME &kp END
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#elif defined(ISO)
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | DEL |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | INS |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER | PGUP|
|
|
||||||
// |SHIFT | \ | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PGDN|
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
|
|
||||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BKSP &kp DEL
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp INS
|
|
||||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp NON_US_HASH &kp RET &kp PG_UP
|
|
||||||
&kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp PG_DN
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
// --------------------------------------------------------------------------------------------------
|
|
||||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | BL_TOG |RGB_TOG|
|
|
||||||
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | | PSCRN|
|
|
||||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' |RESET| BOOT | P_BRK|
|
|
||||||
// |SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| B | N | M | , | . | / | SHIFT | HOME | END |
|
|
||||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL | LEFT | DOWN |BT_CLR|
|
|
||||||
// --------------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &kp PSCRN
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &sys_reset &bootloader &kp PAUSE_BREAK
|
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &kp HOME &kp END
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#elif defined(ALL_1U)
|
|
||||||
default_layer {
|
|
||||||
// -------------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BKSP | DEL | HOME|
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | END |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PGUP|
|
|
||||||
// |SHIFT|NONE | Z | X | C | V | B | N | M | , | . | / |SHIFT|NONE | UP | PGDN|
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
|
|
||||||
// -------------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL &kp HOME
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp END
|
|
||||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp PG_UP
|
|
||||||
&kp LSHFT &none &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &none &kp UP &kp PG_DN
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp LALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
// --------------------------------------------------------------------------------------------------
|
|
||||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |BL_TOG|RGB_TOG|HOME|
|
|
||||||
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | PSCRN|
|
|
||||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' | BOOT | P_BRK|
|
|
||||||
// |SHIFT| NONE|VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / |SHIFT| NONE| UP | INS |
|
|
||||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL| LEFT| DOWN |BT_CLR|
|
|
||||||
// --------------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG &trans
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PSCRN
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &kp PAUSE_BREAK
|
|
||||||
&trans &none &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans &kp INS
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#elif defined(HHKB)
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | DEL |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | HOME|
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | END |
|
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | PGUP|
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | CTRL | PGDN|
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
|
|
||||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BKSP &kp DEL
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp HOME
|
|
||||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp END
|
|
||||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp PG_UP
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp PG_DN
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
// --------------------------------------------------------------------------------------------------
|
|
||||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | BL_TOG |RGB_TOG|
|
|
||||||
// | TAB | Q | UP | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | PSCRN|
|
|
||||||
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | ; | ' | BOOT | P_BRK|
|
|
||||||
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / | SHIFT | INS |
|
|
||||||
// | BT_PRV | BT_NXT | ALT | SPACE | ALT | 1 | CTRL |BT_CLR|
|
|
||||||
// --------------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG
|
|
||||||
&trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PSCRN
|
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &kp PAUSE_BREAK
|
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &kp INS
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65_v1.keymap"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
identifier: bt65_v1
|
|
||||||
name: BT65_V1
|
|
||||||
type: mcu
|
|
||||||
arch: arm
|
|
||||||
toolchain:
|
|
||||||
- zephyr
|
|
||||||
- gnuarmemb
|
|
||||||
- xtools
|
|
||||||
supported:
|
|
||||||
- adc
|
|
||||||
- usb_device
|
|
||||||
- ble
|
|
||||||
- ieee802154
|
|
||||||
- pwm
|
|
||||||
- watchdog
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: bt65_v1
|
|
||||||
name: BT65
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
features:
|
|
||||||
- keys
|
|
||||||
- encoder
|
|
||||||
- underglow
|
|
||||||
- backlight
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
url: https://polarityworks.com/btckp
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_NRF52X=y
|
|
||||||
CONFIG_SOC_NRF52840_QIAA=y
|
|
||||||
CONFIG_BOARD_BT65_V1=y
|
|
||||||
|
|
||||||
# Enable MPU
|
|
||||||
CONFIG_ARM_MPU=y
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
CONFIG_PINCTRL=y
|
|
||||||
|
|
||||||
# encoder
|
|
||||||
CONFIG_EC11=y
|
|
||||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
|
||||||
CONFIG_PWM=y
|
|
||||||
CONFIG_LED_PWM=y
|
|
||||||
CONFIG_ZMK_BACKLIGHT=y
|
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
|
||||||
CONFIG_NVS=y
|
|
||||||
CONFIG_SETTINGS_NVS=y
|
|
||||||
CONFIG_FLASH=y
|
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
||||||
CONFIG_FLASH_MAP=y
|
|
||||||
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW=y
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262
|
|
||||||
CONFIG_WS2812_STRIP=y
|
|
||||||
CONFIG_SPI=y
|
|
||||||
|
|
||||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
|
||||||
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
CONFIG_ZMK_BLE=y
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2022 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
#include "ckp.dtsi"
|
|
||||||
|
|
||||||
|
|
||||||
/ {
|
|
||||||
model = "BT75_V1";
|
|
||||||
compatible = "polarityworks,bt75_v1";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
zmk,matrix_transform = &ansi_transform;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
ansi_transform: keymap_transform_0 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <16>;
|
|
||||||
rows = <6>;
|
|
||||||
map = <
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
|
|
||||||
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15)
|
|
||||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
iso_transform: keymap_transform_1 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <16>;
|
|
||||||
rows = <6>;
|
|
||||||
map = <
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,15)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) RC(3,15)
|
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15)
|
|
||||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
all_1u_transform: keymap_transform_2 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <16>;
|
|
||||||
rows = <6>;
|
|
||||||
map = <
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14) RC(1,15)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
|
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) RC(4,15)
|
|
||||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,148 +0,0 @@
|
|||||||
#include <behaviors.dtsi>
|
|
||||||
#include <dt-bindings/zmk/keys.h>
|
|
||||||
#include <dt-bindings/zmk/bt.h>
|
|
||||||
#include <dt-bindings/zmk/rgb.h>
|
|
||||||
#include <dt-bindings/zmk/backlight.h>
|
|
||||||
|
|
||||||
#define ANSI
|
|
||||||
//#define ISO
|
|
||||||
//#define ALL_1U
|
|
||||||
|
|
||||||
/ {
|
|
||||||
chosen {
|
|
||||||
#ifdef ANSI
|
|
||||||
zmk,matrix_transform = &ansi_transform;
|
|
||||||
#elif defined(ISO)
|
|
||||||
zmk,matrix_transform = &iso_transform;
|
|
||||||
#elif defined(ALL_1U)
|
|
||||||
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
|
|
||||||
};
|
|
||||||
|
|
||||||
keymap {
|
|
||||||
compatible = "zmk,keymap";
|
|
||||||
#ifdef ANSI
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN|HOME| END |
|
|
||||||
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | DEL |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | INS |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PGUP|
|
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PGDN|
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp PSCRN &kp HOME &kp END
|
|
||||||
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BKSP &kp DEL
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp INS
|
|
||||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp PG_UP
|
|
||||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp PG_DN
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
// --------------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN| HOME| END |
|
|
||||||
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BL_TOG |RGB_TOG|
|
|
||||||
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | P_BRK|
|
|
||||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' | BOOT | PG_UP|
|
|
||||||
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / | SHIFT | UP | PG_DN|
|
|
||||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL | LEFT | DOWN |BT_CLR|
|
|
||||||
// --------------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&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 &bl BL_TOG &rgb_ug RGB_TOG
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PAUSE_BREAK
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &trans
|
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#elif defined(ISO)
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN|HOME| END |
|
|
||||||
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | DEL |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | INS |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER | PGUP|
|
|
||||||
// |SHIFT | \ | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PGDN|
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp PSCRN &kp HOME &kp END
|
|
||||||
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BKSP &kp DEL
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp INS
|
|
||||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp NON_US_HASH &kp RET &kp PG_UP
|
|
||||||
&kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp PG_DN
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
// --------------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN|HOME| END |
|
|
||||||
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BL_TOG |RGB_TOG|
|
|
||||||
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | | P_BRK|
|
|
||||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' |RESET| BOOT | PG_UP|
|
|
||||||
// |SHIFT | \ |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / | SHIFT | UP | PG_DN|
|
|
||||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL | LEFT | DOWN |BT_CLR|
|
|
||||||
// --------------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&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 &bl BL_TOG &rgb_ug RGB_TOG
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &kp PAUSE_BREAK
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &sys_reset &bootloader &trans
|
|
||||||
&trans &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#elif defined(ALL_1U)
|
|
||||||
default_layer {
|
|
||||||
// -------------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN| P_B | INS |
|
|
||||||
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BKSP | DEL | HOME|
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | END |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PGUP|
|
|
||||||
// |SHIFT|NONE | Z | X | C | V | B | N | M | , | . | / |SHIFT|NONE | UP | PGDN|
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
|
|
||||||
// -------------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp PSCRN &kp PAUSE_BREAK &kp INS
|
|
||||||
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL &kp HOME
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp END
|
|
||||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp PG_UP
|
|
||||||
&kp LSHFT &none &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &none &kp UP &kp PG_DN
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp LALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
// --------------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN| P_B | INS |
|
|
||||||
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BL_TOG|RGB_TOG|HOME|
|
|
||||||
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | END |
|
|
||||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' | BOOT | PGUP |
|
|
||||||
// |SHIFT| NONE|VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / |SHIFT| NONE| UP | PGDN |
|
|
||||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL| LEFT| DOWN |BT_CLR|
|
|
||||||
// --------------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&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 &bl BL_TOG &rgb_ug RGB_TOG &trans
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &trans
|
|
||||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &trans
|
|
||||||
&trans &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt75.keymap"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
identifier: bt75_v1
|
|
||||||
name: BT75_V1
|
|
||||||
type: mcu
|
|
||||||
arch: arm
|
|
||||||
toolchain:
|
|
||||||
- zephyr
|
|
||||||
- gnuarmemb
|
|
||||||
- xtools
|
|
||||||
supported:
|
|
||||||
- adc
|
|
||||||
- usb_device
|
|
||||||
- ble
|
|
||||||
- ieee802154
|
|
||||||
- pwm
|
|
||||||
- watchdog
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: bt75_v1
|
|
||||||
name: BT75_V1
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
features:
|
|
||||||
- keys
|
|
||||||
- encoder
|
|
||||||
- underglow
|
|
||||||
- backlight
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
url: https://polarityworks.com/btckp
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_NRF52X=y
|
|
||||||
CONFIG_SOC_NRF52840_QIAA=y
|
|
||||||
CONFIG_BOARD_BT75_V1=y
|
|
||||||
|
|
||||||
# Enable MPU
|
|
||||||
CONFIG_ARM_MPU=y
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
CONFIG_PINCTRL=y
|
|
||||||
|
|
||||||
# encoder
|
|
||||||
CONFIG_EC11=y
|
|
||||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
|
||||||
CONFIG_PWM=y
|
|
||||||
CONFIG_LED_PWM=y
|
|
||||||
CONFIG_ZMK_BACKLIGHT=y
|
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
|
||||||
CONFIG_NVS=y
|
|
||||||
CONFIG_SETTINGS_NVS=y
|
|
||||||
CONFIG_FLASH=y
|
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
||||||
CONFIG_FLASH_MAP=y
|
|
||||||
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW=y
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262
|
|
||||||
CONFIG_WS2812_STRIP=y
|
|
||||||
CONFIG_SPI=y
|
|
||||||
|
|
||||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
|
||||||
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
CONFIG_ZMK_BLE=y
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) 2022 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,218 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2022 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 "ckp-pinctrl.dtsi"
|
|
||||||
|
|
||||||
/ {
|
|
||||||
model = "CKP";
|
|
||||||
compatible = "polarityworks,ckp";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
zephyr,code-partition = &code_partition;
|
|
||||||
zephyr,sram = &sram0;
|
|
||||||
zephyr,flash = &flash0;
|
|
||||||
zmk,kscan = &kscan0;
|
|
||||||
zmk,underglow = &led_strip;
|
|
||||||
zmk,backlight = &backlight;
|
|
||||||
zmk,battery = &vbatt;
|
|
||||||
};
|
|
||||||
|
|
||||||
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
|
|
||||||
= <&gpio1 11 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 10 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 13 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 15 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 3 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 2 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 28 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 29 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 30 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 31 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 5 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 23 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 6 GPIO_ACTIVE_HIGH>
|
|
||||||
;
|
|
||||||
|
|
||||||
row-gpios
|
|
||||||
= <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
;
|
|
||||||
};
|
|
||||||
|
|
||||||
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>;
|
|
||||||
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>;
|
|
||||||
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>;
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
backlight: pwmleds {
|
|
||||||
compatible = "pwm-leds";
|
|
||||||
label = "Backlight LEDs";
|
|
||||||
pwm_led_0 {
|
|
||||||
pwms = <&pwm0 0 10000 PWM_POLARITY_NORMAL>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
blue_led: led_0 {
|
|
||||||
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
|
||||||
label = "Blue LED";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
vbatt: vbatt {
|
|
||||||
compatible = "zmk,battery-voltage-divider";
|
|
||||||
label = "VBATT";
|
|
||||||
io-channels = <&adc 2>;
|
|
||||||
output-ohms = <100000>;
|
|
||||||
full-ohms = <(100000 + 100000)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&adc {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&pwm0 {
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-0 = <&pwm0_default>;
|
|
||||||
pinctrl-1 = <&pwm0_sleep>;
|
|
||||||
pinctrl-names = "default", "sleep";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpiote {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio0 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio1 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&usbd {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
&flash0 {
|
|
||||||
/*
|
|
||||||
* For more information, see:
|
|
||||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
|
||||||
*/
|
|
||||||
partitions {
|
|
||||||
compatible = "fixed-partitions";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
sd_partition: partition@0 {
|
|
||||||
label = "softdevice";
|
|
||||||
reg = <0x00000000 0x00026000>;
|
|
||||||
};
|
|
||||||
code_partition: partition@26000 {
|
|
||||||
label = "code_partition";
|
|
||||||
reg = <0x00026000 0x000c6000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The flash starting at 0x000ec000 and ending at
|
|
||||||
* 0x000f3fff is reserved for use by the application.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Storage partition will be used by FCB/LittleFS/NVS
|
|
||||||
* if enabled.
|
|
||||||
*/
|
|
||||||
storage_partition: partition@ec000 {
|
|
||||||
label = "storage";
|
|
||||||
reg = <0x000ec000 0x00008000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
boot_partition: partition@f4000 {
|
|
||||||
label = "adafruit_boot";
|
|
||||||
reg = <0x000f4000 0x0000c000>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&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";
|
|
||||||
label = "WS2812";
|
|
||||||
|
|
||||||
/* SPI */
|
|
||||||
reg = <0>;
|
|
||||||
spi-max-frequency = <4000000>;
|
|
||||||
|
|
||||||
/* WS2812 */
|
|
||||||
chain-length = <12>; /* 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,60 +0,0 @@
|
|||||||
if(CONFIG_ZMK_DISPLAY)
|
|
||||||
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS app PRIVATE widgets/battery_status.c)
|
|
||||||
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS app PRIVATE widgets/output_status.c)
|
|
||||||
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_LAYER_STATUS app PRIVATE widgets/layer_status.c)
|
|
||||||
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS app PRIVATE widgets/peripheral_status.c)
|
|
||||||
|
|
||||||
add_subdirectory_ifdef(CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM widgets/icons)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
zephyr_library()
|
|
||||||
|
|
||||||
if(CONFIG_ZMK_DISPLAY)
|
|
||||||
if(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS)
|
|
||||||
zephyr_library_sources(widgets/icons/batt_100.c)
|
|
||||||
zephyr_library_sources(widgets/icons/batt_100_chg.c)
|
|
||||||
zephyr_library_sources(widgets/icons/batt_75.c)
|
|
||||||
zephyr_library_sources(widgets/icons/batt_75_chg.c)
|
|
||||||
zephyr_library_sources(widgets/icons/batt_50.c)
|
|
||||||
zephyr_library_sources(widgets/icons/batt_50_chg.c)
|
|
||||||
zephyr_library_sources(widgets/icons/batt_25.c)
|
|
||||||
zephyr_library_sources(widgets/icons/batt_25_chg.c)
|
|
||||||
zephyr_library_sources(widgets/icons/batt_5.c)
|
|
||||||
zephyr_library_sources(widgets/icons/batt_5_chg.c)
|
|
||||||
zephyr_library_sources(widgets/icons/batt_0.c)
|
|
||||||
zephyr_library_sources(widgets/icons/batt_0_chg.c)
|
|
||||||
endif()
|
|
||||||
if(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS)
|
|
||||||
zephyr_library_sources(widgets/icons/bluetooth_advertising.c)
|
|
||||||
zephyr_library_sources(widgets/icons/bluetooth_connected_right.c)
|
|
||||||
zephyr_library_sources(widgets/icons/bluetooth_disconnected_right.c)
|
|
||||||
endif()
|
|
||||||
if(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS)
|
|
||||||
zephyr_library_sources(widgets/icons/USB_connected.c)
|
|
||||||
zephyr_library_sources(widgets/icons/bluetooth_connected_1.c)
|
|
||||||
zephyr_library_sources(widgets/icons/bluetooth_connected_2.c)
|
|
||||||
zephyr_library_sources(widgets/icons/bluetooth_connected_3.c)
|
|
||||||
zephyr_library_sources(widgets/icons/bluetooth_connected_4.c)
|
|
||||||
zephyr_library_sources(widgets/icons/bluetooth_connected_5.c)
|
|
||||||
zephyr_library_sources(widgets/icons/bluetooth_advertising_1.c)
|
|
||||||
zephyr_library_sources(widgets/icons/bluetooth_advertising_2.c)
|
|
||||||
zephyr_library_sources(widgets/icons/bluetooth_advertising_3.c)
|
|
||||||
zephyr_library_sources(widgets/icons/bluetooth_advertising_4.c)
|
|
||||||
zephyr_library_sources(widgets/icons/bluetooth_advertising_5.c)
|
|
||||||
zephyr_library_sources(widgets/icons/bluetooth_disconnected_right.c)
|
|
||||||
endif()
|
|
||||||
if(CONFIG_CUSTOM_WIDGET_LAYER_STATUS)
|
|
||||||
zephyr_library_sources(widgets/icons/layers.c)
|
|
||||||
zephyr_library_sources(widgets/icons/layers2.c)
|
|
||||||
endif()
|
|
||||||
if(NOT CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
|
||||||
zephyr_library_sources(widgets/icons/zenlogo.c)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
zephyr_library_include_directories(${ZEPHYR_LVGL_MODULE_DIR})
|
|
||||||
zephyr_library_include_directories(${ZEPHYR_BASE}/lib/gui/lvgl/)
|
|
||||||
zephyr_library_sources_ifdef(CONFIG_ZMK_DISPLAY custom_status_screen.c)
|
|
||||||
zephyr_library_sources(${ZEPHYR_BASE}/misc/empty_file.c)
|
|
||||||
zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include)
|
|
||||||
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2022 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
config BOARD_CORNEISH_ZEN_LEFT
|
|
||||||
bool
|
|
||||||
|
|
||||||
config BOARD_CORNEISH_ZEN_RIGHT
|
|
||||||
bool
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2022 Darryl deHaan
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
config BOARD_CORNEISH_ZEN_V1_LEFT
|
|
||||||
bool "corneish zen left v1"
|
|
||||||
depends on SOC_NRF52840_QIAA
|
|
||||||
select BOARD_CORNEISH_ZEN_LEFT
|
|
||||||
|
|
||||||
config BOARD_CORNEISH_ZEN_V1_RIGHT
|
|
||||||
bool "corneish zen right v1"
|
|
||||||
depends on SOC_NRF52840_QIAA
|
|
||||||
select BOARD_CORNEISH_ZEN_RIGHT
|
|
||||||
|
|
||||||
config BOARD_CORNEISH_ZEN_V2_LEFT
|
|
||||||
bool "corneish zen left v2"
|
|
||||||
depends on SOC_NRF52840_QIAA
|
|
||||||
select BOARD_CORNEISH_ZEN_LEFT
|
|
||||||
|
|
||||||
config BOARD_CORNEISH_ZEN_V2_RIGHT
|
|
||||||
bool "corneish zen right v2"
|
|
||||||
depends on SOC_NRF52840_QIAA
|
|
||||||
select BOARD_CORNEISH_ZEN_RIGHT
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2022 Darryl deHaan
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
if BOARD_CORNEISH_ZEN_LEFT
|
|
||||||
|
|
||||||
config ZMK_KEYBOARD_NAME
|
|
||||||
default "Corne-ish Zen"
|
|
||||||
|
|
||||||
config ZMK_SPLIT_ROLE_CENTRAL
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_CORNEISH_ZEN_LEFT
|
|
||||||
|
|
||||||
|
|
||||||
if BOARD_CORNEISH_ZEN_LEFT || BOARD_CORNEISH_ZEN_RIGHT
|
|
||||||
|
|
||||||
config BOARD
|
|
||||||
default "corneish_zen"
|
|
||||||
|
|
||||||
config ZMK_SPLIT
|
|
||||||
default y
|
|
||||||
|
|
||||||
config BT_CTLR
|
|
||||||
default BT
|
|
||||||
|
|
||||||
if USB
|
|
||||||
|
|
||||||
config USB_NRFX
|
|
||||||
default y
|
|
||||||
|
|
||||||
config USB_DEVICE_STACK
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # USB
|
|
||||||
|
|
||||||
config ZMK_DISPLAY
|
|
||||||
select LV_USE_CONT
|
|
||||||
select LV_FONT_MONTSERRAT_26
|
|
||||||
select LV_FONT_MONTSERRAT_16
|
|
||||||
select LV_USE_LABEL
|
|
||||||
select LV_USE_IMG
|
|
||||||
|
|
||||||
choice ZMK_DISPLAY_STATUS_SCREEN
|
|
||||||
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
if ZMK_DISPLAY
|
|
||||||
|
|
||||||
config SPI
|
|
||||||
default y
|
|
||||||
|
|
||||||
config IL0323
|
|
||||||
default y
|
|
||||||
|
|
||||||
config ZMK_DISPLAY_BLANK_ON_IDLE
|
|
||||||
default n
|
|
||||||
|
|
||||||
endif # ZMK_DISPLAY
|
|
||||||
|
|
||||||
menuconfig CUSTOM_WIDGET_BATTERY_STATUS
|
|
||||||
bool "custom battery status widget"
|
|
||||||
|
|
||||||
menuconfig CUSTOM_WIDGET_OUTPUT_STATUS
|
|
||||||
bool "custom output status widget"
|
|
||||||
|
|
||||||
menuconfig CUSTOM_WIDGET_LAYER_STATUS
|
|
||||||
bool "custom layer status widget"
|
|
||||||
|
|
||||||
menuconfig CUSTOM_WIDGET_PERIPHERAL_STATUS
|
|
||||||
bool "custom peripheral status widget"
|
|
||||||
|
|
||||||
endif # BOARD_CORNEISH_ZEN_LEFT || BOARD_CORNEISH_ZEN_RIGHT
|
|
||||||
|
|
||||||
if BOARD_CORNEISH_ZEN_V1_LEFT || BOARD_CORNEISH_ZEN_V1_RIGHT
|
|
||||||
|
|
||||||
config BQ274XX
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_CORNEISH_ZEN_V1_LEFT || BOARD_CORNEISH_ZEN_V1_RIGHT
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# 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,5 +0,0 @@
|
|||||||
# Go to sleep after one hour (1*60*60*1000ms)
|
|
||||||
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
|
|
||||||
|
|
||||||
# Turn on logging, and set ZMK logging to debug output
|
|
||||||
# CONFIG_ZMK_USB_LOGGING=y
|
|
||||||
@@ -1,125 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
|
||||||
|
|
||||||
#include <dt-bindings/zmk/matrix_transform.h>
|
|
||||||
|
|
||||||
/ {
|
|
||||||
model = "Corne-ish Zen";
|
|
||||||
compatible = "corneish_zen";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
zephyr,code-partition = &code_partition;
|
|
||||||
zephyr,sram = &sram0;
|
|
||||||
zephyr,flash = &flash0;
|
|
||||||
zmk,kscan = &kscan0;
|
|
||||||
zmk,display = &epd;
|
|
||||||
zephyr,console = &cdc_acm_uart;
|
|
||||||
zmk,matrix_transform = &default_transform;
|
|
||||||
};
|
|
||||||
|
|
||||||
default_transform: keymap_transform_0 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <12>;
|
|
||||||
rows = <4>;
|
|
||||||
|
|
||||||
// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 |
|
|
||||||
// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 |
|
|
||||||
// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |
|
|
||||||
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
|
|
||||||
map = <
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11)
|
|
||||||
RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
five_column_transform: keymap_transform_1 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <10>;
|
|
||||||
rows = <4>;
|
|
||||||
|
|
||||||
// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 |
|
|
||||||
// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 |
|
|
||||||
// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 |
|
|
||||||
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
|
|
||||||
map = <
|
|
||||||
RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10)
|
|
||||||
RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10)
|
|
||||||
RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10)
|
|
||||||
RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
&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";
|
|
||||||
label = "CDC_ACM_0";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&flash0 {
|
|
||||||
/*
|
|
||||||
* For more information, see:
|
|
||||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
|
||||||
*/
|
|
||||||
partitions {
|
|
||||||
compatible = "fixed-partitions";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
sd_partition: partition@0 {
|
|
||||||
label = "softdevice";
|
|
||||||
reg = <0x00000000 0x00026000>;
|
|
||||||
};
|
|
||||||
code_partition: partition@26000 {
|
|
||||||
label = "code_partition";
|
|
||||||
reg = <0x00026000 0x000c6000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The flash starting at 0x000ec000 and ending at
|
|
||||||
* 0x000f3fff is reserved for use by the application.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Storage partition will be used by FCB/LittleFS/NVS
|
|
||||||
* if enabled.
|
|
||||||
*/
|
|
||||||
storage_partition: partition@ec000 {
|
|
||||||
label = "storage";
|
|
||||||
reg = <0x000ec000 0x00008000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
boot_partition: partition@f4000 {
|
|
||||||
label = "adafruit_boot";
|
|
||||||
reg = <0x000f4000 0x0000c000>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <behaviors.dtsi>
|
|
||||||
#include <dt-bindings/zmk/keys.h>
|
|
||||||
#include <dt-bindings/zmk/bt.h>
|
|
||||||
|
|
||||||
/ {
|
|
||||||
chosen {
|
|
||||||
zmk,matrix_transform = &default_transform;
|
|
||||||
// zmk,matrix_transform = &five_column_transform;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/ {
|
|
||||||
keymap {
|
|
||||||
compatible = "zmk,keymap";
|
|
||||||
|
|
||||||
default_layer {
|
|
||||||
label = "QWERTY";
|
|
||||||
// --------------------------------------------------------------------------------
|
|
||||||
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP |
|
|
||||||
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' |
|
|
||||||
// | SHFT | Z | X | C | V | B | | N | M | , | . | / | ESC |
|
|
||||||
// | GUI | LWR | SPC | | ENT | RSE | ALT |
|
|
||||||
bindings = <
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
|
|
||||||
&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
|
|
||||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC
|
|
||||||
&kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp RALT
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
lower_layer {
|
|
||||||
label = "NUMBER";
|
|
||||||
// -----------------------------------------------------------------------------------------
|
|
||||||
// | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP |
|
|
||||||
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | |
|
|
||||||
// | SHFT | | | | | | | | | | | | |
|
|
||||||
// | GUI | | SPC | | ENT | | ALT |
|
|
||||||
bindings = <
|
|
||||||
&kp TAB &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
|
|
||||||
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
|
|
||||||
&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
||||||
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
raise_layer {
|
|
||||||
label = "SYMBOL";
|
|
||||||
// -----------------------------------------------------------------------------------------
|
|
||||||
// | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP |
|
|
||||||
// | CTRL | | | | | | | - | = | [ | ] | \ | ` |
|
|
||||||
// | SHFT | | | | | | | _ | + | { | } | "|" | ~ |
|
|
||||||
// | GUI | | SPC | | ENT | | ALT |
|
|
||||||
bindings = <
|
|
||||||
&kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC
|
|
||||||
&kp LCTRL &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE
|
|
||||||
&kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE
|
|
||||||
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
identifier: corne-ish_zen_v2
|
|
||||||
name: Corne-ish Zen v2
|
|
||||||
url: https://lowprokb.ca/collections/keyboards/products/corne-ish-zen
|
|
||||||
type: mcu
|
|
||||||
arch: arm
|
|
||||||
toolchain:
|
|
||||||
- zephyr
|
|
||||||
- gnuarmemb
|
|
||||||
- xtools
|
|
||||||
ram: 40
|
|
||||||
supported:
|
|
||||||
- adc
|
|
||||||
- usb_device
|
|
||||||
- ble
|
|
||||||
- ieee802154
|
|
||||||
- pwm
|
|
||||||
- watchdog
|
|
||||||
- gpio
|
|
||||||
- i2c
|
|
||||||
- spi
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: corneish_zen_v1
|
|
||||||
name: Corneish Zen v1
|
|
||||||
url: https://lowprokb.ca/collections/keyboards/products/corne-ish-zen
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
features:
|
|
||||||
- keys
|
|
||||||
- display
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
siblings:
|
|
||||||
- corneish_zen_v1_left
|
|
||||||
- corneish_zen_v1_right
|
|
||||||
@@ -1,123 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "corneish_zen.dtsi"
|
|
||||||
|
|
||||||
/{
|
|
||||||
chosen {
|
|
||||||
zephyr,display = &epd;
|
|
||||||
zmk,battery = &fuelgauge;
|
|
||||||
};
|
|
||||||
|
|
||||||
kscan0: kscan {
|
|
||||||
compatible = "zmk,kscan-gpio-matrix";
|
|
||||||
label = "KSCAN";
|
|
||||||
|
|
||||||
diode-direction = "col2row";
|
|
||||||
row-gpios
|
|
||||||
= <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
;
|
|
||||||
|
|
||||||
col-gpios
|
|
||||||
= <&gpio0 21 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 23 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 5 GPIO_ACTIVE_HIGH>
|
|
||||||
;
|
|
||||||
};
|
|
||||||
|
|
||||||
leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
blue_led: led_0 {
|
|
||||||
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
|
|
||||||
label = "Blue LED";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&pinctrl {
|
|
||||||
spi2_default: spi2_default {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
|
|
||||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
|
|
||||||
<NRF_PSEL(SPIM_MISO, 0, 22)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
spi2_sleep: spi2_sleep {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
|
|
||||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
|
|
||||||
<NRF_PSEL(SPIM_MISO, 0, 22)>;
|
|
||||||
low-power-enable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c0_default: i2c0_default {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(TWIM_SDA, 0, 6)>,
|
|
||||||
<NRF_PSEL(TWIM_SCL, 0, 26)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c0_sleep: i2c0_sleep {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(TWIM_SDA, 0, 6)>,
|
|
||||||
<NRF_PSEL(TWIM_SCL, 0, 26)>;
|
|
||||||
low-power-enable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&i2c0 {
|
|
||||||
status = "okay";
|
|
||||||
compatible = "nordic,nrf-twim";
|
|
||||||
pinctrl-0 = <&i2c0_default>;
|
|
||||||
pinctrl-1 = <&i2c0_sleep>;
|
|
||||||
pinctrl-names = "default", "sleep";
|
|
||||||
clock-frequency = <100000>;
|
|
||||||
|
|
||||||
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
|
|
||||||
taper-current = <2>; //Battery Taper current in mAh
|
|
||||||
terminate-voltage = <2750>; //Battery Terminate Voltage in mV
|
|
||||||
int-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&spi2 {
|
|
||||||
status = "okay";
|
|
||||||
compatible = "nordic,nrf-spim";
|
|
||||||
pinctrl-0 = <&spi2_default>;
|
|
||||||
pinctrl-1 = <&spi2_sleep>;
|
|
||||||
pinctrl-names = "default", "sleep";
|
|
||||||
cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
|
|
||||||
|
|
||||||
epd: il0323@0 {
|
|
||||||
compatible = "gooddisplay,il0323";
|
|
||||||
reg = <0>;
|
|
||||||
label = "DISPLAY";
|
|
||||||
width = <80>;
|
|
||||||
height = <128>;
|
|
||||||
spi-max-frequency = <4000000>;
|
|
||||||
dc-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
|
|
||||||
busy-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
|
|
||||||
reset-gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
|
|
||||||
pwr = [03 00 26 26];
|
|
||||||
cdi = <0xd2>;
|
|
||||||
tcon = <0x22>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2022 Darryl deHaan
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_NRF52X=y
|
|
||||||
CONFIG_SOC_NRF52840_QIAA=y
|
|
||||||
CONFIG_BOARD_CORNEISH_ZEN_V1_LEFT=y
|
|
||||||
CONFIG_ZMK_SLEEP=y
|
|
||||||
CONFIG_ZMK_DISPLAY=y
|
|
||||||
|
|
||||||
# Enable MPU
|
|
||||||
CONFIG_ARM_MPU=y
|
|
||||||
|
|
||||||
# enable pinctrl
|
|
||||||
CONFIG_PINCTRL=y
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
|
|
||||||
# Enable I2C
|
|
||||||
CONFIG_I2C=y
|
|
||||||
CONFIG_I2C_NRFX=y
|
|
||||||
|
|
||||||
# Enable SPI
|
|
||||||
CONFIG_SPI_NRFX=y
|
|
||||||
|
|
||||||
# Enable writing to flash
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
|
||||||
CONFIG_NVS=y
|
|
||||||
CONFIG_SETTINGS_NVS=y
|
|
||||||
CONFIG_FLASH=y
|
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
||||||
CONFIG_FLASH_MAP=y
|
|
||||||
|
|
||||||
# Enable 32kHz crystal
|
|
||||||
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
|
|
||||||
CONFIG_LV_Z_BITS_PER_PIXEL=1
|
|
||||||
CONFIG_LV_COLOR_DEPTH_1=y
|
|
||||||
CONFIG_LV_DPI_DEF=145
|
|
||||||
CONFIG_LV_Z_VDB_SIZE=100
|
|
||||||
CONFIG_LV_USE_THEME_MONO=y
|
|
||||||
CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00
|
|
||||||
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y
|
|
||||||
CONFIG_LV_FONT_MONTSERRAT_26=y
|
|
||||||
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
|
|
||||||
|
|
||||||
# custom status screens
|
|
||||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
|
|
||||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=n
|
|
||||||
CONFIG_CUSTOM_WIDGET_BATTERY_STATUS=y
|
|
||||||
CONFIG_ZMK_WIDGET_BATTERY_STATUS=n
|
|
||||||
CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS=y
|
|
||||||
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=n
|
|
||||||
CONFIG_CUSTOM_WIDGET_LAYER_STATUS=y
|
|
||||||
CONFIG_ZMK_WIDGET_LAYER_STATUS=n
|
|
||||||
|
|
||||||
# Turn on logging, and set ZMK logging to debug output
|
|
||||||
#CONFIG_LOG=y
|
|
||||||
#CONFIG_ZMK_USB_LOGGING=y
|
|
||||||
#CONFIG_ZMK_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_LOG_BUFFER_SIZE=65536
|
|
||||||
#CONFIG_LOG_STRDUP_BUF_COUNT=160
|
|
||||||
#CONFIG_I2C_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_SPI_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_DISPLAY_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_LVGL_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_LVGL_USE_DEBUG=y
|
|
||||||
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
|
||||||
@@ -1,131 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "corneish_zen.dtsi"
|
|
||||||
|
|
||||||
/{
|
|
||||||
chosen {
|
|
||||||
zephyr,display = &epd;
|
|
||||||
zmk,battery = &fuelgauge;
|
|
||||||
};
|
|
||||||
|
|
||||||
kscan0: kscan {
|
|
||||||
compatible = "zmk,kscan-gpio-matrix";
|
|
||||||
label = "KSCAN";
|
|
||||||
|
|
||||||
diode-direction = "col2row";
|
|
||||||
row-gpios
|
|
||||||
= <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
;
|
|
||||||
|
|
||||||
col-gpios
|
|
||||||
= <&gpio0 19 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 21 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 23 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
|
||||||
;
|
|
||||||
};
|
|
||||||
|
|
||||||
leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
blue_led: led_0 {
|
|
||||||
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
|
|
||||||
label = "Blue LED";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&default_transform {
|
|
||||||
col-offset = <6>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&five_column_transform {
|
|
||||||
col-offset = <6>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&pinctrl {
|
|
||||||
spi2_default: spi2_default {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
|
|
||||||
<NRF_PSEL(SPIM_MOSI, 0, 24)>,
|
|
||||||
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
spi2_sleep: spi2_sleep {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
|
|
||||||
<NRF_PSEL(SPIM_MOSI, 0, 24)>,
|
|
||||||
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
|
||||||
low-power-enable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c0_default: i2c0_default {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(TWIM_SDA, 0, 16)>,
|
|
||||||
<NRF_PSEL(TWIM_SCL, 0, 13)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c0_sleep: i2c0_sleep {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(TWIM_SDA, 0, 16)>,
|
|
||||||
<NRF_PSEL(TWIM_SCL, 0, 13)>;
|
|
||||||
low-power-enable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&i2c0 {
|
|
||||||
status = "okay";
|
|
||||||
compatible = "nordic,nrf-twim";
|
|
||||||
pinctrl-0 = <&i2c0_default>;
|
|
||||||
pinctrl-1 = <&i2c0_sleep>;
|
|
||||||
pinctrl-names = "default", "sleep";
|
|
||||||
clock-frequency = <100000>;
|
|
||||||
|
|
||||||
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
|
|
||||||
taper-current = <2>; //Battery Taper current in mAh 2.1
|
|
||||||
terminate-voltage = <2750>; //Battery Terminate Voltage in mV
|
|
||||||
int-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&spi2 {
|
|
||||||
status = "okay";
|
|
||||||
compatible = "nordic,nrf-spim";
|
|
||||||
pinctrl-0 = <&spi2_default>;
|
|
||||||
pinctrl-1 = <&spi2_sleep>;
|
|
||||||
pinctrl-names = "default", "sleep";
|
|
||||||
cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
|
|
||||||
|
|
||||||
epd: il0323@0 {
|
|
||||||
compatible = "gooddisplay,il0323";
|
|
||||||
reg = <0>;
|
|
||||||
label = "DISPLAY";
|
|
||||||
width = <80>;
|
|
||||||
height = <128>;
|
|
||||||
spi-max-frequency = <4000000>;
|
|
||||||
dc-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
|
|
||||||
busy-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
|
|
||||||
reset-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
|
|
||||||
pwr = [03 00 26 26];
|
|
||||||
cdi = <0xd2>;
|
|
||||||
tcon = <0x22>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2022 Darryl deHaan
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_NRF52X=y
|
|
||||||
CONFIG_SOC_NRF52840_QIAA=y
|
|
||||||
CONFIG_BOARD_CORNEISH_ZEN_V1_RIGHT=y
|
|
||||||
CONFIG_ZMK_SLEEP=y
|
|
||||||
CONFIG_ZMK_DISPLAY=y
|
|
||||||
|
|
||||||
# Enable MPU
|
|
||||||
CONFIG_ARM_MPU=y
|
|
||||||
|
|
||||||
# enable pinctrl
|
|
||||||
CONFIG_PINCTRL=y
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
|
|
||||||
# Enable I2C
|
|
||||||
CONFIG_I2C=y
|
|
||||||
CONFIG_I2C_NRFX=y
|
|
||||||
|
|
||||||
# Enable SPI
|
|
||||||
CONFIG_SPI_NRFX=y
|
|
||||||
|
|
||||||
# Enable writing to flash
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
|
||||||
CONFIG_NVS=y
|
|
||||||
CONFIG_SETTINGS_NVS=y
|
|
||||||
CONFIG_FLASH=y
|
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
||||||
CONFIG_FLASH_MAP=y
|
|
||||||
|
|
||||||
# Enable 32kHz crystal
|
|
||||||
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
|
|
||||||
CONFIG_LV_Z_BITS_PER_PIXEL=1
|
|
||||||
CONFIG_LV_COLOR_DEPTH_1=y
|
|
||||||
CONFIG_LV_DPI_DEF=145
|
|
||||||
CONFIG_LV_Z_VDB_SIZE=100
|
|
||||||
CONFIG_LV_USE_THEME_MONO=y
|
|
||||||
CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00
|
|
||||||
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y
|
|
||||||
CONFIG_LV_FONT_MONTSERRAT_26=y
|
|
||||||
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
|
|
||||||
|
|
||||||
# custom status screens
|
|
||||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
|
|
||||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=n
|
|
||||||
CONFIG_CUSTOM_WIDGET_BATTERY_STATUS=y
|
|
||||||
CONFIG_ZMK_WIDGET_BATTERY_STATUS=n
|
|
||||||
CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS=y
|
|
||||||
CONFIG_ZMK_WIDGET_PERIPHERAL_STATUS=n
|
|
||||||
|
|
||||||
# Turn on logging, and set ZMK logging to debug output
|
|
||||||
#CONFIG_LOG=y
|
|
||||||
#CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
|
|
||||||
#CONFIG_ZMK_USB_LOGGING=y
|
|
||||||
#CONFIG_ZMK_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_LOG_BUFFER_SIZE=20000
|
|
||||||
#CONFIG_LOG_STRDUP_BUF_COUNT=60
|
|
||||||
#CONFIG_I2C_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_SPI_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_DISPLAY_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_LVGL_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_LVGL_USE_DEBUG=y
|
|
||||||
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
identifier: corneish_zen_v2
|
|
||||||
name: Corne-ish Zen v2
|
|
||||||
type: keyboard
|
|
||||||
arch: arm
|
|
||||||
toolchain:
|
|
||||||
- zephyr
|
|
||||||
- gnuarmemb
|
|
||||||
- xtools
|
|
||||||
supported:
|
|
||||||
- gpio
|
|
||||||
- i2c
|
|
||||||
- counter
|
|
||||||
- spi
|
|
||||||
- usb_device
|
|
||||||
- lsm303dlhc
|
|
||||||
- nvs
|
|
||||||
- can
|
|
||||||
- kscan
|
|
||||||
- ble
|
|
||||||
- adc
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: corneish_zen_v2
|
|
||||||
name: Corneish Zen v2
|
|
||||||
url: https://lowprokb.ca/collections/keyboards/products/corne-ish-zen
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
features:
|
|
||||||
- keys
|
|
||||||
- display
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
siblings:
|
|
||||||
- corneish_zen_v2_left
|
|
||||||
- corneish_zen_v2_right
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "corneish_zen.dtsi"
|
|
||||||
|
|
||||||
/{
|
|
||||||
chosen {
|
|
||||||
zephyr,display = &epd;
|
|
||||||
zmk,battery = &vbatt;
|
|
||||||
};
|
|
||||||
|
|
||||||
kscan0: kscan {
|
|
||||||
compatible = "zmk,kscan-gpio-matrix";
|
|
||||||
label = "KSCAN";
|
|
||||||
|
|
||||||
diode-direction = "col2row";
|
|
||||||
row-gpios
|
|
||||||
= <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
;
|
|
||||||
|
|
||||||
col-gpios
|
|
||||||
= <&gpio0 21 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 23 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 5 GPIO_ACTIVE_HIGH>
|
|
||||||
;
|
|
||||||
};
|
|
||||||
|
|
||||||
leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
blue_led: led_0 {
|
|
||||||
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
|
|
||||||
label = "Blue LED";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
vbatt: vbatt {
|
|
||||||
compatible = "zmk,battery-voltage-divider";
|
|
||||||
label = "BATTERY";
|
|
||||||
io-channels = <&adc 0>;
|
|
||||||
output-ohms = <1960000>;
|
|
||||||
full-ohms = <(1960000 + 810000)>;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
&pinctrl {
|
|
||||||
spi0_default: spi0_default {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
|
|
||||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
|
|
||||||
<NRF_PSEL(SPIM_MISO, 0, 22)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
spi0_sleep: spi0_sleep {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
|
|
||||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
|
|
||||||
<NRF_PSEL(SPIM_MISO, 0, 22)>;
|
|
||||||
low-power-enable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&spi0 {
|
|
||||||
status = "okay";
|
|
||||||
compatible = "nordic,nrf-spim";
|
|
||||||
pinctrl-0 = <&spi0_default>;
|
|
||||||
pinctrl-1 = <&spi0_sleep>;
|
|
||||||
pinctrl-names = "default", "sleep";
|
|
||||||
cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
|
|
||||||
|
|
||||||
epd: il0323@0 {
|
|
||||||
compatible = "gooddisplay,il0323";
|
|
||||||
reg = <0>;
|
|
||||||
label = "DISPLAY";
|
|
||||||
width = <80>;
|
|
||||||
height = <128>;
|
|
||||||
spi-max-frequency = <4000000>;
|
|
||||||
dc-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
|
|
||||||
busy-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
|
|
||||||
reset-gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
|
|
||||||
pwr = [03 00 26 26];
|
|
||||||
cdi = <0xd2>;
|
|
||||||
tcon = <0x22>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2022 Darryl deHaan
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_NRF52X=y
|
|
||||||
CONFIG_SOC_NRF52840_QIAA=y
|
|
||||||
CONFIG_BOARD_CORNEISH_ZEN_V2_LEFT=y
|
|
||||||
CONFIG_ZMK_SLEEP=y
|
|
||||||
CONFIG_ZMK_DISPLAY=y
|
|
||||||
|
|
||||||
# Enable MPU
|
|
||||||
CONFIG_ARM_MPU=y
|
|
||||||
|
|
||||||
# enable pinctrl
|
|
||||||
CONFIG_PINCTRL=y
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
|
|
||||||
# Enable SPI
|
|
||||||
CONFIG_SPI_NRFX=y
|
|
||||||
|
|
||||||
# Enable writing to flash
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
|
||||||
CONFIG_NVS=y
|
|
||||||
CONFIG_SETTINGS_NVS=y
|
|
||||||
CONFIG_FLASH=y
|
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
||||||
CONFIG_FLASH_MAP=y
|
|
||||||
|
|
||||||
# Enable 32kHz crystal
|
|
||||||
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
|
|
||||||
CONFIG_LV_Z_BITS_PER_PIXEL=1
|
|
||||||
CONFIG_LV_COLOR_DEPTH_1=y
|
|
||||||
CONFIG_LV_DPI_DEF=145
|
|
||||||
CONFIG_LV_Z_VDB_SIZE=100
|
|
||||||
CONFIG_LV_USE_THEME_MONO=y
|
|
||||||
CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00
|
|
||||||
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y
|
|
||||||
CONFIG_LV_FONT_MONTSERRAT_26=y
|
|
||||||
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
|
|
||||||
|
|
||||||
# custom status screens
|
|
||||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
|
|
||||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=n
|
|
||||||
CONFIG_CUSTOM_WIDGET_BATTERY_STATUS=y
|
|
||||||
CONFIG_ZMK_WIDGET_BATTERY_STATUS=n
|
|
||||||
CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS=y
|
|
||||||
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=n
|
|
||||||
CONFIG_CUSTOM_WIDGET_LAYER_STATUS=y
|
|
||||||
CONFIG_ZMK_WIDGET_LAYER_STATUS=n
|
|
||||||
|
|
||||||
# Turn on logging, and set ZMK logging to debug output
|
|
||||||
#CONFIG_LOG=y
|
|
||||||
#CONFIG_ZMK_USB_LOGGING=y
|
|
||||||
#CONFIG_ZMK_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_LOG_BUFFER_SIZE=65536
|
|
||||||
#CONFIG_LOG_STRDUP_BUF_COUNT=160
|
|
||||||
#CONFIG_I2C_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_SPI_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_DISPLAY_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_LVGL_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_LVGL_USE_DEBUG=y
|
|
||||||
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "corneish_zen.dtsi"
|
|
||||||
|
|
||||||
/{
|
|
||||||
chosen {
|
|
||||||
zephyr,display = &epd;
|
|
||||||
zmk,battery = &vbatt;
|
|
||||||
};
|
|
||||||
|
|
||||||
kscan0: kscan {
|
|
||||||
compatible = "zmk,kscan-gpio-matrix";
|
|
||||||
label = "KSCAN";
|
|
||||||
|
|
||||||
diode-direction = "col2row";
|
|
||||||
row-gpios
|
|
||||||
= <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
;
|
|
||||||
|
|
||||||
col-gpios
|
|
||||||
= <&gpio0 19 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 21 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 23 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
|
||||||
;
|
|
||||||
};
|
|
||||||
|
|
||||||
leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
blue_led: led_0 {
|
|
||||||
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
|
|
||||||
label = "Blue LED";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
vbatt: vbatt {
|
|
||||||
compatible = "zmk,battery-voltage-divider";
|
|
||||||
label = "BATTERY";
|
|
||||||
io-channels = <&adc 0>;
|
|
||||||
output-ohms = <1960000>;
|
|
||||||
full-ohms = <(1960000 + 810000)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&default_transform {
|
|
||||||
col-offset = <6>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&five_column_transform {
|
|
||||||
col-offset = <6>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&pinctrl {
|
|
||||||
spi0_default: spi0_default {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
|
|
||||||
<NRF_PSEL(SPIM_MOSI, 0, 24)>,
|
|
||||||
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
spi0_sleep: spi0_sleep {
|
|
||||||
group1 {
|
|
||||||
psels = <NRF_PSEL(SPIM_SCK, 0, 20)>,
|
|
||||||
<NRF_PSEL(SPIM_MOSI, 0, 24)>,
|
|
||||||
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
|
||||||
low-power-enable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&spi0 {
|
|
||||||
status = "okay";
|
|
||||||
compatible = "nordic,nrf-spim";
|
|
||||||
pinctrl-0 = <&spi0_default>;
|
|
||||||
pinctrl-1 = <&spi0_sleep>;
|
|
||||||
pinctrl-names = "default", "sleep";
|
|
||||||
cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
|
|
||||||
|
|
||||||
epd: il0323@0 {
|
|
||||||
compatible = "gooddisplay,il0323";
|
|
||||||
reg = <0>;
|
|
||||||
label = "DISPLAY";
|
|
||||||
width = <80>;
|
|
||||||
height = <128>;
|
|
||||||
spi-max-frequency = <4000000>;
|
|
||||||
dc-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
|
|
||||||
busy-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
|
|
||||||
reset-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
|
|
||||||
pwr = [03 00 26 26];
|
|
||||||
cdi = <0xd2>;
|
|
||||||
tcon = <0x22>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2022 Darryl deHaan
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_NRF52X=y
|
|
||||||
CONFIG_SOC_NRF52840_QIAA=y
|
|
||||||
CONFIG_BOARD_CORNEISH_ZEN_V2_RIGHT=y
|
|
||||||
CONFIG_ZMK_SLEEP=y
|
|
||||||
CONFIG_ZMK_DISPLAY=y
|
|
||||||
|
|
||||||
# Enable MPU
|
|
||||||
CONFIG_ARM_MPU=y
|
|
||||||
|
|
||||||
# enable pinctrl
|
|
||||||
CONFIG_PINCTRL=y
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
|
|
||||||
# Enable SPI
|
|
||||||
CONFIG_SPI_NRFX=y
|
|
||||||
|
|
||||||
# Enable writing to flash
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
|
||||||
CONFIG_BUILD_OUTPUT_UF2=y
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
|
||||||
CONFIG_NVS=y
|
|
||||||
CONFIG_SETTINGS_NVS=y
|
|
||||||
CONFIG_FLASH=y
|
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
||||||
CONFIG_FLASH_MAP=y
|
|
||||||
|
|
||||||
# Enable 32kHz crystal
|
|
||||||
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
|
|
||||||
CONFIG_LV_Z_BITS_PER_PIXEL=1
|
|
||||||
CONFIG_LV_COLOR_DEPTH_1=y
|
|
||||||
CONFIG_LV_DPI_DEF=145
|
|
||||||
CONFIG_LV_Z_VDB_SIZE=100
|
|
||||||
CONFIG_LV_USE_THEME_MONO=y
|
|
||||||
CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00
|
|
||||||
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y
|
|
||||||
CONFIG_LV_FONT_MONTSERRAT_26=y
|
|
||||||
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
|
|
||||||
|
|
||||||
# custom status screens
|
|
||||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
|
|
||||||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=n
|
|
||||||
CONFIG_CUSTOM_WIDGET_BATTERY_STATUS=y
|
|
||||||
CONFIG_ZMK_WIDGET_BATTERY_STATUS=n
|
|
||||||
CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS=y
|
|
||||||
CONFIG_ZMK_WIDGET_PERIPHERAL_STATUS=n
|
|
||||||
|
|
||||||
# Turn on logging, and set ZMK logging to debug output
|
|
||||||
#CONFIG_LOG=y
|
|
||||||
#CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
|
|
||||||
#CONFIG_ZMK_USB_LOGGING=y
|
|
||||||
#CONFIG_ZMK_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_LOG_BUFFER_SIZE=20000
|
|
||||||
#CONFIG_LOG_STRDUP_BUF_COUNT=60
|
|
||||||
#CONFIG_I2C_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_SPI_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_DISPLAY_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_LVGL_LOG_LEVEL_DBG=y
|
|
||||||
#CONFIG_LVGL_USE_DEBUG=y
|
|
||||||
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "widgets/battery_status.h"
|
|
||||||
#include "widgets/peripheral_status.h"
|
|
||||||
#include "widgets/output_status.h"
|
|
||||||
#include "widgets/layer_status.h"
|
|
||||||
#include "custom_status_screen.h"
|
|
||||||
|
|
||||||
#include <zephyr/logging/log.h>
|
|
||||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
|
||||||
|
|
||||||
LV_IMG_DECLARE(zenlogo);
|
|
||||||
LV_IMG_DECLARE(layers2);
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS)
|
|
||||||
static struct zmk_widget_battery_status battery_status_widget;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS)
|
|
||||||
static struct zmk_widget_output_status output_status_widget;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS)
|
|
||||||
static struct zmk_widget_peripheral_status peripheral_status_widget;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_LAYER_STATUS)
|
|
||||||
static struct zmk_widget_layer_status layer_status_widget;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
lv_obj_t *zmk_display_status_screen() {
|
|
||||||
|
|
||||||
lv_obj_t *screen;
|
|
||||||
screen = lv_obj_create(NULL);
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS)
|
|
||||||
zmk_widget_battery_status_init(&battery_status_widget, screen);
|
|
||||||
lv_obj_align(zmk_widget_battery_status_obj(&battery_status_widget), LV_ALIGN_TOP_MID, 0, 2);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS)
|
|
||||||
zmk_widget_output_status_init(&output_status_widget, screen);
|
|
||||||
lv_obj_align(zmk_widget_output_status_obj(&output_status_widget), LV_ALIGN_TOP_MID, 0, 41);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS)
|
|
||||||
zmk_widget_peripheral_status_init(&peripheral_status_widget, screen);
|
|
||||||
lv_obj_align(zmk_widget_peripheral_status_obj(&peripheral_status_widget), LV_ALIGN_TOP_MID, 0,
|
|
||||||
41);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_LAYER_STATUS)
|
|
||||||
lv_obj_t *LayersHeading;
|
|
||||||
LayersHeading = lv_img_create(screen);
|
|
||||||
lv_obj_align(LayersHeading, LV_ALIGN_BOTTOM_MID, 0, -30);
|
|
||||||
lv_img_set_src(LayersHeading, &layers2);
|
|
||||||
|
|
||||||
zmk_widget_layer_status_init(&layer_status_widget, screen);
|
|
||||||
lv_obj_set_style_text_font(zmk_widget_layer_status_obj(&layer_status_widget),
|
|
||||||
&lv_font_montserrat_16, LV_PART_MAIN);
|
|
||||||
lv_obj_align(zmk_widget_layer_status_obj(&layer_status_widget), LV_ALIGN_BOTTOM_MID, 0, -5);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
|
||||||
lv_obj_t *zenlogo_icon;
|
|
||||||
zenlogo_icon = lv_img_create(screen);
|
|
||||||
lv_img_set_src(zenlogo_icon, &zenlogo);
|
|
||||||
lv_obj_align(zenlogo_icon, LV_ALIGN_BOTTOM_MID, 0, -5);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return screen;
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <lvgl.h>
|
|
||||||
|
|
||||||
lv_obj_t *zmk_display_status_screen();
|
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <zephyr/kernel.h>
|
|
||||||
#include <zephyr/bluetooth/services/bas.h>
|
|
||||||
|
|
||||||
#include <zephyr/logging/log.h>
|
|
||||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
|
||||||
|
|
||||||
#include <zmk/display.h>
|
|
||||||
#include "battery_status.h"
|
|
||||||
#include <zmk/usb.h>
|
|
||||||
#include <zmk/events/usb_conn_state_changed.h>
|
|
||||||
#include <zmk/event_manager.h>
|
|
||||||
#include <zmk/events/battery_state_changed.h>
|
|
||||||
|
|
||||||
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
|
|
||||||
|
|
||||||
struct battery_status_state {
|
|
||||||
uint8_t level;
|
|
||||||
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
|
|
||||||
bool usb_present;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
LV_IMG_DECLARE(batt_100);
|
|
||||||
LV_IMG_DECLARE(batt_100_chg);
|
|
||||||
LV_IMG_DECLARE(batt_75);
|
|
||||||
LV_IMG_DECLARE(batt_75_chg);
|
|
||||||
LV_IMG_DECLARE(batt_50);
|
|
||||||
LV_IMG_DECLARE(batt_50_chg);
|
|
||||||
LV_IMG_DECLARE(batt_25);
|
|
||||||
LV_IMG_DECLARE(batt_25_chg);
|
|
||||||
LV_IMG_DECLARE(batt_5);
|
|
||||||
LV_IMG_DECLARE(batt_5_chg);
|
|
||||||
LV_IMG_DECLARE(batt_0);
|
|
||||||
LV_IMG_DECLARE(batt_0_chg);
|
|
||||||
|
|
||||||
static void set_battery_symbol(lv_obj_t *icon, struct battery_status_state state) {
|
|
||||||
uint8_t level = state.level;
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
|
|
||||||
if (level > 95) {
|
|
||||||
lv_img_set_src(icon, state.usb_present ? &batt_100_chg : &batt_100);
|
|
||||||
} else if (level > 74) {
|
|
||||||
lv_img_set_src(icon, state.usb_present ? &batt_75_chg : &batt_75);
|
|
||||||
} else if (level > 49) {
|
|
||||||
lv_img_set_src(icon, state.usb_present ? &batt_50_chg : &batt_50);
|
|
||||||
} else if (level > 24) {
|
|
||||||
lv_img_set_src(icon, state.usb_present ? &batt_25_chg : &batt_25);
|
|
||||||
} else if (level > 5) {
|
|
||||||
lv_img_set_src(icon, state.usb_present ? &batt_5_chg : &batt_5);
|
|
||||||
} else {
|
|
||||||
lv_img_set_src(icon, state.usb_present ? &batt_0_chg : &batt_0);
|
|
||||||
}
|
|
||||||
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
|
|
||||||
}
|
|
||||||
|
|
||||||
void battery_status_update_cb(struct battery_status_state state) {
|
|
||||||
struct zmk_widget_battery_status *widget;
|
|
||||||
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_battery_symbol(widget->obj, state); }
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct battery_status_state battery_status_get_state(const zmk_event_t *eh) {
|
|
||||||
return (struct battery_status_state) {
|
|
||||||
.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) */
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
ZMK_DISPLAY_WIDGET_LISTENER(widget_battery_status, struct battery_status_state,
|
|
||||||
battery_status_update_cb, battery_status_get_state)
|
|
||||||
|
|
||||||
ZMK_SUBSCRIPTION(widget_battery_status, zmk_battery_state_changed);
|
|
||||||
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
|
|
||||||
ZMK_SUBSCRIPTION(widget_battery_status, zmk_usb_conn_state_changed);
|
|
||||||
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
|
|
||||||
|
|
||||||
int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent) {
|
|
||||||
widget->obj = lv_img_create(parent);
|
|
||||||
|
|
||||||
sys_slist_append(&widgets, &widget->node);
|
|
||||||
widget_battery_status_init();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
lv_obj_t *zmk_widget_battery_status_obj(struct zmk_widget_battery_status *widget) {
|
|
||||||
return widget->obj;
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <lvgl.h>
|
|
||||||
|
|
||||||
#include <zephyr/kernel.h>
|
|
||||||
|
|
||||||
struct zmk_widget_battery_status {
|
|
||||||
sys_snode_t node;
|
|
||||||
lv_obj_t *obj;
|
|
||||||
};
|
|
||||||
|
|
||||||
int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent);
|
|
||||||
lv_obj_t *zmk_widget_battery_status_obj(struct zmk_widget_battery_status *widget);
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2022 Darryl deHaan
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <lvgl.h>
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_IMG_USB_CONNECTED
|
|
||||||
#define LV_ATTRIBUTE_IMG_USB_CONNECTED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_USB_CONNECTED uint8_t USB_connected_map[] = {
|
|
||||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
|
||||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
|
||||||
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xc0, 0x00, 0x3f,
|
|
||||||
0xff, 0xff, 0xc0, 0x00, 0xff, 0xff, 0xff, 0xc0, 0x01, 0xff, 0xff, 0xff, 0x80, 0x03, 0xff, 0xff,
|
|
||||||
0xff, 0xfe, 0x07, 0xff, 0xff, 0xff, 0xff, 0x07, 0x1e, 0x30, 0x38, 0x07, 0x0f, 0x1c, 0x20, 0x38,
|
|
||||||
0x07, 0x0f, 0x1c, 0x47, 0x10, 0xc3, 0x3e, 0x1c, 0x43, 0xf1, 0xc7, 0x7e, 0x3c, 0x60, 0x70, 0x0e,
|
|
||||||
0x7e, 0x3c, 0x70, 0x30, 0x0e, 0x7e, 0x38, 0xfc, 0x33, 0xc7, 0xfe, 0x18, 0x8f, 0x23, 0x87, 0x0e,
|
|
||||||
0x00, 0xc6, 0x20, 0x07, 0x0f, 0x01, 0xe0, 0x60, 0x0e, 0x0f, 0x87, 0xf0, 0xe0, 0x3e, 0x07, 0xff,
|
|
||||||
0xff, 0xff, 0xfc, 0x07, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xfe, 0x00, 0x01, 0xff, 0xff,
|
|
||||||
0xfc, 0x00, 0x00, 0x7f, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
};
|
|
||||||
|
|
||||||
const lv_img_dsc_t USB_connected = {
|
|
||||||
.header.always_zero = 0,
|
|
||||||
.header.w = 40,
|
|
||||||
.header.h = 31,
|
|
||||||
.data_size = 164,
|
|
||||||
.header.cf = LV_IMG_CF_INDEXED_1BIT,
|
|
||||||
.data = USB_connected_map,
|
|
||||||
};
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <lvgl.h>
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_IMG_BATT_0
|
|
||||||
#define LV_ATTRIBUTE_IMG_BATT_0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_0 uint8_t
|
|
||||||
batt_0_map[] = {
|
|
||||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
|
||||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
|
||||||
|
|
||||||
0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
|
|
||||||
0x00, 0x01, 0xff, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x00, 0x7f, 0xfd, 0xff, 0x7f, 0xf8,
|
|
||||||
0xff, 0xfd, 0xff, 0x7f, 0xfc, 0xff, 0xfd, 0xff, 0x7f, 0xfc, 0xff, 0xfc, 0xfe, 0x7f, 0xfc,
|
|
||||||
0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x3f,
|
|
||||||
0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x0f, 0xf0, 0x00, 0x7c, 0x00, 0x0f,
|
|
||||||
0xf0, 0x00, 0x7c, 0x00, 0x0f, 0xf0, 0x00, 0x7c, 0x00, 0x0f, 0xf0, 0x00, 0x7c, 0x00, 0x3f,
|
|
||||||
0xf0, 0x00, 0x7c, 0x00, 0x3f, 0xf0, 0x00, 0x7c, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f,
|
|
||||||
0xff, 0xff, 0x01, 0xff, 0xfc, 0xff, 0xff, 0x01, 0xff, 0xfc, 0xff, 0xfe, 0x7c, 0xff, 0xfc,
|
|
||||||
0x7f, 0xfc, 0xfe, 0x7f, 0xf8, 0x00, 0x01, 0xff, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x00,
|
|
||||||
0x00, 0x01, 0xff, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x7c, 0x00, 0x00,
|
|
||||||
};
|
|
||||||
|
|
||||||
const lv_img_dsc_t batt_0 = {
|
|
||||||
.header.always_zero = 0,
|
|
||||||
.header.w = 40,
|
|
||||||
.header.h = 31,
|
|
||||||
.data_size = 163,
|
|
||||||
.header.cf = LV_IMG_CF_INDEXED_1BIT,
|
|
||||||
.data = batt_0_map,
|
|
||||||
};
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <lvgl.h>
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_IMG_BATT_0_CHG
|
|
||||||
#define LV_ATTRIBUTE_IMG_BATT_0_CHG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_0_CHG uint8_t
|
|
||||||
batt_0_chg_map[] = {
|
|
||||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
|
||||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
|
||||||
|
|
||||||
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
|
|
||||||
0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x7f, 0xff, 0xf7, 0xbf, 0xf8,
|
|
||||||
0xff, 0xff, 0xef, 0xbf, 0xfc, 0xff, 0xff, 0xdf, 0x7f, 0xfc, 0xff, 0xff, 0xbf, 0x7f, 0xfc,
|
|
||||||
0xf0, 0x00, 0x7e, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf0, 0x01, 0xfe, 0x00, 0x3f,
|
|
||||||
0xf0, 0x03, 0xfc, 0x00, 0x3f, 0xf0, 0x07, 0xfc, 0x00, 0x0f, 0xf0, 0x0f, 0xff, 0xe0, 0x0f,
|
|
||||||
0xf0, 0x1f, 0xff, 0xc0, 0x0f, 0xf0, 0x00, 0x7f, 0x80, 0x0f, 0xf0, 0x00, 0x7f, 0x00, 0x3f,
|
|
||||||
0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf0, 0x00, 0xfc, 0x00, 0x3f, 0xf0, 0x01, 0xf8, 0x00, 0x3f,
|
|
||||||
0xff, 0xfd, 0xf7, 0xff, 0xfc, 0xff, 0xfb, 0xef, 0xff, 0xfc, 0xff, 0xfb, 0xdf, 0xff, 0xfc,
|
|
||||||
0x7f, 0xfb, 0xbf, 0xff, 0xf8, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x10, 0x00, 0x00, 0x00,
|
|
||||||
};
|
|
||||||
|
|
||||||
const lv_img_dsc_t batt_0_chg = {
|
|
||||||
.header.always_zero = 0,
|
|
||||||
.header.w = 40,
|
|
||||||
.header.h = 31,
|
|
||||||
.data_size = 163,
|
|
||||||
.header.cf = LV_IMG_CF_INDEXED_1BIT,
|
|
||||||
.data = batt_0_chg_map,
|
|
||||||
};
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <lvgl.h>
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_IMG_BATT_100
|
|
||||||
#define LV_ATTRIBUTE_IMG_BATT_100
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_100 uint8_t
|
|
||||||
batt_100_map[] = {
|
|
||||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
|
||||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
|
||||||
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
|
|
||||||
0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf3, 0xff, 0xff, 0xff, 0x3f,
|
|
||||||
0xf3, 0xff, 0xff, 0xff, 0x3f, 0xf3, 0xff, 0xff, 0xff, 0x0f, 0xf3, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xf3, 0xff, 0xff, 0xff, 0x0f, 0xf3, 0xff, 0xff, 0xff, 0x0f, 0xf3, 0xff, 0xff, 0xff, 0x3f,
|
|
||||||
0xf3, 0xff, 0xff, 0xff, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
|
|
||||||
0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
};
|
|
||||||
|
|
||||||
const lv_img_dsc_t batt_100 = {
|
|
||||||
.header.always_zero = 0,
|
|
||||||
.header.w = 40,
|
|
||||||
.header.h = 31,
|
|
||||||
.data_size = 163,
|
|
||||||
.header.cf = LV_IMG_CF_INDEXED_1BIT,
|
|
||||||
.data = batt_100_map,
|
|
||||||
};
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <lvgl.h>
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_IMG_BATT_100_CHG
|
|
||||||
#define LV_ATTRIBUTE_IMG_BATT_100_CHG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_100_CHG uint8_t
|
|
||||||
batt_100_chg_map[] = {
|
|
||||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
|
||||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
|
||||||
|
|
||||||
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
|
|
||||||
0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x7f, 0xff, 0xf7, 0xbf, 0xf8,
|
|
||||||
0xff, 0xff, 0xef, 0xbf, 0xfc, 0xff, 0xff, 0xdf, 0x7f, 0xfc, 0xff, 0xff, 0xbf, 0x7f, 0xfc,
|
|
||||||
0xf0, 0x00, 0x7e, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf3, 0xfd, 0xfe, 0xff, 0x3f,
|
|
||||||
0xf3, 0xfb, 0xfd, 0xff, 0x3f, 0xf3, 0xf7, 0xfc, 0x07, 0x0f, 0xf3, 0xef, 0xff, 0xef, 0x0f,
|
|
||||||
0xf3, 0xdf, 0xff, 0xdf, 0x0f, 0xf3, 0x80, 0x7f, 0xbf, 0x0f, 0xf3, 0xff, 0x7f, 0x7f, 0x3f,
|
|
||||||
0xf3, 0xfe, 0xfe, 0xff, 0x3f, 0xf0, 0x00, 0xfc, 0x00, 0x3f, 0xf0, 0x01, 0xf8, 0x00, 0x3f,
|
|
||||||
0xff, 0xfd, 0xf7, 0xff, 0xfc, 0xff, 0xfb, 0xef, 0xff, 0xfc, 0xff, 0xfb, 0xdf, 0xff, 0xfc,
|
|
||||||
0x7f, 0xfb, 0xbf, 0xff, 0xf8, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x10, 0x00, 0x00, 0x00,
|
|
||||||
};
|
|
||||||
|
|
||||||
const lv_img_dsc_t batt_100_chg = {
|
|
||||||
.header.always_zero = 0,
|
|
||||||
.header.w = 40,
|
|
||||||
.header.h = 31,
|
|
||||||
.data_size = 163,
|
|
||||||
.header.cf = LV_IMG_CF_INDEXED_1BIT,
|
|
||||||
.data = batt_100_chg_map,
|
|
||||||
};
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <lvgl.h>
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_IMG_BATT_25
|
|
||||||
#define LV_ATTRIBUTE_IMG_BATT_25
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_25 uint8_t
|
|
||||||
batt_25_map[] = {
|
|
||||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
|
||||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
|
||||||
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
|
|
||||||
0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf3, 0xfc, 0x00, 0x00, 0x3f,
|
|
||||||
0xf3, 0xfc, 0x00, 0x00, 0x3f, 0xf3, 0xfc, 0x00, 0x00, 0x0f, 0xf3, 0xfc, 0x00, 0x00, 0x0f,
|
|
||||||
0xf3, 0xfc, 0x00, 0x00, 0x0f, 0xf3, 0xfc, 0x00, 0x00, 0x0f, 0xf3, 0xfc, 0x00, 0x00, 0x3f,
|
|
||||||
0xf3, 0xfc, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
|
|
||||||
0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
};
|
|
||||||
|
|
||||||
const lv_img_dsc_t batt_25 = {
|
|
||||||
.header.always_zero = 0,
|
|
||||||
.header.w = 40,
|
|
||||||
.header.h = 31,
|
|
||||||
.data_size = 163,
|
|
||||||
.header.cf = LV_IMG_CF_INDEXED_1BIT,
|
|
||||||
.data = batt_25_map,
|
|
||||||
};
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <lvgl.h>
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_IMG_BATT_25_CHG
|
|
||||||
#define LV_ATTRIBUTE_IMG_BATT_25_CHG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_25_CHG uint8_t
|
|
||||||
batt_25_chg_map[] = {
|
|
||||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
|
||||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
|
||||||
|
|
||||||
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
|
|
||||||
0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x7f, 0xff, 0xf7, 0xbf, 0xf8,
|
|
||||||
0xff, 0xff, 0xef, 0xbf, 0xfc, 0xff, 0xff, 0xdf, 0x7f, 0xfc, 0xff, 0xff, 0xbf, 0x7f, 0xfc,
|
|
||||||
0xf0, 0x00, 0x7e, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf3, 0xf9, 0xfe, 0x00, 0x3f,
|
|
||||||
0xf3, 0xfb, 0xfc, 0x00, 0x3f, 0xf3, 0xf7, 0xfc, 0x00, 0x0f, 0xf3, 0xef, 0xff, 0xe0, 0x0f,
|
|
||||||
0xf3, 0xdf, 0xff, 0xc0, 0x0f, 0xf3, 0x80, 0x7f, 0x80, 0x0f, 0xf3, 0xf8, 0x7f, 0x00, 0x3f,
|
|
||||||
0xf3, 0xf8, 0xfe, 0x00, 0x3f, 0xf0, 0x00, 0xfc, 0x00, 0x3f, 0xf0, 0x01, 0xf8, 0x00, 0x3f,
|
|
||||||
0xff, 0xfd, 0xf7, 0xff, 0xfc, 0xff, 0xfb, 0xef, 0xff, 0xfc, 0xff, 0xfb, 0xdf, 0xff, 0xfc,
|
|
||||||
0x7f, 0xfb, 0xbf, 0xff, 0xf8, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x10, 0x00, 0x00, 0x00,
|
|
||||||
};
|
|
||||||
|
|
||||||
const lv_img_dsc_t batt_25_chg = {
|
|
||||||
.header.always_zero = 0,
|
|
||||||
.header.w = 40,
|
|
||||||
.header.h = 31,
|
|
||||||
.data_size = 163,
|
|
||||||
.header.cf = LV_IMG_CF_INDEXED_1BIT,
|
|
||||||
.data = batt_25_chg_map,
|
|
||||||
};
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <lvgl.h>
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_IMG_BATT_5
|
|
||||||
#define LV_ATTRIBUTE_IMG_BATT_5
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_5 uint8_t
|
|
||||||
batt_5_map[] = {
|
|
||||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
|
||||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
|
||||||
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
|
|
||||||
0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf3, 0x00, 0x00, 0x00, 0x3f,
|
|
||||||
0xf3, 0x00, 0x00, 0x00, 0x3f, 0xf3, 0x00, 0x00, 0x00, 0x0f, 0xf3, 0x00, 0x00, 0x00, 0x0f,
|
|
||||||
0xf3, 0x00, 0x00, 0x00, 0x0f, 0xf3, 0x00, 0x00, 0x00, 0x0f, 0xf3, 0x00, 0x00, 0x00, 0x3f,
|
|
||||||
0xf3, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
|
|
||||||
0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
};
|
|
||||||
|
|
||||||
const lv_img_dsc_t batt_5 = {
|
|
||||||
.header.always_zero = 0,
|
|
||||||
.header.w = 40,
|
|
||||||
.header.h = 31,
|
|
||||||
.data_size = 163,
|
|
||||||
.header.cf = LV_IMG_CF_INDEXED_1BIT,
|
|
||||||
.data = batt_5_map,
|
|
||||||
};
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <lvgl.h>
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_IMG_BATT_50
|
|
||||||
#define LV_ATTRIBUTE_IMG_BATT_50
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_50 uint8_t
|
|
||||||
batt_50_map[] = {
|
|
||||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
|
||||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
|
||||||
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf8,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
|
|
||||||
0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf3, 0xff, 0xf0, 0x00, 0x3f,
|
|
||||||
0xf3, 0xff, 0xf0, 0x00, 0x3f, 0xf3, 0xff, 0xf0, 0x00, 0x0f, 0xf3, 0xff, 0xf0, 0x00, 0x0f,
|
|
||||||
0xf3, 0xff, 0xf0, 0x00, 0x0f, 0xf3, 0xff, 0xf0, 0x00, 0x0f, 0xf3, 0xff, 0xf0, 0x00, 0x3f,
|
|
||||||
0xf3, 0xff, 0xf0, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfc,
|
|
||||||
0x7f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
};
|
|
||||||
|
|
||||||
const lv_img_dsc_t batt_50 = {
|
|
||||||
.header.always_zero = 0,
|
|
||||||
.header.w = 40,
|
|
||||||
.header.h = 31,
|
|
||||||
.data_size = 163,
|
|
||||||
.header.cf = LV_IMG_CF_INDEXED_1BIT,
|
|
||||||
.data = batt_50_map,
|
|
||||||
};
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright (c) 2021 Darryl deHaan
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <lvgl.h>
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef LV_ATTRIBUTE_IMG_BATT_50_CHG
|
|
||||||
#define LV_ATTRIBUTE_IMG_BATT_50_CHG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BATT_50_CHG uint8_t
|
|
||||||
batt_50_chg_map[] = {
|
|
||||||
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
|
|
||||||
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
|
|
||||||
|
|
||||||
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
|
|
||||||
0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x7f, 0xff, 0xf7, 0xbf, 0xf8,
|
|
||||||
0xff, 0xff, 0xef, 0xbf, 0xfc, 0xff, 0xff, 0xdf, 0x7f, 0xfc, 0xff, 0xff, 0xbf, 0x7f, 0xfc,
|
|
||||||
0xf0, 0x00, 0x7e, 0x00, 0x3f, 0xf0, 0x00, 0xfe, 0x00, 0x3f, 0xf3, 0xfd, 0xfe, 0x00, 0x3f,
|
|
||||||
0xf3, 0xfb, 0xfc, 0x00, 0x3f, 0xf3, 0xf7, 0xfc, 0x00, 0x0f, 0xf3, 0xef, 0xff, 0xe0, 0x0f,
|
|
||||||
0xf3, 0xdf, 0xff, 0xc0, 0x0f, 0xf3, 0x80, 0x7f, 0x80, 0x0f, 0xf3, 0xff, 0x7f, 0x00, 0x3f,
|
|
||||||
0xf3, 0xfe, 0xfe, 0x00, 0x3f, 0xf0, 0x00, 0xfc, 0x00, 0x3f, 0xf0, 0x01, 0xf8, 0x00, 0x3f,
|
|
||||||
0xff, 0xfd, 0xf7, 0xff, 0xfc, 0xff, 0xfb, 0xef, 0xff, 0xfc, 0xff, 0xfb, 0xdf, 0xff, 0xfc,
|
|
||||||
0x7f, 0xfb, 0xbf, 0xff, 0xf8, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x10, 0x00, 0x00, 0x00,
|
|
||||||
};
|
|
||||||
|
|
||||||
const lv_img_dsc_t batt_50_chg = {
|
|
||||||
.header.always_zero = 0,
|
|
||||||
.header.w = 40,
|
|
||||||
.header.h = 31,
|
|
||||||
.data_size = 163,
|
|
||||||
.header.cf = LV_IMG_CF_INDEXED_1BIT,
|
|
||||||
.data = batt_50_chg_map,
|
|
||||||
};
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user