Merge branch 'zmkfirmware:main' into battery_reporting_improvement
This commit is contained in:
commit
e365ab21f4
482 changed files with 15604 additions and 18358 deletions
|
@ -1,4 +1,4 @@
|
|||
FROM docker.io/zmkfirmware/zmk-dev-arm:3.2
|
||||
FROM docker.io/zmkfirmware/zmk-dev-arm:3.5
|
||||
|
||||
COPY .bashrc tmp
|
||||
RUN mv /tmp/.bashrc ~/.bashrc
|
||||
|
|
10
.github/workflows/ble-test.yml
vendored
10
.github/workflows/ble-test.yml
vendored
|
@ -21,7 +21,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Find test directories
|
||||
id: test-dirs
|
||||
run: |
|
||||
|
@ -35,12 +35,12 @@ jobs:
|
|||
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker.io/zmkfirmware/zmk-build-arm:3.2
|
||||
image: docker.io/zmkfirmware/zmk-build-arm:3.5
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Cache west modules
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-zephyr-modules
|
||||
with:
|
||||
|
@ -69,7 +69,7 @@ jobs:
|
|||
run: make everything
|
||||
- name: Test ${{ matrix.test }}
|
||||
working-directory: app
|
||||
run: BSIM_COMPONENTS_PATH="${GITHUB_WORKSPACE}/tools/bsim/components/" BSIM_OUT_PATH="${GITHUB_WORKSPACE}/tools/bsim/" ./run-ble-test.sh tests/ble/${{ matrix.test }}
|
||||
run: BSIM_COMPONENTS_PATH="${GITHUB_WORKSPACE}/tools/bsim/components" BSIM_OUT_PATH="${GITHUB_WORKSPACE}/tools/bsim" ./run-ble-test.sh tests/ble/${{ matrix.test }}
|
||||
- name: Archive artifacts
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
33
.github/workflows/build-user-config.yml
vendored
33
.github/workflows/build-user-config.yml
vendored
|
@ -32,7 +32,7 @@ jobs:
|
|||
build_matrix: ${{ env.build_matrix }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install yaml2json
|
||||
run: python3 -m pip install remarshal
|
||||
|
@ -53,7 +53,7 @@ jobs:
|
|||
matrix: ${{ fromJson(needs.matrix.outputs.build_matrix) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Create build directory
|
||||
run: |
|
||||
|
@ -65,16 +65,23 @@ jobs:
|
|||
board: ${{ matrix.board }}
|
||||
shield: ${{ matrix.shield }}
|
||||
artifact_name: ${{ matrix.artifact-name }}
|
||||
snippet: ${{ matrix.snippet }}
|
||||
run: |
|
||||
if [ -e zephyr/module.yml ]; then
|
||||
export zmk_load_arg=" -DZMK_EXTRA_MODULES='${GITHUB_WORKSPACE}'"
|
||||
export new_tmp_dir=$(mktemp -d)
|
||||
new_tmp_dir="${TMPDIR:-/tmp}/zmk-config"
|
||||
mkdir -p "${new_tmp_dir}"
|
||||
echo "base_dir=${new_tmp_dir}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "base_dir=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
if [ -n "${snippet}" ]; then
|
||||
extra_west_args="-S \"${snippet}\""
|
||||
fi
|
||||
|
||||
echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV
|
||||
echo "extra_west_args=${extra_west_args}" >> $GITHUB_ENV
|
||||
echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}${zmk_load_arg}" >> $GITHUB_ENV
|
||||
echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV
|
||||
echo "artifact_name=${artifact_name:-${shield:+$shield-}${board}-zmk}" >> $GITHUB_ENV
|
||||
|
@ -87,7 +94,7 @@ jobs:
|
|||
fi
|
||||
|
||||
- name: Cache west modules
|
||||
uses: actions/cache@v3.0.11
|
||||
uses: actions/cache@v4
|
||||
continue-on-error: true
|
||||
env:
|
||||
cache_name: cache-zephyr-${{ env.zephyr_version }}-modules
|
||||
|
@ -119,7 +126,7 @@ jobs:
|
|||
- name: West Build (${{ env.display_name }})
|
||||
working-directory: ${{ env.base_dir }}
|
||||
shell: sh -x {0}
|
||||
run: west build -s zmk/app -d "${{ env.build_dir }}" -b "${{ matrix.board }}" -- -DZMK_CONFIG=${{ env.base_dir }}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}
|
||||
run: west build -s zmk/app -d "${{ env.build_dir }}" -b "${{ matrix.board }}" ${{ env.extra_west_args }} -- -DZMK_CONFIG=${{ env.base_dir }}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}
|
||||
|
||||
- name: ${{ env.display_name }} Kconfig file
|
||||
run: |
|
||||
|
@ -157,7 +164,19 @@ jobs:
|
|||
fi
|
||||
|
||||
- name: Archive (${{ env.display_name }})
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: artifact-${{ env.artifact_name }}
|
||||
path: ${{ env.build_dir }}/artifacts
|
||||
|
||||
merge:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
name: Merge Output Artifacts
|
||||
steps:
|
||||
- name: Merge Artifacts
|
||||
uses: actions/upload-artifact/merge@v4
|
||||
with:
|
||||
name: ${{ inputs.archive_name }}
|
||||
path: ${{ env.build_dir }}/artifacts
|
||||
pattern: artifact-*
|
||||
delete-merged: true
|
||||
|
|
67
.github/workflows/build.yml
vendored
67
.github/workflows/build.yml
vendored
|
@ -17,16 +17,16 @@ jobs:
|
|||
if: ${{ always() }}
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker.io/zmkfirmware/zmk-build-arm:3.2
|
||||
image: docker.io/zmkfirmware/zmk-build-arm:3.5
|
||||
needs: compile-matrix
|
||||
strategy:
|
||||
matrix:
|
||||
include: ${{ fromJSON(needs.compile-matrix.outputs.include-list) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Cache west modules
|
||||
uses: actions/cache@v3.0.2
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-zephyr-modules
|
||||
with:
|
||||
|
@ -49,18 +49,17 @@ jobs:
|
|||
- name: Export Zephyr CMake package (west zephyr-export)
|
||||
run: west zephyr-export
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "14.x"
|
||||
- name: Install @actions/artifact
|
||||
run: npm install @actions/artifact
|
||||
- name: Build and upload artifacts
|
||||
- name: Build
|
||||
uses: actions/github-script@v7
|
||||
id: boards-list
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const {default: artifact} = require('@actions/artifact');
|
||||
|
||||
const execSync = require('child_process').execSync;
|
||||
|
||||
|
@ -70,10 +69,39 @@ jobs:
|
|||
|
||||
for (const shieldArgs of buildShieldArgs) {
|
||||
try {
|
||||
console.log(`::group::${{ matrix.board}} ${shieldArgs.shield} Build`)
|
||||
|
||||
const output = execSync(`west build -s app -p -b ${{ matrix.board }} -- ${shieldArgs.shield ? '-DSHIELD="' + shieldArgs.shield + '"' : ''} ${shieldArgs['cmake-args'] || ''}`);
|
||||
|
||||
console.log(`::group::${{ matrix.board}} ${shieldArgs.shield} Build`)
|
||||
console.log(output.toString());
|
||||
} catch (e) {
|
||||
console.error(`::error::Failed to build ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
|
||||
console.error(e);
|
||||
error = true;
|
||||
} finally {
|
||||
console.log('::endgroup::');
|
||||
}
|
||||
}
|
||||
|
||||
if (error) {
|
||||
throw new Error('Failed to build one or more configurations');
|
||||
}
|
||||
- name: Upload artifacts
|
||||
uses: actions/github-script@v7
|
||||
continue-on-error: ${{ github.event_name == 'pull_request' }}
|
||||
id: boards-upload
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const {default: artifact} = require('@actions/artifact');
|
||||
|
||||
const buildShieldArgs = JSON.parse(`${{ matrix.shieldArgs }}`);
|
||||
|
||||
let error = false;
|
||||
|
||||
for (const shieldArgs of buildShieldArgs) {
|
||||
try {
|
||||
console.log(`::group::${{ matrix.board}} ${shieldArgs.shield} Upload`)
|
||||
|
||||
const fileExtensions = ["hex", "uf2"];
|
||||
|
||||
|
@ -91,7 +119,7 @@ jobs:
|
|||
|
||||
await artifact.uploadArtifact(artifactName, files, rootDirectory, options);
|
||||
} catch (e) {
|
||||
console.error(`::error::Failed to build or upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
|
||||
console.error(`::error::Failed to upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
|
||||
console.error(e);
|
||||
error = true;
|
||||
} finally {
|
||||
|
@ -150,9 +178,9 @@ jobs:
|
|||
core-include: ${{ steps.core-list.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "14.x"
|
||||
- name: Install js-yaml
|
||||
|
@ -179,9 +207,9 @@ jobs:
|
|||
boards-include: ${{ steps.boards-list.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "14.x"
|
||||
- name: Install js-yaml
|
||||
|
@ -306,9 +334,9 @@ jobs:
|
|||
organized-metadata: ${{ steps.organize-metadata.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "14.x"
|
||||
- name: Install js-yaml
|
||||
|
@ -381,19 +409,20 @@ jobs:
|
|||
if: ${{ github.event_name != 'schedule' }}
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
changed-files: ${{ steps.changed-files.outputs.all }}
|
||||
changed-files: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
board-changes: ${{ steps.board-changes.outputs.result }}
|
||||
core-changes: ${{ steps.core-changes.outputs.result }}
|
||||
steps:
|
||||
- uses: Ana06/get-changed-files@v2.0.0
|
||||
- uses: tj-actions/changed-files@v42
|
||||
id: changed-files
|
||||
with:
|
||||
format: "json"
|
||||
json: true
|
||||
escape_json: false
|
||||
- uses: actions/github-script@v7
|
||||
id: board-changes
|
||||
with:
|
||||
script: |
|
||||
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all }}`);
|
||||
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all_changed_files }}`);
|
||||
const boardChanges = changedFiles.filter(f => f.startsWith('app/boards'));
|
||||
return boardChanges.length ? 'true' : 'false';
|
||||
result-encoding: string
|
||||
|
@ -401,7 +430,7 @@ jobs:
|
|||
id: core-changes
|
||||
with:
|
||||
script: |
|
||||
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all }}`);
|
||||
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all_changed_files }}`);
|
||||
const boardChanges = changedFiles.filter(f => f.startsWith('app/boards'));
|
||||
const appChanges = changedFiles.filter(f => f.startsWith('app'));
|
||||
const ymlChanges = changedFiles.includes('.github/workflows/build.yml');
|
||||
|
|
4
.github/workflows/doc-checks.yml
vendored
4
.github/workflows/doc-checks.yml
vendored
|
@ -14,7 +14,7 @@ jobs:
|
|||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: bahmutov/npm-install@v1
|
||||
with:
|
||||
working-directory: docs
|
||||
|
@ -24,7 +24,7 @@ jobs:
|
|||
typecheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: bahmutov/npm-install@v1
|
||||
with:
|
||||
working-directory: docs
|
||||
|
|
|
@ -18,9 +18,9 @@ jobs:
|
|||
validate-metadata:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker.io/zmkfirmware/zmk-dev-arm:3.2
|
||||
image: docker.io/zmkfirmware/zmk-dev-arm:3.5
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
run: pip install -r app/scripts/requirements.txt
|
||||
- name: West init
|
||||
|
|
4
.github/workflows/pre-commit.yml
vendored
4
.github/workflows/pre-commit.yml
vendored
|
@ -8,8 +8,8 @@ jobs:
|
|||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
- uses: pre-commit/action@v3.0.0
|
||||
|
|
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
|
@ -6,11 +6,13 @@ on:
|
|||
- ".github/workflows/test.yml"
|
||||
- "app/tests/**"
|
||||
- "app/src/**"
|
||||
- "app/include/**"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/test.yml"
|
||||
- "app/tests/**"
|
||||
- "app/src/**"
|
||||
- "app/include/**"
|
||||
|
||||
jobs:
|
||||
collect-tests:
|
||||
|
@ -19,7 +21,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Find test directories
|
||||
id: test-dirs
|
||||
run: |
|
||||
|
@ -33,12 +35,12 @@ jobs:
|
|||
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker.io/zmkfirmware/zmk-build-arm:3.2
|
||||
image: docker.io/zmkfirmware/zmk-build-arm:3.5
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Cache west modules
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-zephyr-modules
|
||||
with:
|
||||
|
|
9
.gitignore
vendored
9
.gitignore
vendored
|
@ -5,5 +5,14 @@
|
|||
/zephyr
|
||||
/zmk-config
|
||||
/build
|
||||
|
||||
# macOS
|
||||
*.DS_Store
|
||||
|
||||
# Python
|
||||
__pycache__
|
||||
.python-version
|
||||
.venv
|
||||
|
||||
# clangd
|
||||
app/.cache/
|
||||
|
|
|
@ -86,6 +86,12 @@ documentation to areas not currently covered are greatly appreciated.
|
|||
ZMK uses `prettier` to format documentation files. You can run prettier with `npm run prettier:format`.
|
||||
You can setup git to run prettier automatically when you commit by installing the pre-commit hooks: `pip3 install pre-commit`, `pre-commit install`.
|
||||
|
||||
### Linting
|
||||
|
||||
This repository utilizes ESLint for code linting to ensure consistent code style and identify potential errors or bugs early in the development process.
|
||||
|
||||
You can run ESLint with `npm run lint` to verify your changes.
|
||||
|
||||
## Code Contributions
|
||||
|
||||
### Development Setup
|
||||
|
|
|
@ -11,6 +11,9 @@ project(zmk)
|
|||
zephyr_linker_sources(SECTIONS include/linker/zmk-behaviors.ld)
|
||||
zephyr_linker_sources(RODATA include/linker/zmk-events.ld)
|
||||
|
||||
zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/behavior.h)
|
||||
zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/ext_power.h)
|
||||
|
||||
# Add your source file to the "app" target. This must come after
|
||||
# find_package(Zephyr) which defines the target.
|
||||
target_include_directories(app PRIVATE include)
|
||||
|
@ -18,11 +21,14 @@ target_sources(app PRIVATE src/stdlib.c)
|
|||
target_sources(app PRIVATE src/activity.c)
|
||||
target_sources(app PRIVATE src/behavior.c)
|
||||
target_sources(app PRIVATE src/kscan.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_KSCAN_SIDEBAND_BEHAVIORS app PRIVATE src/kscan_sideband_behaviors.c)
|
||||
target_sources(app PRIVATE src/matrix_transform.c)
|
||||
target_sources(app PRIVATE src/sensors.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/wpm.c)
|
||||
target_sources(app PRIVATE src/event_manager.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_PM app PRIVATE src/pm.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/ext_power_generic.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_GPIO_KEY_WAKEUP_TRIGGER app PRIVATE src/gpio_key_wakeup_trigger.c)
|
||||
target_sources(app PRIVATE src/events/activity_state_changed.c)
|
||||
target_sources(app PRIVATE src/events/position_state_changed.c)
|
||||
target_sources(app PRIVATE src/events/sensor_event.c)
|
||||
|
@ -31,6 +37,7 @@ target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c)
|
|||
target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/events/usb_conn_state_changed.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_reset.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SOFT_OFF app PRIVATE src/behaviors/behavior_soft_off.c)
|
||||
if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||
target_sources(app PRIVATE src/hid.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_MOUSE app PRIVATE src/mouse.c)
|
||||
|
@ -92,5 +99,6 @@ target_sources_ifdef(CONFIG_ZMK_LOW_PRIORITY_WORK_QUEUE app PRIVATE src/workqueu
|
|||
target_sources(app PRIVATE src/main.c)
|
||||
|
||||
add_subdirectory(src/display/)
|
||||
add_subdirectory_ifdef(CONFIG_SETTINGS src/settings/)
|
||||
|
||||
zephyr_cc_option(-Wfatal-errors)
|
||||
|
|
98
app/Kconfig
98
app/Kconfig
|
@ -37,6 +37,17 @@ config BT_DIS_MODEL
|
|||
config BT_DIS_MANUF
|
||||
default "ZMK Project"
|
||||
|
||||
# Hardware specific overrides
|
||||
|
||||
if SOC_SERIES_NRF52X
|
||||
|
||||
# Default on for our usage until boards implement retained bootmode.
|
||||
config NRF_STORE_REBOOT_TYPE_GPREGRET
|
||||
bool
|
||||
default y
|
||||
|
||||
endif
|
||||
|
||||
menu "HID"
|
||||
|
||||
choice ZMK_HID_REPORT_TYPE
|
||||
|
@ -144,7 +155,6 @@ if ZMK_BLE
|
|||
|
||||
config ZMK_BLE_EXPERIMENTAL_CONN
|
||||
bool "Experimental BLE connection changes"
|
||||
imply BT_GATT_AUTO_SEC_REQ
|
||||
help
|
||||
Enables a combination of settings that are planned to be default in future versions of ZMK
|
||||
to improve connection stability. This includes changes to timing on BLE pairing initation,
|
||||
|
@ -167,17 +177,11 @@ config ZMK_BLE_EXPERIMENTAL_FEATURES
|
|||
|
||||
config ZMK_BLE_PASSKEY_ENTRY
|
||||
bool "Require passkey entry on the keyboard to complete pairing"
|
||||
default n
|
||||
select RING_BUFFER
|
||||
|
||||
config BT_SMP_ALLOW_UNAUTH_OVERWRITE
|
||||
imply ZMK_BLE_PASSKEY_ENTRY
|
||||
|
||||
choice BT_LL_SW_LLCP_IMPL
|
||||
default BT_LL_SW_LLCP_LEGACY if !ZMK_BLE_EXPERIMENTAL_CONN
|
||||
|
||||
endchoice
|
||||
|
||||
config BT_CTLR_PHY_2M
|
||||
default n if ZMK_BLE_EXPERIMENTAL_CONN
|
||||
|
||||
|
@ -211,14 +215,13 @@ config ZMK_BLE_MOUSE_REPORT_QUEUE_SIZE
|
|||
|
||||
config ZMK_BLE_CLEAR_BONDS_ON_START
|
||||
bool "Configuration that clears all bond information from the keyboard on startup."
|
||||
default n
|
||||
|
||||
# HID GATT notifications sent this way are *not* picked up by Linux, and possibly others.
|
||||
config BT_GATT_NOTIFY_MULTIPLE
|
||||
default n
|
||||
|
||||
config BT_GATT_AUTO_SEC_REQ
|
||||
default n
|
||||
default (ZMK_SPLIT_BLE && !ZMK_SPLIT_ROLE_CENTRAL)
|
||||
|
||||
config BT_DEVICE_APPEARANCE
|
||||
default 961
|
||||
|
@ -368,7 +371,6 @@ menu "Mouse Options"
|
|||
|
||||
config ZMK_MOUSE
|
||||
bool "Enable ZMK mouse emulation"
|
||||
default n
|
||||
|
||||
#Mouse Options
|
||||
endmenu
|
||||
|
@ -377,17 +379,33 @@ menu "Power Management"
|
|||
|
||||
config ZMK_BATTERY_REPORTING
|
||||
bool "Battery level detection/reporting"
|
||||
default n
|
||||
select SENSOR
|
||||
select ZMK_LOW_PRIORITY_WORK_QUEUE
|
||||
imply BT_BAS if ZMK_BLE
|
||||
|
||||
if ZMK_BATTERY_REPORTING
|
||||
|
||||
choice ZMK_BATTERY_REPORTING_FETCH_MODE
|
||||
prompt "Battery Reporting Fetch Mode"
|
||||
|
||||
config ZMK_BATTERY_REPORTING_FETCH_MODE_STATE_OF_CHARGE
|
||||
bool "State of charge"
|
||||
|
||||
config ZMK_BATTERY_REPORTING_FETCH_MODE_LITHIUM_VOLTAGE
|
||||
bool "Lithium Voltage"
|
||||
|
||||
endchoice
|
||||
endif
|
||||
|
||||
config ZMK_IDLE_TIMEOUT
|
||||
int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)"
|
||||
default 30000
|
||||
|
||||
config ZMK_SLEEP
|
||||
bool "Enable deep sleep support"
|
||||
depends on HAS_POWEROFF
|
||||
select POWEROFF
|
||||
select ZMK_PM_DEVICE_SUSPEND_RESUME
|
||||
imply USB
|
||||
|
||||
if ZMK_SLEEP
|
||||
|
@ -406,6 +424,26 @@ config ZMK_EXT_POWER
|
|||
bool "Enable support to control external power output"
|
||||
default y
|
||||
|
||||
config ZMK_PM
|
||||
bool
|
||||
|
||||
config ZMK_PM_DEVICE_SUSPEND_RESUME
|
||||
bool
|
||||
select ZMK_PM
|
||||
|
||||
config ZMK_PM_SOFT_OFF
|
||||
bool "Soft-off support"
|
||||
depends on HAS_POWEROFF
|
||||
select ZMK_PM
|
||||
select PM_DEVICE
|
||||
select ZMK_PM_DEVICE_SUSPEND_RESUME
|
||||
select POWEROFF
|
||||
|
||||
config ZMK_GPIO_KEY_WAKEUP_TRIGGER
|
||||
bool "Hardware supported wakeup (GPIO)"
|
||||
default y
|
||||
depends on DT_HAS_ZMK_GPIO_KEY_WAKEUP_TRIGGER_ENABLED && ZMK_PM_SOFT_OFF
|
||||
|
||||
#Power Management
|
||||
endmenu
|
||||
|
||||
|
@ -482,6 +520,21 @@ config ZMK_KSCAN_EVENT_QUEUE_SIZE
|
|||
|
||||
endif # ZMK_KSCAN
|
||||
|
||||
config ZMK_KSCAN_SIDEBAND_BEHAVIORS
|
||||
bool
|
||||
default y
|
||||
depends on DT_HAS_ZMK_KSCAN_SIDEBAND_BEHAVIORS_ENABLED
|
||||
select KSCAN
|
||||
|
||||
if ZMK_KSCAN_SIDEBAND_BEHAVIORS
|
||||
|
||||
config ZMK_KSCAN_SIDEBAND_BEHAVIORS_INIT_PRIORITY
|
||||
int "Keyboard scan sideband behaviors driver init priority"
|
||||
# The default kscan init priority is 90, so be sure we are initialized later.
|
||||
default 95
|
||||
|
||||
endif # ZMK_KSCAN_SIDEBAND_BEHAVIORS
|
||||
|
||||
menu "Logging"
|
||||
|
||||
config ZMK_LOGGING_MINIMAL
|
||||
|
@ -562,6 +615,22 @@ endmenu
|
|||
|
||||
if SETTINGS
|
||||
|
||||
config ZMK_SETTINGS_RESET_ON_START
|
||||
bool "Delete all persistent settings when the keyboard boots"
|
||||
|
||||
if ZMK_SETTINGS_RESET_ON_START
|
||||
|
||||
config ZMK_SETTINGS_RESET_ON_START_INIT_PRIORITY
|
||||
int "Settings Reset ON Start Initialization Priority"
|
||||
default 60
|
||||
help
|
||||
Initialization priority for the settings reset on start. Must be lower priority/
|
||||
higher value than FLASH_INIT_PRIORITY if using the NVS/Flash settings backend.
|
||||
|
||||
|
||||
endif
|
||||
|
||||
|
||||
config ZMK_SETTINGS_SAVE_DEBOUNCE
|
||||
int "Milliseconds to debounce settings saves"
|
||||
default 60000
|
||||
|
@ -595,9 +664,6 @@ endmenu
|
|||
#ZMK
|
||||
endmenu
|
||||
|
||||
config HEAP_MEM_POOL_SIZE
|
||||
default 8192
|
||||
|
||||
config KERNEL_BIN_NAME
|
||||
default "zmk"
|
||||
|
||||
|
@ -607,9 +673,11 @@ config REBOOT
|
|||
config USB_DEVICE_STACK
|
||||
default y if HAS_HW_NRF_USBD
|
||||
|
||||
config FPU
|
||||
default CPU_HAS_FPU
|
||||
|
||||
config ZMK_WPM
|
||||
bool "Calculate WPM"
|
||||
default n
|
||||
|
||||
config ZMK_KEYMAP_SENSORS
|
||||
bool "Enable Keymap Sensors support"
|
||||
|
|
|
@ -12,9 +12,13 @@ config ZMK_BEHAVIOR_MOUSE_KEY_PRESS
|
|||
depends on DT_HAS_ZMK_BEHAVIOR_MOUSE_KEY_PRESS_ENABLED
|
||||
imply ZMK_MOUSE
|
||||
|
||||
config ZMK_BEHAVIOR_SOFT_OFF
|
||||
bool
|
||||
default y
|
||||
depends on DT_HAS_ZMK_BEHAVIOR_SOFT_OFF_ENABLED && ZMK_PM_SOFT_OFF
|
||||
|
||||
config ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
|
||||
bool
|
||||
default n
|
||||
|
||||
config ZMK_BEHAVIOR_SENSOR_ROTATE
|
||||
bool
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
zmk,kscan = &kscan0;
|
||||
zmk,backlight = &backlight;
|
||||
zmk,battery = &vbatt;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
zmk,underglow = &led_strip;
|
||||
};
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
|||
|
||||
>;
|
||||
};
|
||||
ext-power {
|
||||
|
||||
// Node name must match original "EXT_POWER" label to preserve user settings.
|
||||
EXT_POWER {
|
||||
compatible = "zmk,ext-power-generic";
|
||||
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
/{
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
/{
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
|
|
|
@ -5,4 +5,5 @@
|
|||
|
||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
|
|
9
app/boards/arm/blackpill_f401cc/blackpill_f401cc.zmk.yml
Normal file
9
app/boards/arm/blackpill_f401cc/blackpill_f401cc.zmk.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
file_format: "1"
|
||||
id: blackpill_f401cc
|
||||
name: BlackPill F401CC
|
||||
type: board
|
||||
arch: arm
|
||||
outputs:
|
||||
- usb
|
||||
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
|
||||
exposes: [blackpill]
|
|
@ -1,5 +1,5 @@
|
|||
# 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/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# 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/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,battery = &vbatt;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
sensors: sensors {
|
||||
|
@ -70,18 +70,6 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
compatible = "nordic,nrf-twi";
|
||||
sda-pin = <17>;
|
||||
scl-pin = <20>;
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
compatible = "nordic,nrf-uarte";
|
||||
tx-pin = <6>;
|
||||
rx-pin = <8>;
|
||||
};
|
||||
|
||||
&usbd {
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
};
|
||||
|
||||
ansi_transform: keymap_transform_0 {
|
||||
|
@ -81,6 +81,8 @@
|
|||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
|
|
|
@ -13,15 +13,15 @@
|
|||
/ {
|
||||
chosen {
|
||||
#ifdef ANSI
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
#elif defined(HHKB)
|
||||
zmk,matrix_transform = &hhkb_transform;
|
||||
zmk,matrix-transform = &hhkb_transform;
|
||||
#elif defined(ISO)
|
||||
zmk,matrix_transform = &iso_transform;
|
||||
zmk,matrix-transform = &iso_transform;
|
||||
#elif defined(ALL_1U)
|
||||
zmk,matrix_transform = &all_1u_transform;
|
||||
zmk,matrix-transform = &all_1u_transform;
|
||||
#else
|
||||
zmk,matrix_transform = &split_transform;
|
||||
zmk,matrix-transform = &split_transform;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
|
@ -30,6 +30,8 @@
|
|||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
compatible = "polarityworks,bt60_v2";
|
||||
|
||||
chosen {
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -12,13 +12,13 @@
|
|||
/ {
|
||||
chosen {
|
||||
#ifdef ANSI
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
#elif defined(ISO)
|
||||
zmk,matrix_transform = &iso_transform;
|
||||
zmk,matrix-transform = &iso_transform;
|
||||
#elif defined(ALL_1U)
|
||||
zmk,matrix_transform = &all_1u_transform;
|
||||
zmk,matrix-transform = &all_1u_transform;
|
||||
#elif defined(HHKB)
|
||||
zmk,matrix_transform = &hhkb_transform;
|
||||
zmk,matrix-transform = &hhkb_transform;
|
||||
#else
|
||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap"
|
||||
#endif
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
compatible = "polarityworks,bt65_v1";
|
||||
|
||||
chosen {
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -12,13 +12,13 @@
|
|||
/ {
|
||||
chosen {
|
||||
#ifdef ANSI
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
#elif defined(ISO)
|
||||
zmk,matrix_transform = &iso_transform;
|
||||
zmk,matrix-transform = &iso_transform;
|
||||
#elif defined(ALL_1U)
|
||||
zmk,matrix_transform = &all_1u_transform;
|
||||
zmk,matrix-transform = &all_1u_transform;
|
||||
#elif defined(HHKB)
|
||||
zmk,matrix_transform = &hhkb_transform;
|
||||
zmk,matrix-transform = &hhkb_transform;
|
||||
#else
|
||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65_v1.keymap"
|
||||
#endif
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
compatible = "polarityworks,bt75_v1";
|
||||
|
||||
chosen {
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
/ {
|
||||
chosen {
|
||||
#ifdef ANSI
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
#elif defined(ISO)
|
||||
zmk,matrix_transform = &iso_transform;
|
||||
zmk,matrix-transform = &iso_transform;
|
||||
#elif defined(ALL_1U)
|
||||
zmk,matrix_transform = &all_1u_transform;
|
||||
zmk,matrix-transform = &all_1u_transform;
|
||||
#else
|
||||
#error "Layout not defined, please define a layout using by uncommenting the appropriate line in bt75_v1.keymap"
|
||||
#endif
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
|
|
|
@ -57,6 +57,13 @@ config IL0323
|
|||
config ZMK_DISPLAY_BLANK_ON_IDLE
|
||||
default n
|
||||
|
||||
# Needed for the IL0323 driver which allocs memory to clear the display
|
||||
config HEAP_MEM_POOL_SIZE
|
||||
default 1024
|
||||
|
||||
config LV_Z_MEM_POOL_SIZE
|
||||
default 4096
|
||||
|
||||
endif # ZMK_DISPLAY
|
||||
|
||||
menuconfig CUSTOM_WIDGET_BATTERY_STATUS
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# 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/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
zmk,kscan = &kscan0;
|
||||
zmk,display = &epd;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,matrix_transform = &default_transform;
|
||||
// zmk,matrix_transform = &five_column_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
// zmk,matrix-transform = &five_column_transform;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
|||
// | SHFT | | | | | | | _ | + | { | } | "|" | ~ |
|
||||
// | GUI | | SPC | | ENT | | ALT |
|
||||
bindings = <
|
||||
&kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC
|
||||
&kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &kp BSPC
|
||||
&kp LCTRL &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE
|
||||
&kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE
|
||||
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
|
|
|
@ -44,7 +44,7 @@ CONFIG_ZMK_BLE=y
|
|||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=4096
|
||||
CONFIG_LV_Z_BITS_PER_PIXEL=1
|
||||
CONFIG_LV_COLOR_DEPTH_1=y
|
||||
CONFIG_LV_DPI_DEF=145
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
|
|
|
@ -39,12 +39,12 @@ CONFIG_FLASH_MAP=y
|
|||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_USB=n
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=4096
|
||||
CONFIG_LV_Z_BITS_PER_PIXEL=1
|
||||
CONFIG_LV_COLOR_DEPTH_1=y
|
||||
CONFIG_LV_DPI_DEF=145
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
|
|
|
@ -40,7 +40,7 @@ CONFIG_ZMK_BLE=y
|
|||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=4096
|
||||
CONFIG_LV_Z_BITS_PER_PIXEL=1
|
||||
CONFIG_LV_COLOR_DEPTH_1=y
|
||||
CONFIG_LV_DPI_DEF=145
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
|
|
|
@ -35,12 +35,12 @@ CONFIG_FLASH_MAP=y
|
|||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_USB=n
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=4096
|
||||
CONFIG_LV_Z_BITS_PER_PIXEL=1
|
||||
CONFIG_LV_COLOR_DEPTH_1=y
|
||||
CONFIG_LV_DPI_DEF=145
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*/
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/bluetooth/services/bas.h>
|
||||
|
||||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
#include <zmk/display.h>
|
||||
#include <zmk/battery.h>
|
||||
#include "battery_status.h"
|
||||
#include <zmk/usb.h>
|
||||
#include <zmk/events/usb_conn_state_changed.h>
|
||||
|
@ -66,8 +66,10 @@ void battery_status_update_cb(struct battery_status_state state) {
|
|||
}
|
||||
|
||||
static struct battery_status_state battery_status_get_state(const zmk_event_t *eh) {
|
||||
const struct zmk_battery_state_changed *ev = as_zmk_battery_state_changed(eh);
|
||||
|
||||
return (struct battery_status_state) {
|
||||
.level = bt_bas_get_battery_level(),
|
||||
.level = (ev != NULL) ? ev->state_of_charge : zmk_battery_state_of_charge(),
|
||||
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
|
||||
.usb_present = zmk_usb_is_powered(),
|
||||
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
*/
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/bluetooth/services/bas.h>
|
||||
|
||||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
zephyr,flash = &flash0;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
|
|
|
@ -5,9 +5,6 @@ CONFIG_SOC_STM32F303XC=y
|
|||
# 72MHz system clock
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
|
||||
|
||||
# enable pinmux
|
||||
CONFIG_PINMUX=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
zephyr,flash = &flash0;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,kscan = &kscan;
|
||||
zmk,matrix_transform = &transform;
|
||||
zmk,matrix-transform = &transform;
|
||||
/* TODO: Enable once we support the IC for underglow
|
||||
zmk,underglow = &led_strip;
|
||||
*/
|
||||
|
@ -112,6 +112,9 @@
|
|||
|
||||
&usb {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
|
||||
pinctrl-names = "default";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
};
|
||||
|
@ -121,6 +124,10 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&clk_hsi48 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pll {
|
||||
prediv = <1>;
|
||||
mul = <6>;
|
||||
|
|
|
@ -14,14 +14,14 @@
|
|||
#define SYM_L 4
|
||||
|
||||
// Using layer taps on thumbs, having quick tap as well helps w/ repeating space/backspace
|
||||
< { quick_tap_ms = <200>; };
|
||||
< { quick-tap-ms = <200>; };
|
||||
|
||||
/ {
|
||||
behaviors {
|
||||
hm: homerow_mods {
|
||||
compatible = "zmk,behavior-hold-tap";
|
||||
#binding-cells = <2>;
|
||||
tapping_term_ms = <200>;
|
||||
tapping-term-ms = <200>;
|
||||
flavor = "tap-preferred";
|
||||
bindings = <&kp>, <&kp>;
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@ CONFIG_SOC_STM32F072XB=y
|
|||
# 48MHz system clock
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000
|
||||
|
||||
# enable PINMUX
|
||||
# enable PINCTRL
|
||||
CONFIG_PINCTRL=y
|
||||
|
||||
# enable GPIO
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
# 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/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
zephyr,code-partition = &code_partition;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
|
@ -34,6 +34,8 @@
|
|||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
debounce-press-ms = <4>;
|
||||
debounce-release-ms = <20>;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
zephyr,shell-uart = &cdc_acm_uart;
|
||||
zephyr,code-partition = &code_partition;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
xtal_clk: xtal-clk {
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
|
||||
if(CONFIG_PINMUX)
|
||||
zephyr_library()
|
||||
zephyr_library_sources(pinmux.c)
|
||||
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
||||
endif()
|
|
@ -21,9 +21,6 @@ endif # USB
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config PINMUX
|
||||
default y
|
||||
|
||||
choice BOARD_MIKOTO_CHARGER_CURRENT
|
||||
default BOARD_MIKOTO_CHARGER_CURRENT_100MA
|
||||
endchoice
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# 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/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
|
|
|
@ -11,8 +11,7 @@
|
|||
#include <zephyr/sys/sys_io.h>
|
||||
#include <zephyr/devicetree.h>
|
||||
|
||||
static int pinmux_mikoto_init(const struct device *port) {
|
||||
ARG_UNUSED(port);
|
||||
static int pinmux_mikoto_init(void) {
|
||||
|
||||
#if CONFIG_BOARD_MIKOTO_520
|
||||
const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0));
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
|
||||
set(OPENOCD_NRF5_SUBFAMILY nrf52)
|
||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,battery = &vbatt;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
zmk,underglow = &led_strip;
|
||||
};
|
||||
|
||||
|
@ -42,6 +42,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R
|
|||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# 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/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
|
||||
if(CONFIG_PINMUX)
|
||||
zephyr_library()
|
||||
zephyr_library_sources(pinmux.c)
|
||||
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
||||
endif()
|
|
@ -18,9 +18,6 @@ endif # USB_DEVICE_STACK
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config PINMUX
|
||||
default y
|
||||
|
||||
if BOARD_NRFMICRO_13 || BOARD_NRFMICRO_13_52833
|
||||
|
||||
config BOARD_NRFMICRO_CHARGER
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# 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/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
EXT_POWER {
|
||||
compatible = "zmk,ext-power-generic";
|
||||
control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
|
||||
init-delay-ms = <50>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
EXT_POWER {
|
||||
compatible = "zmk,ext-power-generic";
|
||||
control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
|
||||
init-delay-ms = <50>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
EXT_POWER {
|
||||
compatible = "zmk,ext-power-generic";
|
||||
control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
|
||||
init-delay-ms = <50>;
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
EXT_POWER {
|
||||
compatible = "zmk,ext-power-generic";
|
||||
control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
|
||||
init-delay-ms = <50>;
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
|
|
|
@ -11,9 +11,7 @@
|
|||
#include <zephyr/sys/sys_io.h>
|
||||
#include <zephyr/devicetree.h>
|
||||
|
||||
static int pinmux_nrfmicro_init(const struct device *port) {
|
||||
ARG_UNUSED(port);
|
||||
|
||||
static int pinmux_nrfmicro_init(void) {
|
||||
#if (CONFIG_BOARD_NRFMICRO_13 || CONFIG_BOARD_NRFMICRO_13_52833)
|
||||
const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0));
|
||||
#if CONFIG_BOARD_NRFMICRO_CHARGER
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
|
||||
set(OPENOCD_NRF5_SUBFAMILY nrf52)
|
||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
zephyr,flash = &flash0;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &layout_grid_transform;
|
||||
zmk,matrix-transform = &layout_grid_transform;
|
||||
};
|
||||
|
||||
kscan0: kscan {
|
||||
|
@ -44,6 +44,20 @@
|
|||
;
|
||||
};
|
||||
|
||||
encoder: encoder {
|
||||
compatible = "alps,ec11";
|
||||
a-gpios = <&gpiob 12 GPIO_PULL_UP>;
|
||||
b-gpios = <&gpiob 13 GPIO_PULL_UP>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
layout_grid_transform:
|
||||
keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
|
|
|
@ -7,6 +7,11 @@
|
|||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
|
||||
/* Uncomment this block if using an encoder */
|
||||
//&encoder {
|
||||
// status = "okay";
|
||||
//};
|
||||
|
||||
/ {
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
@ -23,6 +28,7 @@
|
|||
&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 LCTL &kp LALT &kp LGUI &mo 1 &trans &kp SPACE &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
|
||||
lower {
|
||||
|
|
|
@ -5,6 +5,7 @@ type: board
|
|||
arch: arm
|
||||
features:
|
||||
- keys
|
||||
- encoder
|
||||
outputs:
|
||||
- usb
|
||||
url: https://olkb.com/collections/planck
|
||||
|
|
|
@ -5,9 +5,6 @@ CONFIG_SOC_STM32F303XC=y
|
|||
# 72MHz system clock
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
|
||||
|
||||
|
||||
# enable pinmux
|
||||
CONFIG_PINMUX=y
|
||||
CONFIG_PINCTRL=y
|
||||
|
||||
# enable GPIO
|
||||
|
@ -17,3 +14,7 @@ CONFIG_GPIO=y
|
|||
CONFIG_CLOCK_CONTROL=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
|
||||
# Uncomment these two lines to add support for encoder to your firmware
|
||||
#CONFIG_EC11=y
|
||||
#CONFIG_EC11_TRIGGER_OWN_THREAD=y
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
chosen {
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &layout_grid_transform;
|
||||
zmk,matrix-transform = &layout_grid_transform;
|
||||
};
|
||||
|
||||
kscan0: kscan_0 {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#define RAISE 2
|
||||
|
||||
/ {
|
||||
chosen { zmk,matrix_transform = &layout_grid_transform; };
|
||||
chosen { zmk,matrix-transform = &layout_grid_transform; };
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
default_layer {
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
|
||||
if(CONFIG_PINMUX)
|
||||
zephyr_library()
|
||||
zephyr_library_sources(pinmux.c)
|
||||
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
||||
endif()
|
|
@ -16,7 +16,4 @@ endif # USB_DEVICE_STACK
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config PINMUX
|
||||
default y
|
||||
|
||||
endif # BOARD_PUCHI_BLE_v1
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
# 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/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
|
|
|
@ -11,9 +11,7 @@
|
|||
#include <zephyr/sys/sys_io.h>
|
||||
#include <zephyr/devicetree.h>
|
||||
|
||||
static int pinmux_puchi_ble_init(const struct device *port) {
|
||||
ARG_UNUSED(port);
|
||||
|
||||
static int pinmux_puchi_ble_init(void) {
|
||||
#if CONFIG_BOARD_PUCHI_BLE_v1
|
||||
const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0));
|
||||
#if CONFIG_BOARD_PUCHI_BLE_CHARGER
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
|
||||
set(OPENOCD_NRF5_SUBFAMILY nrf52)
|
||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,battery = &vbatt;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
|
@ -37,6 +37,7 @@
|
|||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
|
|
6
app/boards/blackpill_f401cc.conf
Normal file
6
app/boards/blackpill_f401cc.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
CONFIG_CONSOLE=n
|
||||
CONFIG_SERIAL=n
|
||||
CONFIG_UART_CONSOLE=n
|
||||
CONFIG_UART_INTERRUPT_DRIVEN=n
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_KSCAN_MATRIX_POLLING=y
|
50
app/boards/blackpill_f401cc.overlay
Normal file
50
app/boards/blackpill_f401cc.overlay
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright (c) 2024 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/ {
|
||||
blackpill: connector {
|
||||
compatible = "blackpill";
|
||||
#gpio-cells = <2>;
|
||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||
gpio-map-pass-thru = <0 0x3f>;
|
||||
gpio-map
|
||||
= <2 0 &gpioc 13 0> /* PC13 */
|
||||
, <3 0 &gpioc 14 0> /* PC14 */
|
||||
, <4 0 &gpioc 15 0> /* PC15 */
|
||||
, <10 0 &gpioa 0 0> /* PA0 */
|
||||
, <11 0 &gpioa 1 0> /* PA1 */
|
||||
, <12 0 &gpioa 2 0> /* PA2 */
|
||||
, <13 0 &gpioa 3 0> /* PA3 */
|
||||
, <14 0 &gpioa 4 0> /* PA4 */
|
||||
, <15 0 &gpioa 5 0> /* PA5 */
|
||||
, <16 0 &gpioa 6 0> /* PA6 */
|
||||
, <17 0 &gpioa 7 0> /* PA7 */
|
||||
, <18 0 &gpiob 0 0> /* PB0 */
|
||||
, <19 0 &gpiob 1 0> /* PB1 */
|
||||
, <20 0 &gpiob 2 0> /* PB2 */
|
||||
, <21 0 &gpiob 10 0> /* PB10 */
|
||||
, <25 0 &gpiob 12 0> /* PB12 */
|
||||
, <26 0 &gpiob 13 0> /* PB13 */
|
||||
, <27 0 &gpiob 14 0> /* PB14 */
|
||||
, <28 0 &gpiob 15 0> /* PB15 */
|
||||
, <29 0 &gpioa 8 0> /* PA8 */
|
||||
, <30 0 &gpioa 9 0> /* PA9 */
|
||||
, <31 0 &gpioa 10 0> /* PA10 */
|
||||
, <38 0 &gpioa 15 0> /* PA15 */
|
||||
, <39 0 &gpiob 3 0> /* PB3 */
|
||||
, <40 0 &gpiob 4 0> /* PB4 */
|
||||
, <41 0 &gpiob 5 0> /* PB5 */
|
||||
, <42 0 &gpiob 6 0> /* PB6 */
|
||||
, <43 0 &gpiob 7 0> /* PB7 */
|
||||
, <45 0 &gpiob 8 0> /* PB8 */
|
||||
, <46 0 &gpiob 9 0> /* PB9 */
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
blackpill_i2c: &i2c1 {};
|
||||
blackpill_spi: &spi1 {};
|
||||
blackpill_serial: &usart1 {};
|
|
@ -3,5 +3,4 @@ CONFIG_SERIAL=n
|
|||
CONFIG_UART_CONSOLE=n
|
||||
CONFIG_UART_INTERRUPT_DRIVEN=n
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=n
|
||||
CONFIG_ZMK_KSCAN_MATRIX_POLLING=y
|
||||
|
|
|
@ -3,5 +3,4 @@ CONFIG_SERIAL=n
|
|||
CONFIG_UART_CONSOLE=n
|
||||
CONFIG_UART_INTERRUPT_DRIVEN=n
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=n
|
||||
CONFIG_ZMK_KSCAN_MATRIX_POLLING=y
|
||||
|
|
|
@ -31,5 +31,24 @@
|
|||
};
|
||||
|
||||
&qspi {
|
||||
status = "disabled";
|
||||
status = "okay";
|
||||
pinctrl-0 = <&qspi_default>;
|
||||
pinctrl-1 = <&qspi_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
p25q16h: p25q16h@0 {
|
||||
compatible = "nordic,qspi-nor";
|
||||
reg = <0>;
|
||||
sck-frequency = <104000000>;
|
||||
quad-enable-requirements = "S2B1v1";
|
||||
jedec-id = [85 60 15];
|
||||
sfdp-bfp = [
|
||||
e5 20 f1 ff ff ff ff 00 44 eb 08 6b 08 3b 80 bb
|
||||
ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52
|
||||
10 d8 08 81
|
||||
];
|
||||
size = <16777216>;
|
||||
has-dpd;
|
||||
t-enter-dpd = <3000>;
|
||||
t-exit-dpd = <8000>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "cradios"
|
||||
|
||||
# Unable to use interrupts as the same pin number is used
|
||||
# across A & B controllers, and STM32F303CCT6 can't enable
|
||||
# interrutps for multiple controllers for the same "line"
|
||||
# for the external interrupts.
|
||||
config ZMK_KSCAN_GPIO_POLLING
|
||||
default y
|
||||
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
# Copyright (c) 2020 Pete Johanson
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config SHIELD_CRADIOS
|
||||
def_bool $(shields_list_contains,cradios)
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
|
@ -27,6 +27,8 @@
|
|||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-direct";
|
||||
wakeup-source;
|
||||
|
||||
input-gpios =
|
||||
<&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||
<&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
|
@ -28,6 +28,7 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2)
|
|||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
|
@ -28,6 +28,7 @@
|
|||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
|
||||
row-gpios
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
|
||||
row-gpios
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
|
||||
|
@ -44,6 +44,8 @@
|
|||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
|
@ -26,6 +26,7 @@
|
|||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-direct";
|
||||
wakeup-source;
|
||||
|
||||
input-gpios
|
||||
= <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
&mt {
|
||||
flavor = "tap-preferred";
|
||||
tapping_term_ms = <140>;
|
||||
tapping-term-ms = <140>;
|
||||
};
|
||||
|
||||
/ {
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
|
|
|
@ -21,9 +21,6 @@ config I2C
|
|||
config SSD1306
|
||||
default y
|
||||
|
||||
config SSD1306_REVERSE_MODE
|
||||
default y
|
||||
|
||||
endif # ZMK_DISPLAY
|
||||
|
||||
if LVGL
|
||||
|
@ -31,7 +28,7 @@ if LVGL
|
|||
config LV_Z_VDB_SIZE
|
||||
default 64
|
||||
|
||||
config LV_Z_DPI
|
||||
config LV_DPI_DEF
|
||||
default 148
|
||||
|
||||
config LV_Z_BITS_PER_PIXEL
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
chosen {
|
||||
zephyr,display = &oled;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
|
@ -47,6 +47,7 @@ RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10
|
|||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
|
@ -76,6 +77,7 @@ RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10
|
|||
segment-remap;
|
||||
com-invdir;
|
||||
com-sequential;
|
||||
inversion-on;
|
||||
prechargep = <0x22>;
|
||||
};
|
||||
};
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue