mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 04:55:20 -05:00
Compare commits
1 Commits
docs/codes
...
ci/codeql-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40f7137df7 |
@@ -1,4 +1,4 @@
|
|||||||
FROM docker.io/zmkfirmware/zmk-dev-arm:2.5
|
FROM zmkfirmware/zmk-dev-arm:2.4
|
||||||
|
|
||||||
COPY .bashrc tmp
|
COPY .bashrc tmp
|
||||||
RUN mv /tmp/.bashrc ~/.bashrc
|
RUN mv /tmp/.bashrc ~/.bashrc
|
||||||
|
|||||||
11
.github/pull_request_template.md
vendored
11
.github/pull_request_template.md
vendored
@@ -1,11 +0,0 @@
|
|||||||
<!-- If you're adding a board/shield please fill out this check-list, otherwise you can delete it -->
|
|
||||||
## Board/Shield Check-list
|
|
||||||
- [ ] This board/shield is tested working on real hardware
|
|
||||||
- [ ] Definitions follow the general style of other shields/boards upstream ([Reference](https://zmk.dev/docs/development/new-shield))
|
|
||||||
- [ ] `.zmk.yml` metadata file added
|
|
||||||
- [ ] Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
|
|
||||||
- [ ] General consistent formatting of DeviceTree files
|
|
||||||
- [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader))
|
|
||||||
- [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable
|
|
||||||
- [ ] If split, no name added for the right/peripheral half
|
|
||||||
- [ ] `.conf` file has optional extra features commented out
|
|
||||||
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@@ -14,13 +14,12 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker.io/zmkfirmware/zmk-build-arm:2.5
|
image: zmkfirmware/zmk-build-arm:2.4
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
board:
|
board:
|
||||||
- bluemicro840_v1
|
- bluemicro840_v1
|
||||||
- nice_nano
|
- nice_nano
|
||||||
- nice_nano_v2
|
|
||||||
- nrfmicro_13
|
- nrfmicro_13
|
||||||
- proton_c
|
- proton_c
|
||||||
shield:
|
shield:
|
||||||
@@ -70,11 +69,11 @@ jobs:
|
|||||||
- board: planck_rev6
|
- board: planck_rev6
|
||||||
- board: proton_c
|
- board: proton_c
|
||||||
shield: clueboard_california
|
shield: clueboard_california
|
||||||
- board: nice_nano_v2
|
- board: nice_nano
|
||||||
shield: kyria_left
|
shield: kyria_left
|
||||||
cmake-args: -DCONFIG_ZMK_DISPLAY=y
|
cmake-args: -DCONFIG_ZMK_DISPLAY=y
|
||||||
skip-archive: true
|
skip-archive: true
|
||||||
- board: nice_nano_v2
|
- board: nice_nano
|
||||||
shield: kyria_right
|
shield: kyria_right
|
||||||
cmake-args: -DCONFIG_ZMK_DISPLAY=y
|
cmake-args: -DCONFIG_ZMK_DISPLAY=y
|
||||||
skip-archive: true
|
skip-archive: true
|
||||||
|
|||||||
2
.github/workflows/clang-format-lint.yml
vendored
2
.github/workflows/clang-format-lint.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: DoozyX/clang-format-lint-action@v0.13
|
- uses: DoozyX/clang-format-lint-action@v0.11
|
||||||
with:
|
with:
|
||||||
source: "./app"
|
source: "./app"
|
||||||
extensions: "h,c"
|
extensions: "h,c"
|
||||||
|
|||||||
61
.github/workflows/codeql-analysis.yml
vendored
Normal file
61
.github/workflows/codeql-analysis.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# Copyright (c) 2021 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
name: "CodeQL"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
# The branches below must be a subset of the branches above
|
||||||
|
branches: [ main ]
|
||||||
|
schedule:
|
||||||
|
- cron: '40 19 * * 4'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: zmkfirmware/zmk-build-arm:2.4
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
language: [ 'cpp']
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v1
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
|
||||||
|
- name: Cache west modules
|
||||||
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
cache-name: cache-zephyr-modules
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
modules/
|
||||||
|
tools/
|
||||||
|
zephyr/
|
||||||
|
bootloader/
|
||||||
|
key: codeql-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
|
||||||
|
restore-keys: |
|
||||||
|
codeql-${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
|
codeql-${{ runner.os }}-build-
|
||||||
|
codeql-${{ nrunner.os }}-
|
||||||
|
timeout-minutes: 2
|
||||||
|
continue-on-error: true
|
||||||
|
- name: Initialize workspace (west init)
|
||||||
|
run: west init -l app
|
||||||
|
- name: Update modules (west update)
|
||||||
|
run: west update
|
||||||
|
- name: Build (west build)
|
||||||
|
run: west build -s app -b nice_nano -- -DSHIELD=qaz
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v1
|
||||||
13
.github/workflows/doc-checks.yml
vendored
13
.github/workflows/doc-checks.yml
vendored
@@ -31,16 +31,3 @@ jobs:
|
|||||||
- name: Prettier check
|
- name: Prettier check
|
||||||
run: npm run prettier:check
|
run: npm run prettier:check
|
||||||
working-directory: docs
|
working-directory: docs
|
||||||
typecheck:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: bahmutov/npm-install@v1
|
|
||||||
with:
|
|
||||||
working-directory: docs
|
|
||||||
- name: Build
|
|
||||||
run: npm run build
|
|
||||||
working-directory: docs
|
|
||||||
- name: TypeScript check
|
|
||||||
run: npm run typecheck
|
|
||||||
working-directory: docs
|
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
name: Hardware Metadata Validation
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- ".github/workflows/hardware-metadata-validation.yml"
|
|
||||||
- "schema/hardware-metadata.schema.json"
|
|
||||||
- "app/boards/**/*.zmk.yml"
|
|
||||||
- "app/scripts/west_commands/metadata.py"
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- ".github/workflows/hardware-metadata-validation.yml"
|
|
||||||
- "schema/hardware-metadata.schema.json"
|
|
||||||
- "app/boards/**/*.zmk.yml"
|
|
||||||
- "app/scripts/west_commands/metadata.py"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check-metadata-format:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: bahmutov/npm-install@v1
|
|
||||||
with:
|
|
||||||
working-directory: app
|
|
||||||
- name: Prettier Check
|
|
||||||
run: npm run prettier:check
|
|
||||||
working-directory: app
|
|
||||||
validate-metadata:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: docker.io/zmkfirmware/zmk-dev-arm:2.5
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pip install -r app/scripts/requirements.txt
|
|
||||||
- name: West init
|
|
||||||
run: west init -l app
|
|
||||||
- name: Update modules (west update)
|
|
||||||
run: west update
|
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
|
||||||
run: west zephyr-export
|
|
||||||
- name: Validate Hardware Metadata
|
|
||||||
working-directory: app
|
|
||||||
run: west metadata check
|
|
||||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
|||||||
integration_test:
|
integration_test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker.io/zmkfirmware/zmk-build-arm:2.5
|
image: zmkfirmware/zmk-build-arm:2.4
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
fail_fast: false
|
|
||||||
repos:
|
|
||||||
- repo: https://github.com/pocc/pre-commit-hooks
|
|
||||||
rev: v1.1.1
|
|
||||||
hooks:
|
|
||||||
- id: clang-format
|
|
||||||
args:
|
|
||||||
- -i
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
||||||
rev: v2.2.1
|
|
||||||
hooks:
|
|
||||||
- id: prettier
|
|
||||||
@@ -60,7 +60,7 @@ representative at an online or offline event.
|
|||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
reported to the community leaders responsible for enforcement at
|
reported to the community leaders responsible for enforcement at
|
||||||
conduct@zmk.dev.
|
conduct@zmkfirmware.dev.
|
||||||
All complaints will be reviewed and investigated promptly and fairly.
|
All complaints will be reviewed and investigated promptly and fairly.
|
||||||
|
|
||||||
All community leaders are obligated to respect the privacy and security of the
|
All community leaders are obligated to respect the privacy and security of the
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ you have any questions, please come join us on the
|
|||||||
## Code of Conduct
|
## Code of Conduct
|
||||||
|
|
||||||
All community members are expected to abide by the [Code of Conduct][code-of-conduct].
|
All community members are expected to abide by the [Code of Conduct][code-of-conduct].
|
||||||
For any and all conduct inquiries or concerns, please contact conduct@zmk.dev.
|
For any and all conduct inquiries or concerns, please contact conduct@zmkfirmware.dev.
|
||||||
|
|
||||||
[code-of-conduct]: https://github.com/zmkfirmware/zmk/blob/main/CODE_OF_CONDUCT.md
|
[code-of-conduct]: https://github.com/zmkfirmware/zmk/blob/main/CODE_OF_CONDUCT.md
|
||||||
|
|
||||||
@@ -35,8 +35,8 @@ ZMK project.
|
|||||||
|
|
||||||
### Before Submitting a Report
|
### Before Submitting a Report
|
||||||
|
|
||||||
- Review the [Frequently Asked Questions](https://zmk.dev/docs/faq).
|
- Review the [Frequently Asked Questions](https://zmkfirmware.dev/docs/faq).
|
||||||
- Check the [Troubleshooting Guide](https://zmk.dev/docs/troubleshooting) for answers.
|
- Check the [Troubleshooting Guide](https://zmkfirmware.dev/docs/troubleshooting) for answers.
|
||||||
- Search the [open issues](https://github.com/zmkfirmware/zmk/issues) for an existing report that
|
- Search the [open issues](https://github.com/zmkfirmware/zmk/issues) for an existing report that
|
||||||
matches your problem.
|
matches your problem.
|
||||||
|
|
||||||
@@ -47,10 +47,10 @@ To open a report:
|
|||||||
- Head to https://github.com/zmkfirmware/zmk/issues/new
|
- Head to https://github.com/zmkfirmware/zmk/issues/new
|
||||||
- Provide an accurate summary of the issue in the title.
|
- Provide an accurate summary of the issue in the title.
|
||||||
- Provide as much detail as you can about the issue including:
|
- Provide as much detail as you can about the issue including:
|
||||||
- What [board/shield](https://zmk.dev/docs/faq#what-is-a-board) you are using.
|
- What [board/shield](https://zmkfirmware.dev/docs/faq#what-is-a-board) you are using.
|
||||||
- A link to the user repository, if you used it to build your firmware.
|
- A link to the user repository, if you used it to build your firmware.
|
||||||
- Exact steps to reproduce the problem.
|
- Exact steps to reproduce the problem.
|
||||||
- Any relevant screenshots or [logs](https://zmk.dev/docs/dev-guide-usb-logging)
|
- Any relevant screenshots or [logs](https://zmkfirmware.dev/docs/dev-guide-usb-logging)
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
@@ -81,17 +81,12 @@ documentation to areas not currently covered are greatly appreciated.
|
|||||||
- To get started, from the `docs/` directory, run `npm ci` and then `npm start`.
|
- To get started, from the `docs/` directory, run `npm ci` and then `npm start`.
|
||||||
- Enhancements should be submitted as pull requests to the `main` branch of ZMK.
|
- Enhancements should be submitted as pull requests to the `main` branch of ZMK.
|
||||||
|
|
||||||
### Formatting
|
|
||||||
|
|
||||||
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`.
|
|
||||||
|
|
||||||
## Code Contributions
|
## Code Contributions
|
||||||
|
|
||||||
### Development Setup
|
### Development Setup
|
||||||
|
|
||||||
To get your development environment setup going, start at the
|
To get your development environment setup going, start at the
|
||||||
[basic setup](https://zmk.dev/docs/development/setup/) docs, and make sure you can build and flash
|
[basic setup](https://zmkfirmware.dev/docs/dev-setup) docs, and make sure you can build and flash
|
||||||
your own locally built firmware.
|
your own locally built firmware.
|
||||||
|
|
||||||
### Formatting
|
### Formatting
|
||||||
@@ -100,8 +95,6 @@ ZMK uses `clang-format` to ensure consist formatting for our source code. Before
|
|||||||
changes, make sure you've manually run `clang-format`, or have your IDE configured to auto-format
|
changes, make sure you've manually run `clang-format`, or have your IDE configured to auto-format
|
||||||
on save.
|
on save.
|
||||||
|
|
||||||
You can setup git to run `clang-format` automatically when you commit by installing the pre-commit hooks: `pip3 install pre-commit`, `pre-commit install`.
|
|
||||||
|
|
||||||
### Commit Messages
|
### Commit Messages
|
||||||
|
|
||||||
The ZMK project is working towards, but not yet enforcing, the use of
|
The ZMK project is working towards, but not yet enforcing, the use of
|
||||||
@@ -124,4 +117,4 @@ When opening a pull request with your changes, please:
|
|||||||
- Requested testing by reviewers or testers.
|
- Requested testing by reviewers or testers.
|
||||||
- Screenshots or logs that support understanding the change.
|
- Screenshots or logs that support understanding the change.
|
||||||
|
|
||||||
[discord-invite]: https://zmk.dev/community/discord/invite
|
[discord-invite]: https://zmkfirmware.dev/community/discord/invite
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -1,13 +1,13 @@
|
|||||||
# Zephyr™ Mechanical Keyboard (ZMK) Firmware
|
# Zephyr™ Mechanical Keyboard (ZMK) Firmware
|
||||||
|
|
||||||
[](https://zmk.dev/community/discord/invite)
|
[](https://zmkfirmware.dev/community/discord/invite)
|
||||||
[](https://github.com/zmkfirmware/zmk/actions)
|
[](https://github.com/zmkfirmware/zmk/actions)
|
||||||
[](CODE_OF_CONDUCT.md)
|
[](CODE_OF_CONDUCT.md)
|
||||||
|
|
||||||
[ZMK Firmware](https://zmk.dev/) is an open source (MIT) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues.
|
[ZMK Firmware](https://zmkfirmware.dev/) is an open source (MIT) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues.
|
||||||
|
|
||||||
Check out the website to learn more: https://zmk.dev/
|
Check out the website to learn more: https://zmkfirmware.dev/
|
||||||
|
|
||||||
You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite)
|
You can also come join our [ZMK Discord Server](https://zmkfirmware.dev/community/discord/invite)
|
||||||
|
|
||||||
To review features, check out the [feature overview](https://zmk.dev/docs/). ZMK is under active development, and new features are listed with the [enhancement label](https://github.com/zmkfirmware/zmk/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature.
|
To review features, check out the [feature overview](https://zmkfirmware.dev/docs/). ZMK is under active development, and new features are listed with the [enhancement label](https://github.com/zmkfirmware/zmk/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature.
|
||||||
|
|||||||
1
app/.gitignore
vendored
1
app/.gitignore
vendored
@@ -1,2 +1 @@
|
|||||||
build/
|
build/
|
||||||
node_modules/
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
endOfLine: "auto",
|
|
||||||
};
|
|
||||||
@@ -36,7 +36,6 @@ target_sources(app PRIVATE src/events/position_state_changed.c)
|
|||||||
target_sources(app PRIVATE src/events/layer_state_changed.c)
|
target_sources(app PRIVATE src/events/layer_state_changed.c)
|
||||||
target_sources(app PRIVATE src/events/keycode_state_changed.c)
|
target_sources(app PRIVATE src/events/keycode_state_changed.c)
|
||||||
target_sources(app PRIVATE src/events/modifiers_state_changed.c)
|
target_sources(app PRIVATE src/events/modifiers_state_changed.c)
|
||||||
target_sources(app PRIVATE src/events/endpoint_selection_changed.c)
|
|
||||||
target_sources(app PRIVATE src/events/sensor_event.c)
|
target_sources(app PRIVATE src/events/sensor_event.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c)
|
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/ble_active_profile_changed.c)
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/ble_active_profile_changed.c)
|
||||||
@@ -47,7 +46,6 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
|
|||||||
target_sources(app PRIVATE src/behaviors/behavior_reset.c)
|
target_sources(app PRIVATE src/behaviors/behavior_reset.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c)
|
target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_sticky_key.c)
|
target_sources(app PRIVATE src/behaviors/behavior_sticky_key.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_caps_word.c)
|
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_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)
|
||||||
@@ -58,7 +56,6 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
|
|||||||
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_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c)
|
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c)
|
||||||
target_sources(app PRIVATE src/combo.c)
|
target_sources(app PRIVATE src/combo.c)
|
||||||
target_sources(app PRIVATE src/conditional_layer.c)
|
|
||||||
target_sources(app PRIVATE src/keymap.c)
|
target_sources(app PRIVATE src/keymap.c)
|
||||||
endif()
|
endif()
|
||||||
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c)
|
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c)
|
||||||
|
|||||||
107
app/Kconfig
107
app/Kconfig
@@ -25,57 +25,7 @@ config USB_DEVICE_PID
|
|||||||
config USB_DEVICE_MANUFACTURER
|
config USB_DEVICE_MANUFACTURER
|
||||||
default "ZMK Project"
|
default "ZMK Project"
|
||||||
|
|
||||||
menu "HID"
|
menu "HID Output Types"
|
||||||
|
|
||||||
choice ZMK_HID_REPORT_TYPE
|
|
||||||
prompt "HID Report Type"
|
|
||||||
|
|
||||||
config ZMK_HID_REPORT_TYPE_HKRO
|
|
||||||
bool "#-Key Roll Over (HKRO) HID Report"
|
|
||||||
help
|
|
||||||
Enable # key roll over for HID report. This selection is "boot keyboard" compatible
|
|
||||||
but limits the total number of possible keys to report as held to #.
|
|
||||||
|
|
||||||
config ZMK_HID_REPORT_TYPE_NKRO
|
|
||||||
bool "Full N-Key Roll Over (NKRO) HID Report"
|
|
||||||
help
|
|
||||||
Enable full N-Key Roll Over for HID output. This selection will prevent the keyboard
|
|
||||||
from working with some BIOS/UEFI versions that only support "boot keyboard" support.
|
|
||||||
This option also prevents using some infrequently used higher range HID usages.
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
if ZMK_HID_REPORT_TYPE_HKRO
|
|
||||||
|
|
||||||
config ZMK_HID_KEYBOARD_REPORT_SIZE
|
|
||||||
int "# Keyboard Keys Reportable"
|
|
||||||
default 6
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
config ZMK_HID_CONSUMER_REPORT_SIZE
|
|
||||||
int "# Consumer Keys Reportable"
|
|
||||||
default 6
|
|
||||||
|
|
||||||
|
|
||||||
choice ZMK_HID_CONSUMER_REPORT_USAGES
|
|
||||||
prompt "HID Report Type"
|
|
||||||
|
|
||||||
config ZMK_HID_CONSUMER_REPORT_USAGES_FULL
|
|
||||||
bool "Full Consumer HID Usage Support"
|
|
||||||
help
|
|
||||||
Enable full Consumer usage ID values to be sent to hosts. Allows for less
|
|
||||||
frequently used usages, but has compatibability issues with some host OSes.
|
|
||||||
|
|
||||||
config ZMK_HID_CONSUMER_REPORT_USAGES_BASIC
|
|
||||||
bool "Basic Consumer HID Usage Support"
|
|
||||||
help
|
|
||||||
Enable Consumer usage ID values up to "Playback Speed - Slow" to be sent to
|
|
||||||
hosts. Allows for broader compatibability with more host OSes.
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
menu "Output Types"
|
|
||||||
|
|
||||||
config ZMK_USB
|
config ZMK_USB
|
||||||
bool "USB"
|
bool "USB"
|
||||||
@@ -142,10 +92,7 @@ config ZMK_BLE_PASSKEY_ENTRY
|
|||||||
#ZMK_BLE
|
#ZMK_BLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#Output Types
|
#HID Output Types
|
||||||
endmenu
|
|
||||||
|
|
||||||
# HID
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "Split Support"
|
menu "Split Support"
|
||||||
@@ -167,7 +114,6 @@ menuconfig ZMK_SPLIT_BLE_ROLE_CENTRAL
|
|||||||
bool "Central"
|
bool "Central"
|
||||||
select BT_CENTRAL
|
select BT_CENTRAL
|
||||||
select BT_GATT_CLIENT
|
select BT_GATT_CLIENT
|
||||||
select BT_GATT_AUTO_DISCOVER_CCC
|
|
||||||
|
|
||||||
if ZMK_SPLIT_BLE_ROLE_CENTRAL
|
if ZMK_SPLIT_BLE_ROLE_CENTRAL
|
||||||
|
|
||||||
@@ -263,54 +209,36 @@ config ZMK_RGB_UNDERGLOW_EXT_POWER
|
|||||||
bool "RGB underglow toggling also controls external power"
|
bool "RGB underglow toggling also controls external power"
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_BRT_MIN
|
|
||||||
int "RGB underglow minimum brightness in percent"
|
|
||||||
range 0 100
|
|
||||||
default 0
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_BRT_MAX
|
|
||||||
int "RGB underglow maximum brightness in percent"
|
|
||||||
range ZMK_RGB_UNDERGLOW_BRT_MIN 100
|
|
||||||
default 100
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_HUE_STEP
|
config ZMK_RGB_UNDERGLOW_HUE_STEP
|
||||||
int "RGB underglow hue step in degrees"
|
int "RGB underglow hue step in degrees of 360"
|
||||||
range 0 359
|
|
||||||
default 10
|
default 10
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_SAT_STEP
|
config ZMK_RGB_UNDERGLOW_SAT_STEP
|
||||||
int "RGB underglow saturation step in percent"
|
int "RGB underglow sturation step in percent"
|
||||||
range 0 100
|
|
||||||
default 10
|
default 10
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_BRT_STEP
|
config ZMK_RGB_UNDERGLOW_BRT_STEP
|
||||||
int "RGB underglow brightness step in percent"
|
int "RGB underglow brightness step in percent"
|
||||||
range 0 100
|
|
||||||
default 10
|
default 10
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_HUE_START
|
config ZMK_RGB_UNDERGLOW_HUE_START
|
||||||
int "RGB underglow start hue value in degrees"
|
int "RGB underglow start hue value from 0-359"
|
||||||
range 0 359
|
|
||||||
default 0
|
default 0
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_SAT_START
|
config ZMK_RGB_UNDERGLOW_SAT_START
|
||||||
int "RGB underglow start saturations value in percent"
|
int "RGB underglow start saturations value from 0-100"
|
||||||
range 0 100
|
|
||||||
default 100
|
default 100
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_BRT_START
|
config ZMK_RGB_UNDERGLOW_BRT_START
|
||||||
int "RGB underglow start brightness value in percent"
|
int "RGB underglow start brightness value from 0-100"
|
||||||
range ZMK_RGB_UNDERGLOW_BRT_MIN ZMK_RGB_UNDERGLOW_BRT_MAX
|
default 100
|
||||||
default ZMK_RGB_UNDERGLOW_BRT_MAX
|
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_SPD_START
|
config ZMK_RGB_UNDERGLOW_SPD_START
|
||||||
int "RGB underglow start animation speed value"
|
int "RGB underglow start animation speed value from 1-5"
|
||||||
range 1 5
|
|
||||||
default 3
|
default 3
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_EFF_START
|
config ZMK_RGB_UNDERGLOW_EFF_START
|
||||||
int "RGB underglow start effect int value related to the effect enum list"
|
int "RGB underglow start effect int value related to the effect enum list"
|
||||||
range 0 3
|
|
||||||
default 0
|
default 0
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW_ON_START
|
config ZMK_RGB_UNDERGLOW_ON_START
|
||||||
@@ -335,11 +263,14 @@ config ZMK_SLEEP
|
|||||||
|
|
||||||
if ZMK_SLEEP
|
if ZMK_SLEEP
|
||||||
|
|
||||||
|
config SYS_POWER_DEEP_SLEEP_STATES
|
||||||
|
default y
|
||||||
|
|
||||||
choice SYS_PM_POLICY
|
choice SYS_PM_POLICY
|
||||||
default PM_POLICY_APP
|
default SYS_PM_POLICY_APP
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
config PM_DEVICE
|
config DEVICE_POWER_MANAGEMENT
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ZMK_IDLE_SLEEP_TIMEOUT
|
config ZMK_IDLE_SLEEP_TIMEOUT
|
||||||
@@ -406,9 +337,11 @@ config ZMK_KSCAN_EVENT_QUEUE_SIZE
|
|||||||
|
|
||||||
config ZMK_KSCAN_MOCK_DRIVER
|
config ZMK_KSCAN_MOCK_DRIVER
|
||||||
bool "Enable mock kscan driver to simulate key presses"
|
bool "Enable mock kscan driver to simulate key presses"
|
||||||
|
default n
|
||||||
|
|
||||||
config ZMK_KSCAN_COMPOSITE_DRIVER
|
config ZMK_KSCAN_COMPOSITE_DRIVER
|
||||||
bool "Enable composite kscan driver to combine kscan devices"
|
bool "Enable composite kscan driver to combine kscan devices"
|
||||||
|
default n
|
||||||
|
|
||||||
#KSCAN Settings
|
#KSCAN Settings
|
||||||
endmenu
|
endmenu
|
||||||
@@ -488,14 +421,6 @@ config ZMK_WPM
|
|||||||
bool "Calculate WPM"
|
bool "Calculate WPM"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config SENSOR
|
|
||||||
default y
|
|
||||||
|
|
||||||
choice CBPRINTF_IMPLEMENTATION
|
|
||||||
default CBPRINTF_NANO
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
module = ZMK
|
module = ZMK
|
||||||
module-str = zmk
|
module-str = zmk
|
||||||
source "subsys/logging/Kconfig.template.log_config"
|
source "subsys/logging/Kconfig.template.log_config"
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: bdn9_rev2
|
|
||||||
name: BDN9 Rev2
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
features:
|
|
||||||
- keys
|
|
||||||
- encoder
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
url: https://keeb.io/products/bdn9-rev-2-3x3-9-key-macropad-rotary-encoder-and-rgb
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: bdn9_rev2
|
|
||||||
name: BDN9 Rev2
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
features:
|
|
||||||
- keys
|
|
||||||
- encoder
|
|
||||||
url: https://keeb.io/collections/bdn9-collection/products/bdn9-rev-2-3x3-9-key-macropad-rotary-encoder-and-rgb
|
|
||||||
@@ -11,9 +11,6 @@ CONFIG_FPU=y
|
|||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
# Enable pinmux
|
|
||||||
CONFIG_PINMUX=y
|
|
||||||
|
|
||||||
# Needed to reduce this to size that will fit on F072
|
# Needed to reduce this to size that will fit on F072
|
||||||
CONFIG_HEAP_MEM_POOL_SIZE=1024
|
CONFIG_HEAP_MEM_POOL_SIZE=1024
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
pro_micro: connector {
|
pro_micro_d: connector_d {
|
||||||
compatible = "arduino-pro-micro";
|
compatible = "arduino-pro-micro";
|
||||||
#gpio-cells = <2>;
|
#gpio-cells = <2>;
|
||||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
@@ -25,10 +25,6 @@
|
|||||||
, <16 0 &gpio0 28 0> /* D16 B2*/
|
, <16 0 &gpio0 28 0> /* D16 B2*/
|
||||||
, <14 0 &gpio0 3 0> /* D14 B3*/
|
, <14 0 &gpio0 3 0> /* D14 B3*/
|
||||||
, <15 0 &gpio1 13 0> /* D15 B1*/
|
, <15 0 &gpio1 13 0> /* D15 B1*/
|
||||||
, <18 0 &gpio0 2 0> /* D18/A0 F7*/
|
|
||||||
, <19 0 &gpio0 29 0> /* D19/A1 F6*/
|
|
||||||
, <20 0 &gpio0 26 0> /* D20/A2 F5*/
|
|
||||||
, <21 0 &gpio0 30 0> /* D21/A3 F4*/
|
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -38,20 +34,19 @@
|
|||||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
gpio-map-pass-thru = <0 0x3f>;
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
gpio-map
|
gpio-map
|
||||||
= <0 0 &gpio0 2 0> /* D18/A0 F7*/
|
= <0 0 &gpio0 2 0> /* A0 F7*/
|
||||||
, <1 0 &gpio0 29 0> /* D19/A1 F6*/
|
, <1 0 &gpio0 29 0> /* A1 F6*/
|
||||||
, <2 0 &gpio0 26 0> /* D20/A2 F5*/
|
, <2 0 &gpio0 26 0> /* A2 F5*/
|
||||||
, <3 0 &gpio0 30 0> /* D21/A3 F4*/
|
, <3 0 &gpio0 30 0> /* A3 F4*/
|
||||||
, <6 0 &gpio0 20 0> /* D4/A6 D4*/
|
, <6 0 &gpio0 20 0> /* D4/A6 D4*/
|
||||||
, <7 0 &gpio0 24 0> /* D6/A7 D7*/
|
, <7 0 &gpio0 24 0> /* D6/A7 D7*/
|
||||||
, <8 0 &gpio0 10 0> /* D8/A8 B4*/
|
, <8 0 &gpio0 10 0> /* D8/A8 B4*/
|
||||||
, <9 0 &gpio1 6 0> /* D9/A9 B5*/
|
, <9 0 &gpio1 6 0> /* D9/A9 B5*/
|
||||||
, <10 0 &gpio1 11 0> /* D10/A10 B6*/
|
, <10 0 &gpio1 13 0> /* D10/A10 B6*/
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pro_micro_d: &pro_micro {};
|
|
||||||
pro_micro_i2c: &i2c0 {};
|
pro_micro_i2c: &i2c0 {};
|
||||||
pro_micro_spi: &spi0 {};
|
pro_micro_spi: &spi0 {};
|
||||||
pro_micro_serial: &uart0 {};
|
pro_micro_serial: &uart0 {};
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
leds {
|
leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
blue_led: led_0 {
|
blue_led: led_0 {
|
||||||
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio0 42 GPIO_ACTIVE_HIGH>;
|
||||||
label = "Blue LED";
|
label = "Blue LED";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -29,7 +29,6 @@
|
|||||||
ext-power {
|
ext-power {
|
||||||
compatible = "zmk,ext-power-generic";
|
compatible = "zmk,ext-power-generic";
|
||||||
label = "EXT_POWER";
|
label = "EXT_POWER";
|
||||||
init-delay-ms = <20>;
|
|
||||||
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: bluemicro840_v1
|
|
||||||
name: BlueMicro840 v1
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
url: https://nrf52.jpconstantineau.com/docs/bluemicro840_v1/
|
|
||||||
exposes: [pro_micro]
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
|
||||||
-c
|
|
||||||
-b 0x26000
|
|
||||||
-f 0xADA52840
|
|
||||||
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
|
||||||
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
|
||||||
)
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
config BOARD_ENABLE_DCDC
|
|
||||||
bool "Enable DCDC mode"
|
|
||||||
select SOC_DCDC_NRF52X
|
|
||||||
default y
|
|
||||||
depends on (BOARD_BT60_V1_HS || BOARD_BT60_V1)
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# BT60 board configuration
|
|
||||||
|
|
||||||
# Copyright (c) 2021 Polarity Works
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
config BOARD_BT60_V1
|
|
||||||
bool "bt60"
|
|
||||||
depends on SOC_NRF52840_QIAA
|
|
||||||
|
|
||||||
config BOARD_BT60_V1_HS
|
|
||||||
bool "bt60 hotswap"
|
|
||||||
depends on SOC_NRF52840_QIAA
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
# Copyright (c) 2021 Polarity Works
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
if BOARD_BT60_V1_HS || BOARD_BT60_V1
|
|
||||||
|
|
||||||
config BOARD
|
|
||||||
default "bt60"
|
|
||||||
|
|
||||||
if USB
|
|
||||||
|
|
||||||
config USB_NRFX
|
|
||||||
default y
|
|
||||||
|
|
||||||
config USB_DEVICE_STACK
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # USB
|
|
||||||
|
|
||||||
config BT_CTLR
|
|
||||||
default BT
|
|
||||||
|
|
||||||
config ZMK_BLE
|
|
||||||
default y
|
|
||||||
|
|
||||||
config ZMK_USB
|
|
||||||
default y
|
|
||||||
|
|
||||||
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
|
||||||
default y
|
|
||||||
|
|
||||||
config ZMK_KEYBOARD_NAME
|
|
||||||
default "BT60"
|
|
||||||
|
|
||||||
endif # BOARD_BT60
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
|
||||||
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
|
|
||||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
|
||||||
@@ -1,128 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Polarity Works
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
|
||||||
#include <dt-bindings/zmk/matrix_transform.h>
|
|
||||||
|
|
||||||
/ {
|
|
||||||
model = "BT60";
|
|
||||||
compatible = "polarityworks,bt60";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
zephyr,code-partition = &code_partition;
|
|
||||||
zephyr,sram = &sram0;
|
|
||||||
zephyr,flash = &flash0;
|
|
||||||
zmk,kscan = &kscan0;
|
|
||||||
zmk,matrix_transform = &default_transform;
|
|
||||||
};
|
|
||||||
|
|
||||||
sensors {
|
|
||||||
compatible = "zmk,keymap-sensors";
|
|
||||||
sensors = <&left_encoder>;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
left_encoder: encoder_left {
|
|
||||||
compatible = "alps,ec11";
|
|
||||||
label = "LEFT_ENCODER";
|
|
||||||
a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
|
||||||
b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
|
||||||
resolution = <4>;
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
blue_led: led_0 {
|
|
||||||
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
|
||||||
label = "Blue LED";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
vbatt {
|
|
||||||
compatible = "zmk,battery-voltage-divider";
|
|
||||||
label = "BATTERY";
|
|
||||||
io-channels = <&adc 2>;
|
|
||||||
output-ohms = <2000000>;
|
|
||||||
full-ohms = <(2000000 + 806000)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&adc {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpiote {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio0 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio1 {
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
&flash0 {
|
|
||||||
/*
|
|
||||||
* For more information, see:
|
|
||||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
|
||||||
*/
|
|
||||||
partitions {
|
|
||||||
compatible = "fixed-partitions";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
sd_partition: partition@0 {
|
|
||||||
label = "softdevice";
|
|
||||||
reg = <0x00000000 0x00026000>;
|
|
||||||
};
|
|
||||||
code_partition: partition@26000 {
|
|
||||||
label = "code_partition";
|
|
||||||
reg = <0x00026000 0x000c6000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The flash starting at 0x000ec000 and ending at
|
|
||||||
* 0x000f3fff is reserved for use by the application.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Storage partition will be used by FCB/LittleFS/NVS
|
|
||||||
* if enabled.
|
|
||||||
*/
|
|
||||||
storage_partition: partition@ec000 {
|
|
||||||
label = "storage";
|
|
||||||
reg = <0x000ec000 0x00008000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
boot_partition: partition@f4000 {
|
|
||||||
label = "adafruit_boot";
|
|
||||||
reg = <0x000f4000 0x0000c000>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Polarity Works
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
#include "bt60.dtsi"
|
|
||||||
|
|
||||||
|
|
||||||
/ {
|
|
||||||
chosen {
|
|
||||||
zmk,kscan = &kscan0;
|
|
||||||
zmk,matrix_transform = &ansi_transform;
|
|
||||||
};
|
|
||||||
|
|
||||||
ansi_transform: keymap_transform_0 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <15>;
|
|
||||||
rows = <5>;
|
|
||||||
map = <
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13)
|
|
||||||
RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
|
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
hhkb_transform: keymap_transform_1 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <15>;
|
|
||||||
rows = <5>;
|
|
||||||
map = <
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13)
|
|
||||||
RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,14)
|
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
iso_transform: keymap_transform_2 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <15>;
|
|
||||||
rows = <5>;
|
|
||||||
map = <
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12)
|
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
all_1u_transform: keymap_transform_3 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <15>;
|
|
||||||
rows = <5>;
|
|
||||||
map = <
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13)
|
|
||||||
RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) RC(3,14)
|
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
split_transform: keymap_transform_4 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <15>;
|
|
||||||
rows = <5>;
|
|
||||||
map = <
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13)
|
|
||||||
RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,14)
|
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
kscan0: kscan_0 {
|
|
||||||
compatible = "zmk,kscan-gpio-matrix";
|
|
||||||
label = "KSCAN";
|
|
||||||
diode-direction = "col2row";
|
|
||||||
|
|
||||||
col-gpios
|
|
||||||
= <&gpio1 13 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 10 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 11 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 15 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 3 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 2 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 28 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 29 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 30 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 31 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 5 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 23 GPIO_ACTIVE_HIGH>
|
|
||||||
;
|
|
||||||
|
|
||||||
row-gpios
|
|
||||||
= <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,180 +0,0 @@
|
|||||||
#include <behaviors.dtsi>
|
|
||||||
#include <dt-bindings/zmk/keys.h>
|
|
||||||
#include <dt-bindings/zmk/bt.h>
|
|
||||||
|
|
||||||
#define ANSI true
|
|
||||||
//#define HHKB true
|
|
||||||
//#define ISO true
|
|
||||||
//#define ALL_1U true
|
|
||||||
//#define SPLIT_BKSP_RSHFT true
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/ {
|
|
||||||
chosen {
|
|
||||||
#ifdef ANSI
|
|
||||||
zmk,matrix_transform = &ansi_transform;
|
|
||||||
#elif defined(HHKB)
|
|
||||||
zmk,matrix_transform = &hhkb_transform;
|
|
||||||
#elif defined(ISO)
|
|
||||||
zmk,matrix_transform = &iso_transform;
|
|
||||||
#elif defined(ALL_1U)
|
|
||||||
zmk,matrix_transform = &all_1u_transform;
|
|
||||||
#else
|
|
||||||
zmk,matrix_transform = &split_transform;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
keymap {
|
|
||||||
compatible = "zmk,keymap";
|
|
||||||
#ifdef ANSI
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
|
|
||||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
|
|
||||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
|
||||||
// | TAB | Q | UP | E | R | T | Y | U | INS | O |PSCRN|SLCK |PSEBRK| RESET |
|
|
||||||
// | CAPS |LEFT |DOWN |RIGHT| F | G | H | J | K | L |HOME |PGUP | BOOTLOADER |
|
|
||||||
// | PREV |VOLUP |VOLDN|MUTE | V | B | N | M | , | END | PGDN | NEXT |
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | BT_CLR |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
|
||||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
|
||||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR &trans
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#elif defined(HHKB)
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | BSPC |
|
|
||||||
// | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | 1 |
|
|
||||||
// | CAPS | ALT | WIN | SPACE | WIN | ALT | CTRL |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSLH &kp GRAVE
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSPC
|
|
||||||
&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
|
|
||||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &mo 1
|
|
||||||
&kp LCTRL &kp LALT &kp LGUI &kp SPACE &kp RGUI &kp RALT &kp RCTRL
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
bindings = <
|
|
||||||
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp INS &kp DEL
|
|
||||||
&kp CLCK &bt BT_PRV &bt BT_NXT &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &kp UP &trans &reset
|
|
||||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp LEFT &kp RIGHT &trans
|
|
||||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp DOWN &trans &trans
|
|
||||||
&trans &trans &trans &bootloader &trans &trans &trans
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#elif defined(ISO)
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER |
|
|
||||||
// | SHIFT | | | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT
|
|
||||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp NON_US_HASH &kp RET
|
|
||||||
&kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
bindings = <
|
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
|
||||||
&reset &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK
|
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &trans &bootloader
|
|
||||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#elif defined(ALL_1U)
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHFT | UP | 1 |
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | CTRL | LEFT | DOWN | RIGHT |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
|
|
||||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
|
|
||||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &mo 1
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
bindings = <
|
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp F1
|
|
||||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
|
||||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BKSP| DEL |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | 1 |
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | CTRL |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
|
|
||||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
|
|
||||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &mo 1
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RGUI &kp C_MENU &kp RCTRL
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
bindings = <
|
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans
|
|
||||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
|
||||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &trans
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
identifier: bt60_v1
|
|
||||||
name: BT60 V1 Soldered
|
|
||||||
type: mcu
|
|
||||||
arch: arm
|
|
||||||
toolchain:
|
|
||||||
- zephyr
|
|
||||||
- gnuarmemb
|
|
||||||
- xtools
|
|
||||||
supported:
|
|
||||||
- adc
|
|
||||||
- usb_device
|
|
||||||
- ble
|
|
||||||
- ieee802154
|
|
||||||
- pwm
|
|
||||||
- watchdog
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: bt60_v1
|
|
||||||
name: BT60 V1 Soldered
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
features:
|
|
||||||
- keys
|
|
||||||
- encoder
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
url: https://polarityworks.com
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_NRF52X=y
|
|
||||||
CONFIG_SOC_NRF52840_QIAA=y
|
|
||||||
CONFIG_BOARD_BT60_V1=y
|
|
||||||
|
|
||||||
# Enable MPU
|
|
||||||
CONFIG_ARM_MPU=y
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
|
|
||||||
# encoder
|
|
||||||
CONFIG_EC11=y
|
|
||||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
|
||||||
CONFIG_NVS=y
|
|
||||||
CONFIG_SETTINGS_NVS=y
|
|
||||||
CONFIG_FLASH=y
|
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
||||||
CONFIG_FLASH_MAP=y
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Polarity Works
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
#include "bt60.dtsi"
|
|
||||||
|
|
||||||
|
|
||||||
/ {
|
|
||||||
chosen {
|
|
||||||
zmk,kscan = &kscan0;
|
|
||||||
zmk,matrix_transform = &default_transform;
|
|
||||||
};
|
|
||||||
|
|
||||||
default_transform: keymap_transform_0 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <15>;
|
|
||||||
rows = <5>;
|
|
||||||
map = <
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(2,13)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11)
|
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(4,8) RC(4,9) RC(4,10) RC(4,11)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
kscan0: kscan_0 {
|
|
||||||
compatible = "zmk,kscan-gpio-matrix";
|
|
||||||
label = "KSCAN";
|
|
||||||
diode-direction = "col2row";
|
|
||||||
|
|
||||||
col-gpios
|
|
||||||
= <&gpio1 11 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 10 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 13 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 15 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 3 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 2 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 28 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 29 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 30 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 31 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 5 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
|
||||||
;
|
|
||||||
|
|
||||||
row-gpios
|
|
||||||
= <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio0 23 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
#include <behaviors.dtsi>
|
|
||||||
#include <dt-bindings/zmk/keys.h>
|
|
||||||
#include <dt-bindings/zmk/bt.h>
|
|
||||||
|
|
||||||
/ {
|
|
||||||
keymap {
|
|
||||||
compatible = "zmk,keymap";
|
|
||||||
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | DEL
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &bt BT_CLR
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
|
|
||||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
|
|
||||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
raise {
|
|
||||||
bindings = <
|
|
||||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans
|
|
||||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
|
||||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
|
||||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
|
||||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
|
||||||
>;
|
|
||||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
identifier: bt60_v1_hs
|
|
||||||
name: BT60 V1 Hotswap
|
|
||||||
type: mcu
|
|
||||||
arch: arm
|
|
||||||
toolchain:
|
|
||||||
- zephyr
|
|
||||||
- gnuarmemb
|
|
||||||
- xtools
|
|
||||||
supported:
|
|
||||||
- adc
|
|
||||||
- usb_device
|
|
||||||
- ble
|
|
||||||
- ieee802154
|
|
||||||
- pwm
|
|
||||||
- watchdog
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: bt60_v1_hs
|
|
||||||
name: BT60 V1 Hotswap
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
features:
|
|
||||||
- keys
|
|
||||||
- encoder
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
url: https://polarityworks.com
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_NRF52X=y
|
|
||||||
CONFIG_SOC_NRF52840_QIAA=y
|
|
||||||
CONFIG_BOARD_BT60_V1_HS=y
|
|
||||||
|
|
||||||
# Enable MPU
|
|
||||||
CONFIG_ARM_MPU=y
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
|
|
||||||
# encoder
|
|
||||||
CONFIG_EC11=y
|
|
||||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
|
||||||
CONFIG_NVS=y
|
|
||||||
CONFIG_SETTINGS_NVS=y
|
|
||||||
CONFIG_FLASH=y
|
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
||||||
CONFIG_FLASH_MAP=y
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# Ferris board configuration
|
|
||||||
|
|
||||||
# Copyright (c) 2020 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
config BOARD_FERRIS
|
|
||||||
bool "Ferris rev 0.2"
|
|
||||||
depends on SOC_STM32F072XB
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
# Ferris board configuration
|
|
||||||
|
|
||||||
# Copyright (c) 2020 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
if BOARD_FERRIS
|
|
||||||
|
|
||||||
config BOARD
|
|
||||||
default "ferris_rev02"
|
|
||||||
|
|
||||||
config ZMK_KEYBOARD_NAME
|
|
||||||
default "Ferris rev 0.2"
|
|
||||||
|
|
||||||
config ZMK_USB
|
|
||||||
default y
|
|
||||||
|
|
||||||
config ZMK_KSCAN_MATRIX_POLLING
|
|
||||||
default y
|
|
||||||
|
|
||||||
config ZMK_KSCAN_COMPOSITE_DRIVER
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_FERRIS
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# Building ZMK for the Ferris 0.2
|
|
||||||
|
|
||||||
|
|
||||||
## Standard Build
|
|
||||||
|
|
||||||
```
|
|
||||||
west build -p -d build/ferris --board ferris_rev02
|
|
||||||
```
|
|
||||||
|
|
||||||
## Flashing
|
|
||||||
|
|
||||||
`west` can be used to flash the board directly. Press the reset button once, and run:
|
|
||||||
|
|
||||||
```
|
|
||||||
west flash -d build/ferris
|
|
||||||
```
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse")
|
|
||||||
board_runner_args(jlink "--device=STM32F072CB" "--speed=4000")
|
|
||||||
|
|
||||||
include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
|
|
||||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
|
||||||
@@ -1,139 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2020 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
#include <st/f0/stm32f072Xb.dtsi>
|
|
||||||
#include <st/f0/stm32f072v(8-b)tx-pinctrl.dtsi>
|
|
||||||
|
|
||||||
#include <dt-bindings/zmk/matrix_transform.h>
|
|
||||||
|
|
||||||
/ {
|
|
||||||
model = "Ferris rev0.2";
|
|
||||||
compatible = "ferris,rev02", "st,stm32f072";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
zephyr,sram = &sram0;
|
|
||||||
zephyr,flash = &flash0;
|
|
||||||
zmk,kscan = &kscan;
|
|
||||||
zmk,matrix_transform = &transform;
|
|
||||||
/* TODO: Enable once we support the IC for underglow
|
|
||||||
zmk,underglow = &led_strip;
|
|
||||||
*/
|
|
||||||
};
|
|
||||||
|
|
||||||
transform: transform {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
rows = <4>;
|
|
||||||
columns = <10>;
|
|
||||||
|
|
||||||
map = <
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9)
|
|
||||||
RC(3,3) RC(3,4) RC(3,5) RC(3,6)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
kscan: kscan {
|
|
||||||
compatible = "zmk,kscan-composite";
|
|
||||||
label = "KSCAN";
|
|
||||||
rows = <4>;
|
|
||||||
columns = <10>;
|
|
||||||
|
|
||||||
left {
|
|
||||||
kscan = <&kscan_left>;
|
|
||||||
};
|
|
||||||
|
|
||||||
right {
|
|
||||||
kscan = <&kscan_right>;
|
|
||||||
column-offset = <5>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
kscan_left: kscan_left {
|
|
||||||
compatible = "zmk,kscan-gpio-matrix";
|
|
||||||
label = "KSCAN_LEFT";
|
|
||||||
|
|
||||||
diode-direction = "col2row";
|
|
||||||
|
|
||||||
col-gpios
|
|
||||||
= <&gpiob 8 (GPIO_ACTIVE_HIGH)>
|
|
||||||
, <&gpiob 4 (GPIO_ACTIVE_HIGH)>
|
|
||||||
, <&gpiob 3 (GPIO_ACTIVE_HIGH)>
|
|
||||||
, <&gpioa 15 (GPIO_ACTIVE_HIGH)>
|
|
||||||
, <&gpioa 14 (GPIO_ACTIVE_HIGH)>
|
|
||||||
;
|
|
||||||
row-gpios
|
|
||||||
= <&gpiob 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpiob 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpiob 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpioa 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
;
|
|
||||||
};
|
|
||||||
|
|
||||||
kscan_right: kscan_right {
|
|
||||||
compatible = "zmk,kscan-gpio-matrix";
|
|
||||||
label = "KSCAN_RIGHT";
|
|
||||||
|
|
||||||
diode-direction = "row2col";
|
|
||||||
|
|
||||||
col-gpios
|
|
||||||
= <&right_io 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
|
||||||
, <&right_io 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
|
||||||
, <&right_io 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
|
||||||
, <&right_io 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
|
||||||
, <&right_io 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
|
||||||
;
|
|
||||||
row-gpios
|
|
||||||
= <&right_io 8 (GPIO_ACTIVE_LOW)>
|
|
||||||
, <&right_io 9 (GPIO_ACTIVE_LOW)>
|
|
||||||
, <&right_io 10 (GPIO_ACTIVE_LOW)>
|
|
||||||
, <&right_io 11 (GPIO_ACTIVE_LOW)>
|
|
||||||
;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&i2c2 {
|
|
||||||
pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
|
|
||||||
status = "okay";
|
|
||||||
clock-frequency = <I2C_BITRATE_FAST>;
|
|
||||||
|
|
||||||
right_io: mcp23017@20 {
|
|
||||||
compatible = "microchip,mcp23017";
|
|
||||||
status = "okay";
|
|
||||||
gpio-controller;
|
|
||||||
reg = <0x20>;
|
|
||||||
label = "RIGHT_IO";
|
|
||||||
#gpio-cells = <2>;
|
|
||||||
ngpios = <16>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&usb {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&rtc {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&flash0 {
|
|
||||||
/*
|
|
||||||
* For more information, see:
|
|
||||||
* http: //docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions
|
|
||||||
*/
|
|
||||||
partitions {
|
|
||||||
compatible = "fixed-partitions";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
/* Set 6Kb of storage at the end of the 128Kb of flash */
|
|
||||||
storage_partition: partition@3e800 {
|
|
||||||
label = "storage";
|
|
||||||
reg = <0x0001e800 0x00001800>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2020 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <behaviors.dtsi>
|
|
||||||
#include <dt-bindings/zmk/keys.h>
|
|
||||||
#include <dt-bindings/zmk/bt.h>
|
|
||||||
|
|
||||||
#define NAV_L 1
|
|
||||||
#define OTHER_L 2
|
|
||||||
#define NUM_L 3
|
|
||||||
#define SYM_L 4
|
|
||||||
|
|
||||||
// Using layer taps on thumbs, having quick tap as well helps w/ repeating space/backspace
|
|
||||||
< { quick_tap_ms = <200>; };
|
|
||||||
|
|
||||||
/ {
|
|
||||||
behaviors {
|
|
||||||
hm: homerow_mods {
|
|
||||||
compatible = "zmk,behavior-hold-tap";
|
|
||||||
label = "homerow mods";
|
|
||||||
#binding-cells = <2>;
|
|
||||||
tapping_term_ms = <200>;
|
|
||||||
flavor = "tap-preferred";
|
|
||||||
bindings = <&kp>, <&kp>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
keymap {
|
|
||||||
compatible = "zmk,keymap";
|
|
||||||
|
|
||||||
default_layer {
|
|
||||||
bindings = <
|
|
||||||
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
|
|
||||||
&hm LGUI A &hm LALT S &hm LCTRL D &hm LSHFT F &kp G &kp H &hm RSHFT J &hm RCTRL K &hm LALT L &hm LGUI QUOT
|
|
||||||
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH
|
|
||||||
< NAV_L TAB &kp ENTER < NUM_L SPACE < SYM_L BKSP
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
nav_layer {
|
|
||||||
bindings = <
|
|
||||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
||||||
&trans &trans &trans &trans &trans &trans &kp LARW &kp DARW &kp UARW &kp RARW
|
|
||||||
&trans &trans &trans &trans &trans &trans &kp HOME &kp PG_DN &kp PG_UP &kp END
|
|
||||||
&trans &trans &kp ESC &kp DEL
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
other_layer {
|
|
||||||
bindings = <
|
|
||||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
||||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
||||||
&trans &trans &trans &trans &trans &trans &kp HOME &trans &trans &trans
|
|
||||||
&trans &trans &trans &trans
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
num_layer {
|
|
||||||
bindings = <
|
|
||||||
&kp LBKT &kp N7 &kp N8 &kp N9 &kp RBKT &trans &trans &trans &trans &trans
|
|
||||||
&kp SEMI &kp N4 &kp N5 &kp N6 &kp EQUAL &trans &trans &trans &trans &trans
|
|
||||||
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp BSLH &trans &trans &trans &trans &trans
|
|
||||||
&kp N0 &kp MINUS &trans &trans
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
sym_layer {
|
|
||||||
bindings = <
|
|
||||||
&kp LBRC &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp RBRC &trans &trans &trans &trans &trans
|
|
||||||
&kp COLON &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp PLUS &trans &trans &trans &trans &trans
|
|
||||||
&kp TILDE &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(BSLH) &trans &trans &trans &trans &trans
|
|
||||||
&kp LS(N0) &kp UNDER &trans &trans
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
identifier: ferris_rev02
|
|
||||||
name: Ferris 0.2
|
|
||||||
type: mcu
|
|
||||||
arch: arm
|
|
||||||
toolchain:
|
|
||||||
- zephyr
|
|
||||||
- gnuarmemb
|
|
||||||
- xtools
|
|
||||||
ram: 40
|
|
||||||
supported:
|
|
||||||
- switches
|
|
||||||
- underglow
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: ferris_rev02
|
|
||||||
name: Ferris 0.2
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
features:
|
|
||||||
- keys
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
url: https://github.com/pierrechevalier83/ferris/tree/main/0.2
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
CONFIG_BOARD_FERRIS=y
|
|
||||||
CONFIG_SOC_SERIES_STM32F0X=y
|
|
||||||
CONFIG_SOC_STM32F072XB=y
|
|
||||||
# 48MHz system clock
|
|
||||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000
|
|
||||||
|
|
||||||
# enable PINMUX
|
|
||||||
CONFIG_PINMUX=y
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
|
|
||||||
# Enable i2c
|
|
||||||
CONFIG_I2C=y
|
|
||||||
|
|
||||||
# ZMK Settings
|
|
||||||
CONFIG_ZMK_USB=y
|
|
||||||
CONFIG_ZMK_KSCAN_GPIO_DRIVER=y
|
|
||||||
CONFIG_ZMK_KSCAN_COMPOSITE_DRIVER=y
|
|
||||||
CONFIG_ZMK_KSCAN_MATRIX_POLLING=y
|
|
||||||
CONFIG_USB_SELF_POWERED=n
|
|
||||||
|
|
||||||
# Enable IO multiplexer
|
|
||||||
CONFIG_GPIO_MCP23017=y
|
|
||||||
|
|
||||||
# Needed to reduce this to size that will fit on F072
|
|
||||||
CONFIG_HEAP_MEM_POOL_SIZE=1024
|
|
||||||
|
|
||||||
# clock configuration
|
|
||||||
CONFIG_CLOCK_CONTROL=y
|
|
||||||
|
|
||||||
# Clock configuration for Cube Clock control driver
|
|
||||||
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
|
|
||||||
# use HSI as PLL input
|
|
||||||
CONFIG_CLOCK_STM32_PLL_SRC_HSI=y
|
|
||||||
# produce 48MHz clock at PLL output
|
|
||||||
# CONFIG_CLOCK_STM32_PLL_PREDIV=1
|
|
||||||
CONFIG_CLOCK_STM32_PLL_MULTIPLIER=6
|
|
||||||
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
|
|
||||||
CONFIG_CLOCK_STM32_APB1_PRESCALER=1
|
|
||||||
# CONFIG_CLOCK_STM32_APB2_PRESCALER=1
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
|
||||||
-c
|
|
||||||
-b 0x26000
|
|
||||||
-f 0xADA52840
|
|
||||||
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
|
||||||
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
|
||||||
)
|
|
||||||
|
|
||||||
if(CONFIG_PINMUX)
|
|
||||||
zephyr_library()
|
|
||||||
zephyr_library_sources(pinmux.c)
|
|
||||||
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
|
||||||
endif()
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
config BOARD_ENABLE_DCDC
|
|
||||||
bool "Enable DCDC mode"
|
|
||||||
select SOC_DCDC_NRF52X
|
|
||||||
default y
|
|
||||||
depends on (BOARD_MIKOTO_520)
|
|
||||||
|
|
||||||
choice BOARD_MIKOTO_CHARGER_CURRENT
|
|
||||||
prompt "Charge current to supply to attached batteries"
|
|
||||||
depends on (BOARD_MIKOTO_520)
|
|
||||||
|
|
||||||
config BOARD_MIKOTO_CHARGER_CURRENT_40MA
|
|
||||||
bool "40mA charge current, for battery capacity 40mAh or higher"
|
|
||||||
|
|
||||||
config BOARD_MIKOTO_CHARGER_CURRENT_100MA
|
|
||||||
bool "100mA charge current, for battery capacity 100mAh or higher"
|
|
||||||
|
|
||||||
config BOARD_MIKOTO_CHARGER_CURRENT_150MA
|
|
||||||
bool "150mA charge current, for battery capacity 150mAh or higher"
|
|
||||||
|
|
||||||
config BOARD_MIKOTO_CHARGER_CURRENT_250MA
|
|
||||||
bool "250mA charge current, for battery capacity 250mAh or higher"
|
|
||||||
|
|
||||||
config BOARD_MIKOTO_CHARGER_CURRENT_350MA
|
|
||||||
bool "350mA charge current, for battery capacity 350mAh or higher"
|
|
||||||
|
|
||||||
config BOARD_MIKOTO_CHARGER_CURRENT_NONE
|
|
||||||
bool "Disable charge current"
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# mikoto board configuration
|
|
||||||
|
|
||||||
# Copyright (c) 2020 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
config BOARD_MIKOTO_520
|
|
||||||
bool "mikoto_520"
|
|
||||||
depends on SOC_NRF52840_QIAA
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
# Electronut Labs Papyr board configuration
|
|
||||||
|
|
||||||
# Copyright (c) 2020 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
if BOARD_MIKOTO_520
|
|
||||||
|
|
||||||
config BOARD
|
|
||||||
default "mikoto"
|
|
||||||
|
|
||||||
if USB
|
|
||||||
|
|
||||||
config USB_NRFX
|
|
||||||
default y
|
|
||||||
|
|
||||||
config USB_DEVICE_STACK
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # USB
|
|
||||||
|
|
||||||
config BT_CTLR
|
|
||||||
default BT
|
|
||||||
|
|
||||||
config ZMK_BLE
|
|
||||||
default y
|
|
||||||
|
|
||||||
config ZMK_USB
|
|
||||||
default y
|
|
||||||
|
|
||||||
config PINMUX
|
|
||||||
default y
|
|
||||||
|
|
||||||
choice BOARD_MIKOTO_CHARGER_CURRENT
|
|
||||||
default BOARD_MIKOTO_CHARGER_CURRENT_100MA
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_MIKOTO_520
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 4 0> /* D0 */
|
|
||||||
, <1 0 &gpio0 8 0> /* D1 */
|
|
||||||
, <2 0 &gpio0 17 0> /* D2 */
|
|
||||||
, <3 0 &gpio0 20 0> /* D3 */
|
|
||||||
, <4 0 &gpio0 22 0> /* D4/A6 */
|
|
||||||
, <5 0 &gpio0 24 0> /* D5 */
|
|
||||||
, <6 0 &gpio1 0 0> /* D6/A7 */
|
|
||||||
, <7 0 &gpio1 2 0> /* D7 */
|
|
||||||
, <8 0 &gpio1 4 0> /* D8/A8 */
|
|
||||||
, <9 0 &gpio1 6 0> /* D9/A9 */
|
|
||||||
, <10 0 &gpio0 9 0> /* D10/A10 */
|
|
||||||
, <16 0 &gpio0 10 0> /* D16 */
|
|
||||||
, <14 0 &gpio1 13 0> /* D14 */
|
|
||||||
, <15 0 &gpio0 2 0> /* D15 */
|
|
||||||
, <18 0 &gpio0 29 0> /* D18/A0 */
|
|
||||||
, <19 0 &gpio0 31 0> /* D19/A1 */
|
|
||||||
, <20 0 &gpio0 25 0> /* D20/A2 */
|
|
||||||
, <21 0 &gpio0 11 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 29 0> /* D18/A0 */
|
|
||||||
, <1 0 &gpio0 31 0> /* D19/A1 */
|
|
||||||
, <2 0 &gpio0 25 0> /* D20/A2 */
|
|
||||||
, <3 0 &gpio0 11 0> /* D21/A3 */
|
|
||||||
, <6 0 &gpio0 22 0> /* D4/A6 */
|
|
||||||
, <7 0 &gpio1 0 0> /* D6/A7 */
|
|
||||||
, <8 0 &gpio1 4 0> /* D8/A8 */
|
|
||||||
, <9 0 &gpio1 6 0> /* D9/A9 */
|
|
||||||
, <10 0 &gpio0 9 0> /* D10/A10 */
|
|
||||||
;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
pro_micro_d: &pro_micro {};
|
|
||||||
pro_micro_i2c: &i2c0 {};
|
|
||||||
pro_micro_spi: &spi0 {};
|
|
||||||
pro_micro_serial: &uart0 {};
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
|
||||||
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
|
|
||||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
|
||||||
@@ -1,115 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2020 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
|
||||||
#include "arduino_pro_micro_pins.dtsi"
|
|
||||||
|
|
||||||
/ {
|
|
||||||
model = "mikoto";
|
|
||||||
compatible = "zhiayang,mikoto";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
zephyr,code-partition = &code_partition;
|
|
||||||
zephyr,sram = &sram0;
|
|
||||||
zephyr,flash = &flash0;
|
|
||||||
};
|
|
||||||
|
|
||||||
leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
blue_led: led_0 {
|
|
||||||
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
|
||||||
label = "Blue LED";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
ext-power {
|
|
||||||
compatible = "zmk,ext-power-generic";
|
|
||||||
label = "EXT_POWER";
|
|
||||||
control-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
vbatt {
|
|
||||||
compatible = "zmk,battery-voltage-divider";
|
|
||||||
label = "BATTERY";
|
|
||||||
io-channels = <&adc 2>;
|
|
||||||
output-ohms = <10000000>;
|
|
||||||
full-ohms = <(10000000 + 4000000)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&adc {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpiote {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio0 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio1 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&i2c0 {
|
|
||||||
compatible = "nordic,nrf-twi";
|
|
||||||
sda-pin = <17>;
|
|
||||||
scl-pin = <20>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&uart0 {
|
|
||||||
compatible = "nordic,nrf-uarte";
|
|
||||||
tx-pin = <8>;
|
|
||||||
rx-pin = <4>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&usbd {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
&flash0 {
|
|
||||||
/*
|
|
||||||
* For more information, see:
|
|
||||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
|
||||||
*/
|
|
||||||
partitions {
|
|
||||||
compatible = "fixed-partitions";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
sd_partition: partition@0 {
|
|
||||||
label = "softdevice";
|
|
||||||
reg = <0x00000000 0x00026000>;
|
|
||||||
};
|
|
||||||
code_partition: partition@26000 {
|
|
||||||
label = "code_partition";
|
|
||||||
reg = <0x00026000 0x000c6000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The flash starting at 0x000ec000 and ending at
|
|
||||||
* 0x000f3fff is reserved for use by the application.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Storage partition will be used by FCB/LittleFS/NVS
|
|
||||||
* if enabled.
|
|
||||||
*/
|
|
||||||
storage_partition: partition@ec000 {
|
|
||||||
label = "storage";
|
|
||||||
reg = <0x000ec000 0x00008000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
boot_partition: partition@f4000 {
|
|
||||||
label = "adafruit_boot";
|
|
||||||
reg = <0x000f4000 0x0000c000>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
identifier: mikoto_520
|
|
||||||
name: mikoto_520
|
|
||||||
type: mcu
|
|
||||||
arch: arm
|
|
||||||
toolchain:
|
|
||||||
- zephyr
|
|
||||||
- gnuarmemb
|
|
||||||
- xtools
|
|
||||||
supported:
|
|
||||||
- adc
|
|
||||||
- usb_device
|
|
||||||
- ble
|
|
||||||
- ieee802154
|
|
||||||
- pwm
|
|
||||||
- watchdog
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: mikoto_520
|
|
||||||
name: Mikoto 5.20
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
url: https://github.com/zhiayang/mikoto
|
|
||||||
exposes: [pro_micro]
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_NRF52X=y
|
|
||||||
CONFIG_SOC_NRF52840_QIAA=y
|
|
||||||
CONFIG_BOARD_MIKOTO_520=y
|
|
||||||
|
|
||||||
# Enable MPU
|
|
||||||
CONFIG_ARM_MPU=y
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
|
||||||
CONFIG_NVS=y
|
|
||||||
CONFIG_SETTINGS_NVS=y
|
|
||||||
CONFIG_FLASH=y
|
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
||||||
CONFIG_FLASH_MAP=y
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2020 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_mikoto_init(const struct device *port) {
|
|
||||||
ARG_UNUSED(port);
|
|
||||||
|
|
||||||
#if CONFIG_BOARD_MIKOTO_520
|
|
||||||
const struct device *p0 = device_get_binding("GPIO_0");
|
|
||||||
const struct device *p1 = device_get_binding("GPIO_1");
|
|
||||||
#if CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_40MA
|
|
||||||
gpio_pin_configure(p0, 26, GPIO_INPUT | GPIO_PULL_DOWN);
|
|
||||||
gpio_pin_configure(p1, 15, GPIO_INPUT);
|
|
||||||
#elif CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_100MA
|
|
||||||
gpio_pin_configure(p0, 26, GPIO_OUTPUT);
|
|
||||||
gpio_pin_set(p0, 26, 0);
|
|
||||||
gpio_pin_configure(p1, 15, GPIO_INPUT);
|
|
||||||
#elif CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_150MA
|
|
||||||
gpio_pin_configure(p0, 26, GPIO_OUTPUT);
|
|
||||||
gpio_pin_set(p0, 26, 0);
|
|
||||||
gpio_pin_configure(p1, 15, GPIO_INPUT | GPIO_PULL_DOWN);
|
|
||||||
#elif CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_250MA
|
|
||||||
gpio_pin_configure(p0, 26, GPIO_INPUT);
|
|
||||||
gpio_pin_configure(p1, 15, GPIO_OUTPUT);
|
|
||||||
gpio_pin_set(p1, 15, 0);
|
|
||||||
#elif CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_350MA
|
|
||||||
gpio_pin_configure(p0, 26, GPIO_OUTPUT);
|
|
||||||
gpio_pin_set(p0, 26, 0);
|
|
||||||
gpio_pin_configure(p1, 15, GPIO_OUTPUT);
|
|
||||||
gpio_pin_set(p1, 15, 0);
|
|
||||||
#elif CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_NONE
|
|
||||||
gpio_pin_configure(p0, 26, GPIO_INPUT);
|
|
||||||
gpio_pin_configure(p1, 15, GPIO_INPUT);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
SYS_INIT(pinmux_mikoto_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY);
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
|
||||||
-c
|
|
||||||
-b 0x1000
|
|
||||||
-f 0xADA52840
|
|
||||||
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
|
||||||
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
|
||||||
)
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# Copyright (c) 2021 Nick Winans
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
config BOARD_ENABLE_DCDC
|
|
||||||
bool "Enable DCDC mode"
|
|
||||||
select SOC_DCDC_NRF52X
|
|
||||||
default y
|
|
||||||
depends on BOARD_NICE60
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# Copyright (c) 2021 Nick Winans
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
config BOARD_NICE60
|
|
||||||
bool "nice!60"
|
|
||||||
depends on SOC_NRF52840_QIAA
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
# Copyright (c) 2021 Nick Winans
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
if BOARD_NICE60
|
|
||||||
|
|
||||||
config ZMK_KEYBOARD_NAME
|
|
||||||
default "nice!60"
|
|
||||||
|
|
||||||
if USB
|
|
||||||
|
|
||||||
config USB_NRFX
|
|
||||||
default y
|
|
||||||
|
|
||||||
config USB_DEVICE_STACK
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # USB
|
|
||||||
|
|
||||||
config BT_CTLR
|
|
||||||
default BT
|
|
||||||
|
|
||||||
config ZMK_BLE
|
|
||||||
default y
|
|
||||||
|
|
||||||
config ZMK_USB
|
|
||||||
default y
|
|
||||||
|
|
||||||
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_NICE60
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# nice!60
|
|
||||||

|
|
||||||
|
|
||||||
The nice!60 is a hotswap 60% made by Nice Keyboards. https://nicekeyboards.com/nice-60
|
|
||||||
|
|
||||||
## Building nice!60 ZMK firmware
|
|
||||||
```
|
|
||||||
west build -p -b nice60
|
|
||||||
```
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# Copyright (c) 2021 Nick Winans
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
set(OPENOCD_NRF5_SUBFAMILY nrf52)
|
|
||||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
|
||||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
|
||||||
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)
|
|
||||||
@@ -1,172 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Nick Winans
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
|
||||||
#include <dt-bindings/zmk/matrix_transform.h>
|
|
||||||
|
|
||||||
/ {
|
|
||||||
model = "nice!60";
|
|
||||||
compatible = "nice,60";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
zephyr,code-partition = &code_partition;
|
|
||||||
zephyr,sram = &sram0;
|
|
||||||
zephyr,flash = &flash0;
|
|
||||||
zmk,kscan = &kscan0;
|
|
||||||
zmk,matrix_transform = &default_transform;
|
|
||||||
zmk,underglow = &led_strip;
|
|
||||||
};
|
|
||||||
|
|
||||||
default_transform: keymap_transform_0 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <14>;
|
|
||||||
rows = <5>;
|
|
||||||
map = <
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
|
||||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,13)
|
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(4,9) RC(4,10) RC(4,11) RC(4,13)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
kscan0: kscan {
|
|
||||||
compatible = "zmk,kscan-gpio-matrix";
|
|
||||||
label = "KSCAN";
|
|
||||||
|
|
||||||
diode-direction = "col2row";
|
|
||||||
row-gpios
|
|
||||||
= <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
, <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
|
||||||
;
|
|
||||||
col-gpios
|
|
||||||
= <&gpio1 15 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 29 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 31 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 30 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 28 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 2 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio0 3 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 3 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 7 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 4 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 6 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 5 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 1 GPIO_ACTIVE_HIGH>
|
|
||||||
, <&gpio1 2 GPIO_ACTIVE_HIGH>
|
|
||||||
;
|
|
||||||
};
|
|
||||||
|
|
||||||
leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
blue_led: led_0 {
|
|
||||||
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
|
|
||||||
label = "Blue LED";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
ext-power {
|
|
||||||
compatible = "zmk,ext-power-generic";
|
|
||||||
label = "EXT_POWER";
|
|
||||||
control-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
vbatt {
|
|
||||||
compatible = "zmk,battery-voltage-divider";
|
|
||||||
label = "BATTERY";
|
|
||||||
io-channels = <&adc 2>;
|
|
||||||
output-ohms = <2000000>;
|
|
||||||
full-ohms = <(2000000 + 806000)>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&adc {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpiote {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio0 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio1 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&spi0 {
|
|
||||||
compatible = "nordic,nrf-spim";
|
|
||||||
/* Cannot be used together with i2c0. */
|
|
||||||
status = "okay";
|
|
||||||
sck-pin = <12>;
|
|
||||||
mosi-pin = <27>;
|
|
||||||
miso-pin = <13>;
|
|
||||||
|
|
||||||
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 = <12>; /* LED strip length */
|
|
||||||
spi-one-frame = <0x70>;
|
|
||||||
spi-zero-frame = <0x40>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&usbd {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&flash0 {
|
|
||||||
/*
|
|
||||||
* For more information, see:
|
|
||||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
|
||||||
*/
|
|
||||||
partitions {
|
|
||||||
compatible = "fixed-partitions";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
sd_partition: partition@0 {
|
|
||||||
label = "mbr";
|
|
||||||
reg = <0x00000000 0x00001000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
code_partition: partition@1000 {
|
|
||||||
label = "code_partition";
|
|
||||||
reg = <0x00001000 0x000d3000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The flash starting at 0x000d4000 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@d4000 {
|
|
||||||
label = "storage";
|
|
||||||
reg = <0x000d4000 0x00020000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
boot_partition: partition@f4000 {
|
|
||||||
label = "adafruit_boot";
|
|
||||||
reg = <0x000f4000 0x0000c000>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 Nick Winans
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <behaviors.dtsi>
|
|
||||||
#include <dt-bindings/zmk/keys.h>
|
|
||||||
#include <dt-bindings/zmk/rgb.h>
|
|
||||||
#include <dt-bindings/zmk/bt.h>
|
|
||||||
|
|
||||||
/ {
|
|
||||||
keymap {
|
|
||||||
compatible = "zmk,keymap";
|
|
||||||
|
|
||||||
default_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
|
|
||||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" |
|
|
||||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
|
||||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
|
||||||
// | CTL | WIN | ALT | SPACE | ALT | WIN | MO(1) | CTL |
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&gresc &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
|
|
||||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
|
|
||||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
|
|
||||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
|
|
||||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RGUI &mo 1 &kp RCTRL
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
|
|
||||||
rgb_layer {
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
// | BT CLR | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | EFFECT REV |
|
|
||||||
// | BT 1 | | UP | | HUEUP | SATUP | BRIUP | SPDUP | | | | | | |
|
|
||||||
// | BT 2 | LT | DN | RT | HUEDN | SATDN | BRIDN | SPDDN | | | | | EFFECT FORW |
|
|
||||||
// | BT 3 | | | | | | | | | | | |
|
|
||||||
// | BT 4 | | | TOG RGB | PRT SCR | | | DEL |
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
bindings = <
|
|
||||||
&bt BT_CLR &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &rgb_ug RGB_EFR
|
|
||||||
&bt BT_SEL 0 &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &trans &trans &trans &trans &trans &trans
|
|
||||||
&bt BT_SEL 1 &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &trans &trans &trans &trans &rgb_ug RGB_EFF
|
|
||||||
&bt BT_SEL 2 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
||||||
&bt BT_SEL 3 &trans &trans &rgb_ug RGB_TOG &kp PSCRN &trans &trans &kp DEL
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
identifier: nice60
|
|
||||||
name: nice!60
|
|
||||||
type: mcu
|
|
||||||
arch: arm
|
|
||||||
toolchain:
|
|
||||||
- zephyr
|
|
||||||
- gnuarmemb
|
|
||||||
supported:
|
|
||||||
- adc
|
|
||||||
- usb_device
|
|
||||||
- ble
|
|
||||||
- ieee802154
|
|
||||||
- pwm
|
|
||||||
- watchdog
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: nice60
|
|
||||||
name: nice!60
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
features:
|
|
||||||
- keys
|
|
||||||
- underglow
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
url: https://nicekeyboards.com/nice-60
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Copyright (c) 2021 Nick Winans
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_NRF52X=y
|
|
||||||
CONFIG_SOC_NRF52840_QIAA=y
|
|
||||||
CONFIG_BOARD_NICE60=y
|
|
||||||
|
|
||||||
# Enable MPU
|
|
||||||
CONFIG_ARM_MPU=y
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
|
||||||
CONFIG_NVS=y
|
|
||||||
CONFIG_SETTINGS_NVS=y
|
|
||||||
CONFIG_FLASH=y
|
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
||||||
CONFIG_FLASH_MAP=y
|
|
||||||
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW=y
|
|
||||||
CONFIG_WS2812_STRIP=y
|
|
||||||
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=160
|
|
||||||
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
|
|
||||||
@@ -4,4 +4,4 @@ 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_NICE_NANO || BOARD_NICE_NANO_V2)
|
depends on BOARD_NICE_NANO
|
||||||
|
|||||||
@@ -7,7 +7,3 @@ config BOARD_NICE_NANO
|
|||||||
bool "nice!nano"
|
bool "nice!nano"
|
||||||
depends on SOC_NRF52840_QIAA
|
depends on SOC_NRF52840_QIAA
|
||||||
|
|
||||||
config BOARD_NICE_NANO_V2
|
|
||||||
bool "nice!nano v2"
|
|
||||||
depends on SOC_NRF52840_QIAA
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Copyright (c) 2021 The ZMK Contributors
|
# Copyright (c) 2020 Pete Johanson
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
if BOARD_NICE_NANO || BOARD_NICE_NANO_V2
|
if BOARD_NICE_NANO
|
||||||
|
|
||||||
config BOARD
|
config BOARD
|
||||||
default "nice_nano"
|
default "nice_nano"
|
||||||
@@ -25,18 +25,7 @@ config ZMK_BLE
|
|||||||
config ZMK_USB
|
config ZMK_USB
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif # BOARD_NICE_NANO || BOARD_NICE_NANO_V2
|
|
||||||
|
|
||||||
if BOARD_NICE_NANO
|
|
||||||
|
|
||||||
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif # BOARD_NICE_NANO
|
endif # BOARD_NICE_NANO
|
||||||
|
|
||||||
if BOARD_NICE_NANO_V2
|
|
||||||
|
|
||||||
config ZMK_BATTERY_NRF_VDDH
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_NICE_NANO_V2
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
pro_micro: connector {
|
pro_micro_d: connector_d {
|
||||||
compatible = "arduino-pro-micro";
|
compatible = "arduino-pro-micro";
|
||||||
#gpio-cells = <2>;
|
#gpio-cells = <2>;
|
||||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
@@ -25,10 +25,6 @@
|
|||||||
, <16 0 &gpio0 10 0> /* D16 */
|
, <16 0 &gpio0 10 0> /* D16 */
|
||||||
, <14 0 &gpio1 11 0> /* D14 */
|
, <14 0 &gpio1 11 0> /* D14 */
|
||||||
, <15 0 &gpio1 13 0> /* D15 */
|
, <15 0 &gpio1 13 0> /* D15 */
|
||||||
, <18 0 &gpio1 15 0> /* D18/A0 */
|
|
||||||
, <19 0 &gpio0 2 0> /* D19/A1 */
|
|
||||||
, <20 0 &gpio0 29 0> /* D20/A2 */
|
|
||||||
, <21 0 &gpio0 31 0> /* D21/A3 */
|
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -38,10 +34,10 @@
|
|||||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
gpio-map-pass-thru = <0 0x3f>;
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
gpio-map
|
gpio-map
|
||||||
= <0 0 &gpio1 15 0> /* D18/A0 */
|
= <0 0 &gpio1 15 0> /* A0 */
|
||||||
, <1 0 &gpio0 2 0> /* D19/A1 */
|
, <1 0 &gpio0 2 0> /* A1 */
|
||||||
, <2 0 &gpio0 29 0> /* D20/A2 */
|
, <2 0 &gpio0 29 0> /* A2 */
|
||||||
, <3 0 &gpio0 31 0> /* D21/A3 */
|
, <3 0 &gpio0 31 0> /* A3 */
|
||||||
, <6 0 &gpio0 22 0> /* D4/A6 */
|
, <6 0 &gpio0 22 0> /* D4/A6 */
|
||||||
, <7 0 &gpio1 0 0> /* D6/A7 */
|
, <7 0 &gpio1 0 0> /* D6/A7 */
|
||||||
, <8 0 &gpio1 4 0> /* D8/A8 */
|
, <8 0 &gpio1 4 0> /* D8/A8 */
|
||||||
@@ -51,7 +47,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pro_micro_d: &pro_micro {};
|
|
||||||
pro_micro_i2c: &i2c0 {};
|
pro_micro_i2c: &i2c0 {};
|
||||||
pro_micro_spi: &spi0 {};
|
pro_micro_spi: &spi0 {};
|
||||||
pro_micro_serial: &uart0 {};
|
pro_micro_serial: &uart0 {};
|
||||||
|
|||||||
@@ -1,13 +1,31 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 The ZMK Contributors
|
* Copyright (c) 2020 Pete Johanson
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include "nice_nano.dtsi"
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
|
#include "arduino_pro_micro_pins.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
model = "nice!nano";
|
||||||
|
compatible = "nice,nano";
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
zephyr,code-partition = &code_partition;
|
||||||
|
zephyr,sram = &sram0;
|
||||||
|
zephyr,flash = &flash0;
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
blue_led: led_0 {
|
||||||
|
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
||||||
|
label = "Blue LED";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
ext-power {
|
ext-power {
|
||||||
compatible = "zmk,ext-power-generic";
|
compatible = "zmk,ext-power-generic";
|
||||||
label = "EXT_POWER";
|
label = "EXT_POWER";
|
||||||
@@ -22,3 +40,76 @@
|
|||||||
full-ohms = <(2000000 + 806000)>;
|
full-ohms = <(2000000 + 806000)>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&adc {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpiote {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio1 {
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
&flash0 {
|
||||||
|
/*
|
||||||
|
* For more information, see:
|
||||||
|
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
||||||
|
*/
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
sd_partition: partition@0 {
|
||||||
|
label = "softdevice";
|
||||||
|
reg = <0x00000000 0x00026000>;
|
||||||
|
};
|
||||||
|
code_partition: partition@26000 {
|
||||||
|
label = "code_partition";
|
||||||
|
reg = <0x00026000 0x000c6000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The flash starting at 0x000ec000 and ending at
|
||||||
|
* 0x000f3fff is reserved for use by the application.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Storage partition will be used by FCB/LittleFS/NVS
|
||||||
|
* if enabled.
|
||||||
|
*/
|
||||||
|
storage_partition: partition@ec000 {
|
||||||
|
label = "storage";
|
||||||
|
reg = <0x000ec000 0x00008000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot_partition: partition@f4000 {
|
||||||
|
label = "adafruit_boot";
|
||||||
|
reg = <0x000f4000 0x0000c000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|||||||
@@ -1,100 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
|
||||||
#include "arduino_pro_micro_pins.dtsi"
|
|
||||||
|
|
||||||
/ {
|
|
||||||
model = "nice!nano";
|
|
||||||
compatible = "nice,nano";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
zephyr,code-partition = &code_partition;
|
|
||||||
zephyr,sram = &sram0;
|
|
||||||
zephyr,flash = &flash0;
|
|
||||||
};
|
|
||||||
|
|
||||||
leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
blue_led: led_0 {
|
|
||||||
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
|
||||||
label = "Blue LED";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&adc {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpiote {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio0 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio1 {
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
&flash0 {
|
|
||||||
/*
|
|
||||||
* For more information, see:
|
|
||||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
|
||||||
*/
|
|
||||||
partitions {
|
|
||||||
compatible = "fixed-partitions";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
sd_partition: partition@0 {
|
|
||||||
label = "softdevice";
|
|
||||||
reg = <0x00000000 0x00026000>;
|
|
||||||
};
|
|
||||||
code_partition: partition@26000 {
|
|
||||||
label = "code_partition";
|
|
||||||
reg = <0x00026000 0x000c6000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The flash starting at 0x000ec000 and ending at
|
|
||||||
* 0x000f3fff is reserved for use by the application.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Storage partition will be used by FCB/LittleFS/NVS
|
|
||||||
* if enabled.
|
|
||||||
*/
|
|
||||||
storage_partition: partition@ec000 {
|
|
||||||
label = "storage";
|
|
||||||
reg = <0x000ec000 0x00008000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
boot_partition: partition@f4000 {
|
|
||||||
label = "adafruit_boot";
|
|
||||||
reg = <0x000f4000 0x0000c000>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: nice_nano
|
|
||||||
name: nice!nano v1
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
url: https://nicekeyboards.com/nice-nano
|
|
||||||
exposes: [pro_micro]
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2021 The ZMK Contributors
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
#include "nice_nano.dtsi"
|
|
||||||
|
|
||||||
/ {
|
|
||||||
ext-power {
|
|
||||||
compatible = "zmk,ext-power-generic";
|
|
||||||
label = "EXT_POWER";
|
|
||||||
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
|
|
||||||
init-delay-ms = <10>;
|
|
||||||
};
|
|
||||||
|
|
||||||
vbatt {
|
|
||||||
compatible = "zmk,battery-nrf-vddh";
|
|
||||||
label = "BATTERY";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
identifier: nice_nano_v2
|
|
||||||
name: nice!nano v2
|
|
||||||
type: mcu
|
|
||||||
arch: arm
|
|
||||||
toolchain:
|
|
||||||
- zephyr
|
|
||||||
- gnuarmemb
|
|
||||||
- xtools
|
|
||||||
supported:
|
|
||||||
- adc
|
|
||||||
- usb_device
|
|
||||||
- ble
|
|
||||||
- ieee802154
|
|
||||||
- pwm
|
|
||||||
- watchdog
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: nice_nano_v2
|
|
||||||
name: nice!nano v2
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
url: https://nicekeyboards.com/nice-nano
|
|
||||||
exposes: [pro_micro]
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_NRF52X=y
|
|
||||||
CONFIG_SOC_NRF52840_QIAA=y
|
|
||||||
CONFIG_BOARD_NICE_NANO_V2=y
|
|
||||||
|
|
||||||
# Enable MPU
|
|
||||||
CONFIG_ARM_MPU=y
|
|
||||||
|
|
||||||
# enable GPIO
|
|
||||||
CONFIG_GPIO=y
|
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
|
||||||
CONFIG_NVS=y
|
|
||||||
CONFIG_SETTINGS_NVS=y
|
|
||||||
CONFIG_FLASH=y
|
|
||||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
||||||
CONFIG_FLASH_MAP=y
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: nrf52840_m2
|
|
||||||
name: nRF52840 M.2 Module
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
url: https://wiki.makerdiary.com/nrf52840-m2/
|
|
||||||
exposes: [makerdiary_nrf52840_m2]
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
pro_micro: connector {
|
pro_micro_d: connector_d {
|
||||||
compatible = "arduino-pro-micro";
|
compatible = "arduino-pro-micro";
|
||||||
#gpio-cells = <2>;
|
#gpio-cells = <2>;
|
||||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
@@ -24,12 +24,8 @@
|
|||||||
, <9 0 &gpio1 6 0> /* D9/A9 */
|
, <9 0 &gpio1 6 0> /* D9/A9 */
|
||||||
, <10 0 &gpio1 11 0> /* D10/A10 */
|
, <10 0 &gpio1 11 0> /* D10/A10 */
|
||||||
, <16 0 &gpio0 28 0> /* D16 */
|
, <16 0 &gpio0 28 0> /* D16 */
|
||||||
, <14 0 &gpio0 3 0> /* D14 */
|
, <14 0 &gpio0 3 0> /* D14 */
|
||||||
, <15 0 &gpio1 13 0> /* D15 */
|
, <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 */
|
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -39,10 +35,10 @@
|
|||||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
gpio-map-pass-thru = <0 0x3f>;
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
gpio-map
|
gpio-map
|
||||||
= <0 0 &gpio0 2 0> /* D18/A0 */
|
= <0 0 &gpio0 2 0> /* A0 */
|
||||||
, <1 0 &gpio0 29 0> /* D19/A1 */
|
, <1 0 &gpio0 29 0> /* A1 */
|
||||||
, <2 0 &gpio0 31 0> /* D20/A2 */
|
, <2 0 &gpio0 31 0> /* A2 */
|
||||||
, <3 0 &gpio0 30 0> /* D21/A3 */
|
, <3 0 &gpio0 30 0> /* A3 */
|
||||||
, <6 0 &gpio0 20 0> /* D4/A6 */
|
, <6 0 &gpio0 20 0> /* D4/A6 */
|
||||||
, <7 0 &gpio0 24 0> /* D6/A7 */
|
, <7 0 &gpio0 24 0> /* D6/A7 */
|
||||||
, <8 0 &gpio0 10 0> /* D8/A8 */
|
, <8 0 &gpio0 10 0> /* D8/A8 */
|
||||||
@@ -53,7 +49,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
pro_micro_d: &pro_micro {};
|
|
||||||
pro_micro_i2c: &i2c0 {};
|
pro_micro_i2c: &i2c0 {};
|
||||||
pro_micro_spi: &spi0 {};
|
pro_micro_spi: &spi0 {};
|
||||||
pro_micro_serial: &uart0 {};
|
pro_micro_serial: &uart0 {};
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
pro_micro: connector {
|
pro_micro_d: connector_d {
|
||||||
compatible = "arduino-pro-micro";
|
compatible = "arduino-pro-micro";
|
||||||
#gpio-cells = <2>;
|
#gpio-cells = <2>;
|
||||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
@@ -21,14 +21,10 @@
|
|||||||
, <7 0 &gpio0 3 0> /* D7 */
|
, <7 0 &gpio0 3 0> /* D7 */
|
||||||
, <8 0 &gpio0 28 0> /* D8/A8 */
|
, <8 0 &gpio0 28 0> /* D8/A8 */
|
||||||
, <9 0 &gpio1 11 0> /* D9/A9 */
|
, <9 0 &gpio1 11 0> /* D9/A9 */
|
||||||
, <10 0 &gpio1 6 0> /* D10/A10 */
|
, <10 0 &gpio1 6 0> /* D10/A10 */
|
||||||
, <16 0 &gpio0 10 0> /* D16 */
|
, <16 0 &gpio0 10 0> /* D16 */
|
||||||
, <14 0 &gpio0 9 0> /* D14 */
|
, <14 0 &gpio0 9 0> /* D14 */
|
||||||
, <15 0 &gpio0 24 0> /* D15 */
|
, <15 0 &gpio0 24 0> /* D15 */
|
||||||
, <18 0 &gpio0 13 0> /* D18/A0 */
|
|
||||||
, <19 0 &gpio0 20 0> /* D19/A1 */
|
|
||||||
, <20 0 &gpio0 17 0> /* D20/A2 */
|
|
||||||
, <21 0 &gpio0 15 0> /* D21/A3 */
|
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -38,10 +34,10 @@
|
|||||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
gpio-map-pass-thru = <0 0x3f>;
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
gpio-map
|
gpio-map
|
||||||
= <0 0 &gpio0 13 0> /* D18/A0 */
|
= <0 0 &gpio0 13 0> /* A0 */
|
||||||
, <1 0 &gpio0 20 0> /* D19/A1 */
|
, <1 0 &gpio0 20 0> /* A1 */
|
||||||
, <2 0 &gpio0 17 0> /* D20/A2 */
|
, <2 0 &gpio0 17 0> /* A2 */
|
||||||
, <3 0 &gpio0 15 0> /* D21/A3 */
|
, <3 0 &gpio0 15 0> /* A3 */
|
||||||
, <6 0 &gpio0 29 0> /* D4/A6 */
|
, <6 0 &gpio0 29 0> /* D4/A6 */
|
||||||
, <7 0 &gpio1 13 0> /* D6/A7 */
|
, <7 0 &gpio1 13 0> /* D6/A7 */
|
||||||
, <8 0 &gpio0 28 0> /* D8/A8 */
|
, <8 0 &gpio0 28 0> /* D8/A8 */
|
||||||
@@ -51,7 +47,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pro_micro_d: &pro_micro {};
|
|
||||||
pro_micro_i2c: &i2c0 {};
|
pro_micro_i2c: &i2c0 {};
|
||||||
pro_micro_spi: &spi0 {};
|
pro_micro_spi: &spi0 {};
|
||||||
pro_micro_serial: &uart0 {};
|
pro_micro_serial: &uart0 {};
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: nrfmicro_11
|
|
||||||
name: nRFMicro 1.1/1.2
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
url: https://github.com/joric/nrfmicro/
|
|
||||||
exposes: [pro_micro]
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: nrfmicro_11_flipped
|
|
||||||
name: nRFMicro 1.1 (flipped)
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
url: https://github.com/joric/nrfmicro/
|
|
||||||
exposes: [pro_micro]
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: nrfmicro_13
|
|
||||||
name: nRFMicro 1.3/1.4
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
- ble
|
|
||||||
url: https://github.com/joric/nrfmicro/
|
|
||||||
exposes: [pro_micro]
|
|
||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <st/f3/stm32f303Xc.dtsi>
|
#include <st/f3/stm32f303Xc.dtsi>
|
||||||
#include <dt-bindings/zmk/matrix_transform.h>
|
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "Plack PCD, rev6";
|
model = "Plack PCD, rev6";
|
||||||
@@ -16,13 +15,11 @@
|
|||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
zmk,kscan = &kscan0;
|
zmk,kscan = &kscan0;
|
||||||
zmk,matrix_transform = &layout_grid_transform;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
kscan0: kscan {
|
kscan0: kscan {
|
||||||
compatible = "zmk,kscan-gpio-matrix";
|
compatible = "zmk,kscan-gpio-matrix";
|
||||||
label = "KSCAN";
|
label = "KSCAN";
|
||||||
diode-direction = "col2row";
|
|
||||||
row-gpios
|
row-gpios
|
||||||
= <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
= <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
, <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
, <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
@@ -43,42 +40,6 @@
|
|||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
layout_grid_transform:
|
|
||||||
keymap_transform_0 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <6>;
|
|
||||||
rows = <8>;
|
|
||||||
map = <
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
|
|
||||||
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) RC(6,3) RC(6,4) RC(6,5)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,4) RC(7,5) RC(7,0) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
layout_mit_transform:
|
|
||||||
keymap_transform_1 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <6>;
|
|
||||||
rows = <8>;
|
|
||||||
map = <
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
|
|
||||||
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) RC(6,3) RC(6,4) RC(6,5)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,4) RC(7,0) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
layout_2x2u_transform:
|
|
||||||
keymap_transform_2 {
|
|
||||||
compatible = "zmk,matrix-transform";
|
|
||||||
columns = <6>;
|
|
||||||
rows = <8>;
|
|
||||||
map = <
|
|
||||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
|
|
||||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
|
|
||||||
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) RC(6,3) RC(6,4) RC(6,5)
|
|
||||||
RC(3,0) RC(3,1) RC(3,2) RC(7,3) RC(7,5) RC(7,1) RC(7,2) RC(3,3) RC(3,4) RC(3,5)
|
|
||||||
>;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&usb {
|
&usb {
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: planck_rev6
|
|
||||||
name: Planck Rev6
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
features:
|
|
||||||
- keys
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
url: https://olkb.com/collections/planck
|
|
||||||
7
app/boards/arm/proton_c/CMakeLists.txt
Normal file
7
app/boards/arm/proton_c/CMakeLists.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
if(CONFIG_PINMUX)
|
||||||
|
zephyr_library()
|
||||||
|
zephyr_library_sources(pinmux.c)
|
||||||
|
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
||||||
|
endif()
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
pro_micro: connector {
|
pro_micro_d: connector_d {
|
||||||
compatible = "arduino-pro-micro";
|
compatible = "arduino-pro-micro";
|
||||||
#gpio-cells = <2>;
|
#gpio-cells = <2>;
|
||||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
@@ -25,10 +25,6 @@
|
|||||||
, <16 0 &gpiob 15 0> /* D16 */
|
, <16 0 &gpiob 15 0> /* D16 */
|
||||||
, <14 0 &gpiob 14 0> /* D14 */
|
, <14 0 &gpiob 14 0> /* D14 */
|
||||||
, <15 0 &gpiob 13 0> /* D15 */
|
, <15 0 &gpiob 13 0> /* D15 */
|
||||||
, <18 0 &gpiob 8 0> /* D18/A0 */
|
|
||||||
, <19 0 &gpioa 0 0> /* D19/A1 */
|
|
||||||
, <20 0 &gpioa 1 0> /* D20/A2 */
|
|
||||||
, <21 0 &gpioa 2 0> /* D21/A3 */
|
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -38,10 +34,10 @@
|
|||||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
gpio-map-pass-thru = <0 0x3f>;
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
gpio-map
|
gpio-map
|
||||||
= <0 0 &gpiob 8 0> /* D18/A0 */
|
= <0 0 &gpiob 8 0> /* A0 */
|
||||||
, <1 0 &gpioa 0 0> /* D19/A1 */
|
, <1 0 &gpioa 0 0> /* A1 */
|
||||||
, <2 0 &gpioa 1 0> /* D20/A2 */
|
, <2 0 &gpioa 1 0> /* A2 */
|
||||||
, <3 0 &gpioa 2 0> /* D21/A3 */
|
, <3 0 &gpioa 2 0> /* A3 */
|
||||||
, <6 0 &gpiob 5 0> /* D4/A6 */
|
, <6 0 &gpiob 5 0> /* D4/A6 */
|
||||||
, <7 0 &gpiob 3 0> /* D6/A7 */
|
, <7 0 &gpiob 3 0> /* D6/A7 */
|
||||||
, <8 0 &gpiob 1 0> /* D8/A8 */
|
, <8 0 &gpiob 1 0> /* D8/A8 */
|
||||||
@@ -51,7 +47,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pro_micro_d: &pro_micro {};
|
|
||||||
pro_micro_i2c: &i2c1 {};
|
pro_micro_i2c: &i2c1 {};
|
||||||
pro_micro_spi: &spi2 {};
|
pro_micro_spi: &spi1 {};
|
||||||
pro_micro_serial: &usart1 {};
|
pro_micro_serial: &usart1 {};
|
||||||
|
|||||||
67
app/boards/arm/proton_c/pinmux.c
Normal file
67
app/boards/arm/proton_c/pinmux.c
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2017 I-SENSE group of ICCS
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <kernel.h>
|
||||||
|
#include <device.h>
|
||||||
|
#include <init.h>
|
||||||
|
#include <drivers/pinmux.h>
|
||||||
|
#include <sys/sys_io.h>
|
||||||
|
|
||||||
|
#include <pinmux/stm32/pinmux_stm32.h>
|
||||||
|
|
||||||
|
/* pin assignments for STM32F3DISCOVERY board */
|
||||||
|
static const struct pin_config pinconf[] = {
|
||||||
|
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) && CONFIG_SERIAL
|
||||||
|
{STM32_PIN_PC4, STM32F3_PINMUX_FUNC_PC4_USART1_TX},
|
||||||
|
{STM32_PIN_PC5, STM32F3_PINMUX_FUNC_PC5_USART1_RX},
|
||||||
|
#endif
|
||||||
|
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) && CONFIG_SERIAL
|
||||||
|
{STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX},
|
||||||
|
{STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX},
|
||||||
|
#endif
|
||||||
|
#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C
|
||||||
|
{STM32_PIN_PB6, STM32F3_PINMUX_FUNC_PB6_I2C1_SCL},
|
||||||
|
{STM32_PIN_PB7, STM32F3_PINMUX_FUNC_PB7_I2C1_SDA},
|
||||||
|
#endif
|
||||||
|
#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C
|
||||||
|
{STM32_PIN_PA9, STM32F3_PINMUX_FUNC_PA9_I2C2_SCL},
|
||||||
|
{STM32_PIN_PA10, STM32F3_PINMUX_FUNC_PA10_I2C2_SDA},
|
||||||
|
#endif
|
||||||
|
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) && CONFIG_SPI
|
||||||
|
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
||||||
|
{STM32_PIN_PA4, STM32F3_PINMUX_FUNC_PA4_SPI1_NSS},
|
||||||
|
#endif /* CONFIG_SPI_STM32_USE_HW_SS */
|
||||||
|
{STM32_PIN_PA5, STM32F3_PINMUX_FUNC_PA5_SPI1_SCK},
|
||||||
|
{STM32_PIN_PA6, STM32F3_PINMUX_FUNC_PA6_SPI1_MISO},
|
||||||
|
{STM32_PIN_PA7, STM32F3_PINMUX_FUNC_PA7_SPI1_MOSI},
|
||||||
|
#endif
|
||||||
|
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) && CONFIG_SPI
|
||||||
|
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
||||||
|
{STM32_PIN_PB12, STM32F3_PINMUX_FUNC_PB12_SPI2_NSS},
|
||||||
|
#endif /* CONFIG_SPI_STM32_USE_HW_SS */
|
||||||
|
{STM32_PIN_PB13, STM32F3_PINMUX_FUNC_PB13_SPI2_SCK},
|
||||||
|
{STM32_PIN_PB14, STM32F3_PINMUX_FUNC_PB14_SPI2_MISO},
|
||||||
|
{STM32_PIN_PB15, STM32F3_PINMUX_FUNC_PB15_SPI2_MOSI},
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_USB_DC_STM32
|
||||||
|
{STM32_PIN_PA11, STM32F3_PINMUX_FUNC_PA11_USB_DM},
|
||||||
|
{STM32_PIN_PA12, STM32F3_PINMUX_FUNC_PA12_USB_DP},
|
||||||
|
#endif /* CONFIG_USB_DC_STM32 */
|
||||||
|
#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) && CONFIG_CAN
|
||||||
|
{STM32_PIN_PD0, STM32F3_PINMUX_FUNC_PD0_CAN1_RX},
|
||||||
|
{STM32_PIN_PD1, STM32F3_PINMUX_FUNC_PD1_CAN1_TX},
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
static int pinmux_stm32_init(const struct device *port) {
|
||||||
|
ARG_UNUSED(port);
|
||||||
|
|
||||||
|
stm32_setup_pins(pinconf, ARRAY_SIZE(pinconf));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY);
|
||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <st/f3/stm32f303Xc.dtsi>
|
#include <st/f3/stm32f303Xc.dtsi>
|
||||||
#include <st/f3/stm32f303c(b-c)tx-pinctrl.dtsi>
|
|
||||||
#include "arduino_pro_micro_pins.dtsi"
|
#include "arduino_pro_micro_pins.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
@@ -27,18 +26,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&usart1 {
|
|
||||||
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&spi2 {
|
|
||||||
pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&i2c1 {
|
|
||||||
pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&usb {
|
&usb {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: proton_c
|
|
||||||
name: QMK Proton-C
|
|
||||||
type: board
|
|
||||||
arch: arm
|
|
||||||
outputs:
|
|
||||||
- usb
|
|
||||||
url: https://qmk.fm/proton-c/
|
|
||||||
exposes: [pro_micro]
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: makerdiary_nrf52840_m2
|
|
||||||
name: MakerDiary nRF52840 M.2
|
|
||||||
type: interconnect
|
|
||||||
url: https://wiki.makerdiary.com/nrf52840-m2/
|
|
||||||
manufacturer: MakerDiary
|
|
||||||
description: |
|
|
||||||
The MakerDiary nRF52840 M.2 module is a module using the M.2/NGFF form factor to expose a
|
|
||||||
large number of GPIO pins, allowing use of a variety of peripherals such using I2C, SPI,
|
|
||||||
etc.
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
file_format: "1"
|
|
||||||
id: pro_micro
|
|
||||||
name: Pro Micro
|
|
||||||
type: interconnect
|
|
||||||
url: https://www.sparkfun.com/products/12640
|
|
||||||
manufacturer: SparkFun
|
|
||||||
description: |
|
|
||||||
The SparkFun Pro Micro grew popular as a low cost ATmega32U4 board with sufficient GPIO and peripherals
|
|
||||||
to work for many keyboard needs. Since the original Pro Micro, many pin compatible boards have appeared,
|
|
||||||
with various changes or improvements, such as the Elite-C w/ USB-C, nice!nano with nRF52840 wireless.
|
|
||||||
@@ -6,5 +6,3 @@ CONFIG_ZMK_BLE=n
|
|||||||
CONFIG_LOG=y
|
CONFIG_LOG=y
|
||||||
CONFIG_LOG_BACKEND_SHOW_COLOR=n
|
CONFIG_LOG_BACKEND_SHOW_COLOR=n
|
||||||
CONFIG_ZMK_LOG_LEVEL_DBG=y
|
CONFIG_ZMK_LOG_LEVEL_DBG=y
|
||||||
CONFIG_DEBUG=y
|
|
||||||
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
|
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
# Copyright (c) 2021 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
if SHIELD_A_DUX_LEFT
|
|
||||||
|
|
||||||
config ZMK_KEYBOARD_NAME
|
|
||||||
default "A. Dux"
|
|
||||||
|
|
||||||
config ZMK_SPLIT_BLE_ROLE_CENTRAL
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
if SHIELD_A_DUX_LEFT || SHIELD_A_DUX_RIGHT
|
|
||||||
|
|
||||||
config ZMK_SPLIT
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# Copyright (c) 2021 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
config SHIELD_A_DUX_LEFT
|
|
||||||
def_bool $(shields_list_contains,a_dux_left)
|
|
||||||
|
|
||||||
config SHIELD_A_DUX_RIGHT
|
|
||||||
def_bool $(shields_list_contains,a_dux_right)
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# A. Dux
|
|
||||||
|
|
||||||
Shield configuration for [Architeuthis Dux by Tapi][1] (aka A. Dux, A.D., "Giant Squid").
|
|
||||||
|
|
||||||
![Wireless Architeuthis Dux with nice!nano controllers][2]
|
|
||||||
|
|
||||||
This shield is an adaptation of the direct pin [Cradio shield by @davidphilipbarr][3].
|
|
||||||
|
|
||||||
## Cephalopoda
|
|
||||||
|
|
||||||
Check out the rest of Tapi's Cephalopoda collection of low profile split ergonomic mechanical keyboards at <https://github.com/tapioki/cephalopoda>.
|
|
||||||
|
|
||||||
[1]: https://github.com/tapioki/cephalopoda/tree/main/Architeuthis%20dux
|
|
||||||
[2]: https://media.discordapp.net/attachments/855822038287908864/866315666802081792/image0.jpg
|
|
||||||
[3]: https://github.com/zmkfirmware/zmk/tree/main/app/boards/shields/cradio
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# Copyright (c) 2021 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user