Merge branch 'main' of https://github.com/JW2586/zmk
This commit is contained in:
commit
3a0c3f19cc
285 changed files with 26991 additions and 7298 deletions
68
.github/workflows/build-user-config.yml
vendored
68
.github/workflows/build-user-config.yml
vendored
|
@ -18,8 +18,8 @@ on:
|
||||||
default: "bin"
|
default: "bin"
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
artifact_name:
|
archive_name:
|
||||||
description: 'Artifact output file name'
|
description: 'Archive output file name'
|
||||||
default: 'firmware'
|
default: 'firmware'
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
@ -29,21 +29,18 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Fetch Build Keyboards
|
name: Fetch Build Keyboards
|
||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
build_matrix: ${{ env.build_matrix }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install yaml2json
|
- name: Install yaml2json
|
||||||
run: python3 -m pip install remarshal
|
run: python3 -m pip install remarshal
|
||||||
|
|
||||||
- name: Fetch Build Matrix
|
- name: Fetch Build Matrix
|
||||||
id: set-matrix
|
|
||||||
run: |
|
run: |
|
||||||
set -x
|
echo "build_matrix=$(yaml2json ${{ inputs.build_matrix_path }} | jq -c .)" >> $GITHUB_ENV
|
||||||
matrix=$(yaml2json ${{ inputs.build_matrix_path }} | jq -c .)
|
yaml2json ${{ inputs.build_matrix_path }} | jq
|
||||||
yaml2json ${{ inputs.build_matrix_path }}
|
|
||||||
echo "::set-output name=matrix::${matrix}"
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -53,35 +50,31 @@ jobs:
|
||||||
name: Build
|
name: Build
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{fromJson(needs.matrix.outputs.matrix)}}
|
matrix: ${{ fromJson(needs.matrix.outputs.build_matrix) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Prepare variables
|
- name: Prepare variables
|
||||||
id: variables
|
shell: sh -x {0}
|
||||||
run: |
|
run: |
|
||||||
set -x
|
|
||||||
if [ -n "${{ matrix.shield }}" ]
|
if [ -n "${{ matrix.shield }}" ]
|
||||||
then
|
then
|
||||||
EXTRA_CMAKE_ARGS="-DSHIELD=${{ matrix.shield }}"
|
echo "extra_cmake_args=-DSHIELD=\"${{ matrix.shield }}\"" >> $GITHUB_ENV
|
||||||
ARTIFACT_NAME="${{ matrix.shield }}-${{ matrix.board }}-zmk"
|
echo "artifact_name=${{ matrix.shield }}-${{ matrix.board }}-zmk" >> $GITHUB_ENV
|
||||||
DISPLAY_NAME="${{ matrix.shield }} - ${{ matrix.board }}"
|
echo "display_name=${{ matrix.shield }} - ${{ matrix.board }}" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
EXTRA_CMAKE_ARGS=
|
echo "extra_cmake_args=" >> $GITHUB_ENV
|
||||||
DISPLAY_NAME="${{ matrix.board }}"
|
echo "artifact_name=${{ matrix.board }}-zmk" >> $GITHUB_ENV
|
||||||
ARTIFACT_NAME="${{ matrix.board }}-zmk"
|
echo "display_name=${{ matrix.board }}" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
echo ::set-output name=extra-cmake-args::${EXTRA_CMAKE_ARGS}
|
echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV
|
||||||
echo ::set-output name=artifact-name::${ARTIFACT_NAME}
|
|
||||||
echo ::set-output name=display-name::${DISPLAY_NAME}
|
|
||||||
echo ::set-output name=zephyr-version::${ZEPHYR_VERSION}
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Cache west modules
|
- name: Cache west modules
|
||||||
uses: actions/cache@v3.0.2
|
uses: actions/cache@v3.0.11
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
cache-name: cache-zephyr-${{ steps.variables.outputs.zephyr-version }}-modules
|
cache_name: cache-zephyr-${{ env.zephyr_version }}-modules
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
modules/
|
modules/
|
||||||
|
@ -89,9 +82,9 @@ jobs:
|
||||||
zephyr/
|
zephyr/
|
||||||
bootloader/
|
bootloader/
|
||||||
zmk/
|
zmk/
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/west.yml', '**/build.yaml') }}
|
key: ${{ runner.os }}-build-${{ env.cache_name }}-${{ hashFiles('**/west.yml', '**/build.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
${{ runner.os }}-build-${{ env.cache_name }}-
|
||||||
${{ runner.os }}-build-
|
${{ runner.os }}-build-
|
||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
@ -104,28 +97,27 @@ jobs:
|
||||||
- name: West Zephyr export
|
- name: West Zephyr export
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
|
|
||||||
- name: West Build (${{ steps.variables.outputs.display-name }})
|
- name: West Build (${{ env.display_name }})
|
||||||
run: |
|
shell: sh -x {0}
|
||||||
set -x
|
run: west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}
|
||||||
west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/${{ inputs.config_path }} ${{ steps.variables.outputs.extra-cmake-args }} ${{ matrix.cmake-args }}
|
|
||||||
|
|
||||||
- name: ${{ steps.variables.outputs.display-name }} Kconfig file
|
- name: ${{ env.display_name }} Kconfig file
|
||||||
run: grep -v -e "^#" -e "^$" build/zephyr/.config | sort
|
run: grep -v -e "^#" -e "^$" build/zephyr/.config | sort
|
||||||
|
|
||||||
- name: Rename artifacts
|
- name: Rename artifacts
|
||||||
|
shell: sh -x {0}
|
||||||
run: |
|
run: |
|
||||||
set -x
|
|
||||||
mkdir build/artifacts
|
mkdir build/artifacts
|
||||||
if [ -f build/zephyr/zmk.uf2 ]
|
if [ -f build/zephyr/zmk.uf2 ]
|
||||||
then
|
then
|
||||||
cp build/zephyr/zmk.uf2 "build/artifacts/${{ steps.variables.outputs.artifact-name }}.uf2"
|
cp build/zephyr/zmk.uf2 "build/artifacts/${{ env.artifact_name }}.uf2"
|
||||||
elif [ -f build/zephyr/zmk.${{ inputs.fallback_binary }} ]
|
elif [ -f build/zephyr/zmk.${{ inputs.fallback_binary }} ]
|
||||||
then
|
then
|
||||||
cp build/zephyr/zmk.${{ inputs.fallback_binary }} "build/artifacts/${{ steps.variables.outputs.artifact-name }}.${{ inputs.fallback_binary }}"
|
cp build/zephyr/zmk.${{ inputs.fallback_binary }} "build/artifacts/${{ env.artifact_name }}.${{ inputs.fallback_binary }}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Archive (${{ steps.variables.outputs.display-name }})
|
- name: Archive (${{ env.display_name }})
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact_name }}
|
name: ${{ inputs.archive_name }}
|
||||||
path: build/artifacts
|
path: build/artifacts
|
||||||
|
|
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
||||||
include: ${{ fromJSON(needs.compile-matrix.outputs.include-list) }}
|
include: ${{ fromJSON(needs.compile-matrix.outputs.include-list) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Cache west modules
|
- name: Cache west modules
|
||||||
uses: actions/cache@v3.0.2
|
uses: actions/cache@v3.0.2
|
||||||
env:
|
env:
|
||||||
|
@ -35,11 +35,11 @@ jobs:
|
||||||
tools/
|
tools/
|
||||||
zephyr/
|
zephyr/
|
||||||
bootloader/
|
bootloader/
|
||||||
key: 4-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
4-${{ runner.os }}-build-${{ env.cache-name }}-
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
4-${{ runner.os }}-build-
|
${{ runner.os }}-build-
|
||||||
4-${{ runner.os }}-
|
${{ 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)
|
||||||
|
@ -71,7 +71,7 @@ jobs:
|
||||||
|
|
||||||
for (const shieldArgs of buildShieldArgs) {
|
for (const shieldArgs of buildShieldArgs) {
|
||||||
try {
|
try {
|
||||||
const output = execSync(`west build -s app -p -b ${{ matrix.board }} -- ${shieldArgs.shield ? '-DSHIELD=' + shieldArgs.shield : ''} ${shieldArgs['cmake-args'] || ''}`);
|
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(`::group::${{ matrix.board}} ${shieldArgs.shield} Build`)
|
||||||
console.log(output.toString());
|
console.log(output.toString());
|
||||||
|
@ -151,7 +151,7 @@ jobs:
|
||||||
core-include: ${{ steps.core-list.outputs.result }}
|
core-include: ${{ steps.core-list.outputs.result }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Use Node.js
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
|
@ -180,7 +180,7 @@ jobs:
|
||||||
boards-include: ${{ steps.boards-list.outputs.result }}
|
boards-include: ${{ steps.boards-list.outputs.result }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Use Node.js
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
|
@ -246,6 +246,9 @@ jobs:
|
||||||
return hm.requires.flatMap(i =>
|
return hm.requires.flatMap(i =>
|
||||||
metadata.interconnects[i].boards.flatMap(b => boardAndShield(b, hm))
|
metadata.interconnects[i].boards.flatMap(b => boardAndShield(b, hm))
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
console.warn("Unhandled shield without keys");
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "interconnect":
|
case "interconnect":
|
||||||
|
@ -304,7 +307,7 @@ jobs:
|
||||||
organized-metadata: ${{ steps.organize-metadata.outputs.result }}
|
organized-metadata: ${{ steps.organize-metadata.outputs.result }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Use Node.js
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
|
|
2
.github/workflows/clang-format-lint.yml
vendored
2
.github/workflows/clang-format-lint.yml
vendored
|
@ -22,7 +22,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: DoozyX/clang-format-lint-action@v0.13
|
- uses: DoozyX/clang-format-lint-action@v0.13
|
||||||
with:
|
with:
|
||||||
source: "./app"
|
source: "./app"
|
||||||
|
|
6
.github/workflows/doc-checks.yml
vendored
6
.github/workflows/doc-checks.yml
vendored
|
@ -14,7 +14,7 @@ jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: bahmutov/npm-install@v1
|
- uses: bahmutov/npm-install@v1
|
||||||
with:
|
with:
|
||||||
working-directory: docs
|
working-directory: docs
|
||||||
|
@ -24,7 +24,7 @@ jobs:
|
||||||
prettier:
|
prettier:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: bahmutov/npm-install@v1
|
- uses: bahmutov/npm-install@v1
|
||||||
with:
|
with:
|
||||||
working-directory: docs
|
working-directory: docs
|
||||||
|
@ -34,7 +34,7 @@ jobs:
|
||||||
typecheck:
|
typecheck:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: bahmutov/npm-install@v1
|
- uses: bahmutov/npm-install@v1
|
||||||
with:
|
with:
|
||||||
working-directory: docs
|
working-directory: docs
|
||||||
|
|
|
@ -18,8 +18,8 @@ jobs:
|
||||||
check-metadata-format:
|
check-metadata-format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: bahmutov/npm-install@v1
|
- uses: bahmutov/npm-install@v1
|
||||||
with:
|
with:
|
||||||
working-directory: app
|
working-directory: app
|
||||||
|
@ -31,7 +31,7 @@ jobs:
|
||||||
container:
|
container:
|
||||||
image: docker.io/zmkfirmware/zmk-dev-arm:3.0
|
image: docker.io/zmkfirmware/zmk-dev-arm:3.0
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- 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
|
||||||
|
|
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Find test directories
|
- name: Find test directories
|
||||||
id: test-dirs
|
id: test-dirs
|
||||||
run: |
|
run: |
|
||||||
|
@ -36,7 +36,7 @@ jobs:
|
||||||
image: docker.io/zmkfirmware/zmk-build-arm:3.0
|
image: docker.io/zmkfirmware/zmk-build-arm:3.0
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Cache west modules
|
- name: Cache west modules
|
||||||
uses: actions/cache@v3.0.2
|
uses: actions/cache@v3.0.2
|
||||||
env:
|
env:
|
||||||
|
@ -47,11 +47,11 @@ jobs:
|
||||||
tools/
|
tools/
|
||||||
zephyr/
|
zephyr/
|
||||||
bootloader/
|
bootloader/
|
||||||
key: 4-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
4-${{ runner.os }}-build-${{ env.cache-name }}-
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
4-${{ runner.os }}-build-
|
${{ runner.os }}-build-
|
||||||
4-${{ runner.os }}-
|
${{ 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)
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
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}/drivers
|
${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)
|
||||||
|
@ -40,6 +38,7 @@ target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext
|
||||||
if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||||
target_sources(app PRIVATE src/hid.c)
|
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_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)
|
||||||
|
@ -48,13 +47,13 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||||
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)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_tap_dance.c)
|
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_toggle_layer.c)
|
target_sources(app PRIVATE src/behaviors/behavior_toggle_layer.c)
|
||||||
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(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c)
|
target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.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/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/endpoints.c)
|
||||||
|
|
25
app/Kconfig
25
app/Kconfig
|
@ -25,6 +25,18 @@ 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
|
||||||
|
@ -243,6 +255,13 @@ 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
|
||||||
|
|
||||||
|
@ -330,6 +349,12 @@ config ZMK_BEHAVIORS_QUEUE_SIZE
|
||||||
int "Maximum number of behaviors to allow queueing from a macro or other complex behavior"
|
int "Maximum number of behaviors to allow queueing from a macro or other complex behavior"
|
||||||
default 64
|
default 64
|
||||||
|
|
||||||
|
DT_COMPAT_ZMK_BEHAVIOR_KEY_TOGGLE := zmk,behavior-key-toggle
|
||||||
|
|
||||||
|
config ZMK_BEHAVIOR_KEY_TOGGLE
|
||||||
|
bool
|
||||||
|
default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BEHAVIOR_KEY_TOGGLE))
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "Advanced"
|
menu "Advanced"
|
||||||
|
|
|
@ -2,9 +2,9 @@ config BOARD_ENABLE_DCDC
|
||||||
bool "Enable DCDC mode"
|
bool "Enable DCDC mode"
|
||||||
select SOC_DCDC_NRF52X
|
select SOC_DCDC_NRF52X
|
||||||
default y
|
default y
|
||||||
depends on (BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13)
|
depends on (BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833)
|
||||||
|
|
||||||
config BOARD_NRFMICRO_CHARGER
|
config BOARD_NRFMICRO_CHARGER
|
||||||
bool "Enable battery charger"
|
bool "Enable battery charger"
|
||||||
default y
|
default y
|
||||||
depends on (BOARD_NRFMICRO_13)
|
depends on (BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833)
|
||||||
|
|
|
@ -14,3 +14,7 @@ config BOARD_NRFMICRO_11_FLIPPED
|
||||||
config BOARD_NRFMICRO_13
|
config BOARD_NRFMICRO_13
|
||||||
bool "nrfmicro_13"
|
bool "nrfmicro_13"
|
||||||
depends on SOC_NRF52840_QIAA
|
depends on SOC_NRF52840_QIAA
|
||||||
|
|
||||||
|
config BOARD_NRFMICRO_13_52833
|
||||||
|
bool "nrfmicro_13_52833"
|
||||||
|
depends on SOC_NRF52833_QIAA
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Copyright (c) 2020 The ZMK Contributors
|
# Copyright (c) 2020 The ZMK Contributors
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
if BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13
|
if BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833
|
||||||
|
|
||||||
config BOARD
|
config BOARD
|
||||||
default "nrfmicro"
|
default "nrfmicro"
|
||||||
|
@ -27,11 +27,11 @@ config ZMK_USB
|
||||||
config PINMUX
|
config PINMUX
|
||||||
default y
|
default y
|
||||||
|
|
||||||
if BOARD_NRFMICRO_13
|
if BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833
|
||||||
|
|
||||||
config BOARD_NRFMICRO_CHARGER
|
config BOARD_NRFMICRO_CHARGER
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif # BOARD_NRFMICRO_13
|
endif # BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833
|
||||||
|
|
||||||
endif # BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13
|
endif # BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833
|
||||||
|
|
59
app/boards/arm/nrfmicro/arduino_pro_micro_pins_52833.dtsi
Normal file
59
app/boards/arm/nrfmicro/arduino_pro_micro_pins_52833.dtsi
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/ {
|
||||||
|
pro_micro: connector {
|
||||||
|
compatible = "arduino-pro-micro";
|
||||||
|
#gpio-cells = <2>;
|
||||||
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
|
gpio-map
|
||||||
|
= <0 0 &gpio0 8 0> /* D0 */
|
||||||
|
, <1 0 &gpio0 6 0> /* D1 */
|
||||||
|
, <2 0 &gpio0 15 0> /* D2 */
|
||||||
|
, <3 0 &gpio0 17 0> /* D3 */
|
||||||
|
, <4 0 &gpio0 20 0> /* D4/A6 */
|
||||||
|
, <5 0 &gpio0 13 0> /* D5 */
|
||||||
|
, <6 0 &gpio0 24 0> /* D6/A7 */
|
||||||
|
, <7 0 &gpio0 9 0> /* D7 */
|
||||||
|
, <8 0 &gpio0 10 0> /* D8/A8 */
|
||||||
|
, <9 0 &gpio1 6 0> /* D9/A9 */
|
||||||
|
, <10 0 &gpio1 4 0> /* D10/A10 */
|
||||||
|
, <16 0 &gpio0 28 0> /* D16 */
|
||||||
|
, <14 0 &gpio0 3 0> /* D14 */
|
||||||
|
, <15 0 &gpio1 5 0> /* D15 */
|
||||||
|
, <18 0 &gpio0 2 0> /* D18/A0 */
|
||||||
|
, <19 0 &gpio0 29 0> /* D19/A1 */
|
||||||
|
, <20 0 &gpio0 31 0> /* D20/A2 */
|
||||||
|
, <21 0 &gpio0 30 0> /* D21/A3 */
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
|
pro_micro_a: connector_a {
|
||||||
|
compatible = "arduino-pro-micro";
|
||||||
|
#gpio-cells = <2>;
|
||||||
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
|
gpio-map
|
||||||
|
= <0 0 &gpio0 2 0> /* D18/A0 */
|
||||||
|
, <1 0 &gpio0 29 0> /* D19/A1 */
|
||||||
|
, <2 0 &gpio0 31 0> /* D20/A2 */
|
||||||
|
, <3 0 &gpio0 30 0> /* D21/A3 */
|
||||||
|
, <6 0 &gpio0 20 0> /* D4/A6 */
|
||||||
|
, <7 0 &gpio0 24 0> /* D6/A7 */
|
||||||
|
, <8 0 &gpio0 10 0> /* D8/A8 */
|
||||||
|
, <9 0 &gpio1 6 0> /* D9/A9 */
|
||||||
|
, <10 0 &gpio1 11 0> /* D10/A10 */
|
||||||
|
;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
pro_micro_d: &pro_micro {};
|
||||||
|
pro_micro_i2c: &i2c0 {};
|
||||||
|
pro_micro_spi: &spi0 {};
|
||||||
|
pro_micro_serial: &uart0 {};
|
121
app/boards/arm/nrfmicro/nrfmicro_13_52833.dts
Normal file
121
app/boards/arm/nrfmicro/nrfmicro_13_52833.dts
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
#include <nordic/nrf52833_qiaa.dtsi>
|
||||||
|
#include "arduino_pro_micro_pins_52833.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "nrfmicro";
|
||||||
|
compatible = "joric,nrfmicro";
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
zephyr,code-partition = &code_partition;
|
||||||
|
zephyr,sram = &sram0;
|
||||||
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
|
zmk,battery = &vbatt;
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
blue_led: led_0 {
|
||||||
|
gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
|
||||||
|
label = "Blue LED";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ext-power {
|
||||||
|
compatible = "zmk,ext-power-generic";
|
||||||
|
label = "EXT_POWER";
|
||||||
|
control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
vbatt: vbatt {
|
||||||
|
compatible = "zmk,battery-voltage-divider";
|
||||||
|
label = "BATTERY";
|
||||||
|
io-channels = <&adc 2>;
|
||||||
|
output-ohms = <2000000>;
|
||||||
|
full-ohms = <(2000000 + 820000)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&adc {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpiote {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&i2c0 {
|
||||||
|
compatible = "nordic,nrf-twi";
|
||||||
|
sda-pin = <15>;
|
||||||
|
scl-pin = <17>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
compatible = "nordic,nrf-uarte";
|
||||||
|
tx-pin = <6>;
|
||||||
|
rx-pin = <8>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&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 0x00046000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The flash starting at 0x0006c000 and ending at
|
||||||
|
* 0x00073fff is reserved for use by the application.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Storage partition will be used by FCB/LittleFS/NVS
|
||||||
|
* if enabled.
|
||||||
|
*/
|
||||||
|
storage_partition: partition@6c000 {
|
||||||
|
label = "storage";
|
||||||
|
reg = <0x0006c000 0x00008000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot_partition: partition@74000 {
|
||||||
|
label = "adafruit_boot";
|
||||||
|
reg = <0x00074000 0x0000c000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
15
app/boards/arm/nrfmicro/nrfmicro_13_52833.yaml
Normal file
15
app/boards/arm/nrfmicro/nrfmicro_13_52833.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
identifier: nrfmicro_13_52833
|
||||||
|
name: nrfmicro_13_52833
|
||||||
|
type: mcu
|
||||||
|
arch: arm
|
||||||
|
toolchain:
|
||||||
|
- zephyr
|
||||||
|
- gnuarmemb
|
||||||
|
- xtools
|
||||||
|
supported:
|
||||||
|
- adc
|
||||||
|
- usb_device
|
||||||
|
- ble
|
||||||
|
- ieee802154
|
||||||
|
- pwm
|
||||||
|
- watchdog
|
10
app/boards/arm/nrfmicro/nrfmicro_13_52833.zmk.yml
Normal file
10
app/boards/arm/nrfmicro/nrfmicro_13_52833.zmk.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: nrfmicro_13_52833
|
||||||
|
name: nRFMicro 1.3/1.4 (nRF52833)
|
||||||
|
type: board
|
||||||
|
arch: arm
|
||||||
|
outputs:
|
||||||
|
- usb
|
||||||
|
- ble
|
||||||
|
url: https://github.com/joric/nrfmicro/
|
||||||
|
exposes: [pro_micro]
|
23
app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig
Normal file
23
app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
CONFIG_SOC_SERIES_NRF52X=y
|
||||||
|
CONFIG_SOC_NRF52833_QIAA=y
|
||||||
|
CONFIG_BOARD_NRFMICRO_13_52833=y
|
||||||
|
|
||||||
|
# Enable MPU
|
||||||
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
# enable GPIO
|
||||||
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
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
|
||||||
|
CONFIG_CLOCK_CONTROL_NRF=y
|
||||||
|
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
|
|
@ -14,7 +14,7 @@
|
||||||
static int pinmux_nrfmicro_init(const struct device *port) {
|
static int pinmux_nrfmicro_init(const struct device *port) {
|
||||||
ARG_UNUSED(port);
|
ARG_UNUSED(port);
|
||||||
|
|
||||||
#if CONFIG_BOARD_NRFMICRO_13
|
#if (CONFIG_BOARD_NRFMICRO_13 || CONFIG_BOARD_NRFMICRO_13_52833)
|
||||||
const struct device *p0 = device_get_binding("GPIO_0");
|
const struct device *p0 = device_get_binding("GPIO_0");
|
||||||
#if CONFIG_BOARD_NRFMICRO_CHARGER
|
#if CONFIG_BOARD_NRFMICRO_CHARGER
|
||||||
gpio_pin_configure(p0, 5, GPIO_OUTPUT);
|
gpio_pin_configure(p0, 5, GPIO_OUTPUT);
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
#include <behaviors.dtsi>
|
#include <behaviors.dtsi>
|
||||||
#include <dt-bindings/zmk/keys.h>
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
|
||||||
|
@ -6,16 +12,34 @@
|
||||||
compatible = "zmk,keymap";
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
default_layer {
|
default_layer {
|
||||||
// -----------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC |
|
// | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC |
|
||||||
// | ESC | A | S | D | F | G | H | J | K | L | ; | ' |
|
// | ESC | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | RET |
|
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | RET |
|
||||||
// | FN | LGUI | LALT | LCTL | LOWR | SPACE | RAIS | LARW | DARW | UARW | RARW |
|
// | | LCTL | LALT | LGUI | LOWR | SPACE | RAIS | LARW | DARW | UARW | RARW |
|
||||||
bindings = <
|
bindings = <
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &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 BSPC
|
||||||
&kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
|
&kp ESC &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 BSLH &kp RET
|
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH &kp RET
|
||||||
&trans &kp LGUI &kp LALT &kp LCTRL &trans &trans &kp SPACE &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT
|
&trans &kp LCTL &kp LALT &kp LGUI &mo 1 &trans &kp SPACE &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
lower {
|
||||||
|
bindings = <
|
||||||
|
&kp LS(GRAVE) &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp LS(N0) &kp DEL
|
||||||
|
&kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE
|
||||||
|
&trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp LS(HASH) &kp LS(BSLH) &kp HOME &kp END &trans
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
raise {
|
||||||
|
bindings = <
|
||||||
|
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
|
||||||
|
&kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH
|
||||||
|
&trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp HASH &kp BSLH &kp PG_UP &kp PG_DN &trans
|
||||||
|
&reset &bootloader &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
6
app/boards/arm/puchi_ble/CMakeLists.txt
Normal file
6
app/boards/arm/puchi_ble/CMakeLists.txt
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
if(CONFIG_PINMUX)
|
||||||
|
zephyr_library()
|
||||||
|
zephyr_library_sources(pinmux.c)
|
||||||
|
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
||||||
|
endif()
|
3
app/boards/arm/puchi_ble/Kconfig
Normal file
3
app/boards/arm/puchi_ble/Kconfig
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
8
app/boards/arm/puchi_ble/Kconfig.board
Normal file
8
app/boards/arm/puchi_ble/Kconfig.board
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Puchi-BLE board configuration
|
||||||
|
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
config BOARD_PUCHI_BLE_v1
|
||||||
|
bool "puchi_ble_v1"
|
||||||
|
depends on SOC_NRF52840_QIAA
|
28
app/boards/arm/puchi_ble/Kconfig.defconfig
Normal file
28
app/boards/arm/puchi_ble/Kconfig.defconfig
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
if BOARD_PUCHI_BLE_v1
|
||||||
|
|
||||||
|
config BOARD
|
||||||
|
default "puchi_ble"
|
||||||
|
|
||||||
|
if USB_DEVICE_STACK
|
||||||
|
|
||||||
|
config USB_NRFX
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # USB_DEVICE_STACK
|
||||||
|
|
||||||
|
config BT_CTLR
|
||||||
|
default BT
|
||||||
|
|
||||||
|
config ZMK_BLE
|
||||||
|
default y
|
||||||
|
|
||||||
|
config ZMK_USB
|
||||||
|
default y
|
||||||
|
|
||||||
|
config PINMUX
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # BOARD_PUCHI_BLE_v1
|
59
app/boards/arm/puchi_ble/arduino_pro_micro_pins.dtsi
Normal file
59
app/boards/arm/puchi_ble/arduino_pro_micro_pins.dtsi
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/ {
|
||||||
|
pro_micro: connector {
|
||||||
|
compatible = "arduino-pro-micro";
|
||||||
|
#gpio-cells = <2>;
|
||||||
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
|
gpio-map
|
||||||
|
= <0 0 &gpio0 8 0> /* D0 */
|
||||||
|
, <1 0 &gpio0 6 0> /* D1 */
|
||||||
|
, <2 0 &gpio0 15 0> /* D2 */
|
||||||
|
, <3 0 &gpio0 17 0> /* D3 */
|
||||||
|
, <4 0 &gpio0 20 0> /* D4/A6 */
|
||||||
|
, <5 0 &gpio0 13 0> /* D5 */
|
||||||
|
, <6 0 &gpio0 24 0> /* D6/A7 */
|
||||||
|
, <7 0 &gpio0 9 0> /* D7 */
|
||||||
|
, <8 0 &gpio0 10 0> /* D8/A8 */
|
||||||
|
, <9 0 &gpio1 6 0> /* D9/A9 */
|
||||||
|
, <10 0 &gpio1 11 0> /* D10/A10 */
|
||||||
|
, <16 0 &gpio0 28 0> /* D16 */
|
||||||
|
, <14 0 &gpio0 3 0> /* D14 */
|
||||||
|
, <15 0 &gpio1 13 0> /* D15 */
|
||||||
|
, <18 0 &gpio0 2 0> /* D18/A0 */
|
||||||
|
, <19 0 &gpio0 29 0> /* D19/A1 */
|
||||||
|
, <20 0 &gpio0 31 0> /* D20/A2 */
|
||||||
|
, <21 0 &gpio0 30 0> /* D21/A3 */
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
|
pro_micro_a: connector_a {
|
||||||
|
compatible = "arduino-pro-micro";
|
||||||
|
#gpio-cells = <2>;
|
||||||
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
|
gpio-map
|
||||||
|
= <0 0 &gpio0 2 0> /* D18/A0 */
|
||||||
|
, <1 0 &gpio0 29 0> /* D19/A1 */
|
||||||
|
, <2 0 &gpio0 31 0> /* D20/A2 */
|
||||||
|
, <3 0 &gpio0 30 0> /* D21/A3 */
|
||||||
|
, <6 0 &gpio0 20 0> /* D4/A6 */
|
||||||
|
, <7 0 &gpio0 24 0> /* D6/A7 */
|
||||||
|
, <8 0 &gpio0 10 0> /* D8/A8 */
|
||||||
|
, <9 0 &gpio1 6 0> /* D9/A9 */
|
||||||
|
, <10 0 &gpio1 11 0> /* D10/A10 */
|
||||||
|
;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
pro_micro_d: &pro_micro {};
|
||||||
|
pro_micro_i2c: &i2c0 {};
|
||||||
|
pro_micro_spi: &spi0 {};
|
||||||
|
pro_micro_serial: &uart0 {};
|
6
app/boards/arm/puchi_ble/board.cmake
Normal file
6
app/boards/arm/puchi_ble/board.cmake
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||||
|
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
|
||||||
|
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
29
app/boards/arm/puchi_ble/pinmux.c
Normal file
29
app/boards/arm/puchi_ble/pinmux.c
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <kernel.h>
|
||||||
|
#include <device.h>
|
||||||
|
#include <init.h>
|
||||||
|
#include <drivers/gpio.h>
|
||||||
|
#include <sys/sys_io.h>
|
||||||
|
#include <devicetree.h>
|
||||||
|
|
||||||
|
static int pinmux_puchi_ble_init(const struct device *port) {
|
||||||
|
ARG_UNUSED(port);
|
||||||
|
|
||||||
|
#if CONFIG_BOARD_PUCHI_BLE_v1
|
||||||
|
const struct device *p0 = device_get_binding("GPIO_0");
|
||||||
|
#if CONFIG_BOARD_PUCHI_BLE_CHARGER
|
||||||
|
gpio_pin_configure(p0, 5, GPIO_OUTPUT);
|
||||||
|
gpio_pin_set(p0, 5, 0);
|
||||||
|
#else
|
||||||
|
gpio_pin_configure(p0, 5, GPIO_INPUT);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
SYS_INIT(pinmux_puchi_ble_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY);
|
121
app/boards/arm/puchi_ble/puchi_ble_v1.dts
Normal file
121
app/boards/arm/puchi_ble/puchi_ble_v1.dts
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
|
#include "arduino_pro_micro_pins.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "puchi_ble";
|
||||||
|
compatible = "puchi_ble";
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
zephyr,code-partition = &code_partition;
|
||||||
|
zephyr,sram = &sram0;
|
||||||
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
|
zmk,battery = &vbatt;
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
blue_led: led_0 {
|
||||||
|
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
|
||||||
|
label = "Blue LED";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ext-power {
|
||||||
|
compatible = "zmk,ext-power-generic";
|
||||||
|
label = "EXT_POWER";
|
||||||
|
control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
vbatt: vbatt {
|
||||||
|
compatible = "zmk,battery-voltage-divider";
|
||||||
|
label = "BATTERY";
|
||||||
|
io-channels = <&adc 2>;
|
||||||
|
output-ohms = <2000000>;
|
||||||
|
full-ohms = <(2000000 + 820000)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&adc {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpiote {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&i2c0 {
|
||||||
|
compatible = "nordic,nrf-twi";
|
||||||
|
sda-pin = <15>;
|
||||||
|
scl-pin = <17>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
compatible = "nordic,nrf-uarte";
|
||||||
|
tx-pin = <6>;
|
||||||
|
rx-pin = <8>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&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>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
15
app/boards/arm/puchi_ble/puchi_ble_v1.yaml
Normal file
15
app/boards/arm/puchi_ble/puchi_ble_v1.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
identifier: puchi_ble_v1
|
||||||
|
name: puchi_ble_v1
|
||||||
|
type: mcu
|
||||||
|
arch: arm
|
||||||
|
toolchain:
|
||||||
|
- zephyr
|
||||||
|
- gnuarmemb
|
||||||
|
- xtools
|
||||||
|
supported:
|
||||||
|
- adc
|
||||||
|
- usb_device
|
||||||
|
- ble
|
||||||
|
- ieee802154
|
||||||
|
- pwm
|
||||||
|
- watchdog
|
10
app/boards/arm/puchi_ble/puchi_ble_v1.zmk.yml
Normal file
10
app/boards/arm/puchi_ble/puchi_ble_v1.zmk.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: puchi_ble_v1
|
||||||
|
name: Puchi-BLE V1
|
||||||
|
type: board
|
||||||
|
arch: arm
|
||||||
|
outputs:
|
||||||
|
- usb
|
||||||
|
- ble
|
||||||
|
url: https://keycapsss.com/keyboard-parts/mcu-controller/202/puchi-ble-wireless-microcontroller
|
||||||
|
exposes: [pro_micro]
|
24
app/boards/arm/puchi_ble/puchi_ble_v1_defconfig
Normal file
24
app/boards/arm/puchi_ble/puchi_ble_v1_defconfig
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
CONFIG_SOC_SERIES_NRF52X=y
|
||||||
|
CONFIG_SOC_NRF52840_QIAA=y
|
||||||
|
CONFIG_BOARD_PUCHI_BLE_v1=y
|
||||||
|
|
||||||
|
# Enable MPU
|
||||||
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
# enable GPIO
|
||||||
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
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
|
||||||
|
CONFIG_CLOCK_CONTROL_NRF=y
|
||||||
|
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
|
|
@ -16,7 +16,7 @@
|
||||||
label = "BATTERY";
|
label = "BATTERY";
|
||||||
io-channels = <&adc 7>;
|
io-channels = <&adc 7>;
|
||||||
power-gpios = <&gpio0 14 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
|
power-gpios = <&gpio0 14 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
|
||||||
output-ohms = <1000000>;
|
output-ohms = <510000>;
|
||||||
full-ohms = <(1000000 + 510000)>;
|
full-ohms = <(1000000 + 510000)>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,23 +29,23 @@
|
||||||
compatible = "zmk,kscan-gpio-direct";
|
compatible = "zmk,kscan-gpio-direct";
|
||||||
label = "KSCAN";
|
label = "KSCAN";
|
||||||
input-gpios =
|
input-gpios =
|
||||||
<&pro_micro_d 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_d 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_a 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_d 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_a 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_d 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_a 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_a 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_d 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_d 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_d 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
<&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||||
<&pro_micro_d 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
<&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -28,12 +28,6 @@ endif # ZMK_DISPLAY
|
||||||
|
|
||||||
if LVGL
|
if LVGL
|
||||||
|
|
||||||
config LVGL_HOR_RES_MAX
|
|
||||||
default 128
|
|
||||||
|
|
||||||
config LVGL_VER_RES_MAX
|
|
||||||
default 32
|
|
||||||
|
|
||||||
config LVGL_VDB_SIZE
|
config LVGL_VDB_SIZE
|
||||||
default 64
|
default 64
|
||||||
|
|
||||||
|
|
|
@ -11,23 +11,23 @@ Some revisions of the aforementioned PCBs have slightly different pin arrangemen
|
||||||
/* The position of Q and B keys have been swapped */
|
/* The position of Q and B keys have been swapped */
|
||||||
&kscan0 {
|
&kscan0 {
|
||||||
input-gpios
|
input-gpios
|
||||||
= <&pro_micro_d 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
= <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_a 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_a 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_a 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_a 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_d 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_d 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_d 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_d 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_d 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_d 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
, <&pro_micro_d 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
, <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
A 40% Ortho keyboard made by Polarity Works
|
|
|
@ -13,16 +13,16 @@
|
||||||
compatible = "zmk,keymap";
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
default_layer {
|
default_layer {
|
||||||
// -----------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC |
|
// | TAB | Q | W | E | R | T | Y | U | I | O | P | BSPC |
|
||||||
// | ESC | A | S | D | F | G | H | J | K | L | ; | ' |
|
// | ESC | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | RET |
|
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | RET |
|
||||||
// | FN | LGUI | LALT | LCTL | LOWR | SPACE | RAIS | LARW | DARW | UARW | RARW |
|
// | | LCTL | LALT | LGUI | LOWR | SPACE | RAIS | LARW | DARW | UARW | RARW |
|
||||||
bindings = <
|
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 TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
|
||||||
&kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
|
&kp ESC &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 BSLH &kp RET
|
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH &kp RET
|
||||||
&trans &kp LGUI &kp LALT &kp LCTRL &mo 1 &kp SPACE &trans &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT
|
&trans &kp LCTL &kp LALT &kp LGUI &mo 1 &kp SPACE &trans &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT
|
||||||
>;
|
>;
|
||||||
|
|
||||||
sensor-bindings = <&inc_dec_kp PG_UP PG_DN>;
|
sensor-bindings = <&inc_dec_kp PG_UP PG_DN>;
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
lower {
|
lower {
|
||||||
bindings = <
|
bindings = <
|
||||||
&kp LS(GRAVE) &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp LS(N0) &kp DEL
|
&kp LS(GRAVE) &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp LS(N0) &kp DEL
|
||||||
&kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp UNDER &kp PLUS &kp LT &kp GT &kp PIPE
|
&kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE
|
||||||
&trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp LS(HASH) &kp LS(BSLH) &kp HOME &kp END &trans
|
&trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp LS(HASH) &kp LS(BSLH) &kp HOME &kp END &trans
|
||||||
&trans &trans &trans &trans &trans &trans &trans &mo 3 &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP
|
&trans &trans &trans &trans &trans &trans &trans &mo 3 &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP
|
||||||
>;
|
>;
|
||||||
|
@ -46,12 +46,14 @@
|
||||||
&trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp HASH &kp BSLH &kp PG_UP &kp PG_DN &trans
|
&trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp HASH &kp BSLH &kp PG_UP &kp PG_DN &trans
|
||||||
&trans &trans &trans &trans &mo 3 &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP
|
&trans &trans &trans &trans &mo 3 &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
sensor-bindings = <&inc_dec_kp PG_UP PG_DN>;
|
||||||
};
|
};
|
||||||
|
|
||||||
control {
|
control {
|
||||||
bindings = <
|
bindings = <
|
||||||
&reset &bootloader &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans
|
&reset &bootloader &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans
|
||||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
&bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||||
>;
|
>;
|
||||||
|
|
|
@ -31,12 +31,6 @@ endif # ZMK_DISPLAY
|
||||||
|
|
||||||
if LVGL
|
if LVGL
|
||||||
|
|
||||||
config LVGL_HOR_RES_MAX
|
|
||||||
default 128
|
|
||||||
|
|
||||||
config LVGL_VER_RES_MAX
|
|
||||||
default 32
|
|
||||||
|
|
||||||
config LVGL_VDB_SIZE
|
config LVGL_VDB_SIZE
|
||||||
default 64
|
default 64
|
||||||
|
|
||||||
|
|
9
app/boards/shields/eternal_keypad/Kconfig.defconfig
Normal file
9
app/boards/shields/eternal_keypad/Kconfig.defconfig
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
if SHIELD_ETERNAL_KEYPAD || SHIELD_ETERNAL_KEYPAD_LEFTY
|
||||||
|
|
||||||
|
config ZMK_KEYBOARD_NAME
|
||||||
|
default "Eternal Keypad"
|
||||||
|
|
||||||
|
endif
|
8
app/boards/shields/eternal_keypad/Kconfig.shield
Normal file
8
app/boards/shields/eternal_keypad/Kconfig.shield
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
config SHIELD_ETERNAL_KEYPAD
|
||||||
|
def_bool $(shields_list_contains,eternal_keypad)
|
||||||
|
|
||||||
|
config SHIELD_ETERNAL_KEYPAD_LEFTY
|
||||||
|
def_bool $(shields_list_contains,eternal_keypad_lefty)
|
10
app/boards/shields/eternal_keypad/README.md
Normal file
10
app/boards/shields/eternal_keypad/README.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Eternal Keypad
|
||||||
|
|
||||||
|
Eternal Keypad is an open-source input device for gaming that can be assembled for both right and left hand mouse users.
|
||||||
|
|
||||||
|
Firmware is described in the [Eternal Keypad](https://github.com/duckyb/eternal-keypad) repository [README](https://github.com/duckyb/eternal-keypad#firmware).
|
||||||
|
|
||||||
|
Two keymaps are included:
|
||||||
|
|
||||||
|
- eternal_keypad (default)
|
||||||
|
- eternal_keypad_lefty (for left handed users)
|
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
/* Cannot be used together with i2c0. */
|
||||||
|
status = "okay";
|
||||||
|
mosi-pin = <6>;
|
||||||
|
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
|
||||||
|
sck-pin = <5>;
|
||||||
|
miso-pin = <7>;
|
||||||
|
|
||||||
|
led_strip: ws2812@0 {
|
||||||
|
compatible = "worldsemi,ws2812-spi";
|
||||||
|
label = "SK6812mini";
|
||||||
|
|
||||||
|
/* SPI */
|
||||||
|
reg = <0>; /* ignored, but necessary for SPI bindings */
|
||||||
|
spi-max-frequency = <4000000>;
|
||||||
|
|
||||||
|
/* WS2812 */
|
||||||
|
chain-length = <8>;
|
||||||
|
spi-one-frame = <0x70>;
|
||||||
|
spi-zero-frame = <0x40>;
|
||||||
|
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,underglow = &led_strip;
|
||||||
|
};
|
||||||
|
};
|
9
app/boards/shields/eternal_keypad/eternal_keypad.conf
Normal file
9
app/boards/shields/eternal_keypad/eternal_keypad.conf
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
# Uncomment to turn on logging, and set ZMK logging to debug output
|
||||||
|
# CONFIG_ZMK_USB_LOGGING=y
|
||||||
|
|
||||||
|
# Uncomment the following lines to enable RGB underglow
|
||||||
|
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||||
|
# CONFIG_WS2812_STRIP=y
|
53
app/boards/shields/eternal_keypad/eternal_keypad.dtsi
Normal file
53
app/boards/shields/eternal_keypad/eternal_keypad.dtsi
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <dt-bindings/zmk/matrix_transform.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,kscan = &kscan0;
|
||||||
|
zmk,matrix_transform = &default_transform;
|
||||||
|
};
|
||||||
|
|
||||||
|
kscan0: kscan {
|
||||||
|
compatible = "zmk,kscan-gpio-matrix";
|
||||||
|
label = "KSCAN";
|
||||||
|
|
||||||
|
diode-direction = "col2row";
|
||||||
|
|
||||||
|
row-gpios
|
||||||
|
= <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
;
|
||||||
|
|
||||||
|
col-gpios
|
||||||
|
= <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
|
default_transform: keymap_transform_0 {
|
||||||
|
compatible = "zmk,matrix-transform";
|
||||||
|
columns = <8>;
|
||||||
|
rows = <5>;
|
||||||
|
map = <
|
||||||
|
RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7)
|
||||||
|
RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7)
|
||||||
|
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(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7)
|
||||||
|
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,5) RC(4,7)
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
56
app/boards/shields/eternal_keypad/eternal_keypad.keymap
Normal file
56
app/boards/shields/eternal_keypad/eternal_keypad.keymap
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <behaviors.dtsi>
|
||||||
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
#include <dt-bindings/zmk/bt.h>
|
||||||
|
#include <dt-bindings/zmk/outputs.h>
|
||||||
|
#include <dt-bindings/zmk/rgb.h>
|
||||||
|
|
||||||
|
#define BASE 0
|
||||||
|
#define ARROW 1
|
||||||
|
#define FUNC 2
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,kscan = &kscan0;
|
||||||
|
zmk,matrix_transform = &default_transform;
|
||||||
|
};
|
||||||
|
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
|
default_layer {
|
||||||
|
bindings = <
|
||||||
|
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6
|
||||||
|
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp N7
|
||||||
|
&kp F13 &kp ENTER &kp A &kp S &kp D &kp F &kp G &kp N8
|
||||||
|
&kp F14 &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N9
|
||||||
|
&kp F15 &kp LCTRL &sl FUNC &kp LALT &kp SPACE < ARROW N0
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
arrow_layer {
|
||||||
|
bindings = <
|
||||||
|
&bt BT_SEL 0 &bt BT_SEL 1 &trans &trans &trans &out OUT_USB &out OUT_BLE
|
||||||
|
&trans &trans &kp UP &trans &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_HUD
|
||||||
|
&bt BT_CLR &trans &kp LEFT &kp DOWN &kp RIGHT &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD
|
||||||
|
&reset &trans &trans &trans &trans &trans &rgb_ug RGB_EFF &rgb_ug RGB_EFR
|
||||||
|
&bootloader &trans &trans &trans &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
function_layer {
|
||||||
|
bindings = <
|
||||||
|
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6
|
||||||
|
&trans &kp P &kp O &kp I &kp U &kp Y &kp F7
|
||||||
|
&bt BT_CLR &kp BSPC &kp SEMI &kp L &kp K &kp J &kp H &kp F8
|
||||||
|
&reset &trans &kp LGUI &kp M &kp N &kp F12 &kp F11 &kp F9
|
||||||
|
&bootloader &trans &trans &trans &trans &kp F10
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
7
app/boards/shields/eternal_keypad/eternal_keypad.overlay
Normal file
7
app/boards/shields/eternal_keypad/eternal_keypad.overlay
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "eternal_keypad.dtsi"
|
9
app/boards/shields/eternal_keypad/eternal_keypad.zmk.yml
Normal file
9
app/boards/shields/eternal_keypad/eternal_keypad.zmk.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: eternal_keypad
|
||||||
|
name: Eternal Keypad
|
||||||
|
type: shield
|
||||||
|
url: https://github.com/duckyb/eternal-keypad
|
||||||
|
requires: [pro_micro]
|
||||||
|
features:
|
||||||
|
- keys
|
||||||
|
- underglow
|
|
@ -0,0 +1,56 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <behaviors.dtsi>
|
||||||
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
#include <dt-bindings/zmk/bt.h>
|
||||||
|
#include <dt-bindings/zmk/outputs.h>
|
||||||
|
#include <dt-bindings/zmk/rgb.h>
|
||||||
|
|
||||||
|
#define BASE 0
|
||||||
|
#define ARROW 1
|
||||||
|
#define FUNC 2
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,kscan = &kscan0;
|
||||||
|
zmk,matrix_transform = &default_transform;
|
||||||
|
};
|
||||||
|
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
|
default_layer {
|
||||||
|
bindings = <
|
||||||
|
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6
|
||||||
|
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp N7
|
||||||
|
&kp F13 &kp ENTER &kp D &kp S &kp A &kp F &kp G &kp N8
|
||||||
|
&kp F14 &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N9
|
||||||
|
&kp F15 &kp LCTRL &sl FUNC &kp LALT &kp SPACE < ARROW N0
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
arrow_layer {
|
||||||
|
bindings = <
|
||||||
|
&bt BT_SEL 0 &bt BT_SEL 1 &trans &trans &trans &out OUT_USB &out OUT_BLE
|
||||||
|
&trans &trans &kp UP &trans &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_HUD
|
||||||
|
&bt BT_CLR &trans &kp RIGHT &kp DOWN &kp RIGHT &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD
|
||||||
|
&reset &trans &trans &trans &trans &trans &rgb_ug RGB_EFF &rgb_ug RGB_EFR
|
||||||
|
&bootloader &trans &trans &trans &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
function_layer {
|
||||||
|
bindings = <
|
||||||
|
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6
|
||||||
|
&trans &kp P &kp O &kp I &kp U &kp Y &kp F7
|
||||||
|
&bt BT_CLR &kp BSPC &kp SEMI &kp L &kp K &kp J &kp H &kp F8
|
||||||
|
&reset &trans &kp LGUI &kp M &kp N &kp F12 &kp F11 &kp F9
|
||||||
|
&bootloader &trans &trans &trans &trans &kp F10
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 202 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "eternal_keypad.dtsi"
|
|
@ -0,0 +1,9 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: eternal_keypad_lefty
|
||||||
|
name: Eternal Keypad Lefty
|
||||||
|
type: shield
|
||||||
|
url: https://github.com/duckyb/eternal-keypad
|
||||||
|
requires: [pro_micro]
|
||||||
|
features:
|
||||||
|
- keys
|
||||||
|
- underglow
|
|
@ -29,12 +29,6 @@ endif # ZMK_DISPLAY
|
||||||
|
|
||||||
if LVGL
|
if LVGL
|
||||||
|
|
||||||
config LVGL_HOR_RES_MAX
|
|
||||||
default 128
|
|
||||||
|
|
||||||
config LVGL_VER_RES_MAX
|
|
||||||
default 32
|
|
||||||
|
|
||||||
config LVGL_VDB_SIZE
|
config LVGL_VDB_SIZE
|
||||||
default 64
|
default 64
|
||||||
|
|
||||||
|
|
|
@ -21,12 +21,6 @@ endif # ZMK_DISPLAY
|
||||||
|
|
||||||
if LVGL
|
if LVGL
|
||||||
|
|
||||||
config LVGL_HOR_RES_MAX
|
|
||||||
default 128
|
|
||||||
|
|
||||||
config LVGL_VER_RES_MAX
|
|
||||||
default 32
|
|
||||||
|
|
||||||
config LVGL_VDB_SIZE
|
config LVGL_VDB_SIZE
|
||||||
default 64
|
default 64
|
||||||
|
|
||||||
|
|
|
@ -29,12 +29,6 @@ endif # ZMK_DISPLAY
|
||||||
|
|
||||||
if LVGL
|
if LVGL
|
||||||
|
|
||||||
config LVGL_HOR_RES_MAX
|
|
||||||
default 128
|
|
||||||
|
|
||||||
config LVGL_VER_RES_MAX
|
|
||||||
default 64
|
|
||||||
|
|
||||||
config LVGL_VDB_SIZE
|
config LVGL_VDB_SIZE
|
||||||
default 64
|
default 64
|
||||||
|
|
||||||
|
|
|
@ -31,11 +31,6 @@ endif # ZMK_DISPLAY
|
||||||
|
|
||||||
if LVGL
|
if LVGL
|
||||||
|
|
||||||
config LVGL_HOR_RES_MAX
|
|
||||||
default 128
|
|
||||||
|
|
||||||
config LVGL_VER_RES_MAX
|
|
||||||
default 32
|
|
||||||
|
|
||||||
config LVGL_VDB_SIZE
|
config LVGL_VDB_SIZE
|
||||||
default 64
|
default 64
|
||||||
|
|
|
@ -29,12 +29,6 @@ endif # ZMK_DISPLAY
|
||||||
|
|
||||||
if LVGL
|
if LVGL
|
||||||
|
|
||||||
config LVGL_HOR_RES_MAX
|
|
||||||
default 128
|
|
||||||
|
|
||||||
config LVGL_VER_RES_MAX
|
|
||||||
default 32
|
|
||||||
|
|
||||||
config LVGL_VDB_SIZE
|
config LVGL_VDB_SIZE
|
||||||
default 64
|
default 64
|
||||||
|
|
||||||
|
|
|
@ -31,12 +31,6 @@ endif # ZMK_DISPLAY
|
||||||
|
|
||||||
if LVGL
|
if LVGL
|
||||||
|
|
||||||
config LVGL_HOR_RES_MAX
|
|
||||||
default 128
|
|
||||||
|
|
||||||
config LVGL_VER_RES_MAX
|
|
||||||
default 32
|
|
||||||
|
|
||||||
config LVGL_VDB_SIZE
|
config LVGL_VDB_SIZE
|
||||||
default 64
|
default 64
|
||||||
|
|
||||||
|
|
|
@ -31,12 +31,6 @@ endif # ZMK_DISPLAY
|
||||||
|
|
||||||
if LVGL
|
if LVGL
|
||||||
|
|
||||||
config LVGL_HOR_RES_MAX
|
|
||||||
default 128
|
|
||||||
|
|
||||||
config LVGL_VER_RES_MAX
|
|
||||||
default 32
|
|
||||||
|
|
||||||
config LVGL_VDB_SIZE
|
config LVGL_VDB_SIZE
|
||||||
default 64
|
default 64
|
||||||
|
|
||||||
|
|
|
@ -21,12 +21,6 @@ endif # ZMK_DISPLAY
|
||||||
|
|
||||||
if LVGL
|
if LVGL
|
||||||
|
|
||||||
config LVGL_HOR_RES_MAX
|
|
||||||
default 128
|
|
||||||
|
|
||||||
config LVGL_VER_RES_MAX
|
|
||||||
default 32
|
|
||||||
|
|
||||||
config LVGL_VDB_SIZE
|
config LVGL_VDB_SIZE
|
||||||
default 64
|
default 64
|
||||||
|
|
||||||
|
|
|
@ -25,12 +25,6 @@ endif # ZMK_DISPLAY
|
||||||
|
|
||||||
if LVGL
|
if LVGL
|
||||||
|
|
||||||
config LVGL_HOR_RES_MAX
|
|
||||||
default 128
|
|
||||||
|
|
||||||
config LVGL_VER_RES_MAX
|
|
||||||
default 32
|
|
||||||
|
|
||||||
config LVGL_VDB_SIZE
|
config LVGL_VDB_SIZE
|
||||||
default 64
|
default 64
|
||||||
|
|
||||||
|
|
29
app/boards/shields/nice_view/Kconfig.defconfig
Normal file
29
app/boards/shields/nice_view/Kconfig.defconfig
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
if SHIELD_NICE_VIEW
|
||||||
|
|
||||||
|
config ZMK_DISPLAY
|
||||||
|
select LVGL_FONT_MONTSERRAT_26
|
||||||
|
|
||||||
|
if ZMK_DISPLAY
|
||||||
|
|
||||||
|
config SPI
|
||||||
|
default y
|
||||||
|
|
||||||
|
config LS0XX
|
||||||
|
default y
|
||||||
|
|
||||||
|
config ZMK_WIDGET_WPM_STATUS
|
||||||
|
default y if !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL
|
||||||
|
|
||||||
|
config LVGL_BITS_PER_PIXEL
|
||||||
|
default 1
|
||||||
|
|
||||||
|
choice LVGL_COLOR_DEPTH
|
||||||
|
default LVGL_COLOR_DEPTH_1
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
endif # ZMK_DISPLAY
|
||||||
|
|
||||||
|
endif
|
5
app/boards/shields/nice_view/Kconfig.shield
Normal file
5
app/boards/shields/nice_view/Kconfig.shield
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
config SHIELD_NICE_VIEW
|
||||||
|
def_bool $(shields_list_contains,nice_view)
|
5
app/boards/shields/nice_view/README.md
Normal file
5
app/boards/shields/nice_view/README.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# nice!view
|
||||||
|
|
||||||
|
The nice!view is a low power, high refresh rate display meant to replace I2C OLEDs traditionally used.
|
||||||
|
|
||||||
|
This shield requires that an `&nice_view_spi` labelled SPI bus is provided with *at least* MOSI, SCK, and CS pins defined.
|
5
app/boards/shields/nice_view/nice_view.conf
Normal file
5
app/boards/shields/nice_view/nice_view.conf
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Enable nice!view
|
||||||
|
CONFIG_ZMK_DISPLAY=y
|
||||||
|
CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_26=y
|
||||||
|
CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_26=y
|
||||||
|
CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE=n
|
23
app/boards/shields/nice_view/nice_view.overlay
Normal file
23
app/boards/shields/nice_view/nice_view.overlay
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
&nice_view_spi {
|
||||||
|
status = "okay";
|
||||||
|
nice_view: ls0xx@0 {
|
||||||
|
compatible = "sharp,ls0xx";
|
||||||
|
label = "DISPLAY";
|
||||||
|
spi-max-frequency = <1000000>;
|
||||||
|
reg = <0>;
|
||||||
|
width = <160>;
|
||||||
|
height = <68>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zephyr,display = &nice_view;
|
||||||
|
};
|
||||||
|
};
|
8
app/boards/shields/nice_view/nice_view.zmk.yml
Normal file
8
app/boards/shields/nice_view/nice_view.zmk.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: nice_view
|
||||||
|
name: nice!view
|
||||||
|
type: shield
|
||||||
|
url: https://nicekeyboards.com/nice-view
|
||||||
|
requires: [nice_view_header]
|
||||||
|
features:
|
||||||
|
- display
|
2
app/boards/shields/nice_view_adapter/Kconfig.defconfig
Normal file
2
app/boards/shields/nice_view_adapter/Kconfig.defconfig
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
5
app/boards/shields/nice_view_adapter/Kconfig.shield
Normal file
5
app/boards/shields/nice_view_adapter/Kconfig.shield
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
config SHIELD_NICE_VIEW_ADAPTER
|
||||||
|
def_bool $(shields_list_contains,nice_view_adapter)
|
11
app/boards/shields/nice_view_adapter/README.md
Normal file
11
app/boards/shields/nice_view_adapter/README.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# nice!view Adapter
|
||||||
|
|
||||||
|
This shield is used as an adapter between the nice!view and existing shields/boards that expose an I2C OLED header.
|
||||||
|
|
||||||
|
To use this shield, you should add this shield to your list of shields *before* `nice_view`.
|
||||||
|
|
||||||
|
The nice!view will use the SDA/SCL pins of the OLED, and then the adapter expects a final pin to be "bodged" from your microcontroller to the nice!view CS pin. This adapter assumes that the CS pin bodged is the `&pro_micro 1` pin or "D1", which is the top left pin when looking at the front of the board. If you can't use this pin, you'll need to override the `cs-gpios` for the `&nice_view_spi` bus (in your `zmk-config` keymap for example) or you will want to define your own `&nice_view_spi` bus without using this adapter.
|
||||||
|
|
||||||
|
```
|
||||||
|
west build -b nice_nano_v2 -- -DSHIELD="lily58_left nice_view_adapter nice_view"
|
||||||
|
```
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
nice_view_spi: &spi0 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
sck-pin = <17>;
|
||||||
|
mosi-pin = <15>;
|
||||||
|
miso-pin = <25>;
|
||||||
|
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&pro_micro_i2c {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
nice_view_spi: &spi0 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
sck-pin = <20>;
|
||||||
|
mosi-pin = <17>;
|
||||||
|
miso-pin = <5>;
|
||||||
|
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&pro_micro_i2c {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
nice_view_spi: &spi0 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
sck-pin = <20>;
|
||||||
|
mosi-pin = <17>;
|
||||||
|
miso-pin = <25>;
|
||||||
|
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&pro_micro_i2c {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
nice_view_spi: &spi0 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
sck-pin = <20>;
|
||||||
|
mosi-pin = <17>;
|
||||||
|
miso-pin = <25>;
|
||||||
|
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&pro_micro_i2c {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
nice_view_spi: &spi0 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
sck-pin = <17>;
|
||||||
|
mosi-pin = <15>;
|
||||||
|
miso-pin = <25>;
|
||||||
|
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&pro_micro_i2c {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
nice_view_spi: &spi0 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
sck-pin = <31>;
|
||||||
|
mosi-pin = <30>;
|
||||||
|
miso-pin = <25>;
|
||||||
|
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&pro_micro_i2c {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
nice_view_spi: &spi0 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
sck-pin = <17>;
|
||||||
|
mosi-pin = <15>;
|
||||||
|
miso-pin = <25>;
|
||||||
|
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&pro_micro_i2c {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
nice_view_spi: &spi0 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
sck-pin = <17>;
|
||||||
|
mosi-pin = <15>;
|
||||||
|
miso-pin = <25>;
|
||||||
|
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&pro_micro_i2c {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Disable OLED
|
||||||
|
CONFIG_SSD1306=n
|
|
@ -0,0 +1,5 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
|
@ -0,0 +1,7 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: nice_view_adapter
|
||||||
|
name: nice!view adapter
|
||||||
|
type: shield
|
||||||
|
url: https://nicekeyboards.com/nice-view
|
||||||
|
requires: [i2c_oled]
|
||||||
|
exposes: [nice_view_header]
|
9
app/boards/shields/pancake/Kconfig.defconfig
Normal file
9
app/boards/shields/pancake/Kconfig.defconfig
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
if SHIELD_PANCAKE
|
||||||
|
|
||||||
|
config ZMK_KEYBOARD_NAME
|
||||||
|
default "Pancake"
|
||||||
|
|
||||||
|
endif
|
5
app/boards/shields/pancake/Kconfig.shield
Normal file
5
app/boards/shields/pancake/Kconfig.shield
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
config SHIELD_PANCAKE
|
||||||
|
def_bool $(shields_list_contains,pancake)
|
1
app/boards/shields/pancake/pancake.conf
Normal file
1
app/boards/shields/pancake/pancake.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# CONFIG_ZMK_USB_LOGGING=y
|
57
app/boards/shields/pancake/pancake.keymap
Normal file
57
app/boards/shields/pancake/pancake.keymap
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <behaviors.dtsi>
|
||||||
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
#include <dt-bindings/zmk/bt.h>
|
||||||
|
#include <dt-bindings/zmk/outputs.h>
|
||||||
|
|
||||||
|
#define DEF 0
|
||||||
|
#define LWR 1
|
||||||
|
#define RSE 2
|
||||||
|
#define FNC 3
|
||||||
|
|
||||||
|
/ {
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
|
default_layer {
|
||||||
|
bindings = <
|
||||||
|
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
|
||||||
|
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SQT &kp SEMI
|
||||||
|
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp UP &kp ENTER
|
||||||
|
&kp LCTRL &kp LALT &kp LGUI &mo FNC &mo LWR &kp SPACE &kp SPACE &mo RSE &kp SLASH &kp LEFT &kp DOWN &kp RIGHT
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
lower_layer {
|
||||||
|
bindings = <
|
||||||
|
&kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &kp BSPC
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &trans &trans
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &kp LBRC &kp RBRC &kp C_VOL_UP &trans
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &kp QMARK &trans &kp C_VOL_DN &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
raise_layer {
|
||||||
|
bindings = <
|
||||||
|
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &trans &kp BSLH
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &kp LBKT &kp RBKT &kp C_VOL_UP &trans
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_VOL_DN &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
function_layer {
|
||||||
|
bindings = <
|
||||||
|
&bootloader &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &trans
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp F11 &kp F12 &trans
|
||||||
|
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans
|
||||||
|
&out OUT_BLE &out OUT_USB &out OUT_TOG &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
39
app/boards/shields/pancake/pancake.overlay
Normal file
39
app/boards/shields/pancake/pancake.overlay
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,kscan = &kscan0;
|
||||||
|
};
|
||||||
|
|
||||||
|
kscan0: kscan_0 {
|
||||||
|
compatible = "zmk,kscan-gpio-matrix";
|
||||||
|
label = "KSCAN";
|
||||||
|
diode-direction = "col2row";
|
||||||
|
|
||||||
|
col-gpios
|
||||||
|
= <&pro_micro 21 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 20 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 19 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 18 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 7 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 8 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 9 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 6 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 5 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 4 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 3 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 2 GPIO_ACTIVE_HIGH>
|
||||||
|
;
|
||||||
|
|
||||||
|
row-gpios
|
||||||
|
= <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
;
|
||||||
|
};
|
||||||
|
};
|
8
app/boards/shields/pancake/pancake.zmk.yml
Normal file
8
app/boards/shields/pancake/pancake.zmk.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: pancake
|
||||||
|
name: Pancake
|
||||||
|
type: shield
|
||||||
|
url: https://mkultra.click/pancake-keyboard-kit
|
||||||
|
requires: [pro_micro]
|
||||||
|
features:
|
||||||
|
- keys
|
49
app/boards/shields/snap/Kconfig.defconfig
Normal file
49
app/boards/shields/snap/Kconfig.defconfig
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
if SHIELD_SNAP_LEFT
|
||||||
|
|
||||||
|
config ZMK_KEYBOARD_NAME
|
||||||
|
default "SNAP"
|
||||||
|
|
||||||
|
config ZMK_SPLIT_ROLE_CENTRAL
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
if SHIELD_SNAP_LEFT || SHIELD_SNAP_RIGHT
|
||||||
|
|
||||||
|
config ZMK_SPLIT
|
||||||
|
default y
|
||||||
|
|
||||||
|
if ZMK_DISPLAY
|
||||||
|
|
||||||
|
config I2C
|
||||||
|
default y
|
||||||
|
|
||||||
|
config SSD1306
|
||||||
|
default y
|
||||||
|
|
||||||
|
config SSD1306_REVERSE_MODE
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # ZMK_DISPLAY
|
||||||
|
|
||||||
|
if LVGL
|
||||||
|
|
||||||
|
config LVGL_VDB_SIZE
|
||||||
|
default 64
|
||||||
|
|
||||||
|
config LVGL_DPI
|
||||||
|
default 148
|
||||||
|
|
||||||
|
config LVGL_BITS_PER_PIXEL
|
||||||
|
default 1
|
||||||
|
|
||||||
|
choice LVGL_COLOR_DEPTH
|
||||||
|
default LVGL_COLOR_DEPTH_1
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
endif # LVGL
|
||||||
|
|
||||||
|
endif
|
8
app/boards/shields/snap/Kconfig.shield
Normal file
8
app/boards/shields/snap/Kconfig.shield
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
config SHIELD_SNAP_LEFT
|
||||||
|
def_bool $(shields_list_contains,snap_left)
|
||||||
|
|
||||||
|
config SHIELD_SNAP_RIGHT
|
||||||
|
def_bool $(shields_list_contains,snap_right)
|
37
app/boards/shields/snap/boards/nice_nano.overlay
Normal file
37
app/boards/shields/snap/boards/nice_nano.overlay
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
status = "okay";
|
||||||
|
mosi-pin = <10>;
|
||||||
|
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
|
||||||
|
sck-pin = <5>;
|
||||||
|
miso-pin = <7>;
|
||||||
|
|
||||||
|
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 = <5>; /* arbitrary; change at will */
|
||||||
|
spi-one-frame = <0x70>;
|
||||||
|
spi-zero-frame = <0x40>;
|
||||||
|
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,underglow = &led_strip;
|
||||||
|
};
|
||||||
|
};
|
37
app/boards/shields/snap/boards/nice_nano_v2.overlay
Normal file
37
app/boards/shields/snap/boards/nice_nano_v2.overlay
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
status = "okay";
|
||||||
|
mosi-pin = <10>;
|
||||||
|
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
|
||||||
|
sck-pin = <5>;
|
||||||
|
miso-pin = <7>;
|
||||||
|
|
||||||
|
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 = <5>; /* arbitrary; change at will */
|
||||||
|
spi-one-frame = <0x70>;
|
||||||
|
spi-zero-frame = <0x40>;
|
||||||
|
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,underglow = &led_strip;
|
||||||
|
};
|
||||||
|
};
|
17
app/boards/shields/snap/snap.conf
Normal file
17
app/boards/shields/snap/snap.conf
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
# Uncomment these two lines to add support for encoders to your firmware
|
||||||
|
# and enable the encoders
|
||||||
|
# CONFIG_EC11=y
|
||||||
|
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||||
|
|
||||||
|
# Uncomment the following line to enable the OLED Display
|
||||||
|
# CONFIG_ZMK_DISPLAY=y
|
||||||
|
|
||||||
|
# Uncomment the following lines to enable the RGB underglow
|
||||||
|
# CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n
|
||||||
|
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||||
|
# CONFIG_WS2812_STRIP=y
|
||||||
|
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_STEP=5
|
||||||
|
# CONFIG_ZMK_RGB_UNDERGLOW_SPD_START=1
|
86
app/boards/shields/snap/snap.dtsi
Normal file
86
app/boards/shields/snap/snap.dtsi
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <dt-bindings/zmk/matrix_transform.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zephyr,display = &oled;
|
||||||
|
zmk,kscan = &kscan_composite;
|
||||||
|
zmk,matrix_transform = &default_transform;
|
||||||
|
};
|
||||||
|
|
||||||
|
left_encoder: encoder_left {
|
||||||
|
compatible = "alps,ec11";
|
||||||
|
label = "LEFT_ENCODER";
|
||||||
|
resolution = <4>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
right_encoder: encoder_right {
|
||||||
|
compatible = "alps,ec11";
|
||||||
|
label = "RIGHT_ENCODER";
|
||||||
|
resolution = <4>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
default_transform: keymap_transform_0 {
|
||||||
|
compatible = "zmk,matrix-transform";
|
||||||
|
columns = <17>;
|
||||||
|
rows = <6>;
|
||||||
|
|
||||||
|
// | R0C06L | R0C05L | R0C04L | R0C03L | R0C02L | R0C01L | R0C00L | | R0C15R | R0C14R | R0C13R | R0C12R | R0C11R | R0C10R | R0C09R | R0C08R |
|
||||||
|
// R1C07L | R1C06L | R1C05L | R1C04L | R1C03L | R1C02L | R1C01L | R1C00L | | R1C15R | R1C14R | R1C13R | R1C12R | R1C11R | R1C10R | R1C09R | R1C08R | R2C0XR |
|
||||||
|
// R2C07L | R2C06L | R2C05L | R2C04L | R2C03L | R2C02L | R2C00L | | R2C15R | R2C14R | R2C13R | R2C12R | R2C11R | R2C10R | R2C09R | R3C08R | R2C08R |
|
||||||
|
// R3C07L | R3C06L | R3C05L | R3C04L | R3C03L | R3C02L | R3C00L | | R3C15R | R3C14R | R3C13R | R3C12R | R3C11R | R3C10R | R3C09R | R4C08R |
|
||||||
|
// R4C07L | R4C06L | R4C05L | R4C04L | R4C03L | R4C02L | R4C01L | R4C00L | | R4C15R | R4C14R | R4C13R | R4C12R | R4C11R | R4C10R | R4C09R | R5C08R |
|
||||||
|
// R5C07L | R5C06L | R5C05L | R5C04L | R5C02L | R5C00L | | R5C15R | R5C14R | R5C13R | R5C12R | R5C11R | R5C10R | R5C09R |
|
||||||
|
|
||||||
|
map = <
|
||||||
|
RC(0,6) RC(0,5) RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(0,15) RC(0,14) RC(0,13) RC(0,12) RC(0,11) RC(0,10) RC(0,9) RC(0,8)
|
||||||
|
RC(1,7) RC(1,6) RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) RC(1,15) RC(1,14) RC(1,13) RC(1,12) RC(1,11) RC(1,10) RC(1,9) RC(1,8) RC(1,16)
|
||||||
|
RC(2,7) RC(2,6) RC(2,5) RC(2,4) RC(2,3) RC(2,2) RC(2,0) RC(2,15) RC(2,14) RC(2,13) RC(2,12) RC(2,11) RC(2,10) RC(2,9) RC(3,8) RC(2,8)
|
||||||
|
RC(3,7) RC(3,6) RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,0) RC(3,15) RC(3,14) RC(3,13) RC(3,12) RC(3,11) RC(3,10) RC(3,9) RC(4,8)
|
||||||
|
RC(4,7) RC(4,6) RC(4,5) RC(4,4) RC(4,3) RC(4,2) RC(4,1) RC(4,0) RC(4,15) RC(4,14) RC(4,13) RC(4,12) RC(4,11) RC(4,10) RC(4,9) RC(5,8)
|
||||||
|
RC(5,7) RC(5,6) RC(5,5) RC(5,4) RC(5,2) RC(5,0) RC(5,15) RC(5,14) RC(5,13) RC(5,12) RC(5,11) RC(5,10) RC(5,9)
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
kscan_composite: kscan {
|
||||||
|
compatible = "zmk,kscan-composite";
|
||||||
|
label = "KSCAN";
|
||||||
|
rows = <6>;
|
||||||
|
columns = <17>;
|
||||||
|
|
||||||
|
demux {
|
||||||
|
kscan = <&kscan_demux>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
kscan_demux: kscan_demux {
|
||||||
|
compatible = "zmk,kscan-gpio-demux";
|
||||||
|
label = "DEMUX";
|
||||||
|
polling-interval-msec = <25>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pro_micro_i2c {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
oled: ssd1306@3c {
|
||||||
|
compatible = "solomon,ssd1306fb";
|
||||||
|
reg = <0x3c>;
|
||||||
|
label = "DISPLAY";
|
||||||
|
width = <128>;
|
||||||
|
height = <32>;
|
||||||
|
segment-offset = <0>;
|
||||||
|
page-offset = <0>;
|
||||||
|
display-offset = <0>;
|
||||||
|
multiplex-ratio = <31>;
|
||||||
|
com-sequential;
|
||||||
|
prechargep = <0x22>;
|
||||||
|
};
|
||||||
|
};
|
47
app/boards/shields/snap/snap.keymap
Normal file
47
app/boards/shields/snap/snap.keymap
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <behaviors.dtsi>
|
||||||
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
#include <dt-bindings/zmk/rgb.h>
|
||||||
|
#include <dt-bindings/zmk/rgb.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
sensors {
|
||||||
|
compatible = "zmk,keymap-sensors";
|
||||||
|
sensors = <&left_encoder &right_encoder>;
|
||||||
|
};
|
||||||
|
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
|
default_layer {
|
||||||
|
label = "Default";
|
||||||
|
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||||
|
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 KP_NUM &kp PAUSE_BREAK
|
||||||
|
&kp C_MUTE &kp TILDE &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 F13 &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 F14 &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 F15 &kp LSHFT &kp NUHS &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 F16 &kp LCTRL &kp LGUI &kp LALT &mo 1 &kp SPACE &kp BSPC &mo 1 &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
function_layer {
|
||||||
|
label = "Function";
|
||||||
|
sensor-bindings = <&inc_dec_kp C_NEXT C_PREV &inc_dec_kp C_NEXT C_PREV>;
|
||||||
|
bindings = <
|
||||||
|
&bootloader &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bootloader
|
||||||
|
&kp C_PP &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_PP
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &rgb_ug RGB_TOG &rgb_ug RGB_BRI &rgb_ug RGB_EFF
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &rgb_ug RGB_HUD &rgb_ug RGB_BRD &rgb_ug RGB_HUI
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
15
app/boards/shields/snap/snap.zmk.yml
Normal file
15
app/boards/shields/snap/snap.zmk.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: snap
|
||||||
|
name: SNAP
|
||||||
|
type: shield
|
||||||
|
url: https://nullbits.co/snap
|
||||||
|
requires: [pro_micro]
|
||||||
|
exposes: [i2c_oled]
|
||||||
|
features:
|
||||||
|
- keys
|
||||||
|
- display
|
||||||
|
- encoder
|
||||||
|
- underglow
|
||||||
|
siblings:
|
||||||
|
- snap_left
|
||||||
|
- snap_right
|
34
app/boards/shields/snap/snap_left.overlay
Normal file
34
app/boards/shields/snap/snap_left.overlay
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "snap.dtsi"
|
||||||
|
|
||||||
|
&kscan_demux {
|
||||||
|
input-gpios
|
||||||
|
= <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
;
|
||||||
|
output-gpios
|
||||||
|
= <&pro_micro 18 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 19 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 20 GPIO_ACTIVE_HIGH>
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
|
&left_encoder {
|
||||||
|
a-gpios = <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
|
b-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&oled {
|
||||||
|
segment-remap;
|
||||||
|
com-invdir;
|
||||||
|
};
|
51
app/boards/shields/snap/snap_right.overlay
Normal file
51
app/boards/shields/snap/snap_right.overlay
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "snap.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
kscan_direct: kscan_direct {
|
||||||
|
compatible = "zmk,kscan-gpio-direct";
|
||||||
|
label = "DIRECT";
|
||||||
|
input-gpios
|
||||||
|
= <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&default_transform {
|
||||||
|
col-offset = <8>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&kscan_composite {
|
||||||
|
direct {
|
||||||
|
kscan = <&kscan_direct>;
|
||||||
|
row-offset = <1>;
|
||||||
|
column-offset = <8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&kscan_demux {
|
||||||
|
input-gpios
|
||||||
|
= <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
;
|
||||||
|
output-gpios
|
||||||
|
= <&pro_micro 6 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 5 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 4 GPIO_ACTIVE_HIGH>
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
|
&right_encoder {
|
||||||
|
a-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
|
b-gpios = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
|
@ -31,12 +31,6 @@ endif # ZMK_DISPLAY
|
||||||
|
|
||||||
if LVGL
|
if LVGL
|
||||||
|
|
||||||
config LVGL_HOR_RES_MAX
|
|
||||||
default 128
|
|
||||||
|
|
||||||
config LVGL_VER_RES_MAX
|
|
||||||
default 32
|
|
||||||
|
|
||||||
config LVGL_VDB_SIZE
|
config LVGL_VDB_SIZE
|
||||||
default 64
|
default 64
|
||||||
|
|
||||||
|
|
55
app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig
Normal file
55
app/boards/shields/splitkb_aurora_corne/Kconfig.defconfig
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
if SHIELD_SPLITKB_AURORA_CORNE_LEFT
|
||||||
|
|
||||||
|
config ZMK_KEYBOARD_NAME
|
||||||
|
default "Aurora Corne"
|
||||||
|
|
||||||
|
config ZMK_SPLIT_ROLE_CENTRAL
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # SHIELD_SPLITKB_AURORA_CORNE_LEFT
|
||||||
|
|
||||||
|
if SHIELD_SPLITKB_AURORA_CORNE_LEFT || SHIELD_SPLITKB_AURORA_CORNE_RIGHT
|
||||||
|
|
||||||
|
config ZMK_SPLIT
|
||||||
|
default y
|
||||||
|
|
||||||
|
config ZMK_RGB_UNDERGLOW
|
||||||
|
select WS2812_STRIP
|
||||||
|
select SPI
|
||||||
|
|
||||||
|
config ZMK_DISPLAY
|
||||||
|
|
||||||
|
if ZMK_DISPLAY
|
||||||
|
|
||||||
|
config SSD1306
|
||||||
|
default y
|
||||||
|
|
||||||
|
config I2C
|
||||||
|
default y
|
||||||
|
|
||||||
|
config SSD1306_REVERSE_MODE
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # ZMK_DISPLAY
|
||||||
|
|
||||||
|
if LVGL
|
||||||
|
|
||||||
|
config LVGL_VDB_SIZE
|
||||||
|
default 64
|
||||||
|
|
||||||
|
config LVGL_DPI
|
||||||
|
default 148
|
||||||
|
|
||||||
|
config LVGL_BITS_PER_PIXEL
|
||||||
|
default 1
|
||||||
|
|
||||||
|
choice LVGL_COLOR_DEPTH
|
||||||
|
default LVGL_COLOR_DEPTH_1
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
endif # LVGL
|
||||||
|
|
||||||
|
endif # SHIELD_SPLITKB_AURORA_CORNE_LEFT || SHIELD_SPLITKB_AURORA_CORNE_RIGHT
|
8
app/boards/shields/splitkb_aurora_corne/Kconfig.shield
Normal file
8
app/boards/shields/splitkb_aurora_corne/Kconfig.shield
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
config SHIELD_SPLITKB_AURORA_CORNE_LEFT
|
||||||
|
def_bool $(shields_list_contains,splitkb_aurora_corne_left)
|
||||||
|
|
||||||
|
config SHIELD_SPLITKB_AURORA_CORNE_RIGHT
|
||||||
|
def_bool $(shields_list_contains,splitkb_aurora_corne_right)
|
|
@ -0,0 +1,31 @@
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
status = "okay";
|
||||||
|
mosi-pin = <6>;
|
||||||
|
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
|
||||||
|
sck-pin = <5>;
|
||||||
|
miso-pin = <7>;
|
||||||
|
|
||||||
|
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 = <6>; /* arbitrary; change at will */
|
||||||
|
spi-one-frame = <0x70>;
|
||||||
|
spi-zero-frame = <0x40>;
|
||||||
|
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,underglow = &led_strip;
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1,31 @@
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
status = "okay";
|
||||||
|
mosi-pin = <6>;
|
||||||
|
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
|
||||||
|
sck-pin = <5>;
|
||||||
|
miso-pin = <7>;
|
||||||
|
|
||||||
|
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 = <6>; /* arbitrary; change at will */
|
||||||
|
spi-one-frame = <0x70>;
|
||||||
|
spi-zero-frame = <0x40>;
|
||||||
|
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,underglow = &led_strip;
|
||||||
|
};
|
||||||
|
};
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue