Compare commits

..

651 commits

Author SHA1 Message Date
Peter Johanson
6b4d591c37 fix(bt): Fix compilation failure for clearing bonds.
Some checks failed
BLE Tests / collect-tests (push) Has been cancelled
Docs Checks / lint (push) Has been cancelled
Docs Checks / typecheck (push) Has been cancelled
pre-commit / pre-commit (push) Has been cancelled
Tests / collect-tests (push) Has been cancelled
BLE Tests / run-tests (push) Has been cancelled
Tests / run-tests (push) Has been cancelled
* Refactor broke the build when clearing bonds on start.
2024-09-09 11:26:53 -06:00
Nicolas Munnich
1c48f64730
fix(docs): Fix broken anchor in Studio setup (#2465) 2024-09-07 09:26:24 -07:00
Nicolas Munnich
f0319fde94
docs(feat): Added a page on shift registers (#2452)
Added a page on shift registers
---------

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-09-07 13:19:01 +02:00
Pete Johanson
d52bb04090 Revert "feat: Split physical layout selection sync."
This reverts commit 03b5b38bc4.
2024-09-07 00:22:01 -06:00
Grazfather
58207fdb2c
fix(docs): Mention display-name property in layer docs (#2460) 2024-09-06 20:03:23 -07:00
Alexander Krikun
cddc92108c fix(boards): add sleep pinctrl node for nice!60
Add spi3_sleep pinctrl node to fix nice!60 builds with
both RGB underglow and sleep enabled.
2024-09-06 13:04:22 -06:00
honorless
a2f32cc12c refactor(shield): tidbit
* Implement alternative matrix-transform.

* Add missing wakeup-source attribute.

* Revise README to provide more appropriate information.

* Remove unnecessary files (partially-functional shield).
2024-09-06 13:02:15 -06:00
Robert U
2a137bb675
fix: Support west test when invoked as module 2024-09-06 14:56:40 -04:00
dependabot[bot]
ba6f21fd2b chore(deps): bump tj-actions/changed-files from 44 to 45
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 44 to 45.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v44...v45)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-06 12:51:29 -06:00
ReFil
91447ac55c
fix: Correct max brightness in backlight metadata
The set brightness function in the backlighting code has a max of 100, as does the zephyr led-pwm driver https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/led/led_pwm.c

The range for the set brightness function should reflect this max
2024-09-06 14:36:08 -04:00
honorless
eaa8989f37 style: update commented-out obsolete keycodes 2024-09-06 12:22:54 -06:00
honorless
e0ec2ff84d refactor: update obsolete keycodes 2024-09-06 12:22:54 -06:00
Peter Johanson
03b5b38bc4 feat: Split physical layout selection sync.
* Ensure the split peripherals have the same selected physical
  layout on connection and change.
2024-09-06 12:20:45 -06:00
Peter Johanson
3975d2fdaf feat: Add studio related documentation.
* Document setting up studio for a new keyboard definition.
* Document how to enable ZMK Studio for a build, adding reserved layers,
  and controlling which behaviors are built into a studio firmware.
* Document `&studio_unlock` behavior.
* Document studio configuration options.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-09-05 12:22:08 -06:00
Peter Johanson
5176fbea6a fix: Locking fix for RPC subsystem. 2024-09-05 12:22:08 -06:00
Peter Johanson
782695f4a9 fix: Fixes for CRC16 local IDs. 2024-09-05 12:22:08 -06:00
Peter Johanson
e0339a2a57 feat: Add shared layout .dtsi files to promote reuse.
* Add Corne and Ferris shared layouts, and update the respective
  shields to use them.
* Add a sample Hummingbird physical layout for testing posix xiao.
* Add Sofle physical layout as an additional reference.
2024-09-05 12:22:08 -06:00
Peter Johanson
b84436e611 feat: Add posix_pro_micro and posix_seeed_xiao shields
* Make it easier to test native builds of our shields by adding
  `posix_pro_micro` and `posix_seeed_xiao` so you can build posix
  target of, e.g. `corne_left` for testing ZMK Studio.
2024-09-05 12:22:08 -06:00
Peter Johanson
fd28eab179 feat: Add the ability to keep/omit behaviors for a given build.
* Use defines to keep either all behaviors with omits, or selective behaviors with
  explicit kept behavior, before including `behavior.dtsi` in keymaps.
* Default ZMK_BEHAVIORS_KEEP_ALL when building with the studio RPC
  endpoint snippet.
2024-09-05 12:22:08 -06:00
Peter Johanson
d77e400eb9 feat(boards): Add posix MiniVan studio tester
* New shield to easily test studio using the `native_posix_64` board.
2024-09-05 12:22:08 -06:00
Peter Johanson
c8c19598a7 feat(keymap): Add binding get/set, layer movement
* Add keymap API for getting/setting a bindings
  in keymap layers.
* Add layer move support via intemediary ordering array.
* Add settings storage for keymap changes.
2024-09-05 12:22:08 -06:00
dependabot[bot]
0f972f1cc3 chore(deps): bump web-tree-sitter from 0.20.8 to 0.23.0 in /docs
Bumps [web-tree-sitter](https://github.com/tree-sitter/tree-sitter) from 0.20.8 to 0.23.0.
- [Release notes](https://github.com/tree-sitter/tree-sitter/releases)
- [Changelog](https://github.com/tree-sitter/tree-sitter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tree-sitter/tree-sitter/compare/v0.20.8...v0.23.0)

---
updated-dependencies:
- dependency-name: web-tree-sitter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-01 22:57:37 -07:00
Nicolas Munnich
266227b580
refactor(docs): Refactor the development section (#2438) 2024-09-01 21:54:19 -07:00
Cem Aksoylar
aae4feeda8 chore(deps): npm update on docs 2024-09-01 21:37:47 -07:00
Cem Aksoylar
b74cd39ab5 chore(blog): Use truncate markers 2024-09-01 00:15:23 -07:00
Cem Aksoylar
0120156002 refactor(blog): Use global authors 2024-09-01 00:15:23 -07:00
Cem Aksoylar
745b960593 fix(docs): Fix broken anchors 2024-09-01 00:13:46 -07:00
dependabot[bot]
882226e261 chore(deps-dev): bump webpack from 5.89.0 to 5.94.0 in /docs
Bumps [webpack](https://github.com/webpack/webpack) from 5.89.0 to 5.94.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.89.0...v5.94.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-31 17:13:32 -07:00
dependabot[bot]
d74896d780 chore(deps): bump micromatch from 4.0.5 to 4.0.8 in /docs
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-31 17:06:43 -07:00
Mike Szczys
f019524600 fix(display): widgets: increase buffer size for symbols
Increase buffer size used for placing LVGL symbols on displays. This
prevents array overflow warnings as discussed in #2444.

Also convert one sprintf to snprintf to ensure the buffers are always
null terminated and never overflow.

Signed-off-by: Mike Szczys <szczys@hotmail.com>
2024-08-28 00:35:28 -06:00
Anant Thazhemadam
6946ca8b07
fix(docs): minor corrections and fix typo (#2443)
* docs(faq): minor corrections

* docs: fix typo - `s/Alterative/Alternative`

* docs(faq): use Lily58 as an example instead of Corne with revision

Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>

---------

Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
2024-08-27 16:23:15 +02:00
William Brockhus
b866ec031f
fix(docs): Fixing wording in the split keyboards feature page (#2440) 2024-08-25 09:31:21 +02:00
Nicolas Munnich
5f056f7199
refactor(docs): Convert the keymaps section into a base folder (#2430)
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-08-21 10:39:18 -07:00
Nicolas Munnich
503f6c8e58
feat(docs): Add and modify docs to point users to the experimental zmk-cli (#2431)
Co-authored-by: Joel Spadin <joelspadin@gmail.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-08-21 10:36:23 -07:00
Peter Johanson
b735a051ce fix(docs): Admonition formatting fix. 2024-08-15 12:51:38 -06:00
Peter Johanson
d5061c5d3b fix: Make CRC behavior local ID select CRC. 2024-08-15 11:45:18 -06:00
Peter Johanson
6ae6bf78b4 fix(boards): BDN9 rev2 tweaks.
* Reduce RAM usage, no need for heap any more in ZMK.
* Don't attempt to enable FPU that's not present.
2024-08-15 11:45:18 -06:00
Peter Johanson
fb67e4603a feat: Add studio core coverage targets.
* Cover stm32, RP2040, and nRF52 builds.
2024-08-15 11:45:18 -06:00
Peter Johanson
bafe648425 feat: Add &studio_unlock behavior.
* New behavior allows unlocking the keyboard to allow ZMK Studio to
  make changes.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-08-15 11:45:18 -06:00
Peter Johanson
b1bcc3e418 feat(studio): Add studio-rpc-usb-uart snippet.
* Add an easy snippet for enabling USB UART added
   to the `zephyr_udc0` standard node.
2024-08-15 11:45:18 -06:00
Peter Johanson
feda96eb40 feat(studio): Initial RPC infrastructure and subsystems.
* UART and BLE/GATT transports for a protobuf encoded RPC
  request/response protocol.
* Custom framing protocol is used to frame a give message.
* Requests/responses are divided into major "subsystems" which
  handle requests and create response messages.
* Notification support, including mapping local events to RPC
  notifications by a given subsystem.
* Meta responses for "no response" and "unlock needed".
* Initial basic lock state support in a new core section, and allow specifying
  if a given RPC callback requires unlocked state or not.
* Add behavior subsystem with full metadata support and examples of
  using callback to serialize a repeated field without extra stack space needed.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-08-15 11:45:18 -06:00
Cem Aksoylar
ea64fcaf71 fix(docs): Note direct pin use in matrix transform 2024-08-15 10:38:10 -07:00
dependabot[bot]
6fe13c9565
chore(deps-dev): bump eslint-plugin-mdx from 2.3.3 to 3.1.5 in /docs (#2128)
Bumps [eslint-plugin-mdx](https://github.com/mdx-js/eslint-mdx) from 2.3.3 to 3.1.5.
- [Release notes](https://github.com/mdx-js/eslint-mdx/releases)
- [Changelog](https://github.com/mdx-js/eslint-mdx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mdx-js/eslint-mdx/compare/eslint-plugin-mdx@2.3.3...eslint-plugin-mdx@3.1.5)

---
updated-dependencies:
- dependency-name: eslint-plugin-mdx
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-15 16:15:39 +02:00
dependabot[bot]
08988ec7da
chore(deps): bump braces from 3.0.2 to 3.0.3 in /docs (#2337)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-15 16:14:45 +02:00
LostQuasar
b42d06ecf7
chore: Update pancake shield url 2024-08-14 14:38:38 -04:00
down
895f557ae5 fix: no error return in sticky key get_parameter_metadata 2024-08-14 12:34:18 -06:00
Cem Aksoylar
96cd3a1ce2 refactor(docs): Remove unnecessary jsx includes 2024-08-13 23:03:15 -07:00
Cem Aksoylar
4faeb365b1 feat(docs): Add keyboard vs consumer variants note 2024-08-13 23:03:15 -07:00
Cem Aksoylar
ba0dee088f feat(docs): Add section on nesting mod-morphs
Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
2024-08-13 14:56:07 -07:00
Cem Aksoylar
0d15ae84f4 fix(docs): Fix mod-morph terms from keycodes to bindings 2024-08-13 14:56:07 -07:00
Cem Aksoylar
8b909acdcf refactor(docs): Add subheaders for devicetree error types 2024-08-13 11:11:27 -07:00
Cem Aksoylar
3de8a56fcb feat(docs): Add a note on column numbers for DTS errors 2024-08-13 11:11:27 -07:00
Cem Aksoylar
00e4818094 fix(docs): Fix broken anchor in reset behaviors 2024-08-13 10:51:40 -07:00
Nicolas Munnich
049c070b3a
feat(docs): Minor improvements to the docs (#2411) 2024-08-13 10:47:45 -07:00
Peter Johanson
fb3af5327e fix: Fix hardware metadata validation after image changes.
* Newer Docker image requires --break-system-packages for pip.
2024-08-13 07:38:11 -07:00
Pete Johanson
6d50ba5553 chore: Docs review tweaks.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-08-12 16:57:54 -07:00
Peter Johanson
3fec690def feat: Add config settings for sticky keys/hold-tap
* Add new Kconfig symbols to config max held sticky-keys/hold-taps
  and for max captured events during hold-tap resolution.
2024-08-12 16:57:54 -07:00
Cem Aksoylar
2eff266f5b feat(docs): Add battery life remark for split keyboards 2024-08-07 23:57:58 -07:00
Cem Aksoylar
2a0708d1fc feat(docs): Add locality warning for nested behaviors 2024-08-07 23:57:58 -07:00
Cem Aksoylar
2501f1f548 feat(docs): Add references to new split keyboards page 2024-08-07 23:57:58 -07:00
Cem Aksoylar
d75e388593 feat(docs): Add split keyboards feature page
Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
2024-08-07 23:57:58 -07:00
Peter Johanson
cd25c12ce9 fix: Proper device PM support for composite kscan.
* Clean up composite kscan to allow multiple instances properly.
* Implement PM hook and properly suspend/resume the child devices.

Fixes: #2388
2024-08-03 13:45:51 -07:00
Peter Johanson
78ed721c36 fix(pm): Properly configure a wakeup as input.
* Other drivers properly disconnect/de-config pins now, so we need
  to be sure the wakeup trigger connects the wake pin as input.
2024-08-02 16:37:11 -07:00
Cem Aksoylar
47a6715aa6 fix(docs): Fix toggle layer docs 2024-08-02 11:17:10 -07:00
Cem Aksoylar
b9a025c76e
fix(docs): Document number of peripherals Kconfig (#2389)
Fixes #2373
2024-08-02 18:57:15 +02:00
Cem Aksoylar
b080befebb fix(docs): Fix link for matrix transform 2024-08-02 09:55:20 -07:00
Nicolas Munnich
9e7fcde868
feat(docs): Improve the layers-related documentation (#2390)
Fixes #1284
2024-07-31 20:53:36 -07:00
Nicolas Munnich
f92dce43e9
feat(docs): Add modules feature page (#2380)
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-07-25 12:08:08 -07:00
Nicolas Munnich
97294aa341
chore: Add a recommended extension for .mdx files (#2381) 2024-07-25 12:00:55 -07:00
Nicolas Munnich
fd152baff0
feat(docs): Add troubleshooting notes on experimental bluetooth options (#2387)
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-07-25 12:00:22 -07:00
Cem Aksoylar
7bd74a6b0f fix(docs): Add required display-name in physical layout examples 2024-07-14 16:59:15 -07:00
Peter Johanson
8c6bda260a fix: Proper behavior metadata for key repeat/toggle 2024-07-05 15:38:04 -06:00
Peter Johanson
3694ff85a0 fix: Fix up layer metadata, move to layer IDs.
* Studio will use stable layer IDs to refer to layers, so that
  layer reordering doesn't affect behavior bindings, so update to match.
* Fix a few layer metadata entries that missed being refactored.
2024-07-05 13:13:42 -06:00
Peter Johanson
e01f13f9f0 fix: Fix external power settings load issue.
* Because settings load is delayed now, enable external
  power on init, and let it be disabled on settings load
  later, to ensure power is on early for
  other peripheral initialization.

Fixes: #2361
2024-07-04 17:20:40 -06:00
Peter Johanson
82eed0f5dd feat(boards): Add flash/settings to XIAO RP2040.
* Add storage partition.
* Default necessacy Kconfig symbols for flash/settings.
2024-07-03 16:57:22 -06:00
Peter Johanson
b4f9081b09 docs: Updated new shield documentation for physical layouts.
* Document how to define one or more physical layouts and assign
  the chosen one.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-07-03 16:52:05 -06:00
Peter Johanson
5fcf092901 refactor(shields): Set ZMK Uno physical layouts.
* Add physical layout definitions for uno and split uno shields.
2024-07-03 16:52:05 -06:00
Peter Johanson
74f7fe921b fix(splits): Increase split notify stack size. 2024-07-03 16:52:05 -06:00
Peter Johanson
0438cb0ee5 feat(kscan): More complete PM support to drivers.
* Update our GPIO kscan drivers to more completely support PM device,
  by doing proper hardare init/deinit in the PM action hook.
2024-07-03 16:52:05 -06:00
Peter Johanson
c5cca5b34f feat: Add keyboard physical layout system.
* Add bindings to allow creating multiple physical layouts that specify
  their key's physical attributes, and the matching matrix transform
  and dependant kscan to use.
* Synthesize a basic physical layout if none specified, for backwards
  compatibility.
* Update matrix transform API to explicitly pass in the selected transform
  to the API instead of using a fixed chosen transform.
* Move kscan subscription and handling into the physical layout code, so
  that selecting a different physical layout at runtime can also use the
  correct kscan instance.
* Add `physical_layouts.dtsi` file to include so you can use the
  pre-configured `&key_physical_attrs` for adding you layout keys.
2024-07-03 16:52:05 -06:00
Peter Johanson
80173f8ea3 fix: Improve startup time with proper settings loading.
* Avoid doing duplicate calls to setings_load_subtree, which iterates
  NVS fully each time under the hood, and instead use on settings_load
  later in the lifecycle.
2024-07-03 16:24:17 -06:00
Peter Johanson
f18974e8c4 fix: Adjust hid indicator listeners for event refactor
* Avoid static listener to prevent subscription
  issue.
2024-07-01 12:32:04 -06:00
ReFil
f2ea1da036
fix(boards): Suppress devicetree warning
nRF5x boards throw a spurious warning for duplicate unit-address when the devicetree gets processed

Upstream issue:  https://github.com/zephyrproject-rtos/zephyr/issues/29713

Warning suppressed as per: https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html
2024-06-30 12:59:46 -04:00
Peter Johanson
96e55c8be6 fix: BLE refactor mouse keys fix. 2024-06-28 17:48:45 -06:00
Peter Johanson
483a4930e9 feat(behaviors): Add local ID system for behaviors
* Add a new feature for tracking a given behavior by a new concept
  of a "behavior local ID" which is a stable 16-bit identifier for
  a given behavior, that is resilient to new behaviors being added
  and requires no additional work on the part of the behavior
  authors.
* Add implementations for either settings lookup table, or CRC16
  hashing of behavior device names for generating behavior local
  IDs.
2024-06-28 15:10:32 -06:00
Peter Johanson
f7c34c70ba refactor(ble): Extract API to get active profile connection.
* Add `struct bt_conn *zmk_ble_active_profile_conn(void)` function for
  fetching a connection for the current profile.
2024-06-28 14:43:17 -06:00
Peter Johanson
b576d52d58 feat(core): Support adding subs to other listeners.
* Used for ZMK Studio event remappers to be sure the one
  RPC event listener subscribes to their mapped events.
2024-06-28 14:36:25 -06:00
Peter Johanson
49f7275beb fix: Add metadata to missed behaviors. 2024-06-25 12:11:32 -06:00
Timoyoungster
29599e8b0a docs: hopefully more clear description of the new setting 2024-06-24 14:26:14 -06:00
Timoyoungster
10d03ca46c fix: adding option to separate implicit mod release from key release
This adds a new config value `ZMK_HID_SEPARATE_MOD_RELEASE_REPORT`
where, if enabled, the report for a key release is sent separately to
the accompanying modifier release signals, which are then sent in a
second report.

This fixes an issue where certain applications are unable to work with
implicitly modified keys (e.g. colon) due to them registering the
modifier release prior to the actual key release.

Have tested this on my personal keyboard and `wev` now shows the signals
in the correct order.

=> **Previously:** ```LSHIFT (pressed) -> colon (pressed) -> LSHIFT
(released) -> **semi**colon (released)```

=> **Now:** ```LSHIFT (pressed) -> colon (pressed) -> colon (released)
-> LSHIFT (released)```

(This time without accidental files)
2024-06-24 14:26:14 -06:00
honorless
4dce096161 docs: improve settings_reset link 2024-06-24 13:18:56 -07:00
honorless
9c6d1af102 ci(build): limit run scope
* Cancel redundant non-nightly runs and jobs dependent on canceled jobs.

* Limit scheduled runs to zmkfirmware-owned repos.
2024-06-24 13:41:03 -06:00
honorless
7c9477be6e ci(build): improve security posture
* Limit unnecessary permissions.

* Avoid storing credentials.
2024-06-24 13:41:03 -06:00
honorless
0bea7832e9 ci(build): amend changed-files invocation 2024-06-24 13:41:03 -06:00
Peter Johanson
3e2c428fca chore: Add rp2040/USB logging core coverage.
* Include an rp2040 core build target, and include USB logging snippet
  for completeness.
2024-06-24 11:11:51 -06:00
Peter Johanson
03099b04b6 feat(behaviors): Add behavior metadata information.
* For upcoming ZMK studio work, make a set of rich metadata available
  to provide a friendly name for a behavior, and allow super flexible
  descriptions of the parameters the behaviors take.
* Add ability to validate a zmk_behavior_binding against
  the behavior metadata available.
2024-06-24 11:08:00 -06:00
Peter Johanson
7cdf1e42ea fix: Actually add the zmk-usb-logging snippet.
* D'oh.
2024-06-24 10:54:07 -06:00
Peter Johanson
7be955ff72 fix(usb): Ensure USB init is last
* To avoid USB init issues due to other initialization disrupting
  USB setup, move USB setup to a lower priority.
2024-06-21 13:29:12 -06:00
Peter Johanson
a080b5287f refactor: Remove static CDC ACM logging nodes.
* To avoid spurious CDC ACM instances when usint CDC ACM for something
  other than logging, move to the approach used by Zephyr of using a
  snippet to redirect console output to a CDC ACM node added by the
  snippet. Remove all the existing static CDC ACM nodes.
* Add new `zmk-usb-logging` snippet that mirrors the upstream
  `cdc-acm-logging` snippet, but still does our extra USB logging
  configuration.
* Updated logging docs accordingly.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-06-20 12:06:13 -06:00
Cem Aksoylar
7c09eb217e refactor(docs): Document and enforce header casing conventions 2024-06-17 11:46:32 -07:00
Cem Aksoylar
e56db304ea refactor(docs): Split up troubleshooting page into a section 2024-06-17 11:46:32 -07:00
Nicolas Munnich
308d6bce6e
feat(docs): Improve the toolchain setup page (#2272)
Split the toolchain setup into separate docker and native pages
and improve instructions to better refer to Zephyr docs in certain steps.
Also refactor to improve consistency and add virtualenv instructions.

---------

Co-authored-by: KemoNine <mcrosson@kemonine.info>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-06-01 21:51:08 -07:00
Nicolas Munnich
2d96f469c8
fix(docs): Removing to-to typos (#2310) 2024-05-25 22:16:33 -07:00
German Gutierrez
2ee76be6fe
fix(soft_off): central waits 100ms in split if hold_time enabled 2024-05-13 17:43:35 -04:00
Joel Spadin
f0b20c1c93 feat(boards): Add nRF52 high voltage DC/DC config
Added a Kconfig option to enable SOC_DCDC_NRF52X_HV for nice_nano_v2
and mikoto. According to Nordic's documentation, the DC/DC regulator is
more efficient than the LDO regulator, so this is enabled by default.

The following boards do not support this mode and were not changed:

- nice_nano
- nice60
- nrfmicro_11, nrfmicro_13
- nrf52840_m2
- bluemicro840

I could not find schematics to confirm whether the following boards
support this mode:

- bt60_v1, bt60_v2
- bt65_v1
- bt75_v1
- corneish_zen_v1, corneish_zen_v2
- pillbug
- puchi_ble_v1
- s40nc
2024-05-13 14:14:50 -07:00
dependabot[bot]
8f5c7bbfd4 chore(deps): bump pre-commit/action from 3.0.0 to 3.0.1
Bumps [pre-commit/action](https://github.com/pre-commit/action) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/pre-commit/action/releases)
- [Commits](https://github.com/pre-commit/action/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: pre-commit/action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-13 14:07:13 -07:00
Horu
7d1f84e3eb
chore: fix typos in various places 2024-05-13 16:47:33 -04:00
ReFil
4dfc45d4ab
feat(docs): Document example toggle-mode implementation
---------

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-05-03 14:17:09 -04:00
ReFil
2423136788 fix(boards): Fix pulls on ZMK uno toggle switch
The devicetree pulls always add on to the extra pulls configured by toggle mode, so these should not have pulls defined in the devicetree. Saved ~200uA avg on another board with a 3t toggle switch
2024-05-03 06:55:43 -07:00
Peter Johanson
af908826cd fix: Initialize sideband kscan in APPLICATION.
* In order to be sure the rest of the system is fully ready before
  intializing, because init may result in immediate events being
  triggered when used with toggle direct kscan inner devices.
2024-05-01 11:35:54 -07:00
German Gutierrez
d1ad34761a
fix: shortening keymap_soft_off behavior node
* Shorten the soft off node in order for it to work across splits.
2024-04-29 12:22:40 -04:00
Jarryd Tilbrook
0d3a4b7bbb
fix(underglow): Correctly set underglow state
This fixes a bug introduced in #2244
2024-04-25 07:26:26 -07:00
Pablo Martínez
4d566853af
fix(rgb): auto-off logic 2024-04-25 04:55:42 -04:00
Sadek Baroudi
f4a070aacf fix(boards): nrf boards missing SPI in pinctrl and dtsi, requiring users to manually define in their shield definitions if they wanted to use SPI 2024-04-25 00:54:44 -07:00
Peter Johanson
16e92cf665 fix(behaviors): Add multiple soft-off instances properly.
* Properly pass the node id for the unique
  soft-off behavior instance when defining it.
2024-04-17 23:53:12 -07:00
Keeley Hoek
e22bc7620c fix(hid): Correct off-by-one buffer overflow with NKRO 2024-04-09 23:20:20 -07:00
Cem Aksoylar
a9021deef6 fix(docs): Add wakeup-source to split new shield example 2024-04-09 16:27:27 -07:00
Cem Aksoylar
dfc6dc84b8 fix(docs): Make clear the matrix transform example is incomplete 2024-04-09 16:27:27 -07:00
Cem Aksoylar
7a51a46b9f feat(docs): Add pointer to shields folder in new shield docs 2024-04-09 16:27:27 -07:00
Xudong Zheng
849eca7228 refactor(underglow): fix uninitialized variable warning 2024-04-09 15:57:34 -07:00
フィルターペーパー
7d5aa0c0bf feat(docs): Update section for devicetree_generated error 2024-04-04 18:31:09 -07:00
Tobias Arndt
fe509c466f fix(kscan): Enable charlieplex interrupts for single compatible device
Fixes #2201
2024-03-30 19:13:39 -07:00
Tobias Arndt
e7d6519534 fix(docs): Fix and note GPIO flags for charlieplex config 2024-03-30 19:13:39 -07:00
Cem Aksoylar
eb5a6fcfe1 refactor(docs): Split DT props table for sensor rotate variants 2024-03-30 17:03:51 -07:00
Cem Aksoylar
e65a1227d8 fix(docs): Correct property types for behavior bindings 2024-03-30 17:03:51 -07:00
zhiayang
4bef4e98f5
feat(boards): Support board revisions in setup scripts.
* Make setup.sh/ps1 prompt for board revision for boards that have revisions
2024-03-30 19:12:37 -04:00
Peter Johanson
fff1cbecdc fix: Add wakeup-source; to kscan nodes for ZMK_SLEEP.
* ZMK_SLEEP also enables PM_DEVICE, so be sure to mark kscan
  nodes as wakeup sources so they can wake keyboards from sleep.
2024-03-29 12:31:43 -07:00
dependabot[bot]
d672b0c705 chore(deps): bump react-toastify from 7.0.4 to 10.0.5 in /docs
Bumps [react-toastify](https://github.com/fkhadra/react-toastify) from 7.0.4 to 10.0.5.
- [Release notes](https://github.com/fkhadra/react-toastify/releases)
- [Commits](https://github.com/fkhadra/react-toastify/compare/v7.0.4...v10.0.5)

---
updated-dependencies:
- dependency-name: react-toastify
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-28 10:41:56 -07:00
dependabot[bot]
18b86b7720 chore(deps): bump follow-redirects from 1.15.5 to 1.15.6 in /docs
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-28 10:31:21 -07:00
dependabot[bot]
25bb126a11 chore(deps): bump express from 4.18.2 to 4.19.2 in /docs
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-28 10:22:10 -07:00
dependabot[bot]
34910787ff chore(deps): bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /docs
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-28 10:15:51 -07:00
Peter Johanson
f9bb18b676 fix(docs): Add &soft_off to behaviors index. 2024-03-27 22:52:32 -07:00
Peter Johanson
e66f068fb5 fix(docs): Minor soft-off docs tweaks from review. 2024-03-27 20:59:26 -07:00
Peter Johanson
29c0cdb3ab fix(shields): Fix for direct use with ZMK Uno split. 2024-03-27 20:59:26 -07:00
Peter Johanson
7e7110d85f fix(pm): Fixes for dedicated on/off on peripherals.
* Add new flag to differentiate soft off on peripherals that
  is invoked by split GATT svc and dedicated additional ones
  tied to GPIO pin.
2024-03-27 20:59:26 -07:00
Peter Johanson
41d81801ed fix(pm): Use Zephyr created device slots.
* Avoid overwriting random memory by using
  iterable section created by Zephyr PM.
2024-03-27 20:59:26 -07:00
Peter Johanson
d0e0ecb4e3 refactor: Use kscan directly to wake when we can.
* When adding a dedicated GPIO pin for soft off/on, use the direct
  kscan as the waker, instead of adding an additional node.
2024-03-27 20:59:26 -07:00
Peter Johanson
2df6dcd973 feat(behaviors): More logging in soft off. 2024-03-27 20:59:26 -07:00
Pete Johanson
fa9ea9ea8b fix(docs): Fix soft off waker prop name, headers.
* Use the correct property for extra GPIOs to
  make active for the waker before going into soft
  off state.
* Change header depth for easier navigation of the
  soft off feature page.

Co-authored-by: Pablo Martínez <58857054+elpekenin@users.noreply.github.com>
2024-03-27 20:59:26 -07:00
Peter Johanson
bb94a7aafe fix: Fixes for building soft off without deep sleep. 2024-03-27 20:59:26 -07:00
Peter Johanson
cac999b1d6 feat: Updated soft-off docs.
* Document new sideband behavior kscan driver for integrated
  soft-off support.
2024-03-27 20:59:26 -07:00
Peter Johanson
8d54e287f0 fix: Adjustments for Zephyr 3.5. 2024-03-27 20:59:26 -07:00
Peter Johanson
bd21f41412 refactor: Fixes for review feedback. 2024-03-27 20:59:26 -07:00
Peter Johanson
5d960a758f fix: Cleanups of sideband and direct kscan from review.
* Add dedicated init priority for the sideband kscan.
* Refactor sideband code for clarity.
* Tweaks to direct kscan for clarity.
* Make sideband behavior row optional for brevity.
* Allow overriding ZMK Uno sideband behaviors.
2024-03-27 20:59:26 -07:00
Peter Johanson
4198fac90f fix(pm): Fix deep sleep with sideband behaviors.
* Properly implement the PM hook needed for sideband behavior
  kscan device to have wakeup source enabled on it.
2024-03-27 20:59:26 -07:00
Peter Johanson
09111f1cf3 fix: Sleep after clearing endpoints to wait for send.
* Add a small sleep to allow other threads to send data for the
  endpoint clearing before sleep.
2024-03-27 20:59:26 -07:00
Peter Johanson
c3144055e8 refactor(boards): Move ZMK Uno 1P3T slider to sideband
* Invoke output selection from the slider on the ZMK Uno via
  sideband behavior setup, to simplify keymap.
2024-03-27 20:59:26 -07:00
Peter Johanson
a0ad1d4c94 refactor: Add kscan sideband behavior driver
* Instead of gpio key behavior trigger, add new kscan driver that
  decorates/wraps a given kscan driver and will invoke basic system
  behavior assigned to a given row + column, without the need for keymap
  mapping in the matrix transform, bypassing keymaps entirely.
2024-03-27 20:59:26 -07:00
Peter Johanson
e78b25a445 feat(kscan): Direct kscan driver can use gpio-keys.
* Allow specifying direct kscan driver pins using gpio-key list
  as an alternative.
2024-03-27 20:59:26 -07:00
Pete Johanson
933fdcd364 refactor(pm): Remove scanned behavior trigger.
* Remove the painful scanned behavior trigger for now, future enhancement
  will restore this high level functionality using kscan directly.
2024-03-27 20:59:26 -07:00
Pete Johanson
5ebe924e94 chore: Various soft-off review fixes
* Code style to avoid goto.
* Enable pm.c compilation via dedicated Kconfig flag.
* Comment wakeup trigger PM behavior.
2024-03-27 20:59:26 -07:00
Peter Johanson
fceb0351a5 refactor: Fixes for soft-off based on review.
* Better naming for gpio-key behavior triggers.
* Tweaks to scanned behavior trigger to avoid bad semaphore use,
  and reduce chance of issues with slowly scanned matrixes.
* Various code cleanups of style issues.
2024-03-27 20:59:26 -07:00
Pete Johanson
96968514e3 fix(docs): Apply suggestions from code review
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-03-27 20:59:26 -07:00
Peter Johanson
e78249ee06 fix(bt): Fix BT tests after soft off work.
* Move to explicit enable of `ZMK_PM_SOFT_OFF` to turn
  on the feature and use the behaviors, which matches
  how other features work, and helps with split and
  testing schemes.
2024-03-27 20:59:26 -07:00
Peter Johanson
0d4d4fb2b5 feat(pm): Clear HID data before soft off.
* Make sure the connected host has no held HID usages before we sleep.
2024-03-27 20:59:26 -07:00
Peter Johanson
860e53b33a refactor: Promote new endpoints API
* Add ability for external callers to clear the current endpoint.
2024-03-27 20:59:26 -07:00
Peter Johanson
d3fffb9e89 feat(shields): Add soft-off to the nrf52840dk ZMK Uno
* Use Button 1 for soft off on the nrf52840 when using the ZMK Uno
  shield.
2024-03-27 20:59:26 -07:00
Peter Johanson
b19df0cbf0 feat(behaviors): Add soft off behavior.
* New soft-off behavior that can be used to force the device
  into  soft-off state with only certain configured wakeup
  devices.
2024-03-27 20:59:26 -07:00
Peter Johanson
738c3c0e3b feat(kscan): Add PM support to GPIO kscan drivers.
* Add PM device hook to the kscan direct & matrix drivers.
2024-03-27 20:59:26 -07:00
Peter Johanson
adb3a13dc5 feat: Add soft on/off support.
Initial work on a soft on/off support for ZMK. Triggering soft off
puts the device into deep sleep with only a specific GPIO pin
configured to wake the device, avoiding waking from other key
presses in the matrix like the normal deep sleep.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-03-27 20:59:26 -07:00
Thomas Huber
58ccc5970d fix(build): Modify function return type
Change return type of `sticky_key_timeout` function to `void` given it
does not return any value to remove compiler warnings.
2024-03-27 14:52:42 -07:00
Thomas Huber
e806cd6da1 feat(gitignore): add clangd cache folder 2024-03-27 14:41:26 -07:00
Peter Johanson
94c3b9a246 feat(build): Allow specifying snippets for a build.
* Allow using snippets https://docs.zephyrproject.org/latest/build/snippets/using.html
  for user builds in a `snippets` array properly.
2024-03-24 18:44:54 -07:00
Cem Aksoylar
c684cee76f refactor(docs): Refer to overview page for behaviors 2024-03-24 18:29:29 -07:00
Thomas Huber
f2d8b9b0a3 feat(docs): Add Behavior overview page
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-03-24 17:50:33 -07:00
Peter Johanson
44358798d3 feat: Add ability to fetch battery voltage.
* To be able to use the Zephyr `voltage-divider` driver,
  add a mode for fetching raw voltage from the sensor
 and do state of charge calculation outside of the driver.
2024-03-24 13:28:55 -07:00
Cem Aksoylar
931a36ff4a feat(docs): Add a note on using BT with dual boot systems 2024-03-20 11:49:23 -07:00
Peter Johanson
3a3eed2960 fix: Add settings reset on start init priority.
* Add a dedicated settings reset on start init priority and default
  it to lower priority (high number) than default FLASH_INIT_PRIORITY
  to be sure flash is initialized before we open the area.
2024-03-20 11:18:43 -07:00
フィルターペーパー
1f7cd7a107 feat(docs): Add troubleshooting section for empty_file error 2024-03-19 23:48:57 -07:00
Theo Lemay
828943156a
fix(docs): Fix hold-tap info callout (#2211)
The hold-while-undecided callout does not properly render in the docs. This fixes it.
2024-03-18 15:34:45 -07:00
フィルターペーパー
736c5fb46e feat(docs): Add a note on macOS v14.3 file copy error message 2024-03-18 10:38:09 -07:00
Theo Lemay
ce743f2b35 chore: fix whitespace 2024-03-18 10:30:14 -07:00
Theo Lemay
af7e4198ae chore: remove label in test 2024-03-18 10:30:14 -07:00
Theo Lemay
94d9d837e3 refactor: extract duplicate logic 2024-03-18 10:30:14 -07:00
Theo Lemay
341534aa15 feat(behaviors): lazy sticky keys 2024-03-18 10:30:14 -07:00
Pablo
8929355ac0
fix(keymap): Replace some keypad keycodes
* Change KP_MULTIPLY to ASTRK in defaults keymap
2024-03-18 13:19:27 -04:00
honorless
6f2e19ff88 refactor: replace quick_tap_ms with quick-tap-ms
* The underscore form of this property is deprecated.
2024-03-18 10:15:50 -07:00
honorless
3a38979684 refactor: replace tapping_term_ms with tapping-term-ms
* The underscore form of this property is deprecated.
2024-03-18 10:15:50 -07:00
Hans Kruse
c6e0551fb0
fix(hid): Fix typo in HID usage alias 2024-03-18 13:06:09 -04:00
Cem Aksoylar
325e207781 feat(docs): Add pointers to HID descriptor refresh 2024-03-18 09:58:16 -07:00
Cem Aksoylar
aa6cfe250d feat(docs): Document refreshing the HID descriptor 2024-03-18 09:58:16 -07:00
Cem Aksoylar
bddee70b6b refactor(docs): Remove outdated Windows battery advice and unnecessary header 2024-03-18 09:58:16 -07:00
ReFil
388ad71385
feat(build): Explicit missing keymap node error
* Explicit error if zmk,keymap not set
* Document keymap error

---------

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-03-18 12:54:47 -04:00
Joel Spadin
a77288f527 fix: Update settings reset for Zephyr 3.5 2024-03-18 09:48:19 -07:00
Joel Spadin
14b06a36bf docs: Update settings_reset documentation
Updated the section for troubleshooting split halves unable to pair now
that the settings_reset shield resets all settings and explicitly
disables CONFIG_ZMK_BLE:

- Added a note that all settings will be reset.
- Removed the section about immediately putting the halves into
  bootloader mode to prevent pairing, as this is not necessary anymore.
- Added a note that you will not be able to see or pair the Bluetooth
  keyboard until you have flashed regular firmware again.
- Added a sentence to clarify that you will need to re-pair the
  keyboard to all host devices.

Also added some text describing common scenarios where this procedure
might be needed.
2024-03-18 09:48:19 -07:00
Joel Spadin
1dfcfc7d3f feat(shields): Make settings_reset shield reset all settings
Added a new CONFIG_ZMK_SETTINGS_RESET_ON_START option which enables init
code to call zmk_settings_erase(), and changed the settings_reset shield
to use it instead of CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START, so it now
resets all settings instead of just clearing BLE bonds.

CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START is left in place for now in case
someone still needs it. It may be replaced in the future once we find a
better way to repair a broken split connection.
2024-03-18 09:48:19 -07:00
Joel Spadin
610a806c84 feat: Add function to erase all settings
Added a zmk_settings_erase() function to clear all saved settings. This
does not go through Zephyr's settings subsystem, but instead directly
clears the data from the setting storage backend, so a reboot is needed
for it to take effect.
2024-03-18 09:48:19 -07:00
Peter Johanson
2adaa00d10 fix(build): Properly board revision keymaps.
* Handle board keymap location for boards with Zephyr
  board revisions included.
* Includes bare non-revision file and a revision specific keymap
  in case newer revision changes the layout/key positions.
2024-03-08 10:58:10 -08:00
Thomas Huber
08ab45fc78 feat(CONTRIBUTING.md): Add info regarding ESLint 2024-03-04 20:08:52 -08:00
Thomas Huber
37af94edde feat(docs): Add warning to new shield docs how Kconfig treats whitspaces
Added a warning to the shield section explaining that Kconfig does
not ignore whitespaces on function calls and therefore adding whitespaces
after the comma will break functionality.
2024-03-04 20:08:52 -08:00
Andrew Kannan
db7b197790
fix(docs): Add underglow brightness min/max (#2180) 2024-02-28 10:39:04 -08:00
Theo Lemay
c9c620d19f fix: inline initialise 2024-02-20 00:25:53 -08:00
Theo Lemay
8b20874c99 chore: remove label in test 2024-02-20 00:25:53 -08:00
Theo Lemay
c007d60357 feat(behaviors): hold while undecided 2024-02-20 00:25:53 -08:00
Xudong Zheng
104c73d303 refactor: address transport switch enumeration warning
When building without USB or Bluetooth, the compiler emits a warning due to
ZMK_TRANSPORT_USB or ZMK_TRANSPORT_BLE not being handled.
2024-02-19 21:41:52 -08:00
Seth Milliken
b44ec381f6 feat(boards): add encoder support to planck 2024-02-19 17:01:10 -08:00
honorless
ccf0380179 refactor: remove redundant Kconfig defaults
bool symbols implicitly default to n.
2024-02-19 16:39:31 -08:00
ton-im
c082f8d802
fix(boards): Add ext power init delay for nrfMicro
* Address issues with OLED init occurring before display is powered.
2024-02-19 19:32:12 -05:00
zhiayang
a9ae6796a0
fix(display): Proper initial display of battery status
* fix initial display of battery status on displays, and also fix a null deref
2024-02-19 19:15:19 -05:00
Peter Johanson
fda6a5f185 fix(boards): Tweaks for Ferris rev0.2 for Zephyr.
* Enable missing clock and set up USB pinctrl.
2024-02-17 21:57:21 -08:00
Dennis
604af2ebd3
feat(docs): Add pointers for peripheral battery monitoring (#2177)
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>

Fixes #2166
2024-02-17 21:51:09 -08:00
ctranstrum
0f49fa9ae4
fix(behavior): Proper init priority for ext_power. 2024-02-14 20:29:19 -05:00
Peter Johanson
c7fb418e88 fix(build): Used a fixed temp dir for caching.
* Improve GHA caching by using a fixed temporary directory
  when using one.
2024-02-14 14:08:22 -08:00
honorless
40adb3858d refactor(boards): remove superfluous conf settings 2024-02-10 16:15:09 -08:00
honorless
cdcf4ebfb6 feat(boards): allow use of blackpill_f401cc 2024-02-10 16:15:09 -08:00
Pete Johanson
f72f415c5b fix(docs): More Zephyr docs link updates.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-02-09 14:32:46 -08:00
Peter Johanson
50a303b8bb fix(pm): Restore sleep suspension of devices.
* After the move to `sys_poweroff`, restore the behavior of
  suspending devices before entering sleep state.
2024-02-09 14:32:46 -08:00
Peter Johanson
1d83f279cd fix(pm): Tweaks for deep sleep/PM.
* Restore enabling of PM_DEVICE, make ZMK_SLEEP work with
  the ZMK Uno shield on nrf52840dk_nrf52840 board.
2024-02-09 14:32:46 -08:00
Peter Johanson
edc72c1166 chore(docs): Update Zephyr links to 3.5.0 versions. 2024-02-09 14:32:46 -08:00
Peter Johanson
4bcecd98f8 fix(display): Tweaks to memory Kconfig settings.
* Don't default heap mempool by default now that there's a dedicated
  LVGL mempool
* Set proper defaults for CiZ display hardware/custom screen.
* Double the dedicated display thread stack size for CiZ.
2024-02-09 14:32:46 -08:00
Peter Johanson
2d6c9f797c refactor(display): Move to proper SPI ready API. 2024-02-09 14:32:46 -08:00
Peter Johanson
18e5a1a26b feat: Add Zephyr 3.5 blog post. 2024-02-09 14:32:46 -08:00
Peter Johanson
cd6f8a680c fix(ble): Update security test for changes in 3.5. 2024-02-09 14:32:46 -08:00
Peter Johanson
b2a0a357e1 fix(display): Set a default mem size for built-in
* Set a reasonable default LVGL mem pool size for our built-in
  status screen.
2024-02-09 14:32:46 -08:00
Peter Johanson
d9c0ded402 fix(shields): Fix use of deprecated Zephyr header. 2024-02-09 14:32:46 -08:00
Peter Johanson
aeb5bed3d6 fix(kscan): Adjust charlieplex init level/priority. 2024-02-09 14:32:46 -08:00
Peter Johanson
a6c0399493 fix(bluetooth): Remove LLCP impl override. 2024-02-09 14:32:46 -08:00
Peter Johanson
324ada1d20 fix(boards): Remove unused pin settings.
* Remove unused pin settings that used deprecated
  devicetree properties.
2024-02-09 14:32:46 -08:00
Peter Johanson
8e9b4fa57c fix(boards): Make &bootloader work on nrf52 for now.
* Use `NRF_STORE_REBOOT_TYPE_GPREGRET` to get bootloader behavior
  to work for now until retained bootmode is implemented.
2024-02-09 14:32:46 -08:00
Peter Johanson
3968d9febd feat(boards): Make west flash work with new UF2 runner. 2024-02-09 14:32:46 -08:00
Peter Johanson
b3f1d769f0 fix(bt): Fixes for BLE test BSIM bits. 2024-02-09 14:32:46 -08:00
Peter Johanson
4fcbe3268a fix(bt): Updated snapshots for BLE tests.
* Core Zephyr changes tweaked the output from the
  BT stack for our unit tests.
2024-02-09 14:32:46 -08:00
Peter Johanson
413820fc7f fix(shields): LVGL fixes for nice!view screen
* Bump the LVGL mem pool size needed for custom screen.
* Fixes for LVGL drawing/label usage.
2024-02-09 14:32:46 -08:00
Peter Johanson
802881b625 fix(boards): Remove references to PINMUX Kconfig. 2024-02-09 14:32:46 -08:00
Peter Johanson
f4e6d70465 fix: Proper use of CONTAINER_OF with delayable work. 2024-02-09 14:32:46 -08:00
Peter Johanson
94aa7d8d53 chore(ci): Bump to 3.5 Docker images. 2024-02-09 14:32:46 -08:00
Peter Johanson
552347b8a4 fix(kscan): Adjust composite kscan priority
* Composite kscan needs a dedicated priority to be sure it is
  initialized after the other kscan instances.
2024-02-09 14:32:46 -08:00
Peter Johanson
a81a2d37a8 refactor: Remove explicit blocklist item.
* `sof` is now not enabled by default as a west dep, so need to
  add it to the blocklist ourselves.
2024-02-09 14:32:46 -08:00
Peter Johanson
98e3b8b435 refactor: Move to new sys_poweroff API.
* Move to new `sys_poweroff` API for our deep sleep functionality.
2024-02-09 14:32:46 -08:00
Peter Johanson
b6d9f3c911 fix(ble): Ensure large enough string for setting name.
* Fix warning related to potentially large number of profiles
  causing overflow of allocated string for the setting name.
2024-02-09 14:32:46 -08:00
Peter Johanson
58413ca8c5 refactor(kscan): Clean up warning about shadowed local. 2024-02-09 14:32:46 -08:00
Peter Johanson
d6de8a3acc refactor: Move to POST_KERNEL phase for behavior inits. 2024-02-09 14:32:46 -08:00
Peter Johanson
ba1a6c08ad refactor: Return int from main function. 2024-02-09 14:32:46 -08:00
Peter Johanson
d06e90e713 fix: Fix syscalls generation setup. 2024-02-09 14:32:46 -08:00
Peter Johanson
bd9c71ab0a fix(sensors): Avoid duplicate Kconfig/DTS name.
* Upstream added an equivalent fuel gauge driver, so namespace
  our Kconfig symbol and DTS compatible for the MAX17048 driver.
2024-02-09 14:32:46 -08:00
Peter Johanson
0b5afbf9c0 refacter(bluetooth): Proper HCI header include. 2024-02-09 14:32:46 -08:00
Peter Johanson
fb99496a73 chore: Switch to 3.5 Zephyr version. 2024-02-09 14:32:46 -08:00
Peter Johanson
f7e7c9c10b fix: Add missing include for k_work types. 2024-02-09 14:32:46 -08:00
Peter Johanson
bf4008da02 refactor: All SYS_INIT functions are void args. 2024-02-09 14:32:46 -08:00
Peter Johanson
f4fce9e158 refactor(display): Move new LVGL DPI Kconfig setting. 2024-02-09 14:32:46 -08:00
Cem Aksoylar
b8846cf635 refactor(display): Remove unused BAS includes 2024-02-06 01:09:07 -08:00
Cem Aksoylar
efbcd3c8f6 fix(boards): Disable ZMK_USB for peripherals 2024-02-06 01:09:07 -08:00
Cem Aksoylar
4b03fcb709 fix(boards): Add missing battery header include 2024-02-06 01:09:07 -08:00
Joel Spadin
5826b80374 chore: Fix formatting
Fixed the formatting in a file that wasn't passing pre-commit checks.
2024-02-03 21:56:20 -08:00
Joel Spadin
3a4cf185a1 feat(keymap-upgrader): Upgrade encoder resolution
Added an upgrade function to the keymap upgrader to replace the encoder
"resolution" property with "steps" and (if it is not already present)
"triggers-per-rotation".
2024-02-03 18:45:21 -06:00
Joel Spadin
be75da096c fix(keymap-upgrader): Fix highlight on last line
Fixed an issue where a text edit at the very end of a file would cause
it to highlight from the start of the edit to the start of the file
instead of to the end of the file.
2024-02-03 18:45:21 -06:00
Joel Spadin
c2299e2203 fix(shields): Fix deprecated encoder properties
Switched remaining shields over from resolution to steps.
2024-02-03 18:45:21 -06:00
Joel Spadin
f24a0bf9c8 fix(shields): Add labels to all sensors nodes 2024-02-03 18:45:21 -06:00
Johan Friis
aab09d504c
feat(docs): Document Karabiner interference with Mod-Morphs (#2146) 2024-01-30 00:07:48 -08:00
Xudong Zheng
4a5806ac73 feat(core): enable FPU if CPU has FPU 2024-01-29 17:54:34 -08:00
Cem Aksoylar
0755b7a64c fix(ci): Update upload-artifact with merge step 2024-01-29 16:44:39 -08:00
Dhruvin Shah
5685074835 docs: correcting file path in config.md 2024-01-27 11:40:12 -06:00
senseored
b120daa16a
fix(boards): Assign preonic_rev3 chosen console
Quick fix to make USB-logging work on the Preonic.
2024-01-27 07:18:45 -08:00
Pete Johanson
275c0ce271 Revert "fix(ci): Update one lingering upload-artifacts action." 2024-01-26 00:46:00 -08:00
Peter Johanson
3c14c7c112 fix(ci): Update one lingering upload-artifacts action. 2024-01-26 00:40:05 -08:00
Peter Johanson
789c11629e fix(ci): Bump setup-python version. 2024-01-26 00:26:46 -08:00
Peter Johanson
72d5c01e46 fix(ci): Move to maintained get-changed files. 2024-01-26 00:26:46 -08:00
Peter Johanson
1f8b45d57d fix(ci): Updated actions to move away Node 16. 2024-01-26 00:26:46 -08:00
Joel Spadin
1dbd6910cb chore(docs): Update tree-sitter-devicetree to 0.9.0 2024-01-25 18:03:37 -06:00
Joel Spadin
08d9391a8a feat(keymap-upgrader): Upgrade renamed nodes
Added an upgrade function to fix renamed behavior nodes in the unlikely
event that someone was changing behavior settings this way instead of
using references.
2024-01-25 18:03:37 -06:00
Joel Spadin
bf5284b3b9 fix(keymap-upgrader): Note that changed lines are highlighted 2024-01-25 18:03:37 -06:00
Joel Spadin
d4be70587d fix(keymap-upgrader): Filter key codes to bindings
Changed the key code upgrader to only replace codes that appear in
"bindings" properties. Modifier flags such as MOD_LCTL are no longer
valid as key codes, but they are still used in "mods" properties and
should not be replaced there.
2024-01-25 18:03:37 -06:00
Joel Spadin
37fcf190e6 feat(keymap-upgrader): Highlight changes
Updated the keymap upgrader to highlight which lines it changed as well
as indicate when nothing needed to be upgraded.

Also adjusted the line highlight colors to be more readable in both
light and dark color schemes.
2024-01-25 18:03:37 -06:00
Joel Spadin
84e056793b fix(docs): Fix links to keymap upgrader 2024-01-25 18:03:37 -06:00
Joel Spadin
a0465391be refactor: Improve keymap upgrader
Moved the keymap upgrader to a top-level page like the power profiler
to make it more discoverable. It upgrades more things than key codes
now, so putting it in the codes category doesn't make much sense.

Converted the upgrader code to TypeScript and split it up into smaller
files to make it easier to add new upgrade functions.

Added upgrade functions to remove/replace "label" properties and rename
matrix-transform.h to matrix_transform.h.
2024-01-25 18:03:37 -06:00
Peter Johanson
1a3529a3e6 fix(ci): Use proper variable expression. 2024-01-25 13:20:25 -08:00
honorless
6b547019c2 refactor: use zmk,matrix-transform instead of zmk,matrix_transform
* Align codebase with documentation.
2024-01-23 23:02:35 -06:00
honorless
a3fbc2a5ba docs: suggest zmk,matrix-transform over zmk,matrix_transform
* While functionally equivalent, the hyphenated form of this property
  is more consistent with other ZMK properties and adheres to DTS style
  guidelines.

* Additionally, update links to use Zephyr 3.2 documentation instead
  of 2.5 where appropriate.
2024-01-23 23:02:35 -06:00
Cem Aksoylar
19613128b9 fix(docs): Fix extra line issue in hardware headers
Need to make prettier ignore these, because otherwise it splits
them to separate lines and reverts the whole change
2024-01-20 22:28:41 -08:00
Cem Aksoylar
0dc04df09c fix(docs): Fix eslint-plugin-react errors
Remove unused components, and disable proptype checking for children
in OsTabs custom component since I can't figure out a way to assign
propTypes to it in an mdx file.
2024-01-20 22:28:41 -08:00
Cem Aksoylar
7196f9f075 ci(docs): Disable eslint rule for unescaped entities
eslint-plugin-react is emitting a lot of react/no-unescaped-entities
errors in mdx files, primarily due to apostrophes. It seems not ideal
to have to escape every apostrophe in all mdx text, so this commit
disables the check.

There might be a better way to handle this issue, but I am not aware
of one right now.
2024-01-20 22:28:41 -08:00
Cem Aksoylar
fa91648cce ci(docs): Use eslint plugin for automatic JSX runtime
Ref: https://docusaurus.io/docs/migration/v3#automatic-jsx-runtime
and https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md#when-not-to-use-it
2024-01-20 22:28:41 -08:00
Cem Aksoylar
e3f458e539 ci(docs): Fix tsc config for docusaurus 3 2024-01-20 22:28:41 -08:00
Cem Aksoylar
57684f8a66 fix(docs): Fix broken anchors in docs (but not blog) 2024-01-20 22:28:41 -08:00
Cem Aksoylar
5cbffd6625 fix(docs): Work around docusaurus bug causing broken links
Some links ended up broken after docusaurus 3 upgrade,
especially if they are the second on the same line and have anchors.
Likely due to https://github.com/facebook/docusaurus/issues/9518
2024-01-20 22:28:41 -08:00
Cem Aksoylar
1b326ff856 fix(docs): Fix relative links with trailing slashes 2024-01-20 22:28:41 -08:00
Cem Aksoylar
dcfe07d9f6 refactor(docs): Use new admonition title syntax and disable mdx v1 compat 2024-01-20 22:28:41 -08:00
Cem Aksoylar
ee855de349 fix(docs): Fix incorrect admonition title 2024-01-20 22:28:41 -08:00
Cem Aksoylar
f014eb45a7 refactor(docs): Use .mdx for docs with mdx features
Also applies prettier changes in touched files due to precommit
2024-01-20 22:28:41 -08:00
Cem Aksoylar
00962a7255 refactor(docs): Remove no longer necessary React imports 2024-01-20 22:28:41 -08:00
Cem Aksoylar
a0a952413a fix(docs): Fix deprecated admonition types 2024-01-20 22:28:41 -08:00
Cem Aksoylar
13c856d1d3 fix(docs): Fix mdx 3 incompatibility 2024-01-20 22:28:41 -08:00
Cem Aksoylar
0827ff245f chore(docs): Update docusaurus to 3
Following https://docusaurus.io/docs/migration/v3#upgrading-dependencies
and `npm update`
2024-01-20 22:28:41 -08:00
Peter Johanson
f71458aca0 fix(shields): Fix battery warnings for custom widgets. 2024-01-16 16:39:28 -08:00
crides
8c14b155e8 docs: confirm some consumer codes on iOS
Tested on iOS 16.6
2024-01-15 18:07:48 -08:00
Peter Johanson
0890aaeaff chore: Run tests if any includes change. 2024-01-14 16:19:30 -08:00
Peter Johanson
e5050e40fe feat(tests): Enable asserts for tests. 2024-01-14 16:19:30 -08:00
Peter Johanson
e89cffc959 fix(events): Remove our usage of assert.
* __ASSERT is converted to a do/while loop when asserts are enabled,
  which doesn't work with our usage, so revert that addition.
2024-01-14 16:19:30 -08:00
Peter Johanson
331915f989 fix: Fix missed event manager usages from refactor. 2024-01-14 11:31:05 -08:00
Peter Johanson
644feeb40d fix(core): Address review comments from Joel.
* Fix up some lingering events API tweaks for heap-less event manager.
2024-01-14 11:13:57 -08:00
Peter Johanson
33209dee1d refactor(core): Move to stack allocated events.
* Move to local/stack allocated event API that doesn't require
  dynamic allocation/freeing.
* Disable heap, we no longer use alloc/free unless using LVGL.
* Tons of refactors all over to account for the new event approach.
2024-01-14 11:13:57 -08:00
Peter Johanson
50e473276f chore(ci): Split build and upload into separate steps
* Treat build and upload as distinct steps during a build, and don't fail
  a PR if only the upload portion fails.
2024-01-14 10:42:04 -08:00
typorian
466cf92029
fix(docs): Document CONFIG_ZMK_USB_BOOT 2024-01-12 11:02:47 -08:00
dependabot[bot]
2829185a94 chore(deps): bump follow-redirects from 1.15.2 to 1.15.4 in /docs
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-12 10:42:52 -08:00
Peter Johanson
db9ab30335 fix(boards): Fix up EXT_POWER naming for adv360pro;
* Restore setting loading by preserving old device name for the
  external power node.
2024-01-08 17:50:19 -08:00
Xudong Zheng
6bf4870704 fix(battery): prevent bus fault when battery does not exist
zmk_battery_start_reporting() may be called from battery_event_listener(), which
will result in a bus fault when attempting to read a battery that does not exist
such as on a dongle.
2024-01-08 17:39:05 -08:00
Peter Johanson
7652fbeb6b fix(split): Split peripherals should auto sec req still.
* Ensure split peripherals have `BT_GATT_AUTO_SEC_REQ` enabled so that
  reconnects to centrals are automatically encrypted.
2024-01-06 00:53:49 -08:00
Peter Johanson
12bc8b0402 fix: Fix function signatures for WPM.
* Recent refactor accidentally used the wrong signatures for a few
  WPM function definitions.
2024-01-05 16:09:34 -08:00
Leonardo Bispo
cebf651d11
fix(boards): include the right flash info in XIAO BLE overlay 2024-01-05 19:00:32 -05:00
Peter Johanson
395ffaa790 fix(ble): Properly send mouse HoG using worker.
* Properly send mouse HoG reports using our worker to avoid thread issues.
2024-01-05 12:17:59 -08:00
Peter Johanson
74875314f8 feat(ble): Request encryption if notifying fails
* If attempting to notify and getting an EPERM return value, request
  upgrading the security of the connection at that moment, since it
  likely means we got a connection to a bonded host but the connection
  hasn't been upgraded to encrypted yet.
2024-01-05 12:17:59 -08:00
Pete Johanson
69f962fab2 feat(ble): Add security related tests.
* Add security related tests to verify behavior when trying to read
  a GATT characteristic from our peripheral with and without client
  auto security request/retry.
2024-01-05 12:17:59 -08:00
Peter Johanson
bc7b4b56bd fix(ble): Disable Auto Sec Req again.
* Auto security request actually makes macOS worse, so disable it,
  and remove our early request in favor of using GATT enforcement
 to ensure connections are secured.
2024-01-05 12:17:59 -08:00
Chris Andreae
7d1c1ae8fd fixup! docs
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-01-05 12:16:38 -08:00
Chris Andreae
7b9466c7dc fixup! add documentation for BT_CLR_ALL 2024-01-05 12:16:38 -08:00
Chris Andreae
194a9790eb fixup! use wider type for loop iterator 2024-01-05 12:16:38 -08:00
Chris Andreae
b813f34e34 fixup! bt: add BT_CLR_ALL behaviour 2024-01-05 12:16:38 -08:00
Chris Andreae
f4fe7fa40f Extract common behaviour of clearing a bond 2024-01-05 12:16:38 -08:00
Chris Andreae
604c95118e Remove error reporting from ble utility functions that never error 2024-01-05 12:16:38 -08:00
Chris Andreae
b8cb407351 lint: use correct type signature for Zephyr callbacks 2024-01-05 12:16:38 -08:00
Chris Andreae
7a5155f36e lint: add (void) parameter to pass -Wstrict-prototypes
Note there was one place where a non-strict prototype was actually being used
with an argument, in `zmk_hog_init`. In this case, the actual argument type was
added instead.
2024-01-05 12:16:38 -08:00
moergo-sc
5257cde1f5 bt: add BT_CLR_ALL behaviour
Defines behaviour to clear all paired Bluetooth profiles
2024-01-05 12:16:38 -08:00
Justin Ridgewell
6f8d080b6a
fix: Use zmk_battery_state_of_charge in battery widgets 2024-01-05 15:02:06 -05:00
Cem Aksoylar
b3146e665e
feat(blog): Add post for joelspadin projects for spotlight series (#2092)
Co-authored-by: Joel Spadin <joelspadin@gmail.com>
2024-01-05 10:42:04 -08:00
Gabor Hornyak
0e2f94b73b feat(ble): Support perhipheral battery levels.
* Add ability to fetch and report peripheral battery levels
  on split centrals.
* Add additional support for adding a new Battery Level
  service to split centrals that exposes fetched peripheral
  battery levels to connected hosts.

Co-authored-by: Peter Johanson <peter@peterjohanson.com>
2024-01-03 09:26:51 -08:00
honorless
d35311af97 refactor: remove misleading build warning
* Among other issues, this message is often misinterpreted by users
  building out-of-tree shields -- leading them to think the shield
  "not being found" is the cause of a build failure.
2023-12-30 18:26:00 -08:00
honorless
7ef6ec7560 refactor: remove unused Kconfig files 2023-12-30 18:26:00 -08:00
jack
c965e35140
chore: Ignore python virtualenv files 2023-12-27 10:07:55 -08:00
Peter Johanson
a593c7260a feat(bt): Add test for unauth overwrite.
* Add a test to ensure unauth overwrite does the right thing when
  hosts try to pair again without the profile cleared on the ZMK side.
2023-12-18 13:18:09 -08:00
Cem Aksoylar
12d73ba4f9 fix(docs): Fix remark on &bt parameter #2 2023-12-17 17:38:07 -08:00
Cem Aksoylar
78fa1e77c4 feat(blog): Add nodefree-config post for spotlight series
Co-authored-by: Robert U <978080+urob@users.noreply.github.com>
2023-12-16 21:55:45 -08:00
Peter Johanson
1b8b6b4a0e refactor(core): Make low priority queue optional.
* Add a new Kconfig symbol to enable the low priority queue, and make
  the two features that depend on it `select` the symbol to turn it on.
  This helps ensure no wasted RAM/ROM on devices that don't need it.
2023-12-16 17:10:45 -08:00
Peter Johanson
f4f402fa44 fix(ci): Use unique artifact for test logs
* To address conflicts with identically named artifact uploads, include the
  test name in the artifact name.
2023-12-15 13:23:51 -08:00
Peter Johanson
9b3a98691c refactor(bt): Split security and conn exp. Kconfig
* Split connection and security experimental changes into dedicated
  Kconfig flags for easier testing of only connection related fixes.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-12-15 08:59:03 -08:00
Peter Johanson
52ed49b4bb fix(ci): Upgrade to github-script@v7
* Also adjust form @actions/upload API changes.
2023-12-13 11:48:28 -08:00
Cem Aksoylar
ff57ccc75a feat(shields): Allow settings_reset to build with board-only keyboards 2023-12-13 11:29:33 -08:00
Hooky
2c50cff891
feat(kscan): Add charlieplex keyscan driver
* Supports matrixes with and without additional interrupt pin use.

Co-authored-by: Peter Johanson <peter@peterjohanson.com>
2023-12-09 17:10:05 -05:00
Peter Johanson
b35a5e83c0 fix(shields): Don't enable passkey support on Uno.
* The ZMK Uno has no way to input the full range of digits, so skip
  that setting so it's not pulled in by BLE experimental feature flag.
2023-12-08 14:57:23 -08:00
Peter Johanson
63c8c5700a feat(bt): Add more experimental tweaks.
* Support auto security upgrade for splits properly.
* Disable 2M and legacy LLCP if the experimental
  Kconfig flag is selected.
2023-12-08 14:57:23 -08:00
Peter Johanson
96f9031951 fix(build): Only copy if zephyr module detected
* To fix issues with breakage with existing user config
  repos, only do our copy strategy if we detect a zephyr module
  present in the repo as well.
2023-12-08 10:49:27 -08:00
Cem Aksoylar
384637ae6c fix(docs): Fix text blurb about split Kconfig.defconfig 2023-12-06 22:50:06 -08:00
Cem Aksoylar
09d47d8117 refactor(docs): Convert breaks to unordered lists in tables
Co-authored-by: Joel Spadin <joelspadin@gmail.com>
2023-12-06 22:46:03 -08:00
Cem Aksoylar
55bf7cae7e feat(docs): Note how parameters are forwarded for behaviors 2023-12-06 22:46:03 -08:00
Cem Aksoylar
56d863cba6 feat(docs): Document sensor-rotate in behaviors config 2023-12-06 22:46:03 -08:00
Cem Aksoylar
2bab81a304 fix(docs): Note -var definition files for macros 2023-12-06 22:46:03 -08:00
Cem Aksoylar
76a209c728 fix(docs): Fix sticky key #binding-cells 2023-12-06 22:46:03 -08:00
Cem Aksoylar
f3ad08b619 fix(docs): Add missing page pointers in behaviors config 2023-12-06 22:46:03 -08:00
Peter Johanson
88338a9b3c feat(shields): Add ZMK Uno split setup
* Make it easier to test split code with ZMK Uno
  hardware by adding a split left/right setup as well.
2023-12-06 15:00:29 -08:00
Peter Johanson
291bbc2257 refactor(docs): New shield guide to suggest modules
* Update the new shield guide to position Zephyr module location
  as the default when creating new shields, with a note about
  using ZMK repository itself as a last resort.
* Document building with additional Zephyr modules.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-12-06 09:36:37 -08:00
Peter Johanson
3656ec63d0 feat(build): Build unified config/mod repos.
* Detect in our build script if our config repo is *also* a Zephyr
  module and if so pass to ZMK build in ZMK_EXTRA_MODULES
  define.
* Copy config directory contents to new independent temp workspace
  to avoid Kconfig conflicts between the build repo's zephyr module
  directory and the checkout zephyr pulled in by `west update`.
2023-12-06 09:36:37 -08:00
Peter Johanson
efd403a567 refactor: Hook into CMake loading in a better spot.
* Shift to using an extra Zephyr module to do keymap location
  work after all board roots are resolved. This avoids duplicate work
  and allows us to load custom boards from Zephyr modules as well as
  user config setups.
2023-12-06 09:36:37 -08:00
Peter Johanson
0ab6a0ad11 feat(bt): Add new experimental Kconfig setting.
* In order to have an easy way to test and phase in BT changes, add a
  new `ZMK_BLE_EXPERIMENTAL_FEATURES` Kconfig setting.
2023-12-06 09:22:50 -08:00
Joel Spadin
17a6f0b128 refactor: Remove new uses of label property
Removed new uses of the "label" property which were introduced after
the previous commits on this branch were written.
2023-12-04 20:06:54 -06:00
Joel Spadin
0fd8e25807 docs: Document behavior name length limit
Added a section to the new behavior guide to document that the names of
behaviors invoked on the peripheral side of a split must be at most 8
characters long.
2023-12-04 20:06:54 -06:00
Joel Spadin
23ecf08119 refactor(behaviors)!: Remove labels from behaviors
Removed the label property from built-in behaviors, custom behaviors
defined in a few keymaps, and macros generated with ZMK_MACRO().

Now that node names are used to identify behaviors, and names only need
to be unique within the set of behaviors, the names of all behaviors
have been shortened to be similar to their original labels.

This means that any keymaps which reference behavior nodes by name
instead of by label will need to be updated. Keymaps typically use the
labels though, so most keymaps should be unaffected by this change.
2023-12-04 20:06:54 -06:00
Joel Spadin
36eda571b7 refactor(behaviors): Create a list to lookup behaviors
Added BEHAVIOR_DT_DEFINE() and BEHAVIOR_DT_INST_DEFINE(), which work
exactly like the DEVICE_*_DEFINE() macros, except they also register the
device as a behavior by adding a pointer to it to a memory section.

Added zmk_behavior_get_binding(), which works like device_get_binding()
except that it only searches the devices that have been registered as
behaviors. This ensures that behaviors cannot have name collisions with
other devices defined by the SoC, which will be important when we remove
the label property from behaviors so they are given their node names.

As an added benefit, this is faster since it searches a smaller list.
Some basic benchmark code I wrote indicates it takes 30-70% as long,
depending on where the behavior is in the list and whether the name
string is an exact pointer match.

From now on, behaviors should use BEHAVIOR_*_DEFINe() instead of
DEVICE_*_DEFINE(), and any code that looks up a behavior by name should
use zmk_behavior_get_binding() instead of device_get_binding().
2023-12-04 20:06:54 -06:00
Joel Spadin
5ecd3521f5 docs: Remove label property from documentation 2023-12-04 20:06:54 -06:00
Joel Spadin
d4e8dee444 refactor(keymaps): Rename layer label to "display-name"
Changed the property used to define a layer name for displays from
"label" (which affects other things in Zephyr and is deprecated) to
"display-name". (It cannot be named simply "name", because that has
special meaning in newer versions of the devicetree compiler.)

"label" is still supported as a fallback, so no changes need to be made
to existing keymaps.
2023-12-04 20:06:54 -06:00
Joel Spadin
ba5637fdef refactor: Remove unimportant labels
Removed "label" properties which no longer have any function.

Labels are still used as layer names and as identifiers for sending
behaviors between sides of a split keyboard, so those have been left
alone for now.
2023-12-04 20:06:54 -06:00
Joel Spadin
3ae9e74056 refactor(drivers): Make label property optional 2023-12-04 20:06:54 -06:00
Joel Spadin
05925c72d7 refactor(ext_power): Remove label property
Changed the label property on zmk,ext-power-generic to be optional and
removed it from existing uses. Renamed the nodes for all non-development
boards to "EXT_POWER" to preserve user settings.

rgb_underglow.c now finds the correct device by finding the first
instance of zmk,ext-power-generic instead of looking for a node named
"EXT_POWER".
2023-12-04 20:06:54 -06:00
Joel Spadin
179bdbc41a refactor(behaviors): Make label property optional
Changed all code (except for layer names) which used the label property
to use DEVICE_DT_NAME() instead, which uses the label if set or falls
back to the full node name. This matches how Zephyr determines the node
names used with device_get_binding() and allows us to start removing the
deprecated label property from things.
2023-12-04 20:06:54 -06:00
ReFil
dbe5dfb1d8
feat(split): Add is_bonded function to peripherals
There is already a function to see if the peripheral is connected, a matching one for if it's bonded is a useful addition for displays/indicators. `is_bonded` gets reset to false in the advertising function in preparation for runtime peripheral bond clearing
2023-12-04 18:31:35 -05:00
ReFil
9bacaffe62
feat(hid): Add KConfig option for higher NKRO usages
By default the maximum NKRO usage is set to maximise compatibility, but some keys dont work, this adds the ability to use those extended keys, at the cost of compatibiltity

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
2023-12-04 18:24:05 -05:00
Cem Aksoylar
8ee3467adf fix(docs): Update outdated information in the hardware page 2023-12-04 15:22:49 -08:00
Cem Aksoylar
042e5209b3 fix(docs): Fix table for BT_DISC 2023-12-04 09:24:53 -08:00
ReFil
ecefd6d24b
fix(docs): Update backlight docs (#1894)
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>
2023-12-04 09:21:49 -08:00
Peter Johanson
55aed8e89d feat(tests): Add ability to auto-accept test diff. 2023-12-02 17:11:45 -08:00
Peter Johanson
c63d0791d5 chore: Ensure BSIM env. variables set in devcontainer. 2023-12-02 17:11:45 -08:00
Peter Johanson
693530c2f1 feat(bluetooth): Initial nRF52 BSIM based test support.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-12-02 17:11:45 -08:00
Peter Johanson
da15564d0e feat(bluetooth): Build on ARCH_POSIX. 2023-12-02 17:11:45 -08:00
Peter Johanson
3fad4dba07 fix(bt): Passkey entry pairing fixes.
* Don't propogate any key press events while in the
  middle of passkey entry, avoid funky state on hosts.
* Handle passkey on release, not press, to ensure key *releases*
  are not accidentally sent, especially the Enter release
  at the very end of passkey entry, which can trigger
  cancel in the dialog if the keyboard is connected
  via USB to the same host.
2023-12-01 16:48:46 -08:00
Peter Johanson
329d6474ee feat(ble): Make it possible to use BT_GATT_AUTO_SEC_REQ
* Only upgrade security of new connections if BT_GATT_AUTO_SEC_REQ
  is not enabled.
2023-12-01 16:47:49 -08:00
Peter Johanson
744f70c80c feat(bt): Add support for unauth overwrite
* Properly handle the user enabling the
  `CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE`
  Zephyr flag and handle re-pairing to an existing taken
  profile from the same address.
2023-12-01 23:39:31 +00:00
ReFil
69f7bfb409
feat(boards): Kinesis Advantage 360 pro
Add the Kinesis Advantage 360 Pro board definition.
2023-11-27 19:09:58 -05:00
Peter Johanson
817ce8764f refactor: Move to zmk_hid_indicators_t type. 2023-11-27 16:03:18 -08:00
Alessandro Bortolin
d9bb0d7d0e feat: LED indicators on peripheral side 2023-11-27 16:03:18 -08:00
Alessandro Bortolin
4e55c5f6e9 feat: handle LED indicators report 2023-11-27 16:03:18 -08:00
ReFil
6276e973d5 feat(ble): Only update BAS when active
Subscribes to the activity changing event, will stop the battery work timer when in idle or deep sleep, restart when board goes active
2023-11-27 09:58:20 -08:00
ReFil
84b93350b8
feat(docs): Document adding USB logging to a standalone board (#2039)
Currently this is only documented in the zephyr 3.0 upgrade blog. This explicitly documents it as well as when it doesn't need to be applied (i.e. when a mcu board is already in use).
2023-11-27 09:12:33 -08:00
Cem Aksoylar
a3f30ee799 feat(build): Add support for artifact-name in build.yaml, correctly 2023-11-23 21:09:14 -08:00
Idan Gazit
f77e38f2b9
chore: Update devcontainer.json
The format has changed slightly.
2023-11-23 21:02:22 -08:00
Chris Andreae
0a4b1a6533
feat(ble): add behavior to disconnect from BLE profile
Adds new functionality and a behavior to disconnect an active BLE connection.
The motivation for this is that for some devices like phones, the presence of an
active BLE connection results in the onscreen keyboard being selected.
2023-11-20 15:00:10 -05:00
Alexander Krikun
d7d9eed317 feat(mouse): Initial mouse keys support.
* Add HID report/descriptor for a new report with mouse buttons,
  and x/y/wheel deltas.
* New mouse key press behavior for press/release of mouse keys.
* Add constants for HID main item values (e.g. data/array/absolute)
* Define and use constants for our HID report IDs.
2023-11-15 11:16:59 -08:00
ReFil
8776911da5
feat(ble): Allow disabling BLE BAS reporting
The battery reporting has been known to cause macOS computers to wakeup repeatedly. In some cases (e.g. display or custom lighting implementation) one might want to collect battery SOC without broadcasting over BLE

* Update docs/docs/config/battery.md

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-11-15 13:03:30 -05:00
Peter Johanson
3027b2a6e8 chore(usb): Don't enable ZMK_USB_ROOT by default.
* Some initial reports of crashes with this code enabled, so disabling
  by default for now pending further investigation.
2023-11-13 23:56:10 -08:00
Peter Johanson
f6716f869a fix(usb): Build with ZMK_USB_BOOT disabled.
* Invert the logic so `get_keyboard_report` is sane when `ZMK_USB_BOOT`
  is disabled.
2023-11-13 23:56:10 -08:00
Chris Andreae
2a1904e184
feat(boards): Add Glove80 to boards
* Add board definition for MoErgo Glove80
2023-11-14 02:08:58 -05:00
Pete Johanson
afe65ead9c Revert "feat(build): Add support for artifact-name in build.yaml"
This reverts commit c1bf35ce1d.
2023-11-13 13:51:08 -08:00
Peter Johanson
964c54139d fix(usb): Tweak how ZMK_USB gets enabled.
* Previous version of multiple overrides of the default value of ZMK_USB
  were problematic. Move to using board _defconfig files for the
  defaults for those, along with proper `depends on` for ZMK_USB that
  accounts for split and split roles.
2023-11-13 12:56:23 -08:00
Cem Aksoylar
7b4b5d4ff2 fix(docs): Fix debouncing driver support note 2023-11-13 12:37:09 -08:00
Cem Aksoylar
a5c3edd51b refactor(docs): Remove local build section in customization 2023-11-13 12:34:44 -08:00
Cem Aksoylar
2554b5c88f fix(docs): Update boards in build examples to common+uf2 ones 2023-11-13 12:34:44 -08:00
Cem Aksoylar
c1bf35ce1d feat(build): Add support for artifact-name in build.yaml 2023-11-13 12:27:05 -08:00
Chris Andreae
91aa3378f3
feat(usb): Add boot protocol support
* USB boot protocol support
* Use a single definition of a boot report, used for regular reports in
  non-6KRO, and for rollover in all branches.
* Handle gaps in the zmk report when producing a boot report in HKRO mode. For
  .example, if it was 8KRO, it would be possible to have the state 0 0 0 0 0 0 0
  17 (by pressing 8 keys, and letting go of the first 7). Copying the first 6
  bytes would not show up the single pressed key.
* Disable usb status change and callback on SOF events:
  SOF events were introduced by the boot protocol changes, and required internally
  by Zephyr's idle support, but are unused within ZMK itself. Ignore them in the
  usb status callback.

---------

Co-authored-by: Andrew Childs <lorne@cons.org.nz>
2023-11-13 13:04:04 -05:00
Cem Aksoylar
b80c0be0ce feat(blog): Add keymap editor post for spotlight series
Co-authored-by: Nick Coutsos <nick@coutsos.com>
2023-11-08 23:00:26 -08:00
Cem Aksoylar
5b49bc10cd feat(blog): Show all posts on sidebar 2023-11-08 23:00:26 -08:00
Peter Johanson
c2d220fbdf refactor(hid): Use proper defines for HID values.
* Add report ID defines and use them consistently.
* Add defines for main item value flags to avoid magic constants.
2023-11-08 16:00:19 -08:00
Peter Johanson
34c8b3f1e3 refactor: Update boards/shields for encoders.
* Update existing boards/shields for new `steps` and
  `triggers-per-rotation` set up.
2023-11-03 12:35:25 -07:00
Peter Johanson
8d09809ef0 fix(docs): Updated encoder config docs.
* Update new shield guide for new sensor/encoder settings.
* Add DTS section to encoder config docs.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-11-03 12:35:25 -07:00
Nick Coutsos
9e8ee86842
chore(docs): Fix links to relocated files (#1975) 2023-10-22 09:05:49 -07:00
ReFil
82e85699ed
feat(docs): Document ZMK_BATTERY_REPORTING config (#1971)
`CONFIG_ZMK_BATTERY_REPORTING` is currently undocumented, A new KConfig section for battery has been added in line with the other sections in the configuration section of the docs, `CONFIG_ZMK_BATTERY_REPORT_INTERVAL` has been moved from system to battery for consistency
2023-10-19 14:04:04 -07:00
Khalid Aj
7fe9ecd87f
feat(shields): Add Reviung53 shield.
* Initial Reviung53 shield

---------

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-10-17 18:43:50 -04:00
Joel Spadin
3b1d04372b feat: Print Kconfig and DTS for failed builds
Added the combined devicetree file to the user config build action. Set
it and the Kconfig output to run even on a failed build.
2023-10-17 15:35:44 -07:00
Alex Kang
a9a53e6da4
feat(shields): Reviung34 shield definition
* Initial implementation of REVIUNG34 shield.
* Add copyright information to files
* Added a README with instructions on how to enable the 1x2u layout.
* Add a default chosen matrix transform in the default keymap, alongside a commented out version for the alternate layout.

---------

Co-authored-by: Peter Johanson <peter@peterjohanson.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-10-14 19:39:42 -07:00
Peter Johanson
3ab922822c feat(shields): Add ZMK Uno nice!view support.
Export the `nice_view_spi` node properly from the ZMK Uno overlay
to ensure the shield will work when built along with the `nice_view`
shield.
2023-10-14 10:51:48 -07:00
Cem Aksoylar
a9f677007b fix(blog): Correct incorrect info re: global-quick-tap 2023-10-11 12:18:02 -07:00
dependabot[bot]
0c06023ca0 chore(deps): bump postcss from 8.4.18 to 8.4.31 in /docs
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.18 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.18...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-10 16:17:44 -07:00
ReFil
6c75d6986c feat(docs): Document globe key specific quirks 2023-10-10 14:04:28 -07:00
Joel Spadin
65667b863a docs: Add syntax highlighting to more code blocks
Added language tags to more code blocks in the documentation to enable
syntax highlighting.
2023-10-09 15:19:24 -07:00
Joel Spadin
4a339093ce docs: Add highlighting for devicetree and kconfig
Added syntax highlighting for devicetree and kconfig files.

The PrismJS project is not accepting contributions right now as they
work on a version 2 of the library, so the new language files are added
directly here.

Also enabled syntax highlighting for various languages that are used in
the docs but aren't enabled in Docusaurus by default.
2023-10-09 15:19:24 -07:00
Diogo Doreto
6af22424f1 feat(shields): add right encoders support to waterfowl 2023-10-09 11:46:05 -07:00
Cem Aksoylar
791711b555 feat(docs): Note how to use GPIO outside interconnect definition 2023-10-08 18:38:48 -07:00
Joel Spadin
8a84b7dd5b
fix(shields): Fix incorrect union access in nice view
Fixed an error in a previous commit where a member of the selected
endpoint was used without checking if it was the correct transport type.
The nice!view status screen displays the active BLE profile regardless
of whether BLE is active, so we have to get that data directly from the
BLE code instead of from the selected endpoint.
2023-10-08 19:30:23 -04:00
Alex Kang
fd05478897
feat(shields): Microdox V2 shield definition
* Refactor common parts of the Microdox sheild into a separate file. This is in preparation for adding Microdox V2 as another shield in the same directory.
* Refactor Microdox keymap into a common file in preparation for Microdox V2
* Add Microdox V2 shield definition
* Added a README to explain v1/v2 differences.
2023-10-06 15:27:38 -04:00
Cem Aksoylar
ca5c9b4ae6
feat(blog): Add SOTF #6 (#1943)
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
2023-10-05 19:53:15 -07:00
Amettler Thierry
913fdb831e
feat(docs): Add configuration snippet for layer-taps 2023-10-04 13:29:06 -07:00
Seth Milliken
df92b0e37d
feat(shields): sofle: add underglow support with &pinctrl update
* Sofle Shield: Add underglow support

---------

Co-authored-by: Kim Streich <kim@infusedinsight.com>
Co-authored-by: Seth Milliken <seth_zmk@araxia.net>
2023-10-04 11:48:46 -04:00
Andrew Rae
11996ff7f0 refactor(behaviors): Final global-quick-tap deprecation. 2023-10-03 01:12:47 -07:00
Andrew Rae
2234be0871 refactor(docs): Apply suggestions from @caksoylar
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-10-03 01:12:47 -07:00
Andrew Rae
f0f6d61e79 fix(tests): Updating old tests includes 2023-10-03 01:12:47 -07:00
Andrew Rae
b85ffa4b6c refactor(behaviors): global-quick-tap -> require-prior-idle
Renaming global-quick-tap-ms to require-prior-idle.
2023-10-03 01:12:47 -07:00
Andrew Rae
49c393e8f8 refactor(docs): Applying suggestions for gqt from @caksoylar
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-10-03 01:12:47 -07:00
Andrew Rae
1e84e265b1 feat(docs): Adding global-quick-tap-ms docs 2023-10-03 01:12:47 -07:00
Andrew Rae
77eb44ba9b feat(behaviors): Adding global-quick-tap-ms for combos
This brings the 'global-quick-tap' functionality to combos by filtering
out candidate combos that fell within their own quick tap term.

I also replaced `return 0` with `return ZMK_EV_EVENT_BUBBLE` where appropriate.
(I assume this was done in past as it is similar to errno returning, but
being that this is to signify an event type I find this more clear)
2023-10-03 01:12:47 -07:00
Andrew Rae
2f6abff3bc refactor(behaviors): Giving global-quick-tap its own term
Detaching the global-quick-tap functionality from the quick-tap term.
This makes way for two improvements:

1. This functionality can be added to combos under a unified name
   'global-quick-tap-ms'.

2. This allows users to set a lower term for the 'global-quick-tap'
   (typically ~100ms), and a higher term for the regular
   quick-tap (typically ~200ms)

This deprecates the global-quick-tap option, however if it is set, the
quick-tap-ms value will be copied to global-quick-tap-ms.
2023-10-03 01:12:47 -07:00
Flo Kempenich
aa4cb143bf
fix(combos)Fix bug with overlapping combos timeouts (#1945)
* Fix bug with overlapping combos timeouts

* Fix trailing whitespace

* Fix log format
2023-10-03 04:03:59 -04:00
Joel Spadin
6a3cc914fc fix: Fix nice_view display widgets 2023-10-02 22:03:08 -07:00
Joel Spadin
b17d896c5c fix: Address review comments 2023-10-02 22:03:08 -07:00
Joel Spadin
651ed05e9a refactor: Split endpoint to transport and instance
Changed the endpoints code to rename the existing endpoint types to
"transport" and add the concept of "endpoint instances". A transport is
the method by which data is sent, while instances allow describing
multiple endpoints that use the same transport (e.g. bluetooth profiles)

Also added new APIs to get the total number of possible endpoint
instances and assign each instance a unique index, which can be used
for tracking separate state for each endpoint in other code files.
2023-10-02 22:03:08 -07:00
Andrew Rae
2f05ad55ca fix(core): Prevent pre-releasing explicit mods. 2023-10-02 12:28:02 -07:00
Andrew Rae
dffdb2365e test(core): Adding coverage for key pre-releasing.
Added cases for the two use cases I know of:
    1. Rolling with key-repeat behavior
    2. Rolling symbols that have the same base key, eg `+=`
2023-10-02 12:28:02 -07:00
Andrew Rae
933e369d7c feat(core): Adding pre-release for keys that were already pressed.
This fixes #1207 and #1076 (and maybe more?).
2023-10-02 12:28:02 -07:00
ReFil
c1ebadcd2a
feat(hid): Add apple globe keycode
* feat(hid): Add apple globe keycode
* Update docs/src/data/hid.js

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
Co-authored-by: Nick Coutsos <nick@coutsos.com>
2023-09-29 13:14:31 -07:00
zhiayang
9b3d2cb99f
fix(driver): Fix broken compilation for MAX7318 driver 2023-09-28 12:19:14 -04:00
ClicketySplit
07c82836e0
fix(shields): Leeloo-Micro set status disabled for encoders. 2023-09-28 11:54:08 -04:00
zhiayang
8abc449cc2
feat(drivers): add driver for MAX17048 fuel gauge
Add driver for MAX17048 fuel gauge for battery reporting.
2023-09-25 21:04:03 -04:00
Peter Johanson
28ce23d489 chore(tests): Move to proper header name. 2023-09-16 11:52:40 -07:00
Peter Johanson
0ca7f69b6d refactor: Promote debounce to exposed mod lib.
* Promote previously local debounce code from kscan drivers to exposed
  module lib, for use with other drivers as needed.
* Refactor existing kscan driver to new "public" API.
2023-09-16 11:52:40 -07:00
Peter Johanson
c28ef1b61e refactor(drivers): Use proper init stage/priority.
* Avoid APPLICATION stage and use the proper earlier stage for
  kscan drivers.
2023-09-16 11:52:40 -07:00
Peter Johanson
690bc1bb44 refactor: Move drivers into properly module.
* Align our driver module layout to properly match Zephyr conventions,
  allowing proper CMake setup to amend the library for each type of driver.
2023-09-16 11:52:40 -07:00
Jeppe Klitgaard
eaeea4bdfa
feat(docs): Add missing &kp tip for devicetree_unfixed.h error 2023-09-11 23:32:09 -07:00
Cem Aksoylar
7f9e9f8c64 fix(boards): Disable QSPI for Xiao BLE
The GD25Q16 flash connected via QSPI seems to be causing issues
with excessive battery use and inability to sleep. Since ZMK doesn't
use it, disable it.

Resolves #1901
2023-09-05 22:40:25 -07:00
Cem Aksoylar
f442776fe2 feat(docs): Detail logging and note extra useful options 2023-09-04 23:30:52 -07:00
dependabot[bot]
8087fa3b2b chore(deps): bump @fortawesome/fontawesome-svg-core in /docs
Bumps [@fortawesome/fontawesome-svg-core](https://github.com/FortAwesome/Font-Awesome) from 6.4.0 to 6.4.2.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.4.0...6.4.2)

---
updated-dependencies:
- dependency-name: "@fortawesome/fontawesome-svg-core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 23:20:33 -07:00
Nate Eagleson
693875675f
fix(docs): Fix typo in caps-word.md (#1924) 2023-09-04 16:59:59 -07:00
Peter Johanson
718500543b feat(split): Use directed advertising.
* Split centrals to scan with their identity so they receive direct
  advertising packets.
* Split peripherals to use direct advertising if they have an existing
  bond to a split central.
2023-09-04 13:54:07 -07:00
dependabot[bot]
3936298260 chore(deps-dev): bump eslint-plugin-react from 7.32.2 to 7.33.2 in /docs
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.32.2 to 7.33.2.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.32.2...v7.33.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-03 22:39:26 -07:00
Peter Johanson
647945d9f8 feat(shields): Add splitkb.com Aurora Helix
* Add new shield for splitkb.com Aurora Helix, supporting
  keys, encoder(s), displays, and RGB.
2023-09-03 22:39:10 -07:00
dependabot[bot]
8984e12f0d chore(deps-dev): bump json-schema-to-typescript in /docs
Bumps [json-schema-to-typescript](https://github.com/bcherny/json-schema-to-typescript) from 12.0.0 to 13.1.1.
- [Changelog](https://github.com/bcherny/json-schema-to-typescript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bcherny/json-schema-to-typescript/commits)

---
updated-dependencies:
- dependency-name: json-schema-to-typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-03 15:25:21 -07:00
dependabot[bot]
3de23938d6 chore(deps): bump word-wrap from 1.2.3 to 1.2.4 in /docs
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-02 23:11:02 -07:00
フィルターペーパー
ac0691471f feat(shields): Add Bluetooth bindings to kyria keymaps
Bluetooth bindings are useful for handling pairings with hosts. This
change adds the header and a few default commands as template for
new users to work with.
2023-09-02 23:08:17 -07:00
Xudong Zheng
544612c8c0 fix(split): reserve peripheral slot before stopping scanning
In the event that the peripheral MAC address does not match, this allows
scanning to continue.
2023-09-02 23:06:41 -07:00
Cem Aksoylar
4e18b879bd feat(docs): Document persisted settings and debouncing 2023-09-02 23:02:17 -07:00
Cem Aksoylar
b20d3178b9 feat(docs): Note devicetree limits re: macro bindings 2023-09-02 22:59:17 -07:00
Cem Aksoylar
369c7c1721 fix(docs): Correct default macro wait/tap ms 2023-09-02 22:59:17 -07:00
Cem Aksoylar
3d938033b0 feat(docs): Note GPIO flags and add examples 2023-09-02 20:49:19 -07:00
Cem Aksoylar
1e11e84d0d fix(docs): Fix row/col comments in matrix examples 2023-09-02 20:49:19 -07:00
Cem Aksoylar
fd47965838 fix(docs): Remove diode-direction from direct GPIO driver 2023-09-02 20:45:29 -07:00
Mikhail Stralenia
185457bc11
fix(shields): leeloo - proper encoder status for split encoders. 2023-08-29 08:53:30 -07:00
Peter Johanson
a92a4967aa fix(sensors): Only accept data once per behavior.
* Don't accept data for the same behavior on multiple layers more than
  once, to avoid duplicate/extraneous triggers.
2023-08-27 19:52:03 -07:00
Peter Johanson
dcb1f8f135 fix(docs): Update docs about split encoder support 2023-08-27 19:52:03 -07:00
Stephen Wan
9d44229800 feature(split): add support for sensors from peripheral
This commit adds a new GATT characteristics on the peripheral side
and wires it up to read sensor values. The central side subscribes
to this new characteristics and replays sensor values on its side.

Co-authored-by: Peter Johanson <peter@peterjohanson.com>
2023-08-27 19:52:03 -07:00
Seth Milliken
c957348e61 fix(docs): detail overriding the led_strip chain-length property
Quite a few people have struggled with setting the correct
`chain-length` for their `led_strip`. For some, this is their first time
needing to change a pre-defined devicetree property, and so they aren't
familiar with the technique. I commonly see folks adding a duplicate of
the entire `*.overlay` file with only the `chain-length` value changed.
Having clear documentation for this specific application of the property
override technique could help forestall these problems, and give those
of us helping out in Discord something to easily reference.
2023-08-15 11:04:01 +03:00
Jorge Villalobos
d17c473d45
feat(docs): Improve parameterized macros docs 2023-08-02 09:57:00 -07:00
Xudong Zheng
e65a7e3075 fix(battery): change nRF52 ADC gain
With ADC pin, maximum 3.6V input needs gain 1/6 to be less than the 0.6V
reference.

With VDDHDIV5, maximum 6V input corresponds to 1.2V so gain 1/2 will be less
than the 0.6V reference and be slightly more precise.
2023-07-29 23:04:35 -07:00
Xudong Zheng
cb9c573b53 refactor(underglow): turn underglow off in low priority work queue 2023-07-24 17:04:51 -07:00
Xudong Zheng
9a963abfc8 refactor: use low priority workqueue for underglow and battery reporting
Blocking operations on the high priority system workqueue may result in
deadlocks, particularly when Bluetooth is in use.
2023-07-24 17:04:51 -07:00
Peter Johanson
f743d57ff1 feat(shields): Add splitkb.com Aurora Sofle
* Add new shield for splitkb.com Aurora Sofle, supporting
  keys, encoder(s), displays, and RGB.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-07-22 23:16:49 -07:00
Peter Johanson
147f7f23dc fix(shields): Make settings_reset more flexible.
* Don't reference `pro_micro` nexus node in settings_reset
  so it can be used with other controllers.
* Use mock kscan node instead.
2023-07-21 10:41:23 -07:00
Peter Johanson
5f6a13413b fix(bluetooth): Split improvements
* Proper usage of bt_uuid_cmp.
* Central's don't start scanning for peripherals if
  `ZMK_BLE_CLEAR_BONDS_ON_START` is enabled.
* Split peripherals don't advertize if
  `ZMK_BLE_CLEAR_BONDS_ON_START` is enabled.
2023-07-21 10:41:23 -07:00
Peter Johanson
54c2e8e155 feat: Add more logging to peripheral settings. 2023-07-21 10:41:23 -07:00
Peter Johanson
ed400c4feb fix(bluetooth): Corrected use of bt_addr_le_cmp
* Properly compare to zero when comparing LE addresses.
2023-07-21 10:41:23 -07:00
Peter Johanson
73e1b526d5 fix(bluetooth): Properly clear peripheral slots
* When the clear bonds Kconfig is set, also clear peripheral
  address slots addresses from settings as well.
2023-07-21 10:41:23 -07:00
dependabot[bot]
b945ffe943 chore(deps): bump semver from 5.7.1 to 5.7.2 in /docs
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-20 09:52:20 -07:00
Maciej Konieczny aka narf
cec2061dad fix(docs): Fix typos in parameterized macros docs. 2023-07-19 15:42:35 -07:00
Cem Aksoylar
ee1e135104
fix: Proper battery sensor Kconfig dependencies.
Properly make the battery sensor Kconfig symbols depend
on `SENSOR` config, and minor battery reporting Kconfig
symbol dependency fix.
2023-07-19 02:21:09 -04:00
Nick Winans
51a4be8935 fix(displays): Don't enable built-in widget configs by default 2023-07-19 00:13:16 -06:00
Nick Winans
18a2b76bf0 feat(nice!view): Custom widgets 2023-07-19 00:13:16 -06:00
NAHO
f3110d1d1e
fix(docs): Fix README punctuation and add license link 2023-07-17 15:23:22 -07:00
ClicketySplit
aaf9958d86
feat(boards): Leeloo v2 and V2 Zephyr 3.2 fixes
* Add Leeloo v2
* Leeloo-Micro v1 updates to support Zephyr 3.2
* Refactored for new Encoder Configuration

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-07-17 17:26:27 -04:00
フィルターペーパー
bbb27ac027
feat(docs): Note that UF2 drive unmounts after flashing (#1859)
Add a note about the UF2 drive that automatically unmounts itself
to restart, which may surprise some new users.
2023-07-06 10:39:08 -07:00
Kyle McCreery
3772ecb04e
fix(boards): Update pillbug_defconfig to enable pinctrl 2023-07-05 10:50:19 -06:00
Peter Johanson
b259d5a22e fix(sensors): Sensor rotate behavior fix for layers.
* Properly return transparent value when processing mode
  for higher disabled layers means the processing is ignored.
2023-06-20 17:36:37 -06:00
Peter Johanson
805dd4a53b feat(behaviors): Support parameterized macros.
* Add two new compatibles for macros that
  take one or two parameters when bound in
  a keymap.
* Use `&macro_param_1to1`, `&macro_param_1to2`, `&macro_param_2to1`,
  and `&macro_param_2to2` control entries in the bindings for the macro
  to have the next binding entry have it's values substituted.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-06-20 11:19:28 -06:00
Xudong Zheng
e686fce4d9 refactor(split): allow central to define connection parameters
Fixes #1614
2023-06-19 20:48:31 -06:00
Peter Johanson
5763558a02 feat(blog): Add post about sensor refactor.
* Document changed configuration, support for other Zephyr
  drivers, next steps.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-06-18 20:45:06 -06:00
Peter Johanson
753802cd79 fix(sensors): Clean ups based on code review. 2023-06-18 20:45:06 -06:00
Peter Johanson
3a91b32513 refactor(sensors): Use "sensor index" consistently 2023-06-18 20:45:06 -06:00
Peter Johanson
8b29f6d345 refactor(sensors): Split data handling from triggers.
* All sensor behaviors should see sensor data, then selectively
  only have some trigger their behaviors.
2023-06-18 20:45:06 -06:00
Peter Johanson
d781ec795b refactor(bluetooth): Add battery reporting config.
* Add dedicated battery reporting Kconfig that is `imply`d by
  enabling ZMK_BLE.
2023-06-18 20:45:06 -06:00
Peter Johanson
f8aaaff556 refactor(shields): Updated ZMK Uno encoder config.
* Move to new steps/triggers-per-rotation config.
* Leverage QDEC Nordic driver when used on Nordic DK.
2023-06-18 20:45:06 -06:00
Peter Johanson
621d946d29 refactor(bluetooth): Bump HoG stack size.
* Bump the default stack size for the HoG processing thread
  to avoid issues w/ some pathways.
2023-06-18 20:45:06 -06:00
Peter Johanson
f0f7e2081b refactor(config): Select SENSOR as needed.
* Don't force on SENSOR Kconfig setting unless
  needed based on the detected DT.
2023-06-18 20:45:06 -06:00
Peter Johanson
295ed83409 refactor(sensors): ec11 rotation sensor value in degrees.
* Add new `steps` property to the `aips,ec11` binding, to make
  the driver properly report degrees in the rotation delta channel.
* Handle old sensor values in sensor rotate behavior.
2023-06-18 20:45:06 -06:00
Peter Johanson
2244bd3d81 refactor(sensors): Sensor event channel data, resolution tweaks.
* Refactor sensor events to include channel data,
  necessary for prop split encoders, and avoiding duplicate calls,
  to fetch channel data twice, etc.
* More consistent behavior driver API.
* Allow setting triggers per resolution at the behavior level optionally.
2023-06-18 20:45:06 -06:00
Joel Spadin
dcf5e75fa6 fix(boards): Bump nRF5340 DK I2C buffer size
Increased the I2C buffer size again, since it needs to be at least 641
to support 128x64 displays.
2023-06-18 14:57:06 -06:00
Joel Spadin
9ff1eaeb5a fix: Enable BT_TINYCRYPT_ECC when using HCI
BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY to work on setups
that use BT HCI like the nRF5340.
2023-06-18 14:52:45 -06:00
dependabot[bot]
9d714c0b69 chore(deps-dev): bump webpack from 5.80.0 to 5.86.0 in /docs
Bumps [webpack](https://github.com/webpack/webpack) from 5.80.0 to 5.86.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.80.0...v5.86.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-10 23:51:23 -07:00
dependabot[bot]
0be0d07630 chore(deps): bump minimatch and serve-handler in /docs
Bumps [minimatch](https://github.com/isaacs/minimatch) and [serve-handler](https://github.com/zeit/serve-handler). These dependencies needed to be updated together.

Updates `minimatch` from 3.0.4 to 3.1.2
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

Updates `serve-handler` from 6.1.3 to 6.1.5
- [Release notes](https://github.com/zeit/serve-handler/releases)
- [Commits](https://github.com/zeit/serve-handler/compare/6.1.3...6.1.5)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
- dependency-name: serve-handler
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-10 23:37:26 -07:00
pixls
9d39a87f67
fix(docs): Change user-setup.md order to agree with order in setup script
Fixes #1281 

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-06-10 17:49:30 -07:00
kadoyau
98524a9567
fix(docs): Fix INT6 keycode description 2023-06-10 12:32:50 -07:00
Albert Y
a5c57fa224
feat(docs): Add an example for combining just modifiers (#1826)
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-06-05 22:22:39 -07:00
Xudong Zheng
5d9ae8fffa feat(split): allow central to connect to multiple peripherals 2023-06-05 16:22:41 -06:00
Peter Johanson
f08802eaa7 fix(boards): Proper i2c pinctrl for BlueMicro840
* Use the proper pin assignmets after the move to pinctrl for the
  Zephyr 3.2 migration.
2023-06-05 00:05:44 -06:00
Peter Johanson
19d883cdfe fix(bluetooth): Passkey pairing improvements.
* Capture the last 6 entered digits, and then require pressing
   Enter/Return to submit the entered digits. This matches the
   messaging shown on hosts regarding how to complete pairing.
* Fix the wording on the Kconfig menu item to accurately describe
  the feature.
2023-06-05 00:01:44 -06:00
Cem Aksoylar
ace11e327f fix(docs): Fix broken link in BT troubleshooting 2023-06-02 22:07:29 -06:00
Cem Aksoylar
0682bc3aa6 feat(docs): Note split connectivity improvement with TX power 2023-06-02 21:13:27 -06:00
Cem Aksoylar
a9ad11f91e refactor(docs): Move BT troubleshooting items to BT page 2023-06-02 21:13:27 -06:00
Cem Aksoylar
30ba4b08ae feat(docs): Add pointer to Bluetooth page in troubleshooting 2023-06-02 21:13:27 -06:00
Cem Aksoylar
4042aea66f feat(docs): Add troubleshooting for Windows issue 2023-06-02 21:13:27 -06:00
Cem Aksoylar
0508718d6c feat(docs): Add behavior types section for hold-tap 2023-06-02 21:11:33 -06:00
Cem Aksoylar
a2af74f5ab feat(docs): Add note on modifier functions to macros 2023-06-02 21:08:02 -06:00
Joel Spadin
b276a3bfb0 refactor(kscan): batch GPIO reads by port
Changed the GPIO matrix and direct GPIO key scan drivers to do a single
read per port instead of one read per pin. This is much more efficient
for some types of GPIO drivers, such as I2C GPIO expanders.

To accomplish this with minimal overhead, we now sort input pins by port
at driver init. if we iterate through the pins in the sorted order, all
pins on the same port are consecutive, so we only need to read each port
once the first time we see it.
2023-05-28 23:33:34 -06:00
Xudong Zheng
1adfcf92bf refactor(split): fix inconsistency in Kconfig names 2023-05-28 22:58:31 -06:00
Peter Johanson
5aac2743b1 fix(bluetooth): Improved checking for conn status.
* Check the actual connection status before considering
  a discovered connection as connected.
2023-05-22 23:09:40 -06:00
Cem Aksoylar
864394b40a feat(display): Add setting to invert display colors
Add CONFIG_ZMK_DISPLAY_INVERT Kconfig to invert colors
(black-on-white to white-on-black) on monochrome screens.
Currently applies only if CONFIG_LV_USE_THEME_MONO is selected,
which is the default unless user overrides it.
2023-05-21 21:51:36 -06:00
Cem Aksoylar
7e29166c6c refactor(display): Clean up unused theme Kconfig 2023-05-21 21:51:36 -06:00
Cem Aksoylar
b021d19255 fix(display): Imply LVGL mono theme when display is enabled
All displays currently used with ZMK are monochrome so it makes sense
to enable the mono theme by default, which can be disabled by the user
since we use the "imply" statement.

Without this theme setting, the small font size selection for widgets
at the bottom of the stock status screen does not work.
2023-05-21 21:51:36 -06:00
Joel Spadin
c4c014e3d1 fix(docs): Fix typescript error
See https://github.com/facebook/docusaurus/issues/8226#issuecomment-1420620198
2023-05-20 01:33:11 -06:00
Joel Spadin
dae020787e docs: Update tree-sitter
Updated web-tree-sitter and the devicetree grammar.

web-tree-sitter now supports a custom function to locate its .wasm file,
so performing a string replace is no longer necessary to get it to work
with Docusaurus' Webpack configuration. We now check when tree-sitter is
locating its .wasm file and provide the Webpack-adjusted URL.
2023-05-20 01:33:11 -06:00
Joel Spadin
c6bf95a901 chore: Update fontawesome 2023-05-20 01:33:11 -06:00
Joel Spadin
da2599aa75 chore: Update docusaurus, react types 2023-05-20 01:33:11 -06:00
Joel Spadin
4674215551 chore: Update json-schema-to-typescript 2023-05-20 01:33:11 -06:00
Joel Spadin
d799560985 chore: Update typescript, eslint, webpack 2023-05-20 01:33:11 -06:00
digger vermont
89d71ed2c2
feat(boards): Add KBDfans Tofu65 2.0 board
* Initial commit of Tofu65 2.0 board

---------

Co-authored-by: Pete Johanson <peter@peterjohanson.com>
2023-05-18 17:47:36 -06:00
Albert Y
b1ca9199de
fix(ci): Refactor prepare variable step
* Refactor workflow variables
* Use quotes to avoid word splitting
2023-05-17 00:42:57 -04:00
Joel Spadin
a1e0607a22 fix: Don't specify default C formatter
Microsoft's C/C++ extension performs poorly on some systems, so this gives the option to use any other extension that supports formatting with clang-format.
2023-05-14 11:54:34 -06:00
Joel Spadin
d53cd19929 refactor: Add format on save for VS Code
Added settings to format various file types on save in VS Code.

Added some recommended VS Code extensions:

- Prettier for formatting various file types
- Python for formatting Python files
- C/C++ for formatting C files
- Devicetree for syntax highlighting
- CMake for syntax highlighting
2023-05-14 11:54:34 -06:00
Albert Y
48be2eedd0 fix(docs): Update QMK debounce references 2023-05-09 21:40:14 -07:00
Alexander Krikun
94789a092c fix(boards): unify board I2C configuration, use TWI driver 2023-05-04 22:51:54 -07:00
Cem Aksoylar
0239f18b61 feat(boards): Add Corne-ish Zen v1 2023-04-25 23:57:16 -07:00
Cem Aksoylar
39d7f86f70 refactor(boards): Make Zen dtsi non-v2 specific 2023-04-25 23:57:16 -07:00
Cem Aksoylar
4a9c59317f refactor(boards): Add back default matrix transform to Zen v2 chosen node 2023-04-25 23:57:16 -07:00
Cem Aksoylar
2c70048bee refactor(boards): Remove duplicated Zen v2 Kconfigs and unused font size 2023-04-25 23:57:16 -07:00
Cem Aksoylar
ab65ffc114 refactor(boards): Fix Zen v2 DTS spacing inconsistencies 2023-04-25 23:57:16 -07:00
Peter Johanson
a6787b08c7 refactor(underglow): Tad more logging. 2023-04-25 23:53:17 -07:00
Joel Spadin
9bd171ede4 fix(docs): Add key to interconnect tabs
Added a key property to interconnect tabs list items to fix a React
warning.
2023-04-25 15:50:38 -07:00
ReFil
db08e041c6
feat(boards): Polarity works CKP Series
Adds support for the CKP family of boards
BT60V2 ANSIHotswap, ISO Hotswap, ANSI Lowpro and soldered
BT65 ANSI Hotswap, ISO Hotswap and soldered
BT75 ANSI Hotswap and soldered

The BT65 and BT75 are stylised as btXX_v1 in order to maintain compatibility with customers existing zmk-config setups in the same way the BT60 V1 was handled when merged into main.

CKP boards have identical pinmapping between hotswap and soldered so there's only one set of defconfig, dts, keymap, yaml and yml files per size
2023-04-25 13:37:33 -04:00
Peter Johanson
e52e734480 chore: Fix formatting of Kconfig setting. 2023-04-24 23:01:48 -07:00
Peter Johanson
de152fe741 fix(bluetooth): Revert to Legacy LLCP
* Reports of constant/frequent disconnects, with HCI err 0x28,
  "instant passed", seem linked to newer LLCP that became default
  in Zephyr 3.2, so revert to the Legacy LLCP for now until a
  proper fix for new LLCP can be found.
2023-04-24 22:41:03 -07:00
Joel Spadin
7a352908ee docs: Add pre-commit documentation 2023-04-24 16:07:04 -07:00
Joel Spadin
5b07c86d05 chore: Update Prettier
Added a workaround to select the latest version of Prettier with
pre-commit, since the pre-commit mirror repo started tracking alpha
releases and doesn't have anything beyond 2.7.1.
2023-04-24 16:07:04 -07:00
Joel Spadin
94061bb916 refactor: Replace tabs with spaces
Standardized indentation to use spaces with a new pre-commit hook.
2023-04-24 16:07:04 -07:00
Joel Spadin
32ae776c42 refactor: Add more checks to pre-commit
Updated existing pre-commit hooks and added some new hooks:

- Remove trailing whitespace
- Ensure every non-empty file ends with a new line
- Check YAML file validity
- Prevent adding large files
- Ensure any scripts with shebangs are executable

Added a GitHub action to run pre-commit on every commit. Removed any
existing actions which duplicate pre-commit.

Ran pre-commit on the codebase.
2023-04-24 16:07:04 -07:00
Albert Y
9c4f1e02d1
fix(docs): Update references to QMK settings
* Remove TAPPING_FORCE_HOLD reference
* Remove IGNORE_MOD_TAP_INTERRUPT reference
2023-04-24 04:24:36 -04:00
Peter Johanson
53dea223b7 feat(shields): Add splitkb.com Kyria Rev3. 2023-04-24 01:20:51 -07:00
Nick Coutsos
9d64c2a3a0 fix(docs): switch sensor rotate parameter order 2023-04-22 17:30:10 -07:00
Nick Conway
3db163aa2c feat(behaviors): Add reusable sensor behaviors.
* Add new sensor behaviors that either take full bindings
  add definition, or accept parameters when bound in the
  keymap.
* Remove existing hard-coded key press sensor behavior
  and instead leverage new generic sensor behaviors to
  achieve the same functionality.

Co-authored-by: nick@conway.dev
2023-04-21 21:13:31 -07:00
Peter Johanson
9a73650041 fix(boards): Move nice!60 to SPI3 for underglow
* Move to SPI3 for underglow peripheral, needed after the
  move to pinctrl.
2023-04-21 11:41:10 -05:00
Joel Spadin
5c6f21b0e0 fix: Fix compiler warnings in sensor code 2023-04-18 00:20:57 -07:00
Joel Spadin
e7a6e4016d feat(behaviors): Add key position to key events
Extended the virtual key position system from combos so that each sensor
also gets a virtual key position. This allows sensor behaviors to use
the behavior queue API.
2023-04-16 23:53:12 -07:00
sporkus
83a151890c
fix(docs): Correct example keymap filename 2023-04-16 13:28:08 -07:00
Josep Roca
71855af14f
fix(docs): ignore-modifiers clarification
* Clarify the potential need of adding the ignore-modifiers setting for new sticky key behaviors.
* Add ignore-modifiers setting to skq example
* Update docs/docs/behaviors/sticky-key.md

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-04-16 03:04:49 -04:00
Cem Aksoylar
f1b138cbf0 fix(boards): Fix Zen logo alignment 2023-04-14 14:39:54 -07:00
Purdea Andrei
309359b32f
fix(keymaps): fix keypresses that are not in the transform
Before this change, if a matrix position was not present in the transform,
various incorrect behaviors would happen:

1) In some cases out-of-bounds accesses:

Note that the size of the`transform[]` array does not necessarily match
the size of the matrix. So for example if key position
(ZMK_MATRIX_COLS-1, ZMK_MATRIX_ROWS-1) is not present in the transform,
but ends up being pressed, then the array will be accessed beyond its
size, and any data could be returned.

2) In other cases the 0th position in the keymap will be used because
the `transform[]` array is initialized to all zeros.
2023-04-10 03:27:19 -04:00
Xudong Zheng
ee9fcec3c9 feat(core): Process log every 100ms 2023-04-09 23:29:22 -07:00
Xudong Zheng
a20b9502bc feat(core): Add RTT logging Kconfig option 2023-04-09 23:29:22 -07:00
Xudong Zheng
3f48062225 feat(core): Add Kconfig option to exclude debug log messages 2023-04-09 23:29:22 -07:00
nguyendown
702d79c108
test(behaviors): add unit tests for sticky key quick-release
Duplicate the existing tests with `quick-release` enabled:
- 8-lsk-osk-combination-quick-release
- 10-callum-mods-quick-release
2023-04-10 01:50:57 -04:00
Cem Aksoylar
3c8f55ede0 fix(display): Do not override font size in status screen 2023-04-09 21:36:43 -07:00
Joel Spadin
064aff6bc0 fix(behaviors): Fix use after free in sticky key
Fixed an issue where the sticky key behavior would call
ZMK_EVENT_RAISE_AFTER(), which would free the provided event, but then
it would keep using that now-freed event data.
2023-04-09 20:17:40 -07:00
Peter Johanson
374104dec6 fix(underglow): Move to spi3 for underglow bus.
* Workaround Zephyr bug for Nordic SPI(M) driver after the
  pinctrl refactor by using spi3 peripheral for the SPI bus for
  the WS2812 led_strip driver.
2023-04-09 14:41:00 -07:00
Joel Spadin
b31b42018a fix: Remove deprecated labels from zmk_uno 2023-04-08 15:37:48 -07:00
Cem Aksoylar
7434a6b99b fix(shields): Fix nice!view for deep sleep 2023-04-08 00:41:19 -07:00
Hooky
9dcc3ac375
fix(shields): Fixup nice!view adapter pinctrl props.
`pinctrl-0` setting missing `<>`.
2023-04-07 06:53:10 -07:00
Peter Johanson
134b64ef5b fix(docs): Make link to keymap upgrader work. 2023-04-05 23:18:34 -07:00
Peter Johanson
2614b85634 feat(docs): Add blog post for Zephyr 3.2.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-04-05 22:55:38 -07:00
Peter Johanson
313ed6adb6 fix(display): Tweak EPD driver init/blanking.
Ensure we only clear the display when turning blanking off the
first time, not every time, to avoid duplicate clears.
2023-04-05 22:55:38 -07:00
Peter Johanson
0c5bcf5fe4 feat(docs): Add BLE feature/config pages.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2023-04-05 22:55:38 -07:00
Peter Johanson
1493620bf7 refactor(boards): Move to pinctrl. 2023-04-05 22:55:38 -07:00
Peter Johanson
518f9a550f fix(underglow): Use DT_HAS_CHOSEN properly. 2023-04-05 22:55:38 -07:00
Peter Johanson
198daaf524 fix(shields): Don't try to disable xiao_i2c on Hummingbird. 2023-04-05 22:55:38 -07:00
Peter Johanson
c3d06b22c8 fix(core): Bump system work queue stack on RP2040. 2023-04-05 22:55:38 -07:00
Peter Johanson
a6ebdb7180 fix(kscan): Default wait between outputs on RP2040. 2023-04-05 22:55:38 -07:00
Peter Johanson
2f9bc2f1f7 fix(logging): Disable USB driver logging.
When enabling our high level USB logging, disable the USB driver
logging itself entirely, to avoid logging in the driver causing
errors when USB isn't up yet to send the logs.
2023-04-05 22:55:38 -07:00
Peter Johanson
31f664ffec fix(boards): Base config/overlay for rp2040 boards
Baseline config and overlay for the following:

* `rpi_pico`
* `adafruit_kb2040`
* `sparkfun_pro_micro_rp2040`
* `adafruit_qt_py_rp2040`
* `seeeduino_xiao_rp2040`
* `boardsource_blok`
* `01space_rp2040_042lcd`

Co-authored-by: Joel Spadin <joelspadin@gmail.com>
2023-04-05 22:55:38 -07:00
Peter Johanson
4ff1a4d3ea refactor: Move to updated Docker images. 2023-04-05 22:55:38 -07:00
Peter Johanson
09ed79a867 refactor: Move away from deprecated label usages.
* Move away from DT_LABEL.
* Move to DEVICE_DT_GET for non-behavior device access.
* Move various drivers to `gpio_spec_dt` and `DT` related macros.
* Remove mcp23017 while at it, since better upstream driver is
  available.
2023-04-05 22:55:38 -07:00
Peter Johanson
062f94d014 refactor: Remove v1 logging vestiges. 2023-04-05 22:55:38 -07:00
Peter Johanson
e84b4299b5 refactor: Remove deprecated Kconfig override. 2023-04-05 22:55:38 -07:00
Peter Johanson
3a958c667f refactor: Move to zephyr/ include paths.
* Zephyr moved to properly namespaced headers, so major "rip
  the bandaid" commit to move us to those everywhere.
2023-04-05 22:55:38 -07:00
Peter Johanson
35a1c5a3d4 refactor(behaviors): Rename reset behavior.
* Upstream now has a node w/ label `reset` on many boards, so
  renaming our reset behavior node label to `sys_reset`.
2023-04-05 22:55:38 -07:00
Peter Johanson
4f2f9db1d4 refactor(ble): New callback API for pairing complete. 2023-04-05 22:55:38 -07:00
Peter Johanson
d513dc1766 refactor: Move to new PM API. 2023-04-05 22:55:38 -07:00
Peter Johanson
243a227ff9 refactor: Move to LISTIFY/DT_FOREACH_PROP_ELEM macros. 2023-04-05 22:55:38 -07:00
Peter Johanson
69a4c3200d refactor(display): Updates for LVGL v8.x changes.
* LV_ prefix from new LVGL official Kconfig now used.
* API changes for themes, container object removal, etc.
* Add our own Kconfig and code for theme default small font.
* Remove some hardcoded sizes.
2023-04-05 22:55:38 -07:00
Peter Johanson
168b32b828 refactor: Move to Zephyr 3.2 branch. 2023-04-05 22:55:38 -07:00
Peter Johanson
ae8299edb3 fix(boards): Move the CDC ACM node under the USBD.
* Ferris board's CDC ACM node was accidentally nested under the wrong
  node, causing USB logging builds to fail with cryptic error.
2023-03-25 13:14:12 -07:00
prdktntwcklr
cd64c59b39 fix(tests): ignore line endings 2023-03-21 17:44:49 -07:00
chrissicool
56299ba5dc
fix(boards): Disable CDC by default for CiZ
The default configuration for corneish-zen enables a USB CDC endpoint by
default. This is most probably a debugging left-over. Disable that
endpoint. CONFIG_ZMK_USB_LOGGING depends on it anyway, so it will be
enabled again with that config option set.
2023-03-21 20:42:11 -04:00
Robert U
6cb42a8060
feat(behaviors): On-release option for positional-hold-taps 2023-03-12 12:24:00 -04:00
Xudong Zheng
8904407983 feat(underglow): use float for HSB to RGB calculation 2023-02-25 01:44:00 -05:00
dependabot[bot]
5ef6f2f2b7 chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 in /docs
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-25 01:27:37 -05:00
dependabot[bot]
719de801e7 chore(deps): bump @sideway/formula from 3.0.0 to 3.0.1 in /docs
Bumps [@sideway/formula](https://github.com/sideway/formula) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/sideway/formula/releases)
- [Commits](https://github.com/sideway/formula/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: "@sideway/formula"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-25 00:57:00 -05:00
Cem Aksoylar
1d65661efa fix(keymap): Fix tidbit keymap 2023-02-25 00:53:18 -05:00
Cem Aksoylar
3eee53676f fix(shields): Fix missing binding in eek keymap 2023-02-21 23:49:56 -05:00
Cem Aksoylar
0c0ebda65b fix(keymap): Fix default Ergodash keymap 2023-02-21 23:49:10 -05:00
Cem Aksoylar
5d22d76d72 fix(shields): Fix Kyria five column transforms 2023-02-21 23:47:10 -05:00
Cem Aksoylar
72624a41fa fix(shields): Add missing col-offsets for extra transforms 2023-02-21 23:47:10 -05:00
Omri Kaplan
c065d451cb
fix(shields): Fix keycodes that differ from the default keymap (#1590)
- Asterisk in layer 1 was mapped to 8
- Underscore in layer 1 was mapped to minus
- Right GUI in layer 0 was mapped to right Alt
- Space in layer 1 was mapped to Return
- Plus was mapped with KP_PLUS
2023-02-07 20:29:38 -05:00
Albert Y
b7d5865e40 feat(docs): additional note on bug fixed in macOS v13.1 2023-02-02 21:23:48 -05:00
Martí Bolívar
9d1070a140 chore(build): update west.yml syntax
West has supported a 'name-blocklist' replacement for 'name-blacklist'
since v0.9.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2023-02-01 11:36:55 -05:00
dependabot[bot]
2a5e914a77 chore(deps): bump json5 from 2.2.1 to 2.2.3 in /docs
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-26 19:35:16 -05:00
zhiayang
41830ce19a fix formatting 2023-01-19 22:30:27 -05:00
zhiayang
fbdb24c6fe fix(driver): Fix potentially buggy read/write routines for max7318 driver 2023-01-19 22:30:27 -05:00
Joel Spadin
82ff6d8e85 docs: update dev env setup guide
Renamed the "Basic Setup" page to "Toolchain Setup" to make it clearer
that this is for setting up a development environment for local builds.

Linked to the relevant Zephyr setup documentation instead of duplicating
that information in our guide. This also switches Windows and macOS
setup to using the Zephyr SDK, which is much easier to install.

Updated the command for installing Zephyr's Python dependencies to be
OS specific, as Windows and macOS don't need the --user flag.

Updated the IDE integration page with instructions for determining the
compiler path that work with the latest version of the Zephyr SDK.
2023-01-19 22:25:10 -05:00
Peter Johanson
a82a0ec496 feat(shields): Add splitkb.com Aurora Lily58. 2023-01-06 20:10:53 -06:00
Peter Johanson
b7b563a4c3 fix(ci): Fix another spot where ` needs escaping. 2023-01-05 12:47:11 -06:00
Peter Johanson
5b9b507de3 fix(ci): Escape ` from JSON metadata files. 2023-01-04 21:40:07 -06:00
Peter Johanson
c23443a086 feat(docs): Generate new shield interconnect docs.
* Add to metadata schema for interconnects.
* New conventional location for pinout diagrams/pics.
* New component to generate the tabs for the new shield
  doc section on interconnects.
* Add XIAO and arduino uno pinout diagram.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2022-12-23 02:41:35 -06:00
Cem Aksoylar
d993b03433 feat(docs): Refer to troubleshooting in connecting split halves 2022-12-23 00:20:12 -06:00
Cem Aksoylar
080c47825f feat(docs): Add caution note about split peripheral sides to user setup 2022-12-23 00:20:12 -06:00
Cem Aksoylar
77d60182bf feat(docs): Recommend USB testing and warn about BT pairing in user setup 2022-12-23 00:20:12 -06:00
byran.tech
14324390e8
fix(boards): replace nRF3840 with nRF5340 2022-12-22 20:42:57 -06:00
Ladislav Benc
58f8c97d3c
feat(shields): Add a Reviung5 shield
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
2022-12-20 20:49:17 -06:00
Nick Coutsos
6e99a48696 fix(behaviors): Mark sticky key release-after-ms required 2022-12-20 20:38:26 -06:00
Joel Spadin
3eb06f137b feat: Add global macro timing configs
Added ZMK_MACRO_DEFAULT_WAIT_MS and ZMK_MACRO_DEFAULT_TAP_MS to set
global defaults for the wait-ms and tap-ms properties of macros.

Also reduced the default timings for macros, since it's been reported
many times that 100 ms is too slow.
2022-12-20 20:34:25 -06:00
as29
11ca0098a5
fix(docs): Disable encoders in dtsi (#1600) 2022-12-20 20:24:32 +00:00
Cem Aksoylar
5cbe572f7d fix(display): Re-default to blank on idle for OLEDs 2022-12-18 16:34:27 -06:00
Cem Aksoylar
781df31ec4 fix(setup): Fix conf download path in PS script 2022-12-17 17:46:22 -06:00
Cem Aksoylar
b8fb218a01 fix(setup): Make keymap/conf fall back to using dirname 2022-12-16 17:41:39 -06:00
Cem Aksoylar
ebb4cb76d3 fix(boards): Add Zen .conf file for setup script 2022-12-16 17:41:39 -06:00
Darryldh
4a3e783f32
feat(boards): Add Corne-ish zen v2
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
2022-12-16 10:57:25 -06:00
Jerome Olivier
984b16e03b
feat(boards): Add preonic_rev3 board. 2022-12-16 10:52:26 -06:00
hyx0329
4faf6eba97 feat(boards): Add battery sensor for Makerdiary M60 keyboard
Signed-off-by: hyx0329 <hyx0329@163.com>
2022-12-14 12:38:03 -06:00
Petrus Claviger
408b87ae7b
fix(docs): Grammatical fixes (#1587)
Co-authored-by: Dom H <dom@hxy.io>
2022-12-14 14:51:46 +00:00
Peter Johanson
1425d0f2d9 fix(shields): Fix col-offset for splitkb.com corne
Same column offset for both transforms, since we use the same
pins for both, just apply a different transform.

Fixes: 1570
2022-12-13 20:46:26 -06:00
Peter Johanson
f03e29ca13 fix(config): Fix split wired detection in setup.sh. 2022-12-11 09:29:58 -06:00
JW2586
617136b45e
feat(shields): Added Waterfowl shield 2022-12-10 23:51:41 -05:00
Joel Spadin
01500b085e
fix(boards): Add nRF5340 DK metadata file (#1579) 2022-12-10 22:21:54 -06:00
Kyle McCreery
70aa4fa824
feat(boards): Add PillBug board, blackpill interconnect.
* Add blackbill interconnect metadata.
* Add config/overlay for upstream blackpill boards to work with ZMK.
* Add pillbug board.
* Updated new shield docs.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2022-12-10 22:01:37 -06:00
Joel Spadin
36ee1f4e0a fix(boards): Fix nRF5340 DK issues
- Fixed a stack overflow when enabling Bluetooth.
- Increased the I2C buffer size to support displays.
2022-12-10 21:56:14 -06:00
Pavlos Vinieratos
2b235ae281
fix(boards): Add encoder config to bdn9_rev2.conf 2022-12-10 19:33:50 -06:00
Peter Johanson
63b29ccd32 feat(shields): Add ZMK Uno shield.
* Support underglow, backlight, display, encoder, etc.
2022-12-10 17:40:57 -06:00
Peter Johanson
12329b388e feat(boards): Add Arduino Uno interconnect, nrf52840dk config. 2022-12-10 17:40:57 -06:00
Cem Aksoylar
2a42fe658e feat(docs): Document battery widget percentage Kconfig 2022-12-10 17:08:37 -06:00
Cem Aksoylar
58eb7a3305 feat(display): Add config to show battery level in percentage 2022-12-10 17:08:37 -06:00
Joel Spadin
6ccb5280c9 fix(docs): Pin Zephyr docs links to a version
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2022-12-08 01:00:48 -06:00
Joel Spadin
593db85378 feat(boards): Add support for nRF5340 DK
Added overlays to support building for the nRF5340 development kit.

Also added some documentation on how to build and flash ZMK for dual-
chip Bluetooth configurations, with an example for the nRF5340.
2022-12-08 01:00:48 -06:00
Kurtis Lew
001105e318 fix(docs): Correct typo in hold-tap comparison balanced flavor 2022-12-01 20:11:31 +00:00
Albert Y
6550c043c4
refactor: Update cradio keymap with better indentation and additional features 2022-11-25 23:02:28 -06:00
dependabot[bot]
4d0e0fa34b chore(deps): bump loader-utils from 2.0.3 to 2.0.4 in /docs
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.3...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-25 21:00:42 -06:00
Nick Coutsos
5cd608cb60 fix(docs): Correct syntax in capsword mods 2022-11-24 19:11:24 -06:00
Xudong Zheng
c7fdce863a fix(usb): add USB_DC_CLEAR_HALT to supported states
See https://manpages.debian.org/testing/linux-manual-4.9/usb_clear_halt.9 for
information on halted USB endpoints
2022-11-17 22:52:32 -06:00
Peter Johanson
9f90dd1fc7 fix(boards): Fix XIAO BLE voltage divider config.
* Use proper resistor value for the `output-ohms` property.
2022-11-17 22:46:12 -06:00
Michael Anthony
6e7c2a08a2
fix(docs): Update link to Zephyr led docs
* Change Zephyr gpio-leds link to 3.0.0
2022-11-14 16:58:28 -06:00
jhorology
768fc4a5e5 fix: HID report descriptor 2022-11-10 22:15:06 -06:00
Albert Y
1e98ea0afb fix(ci): Refactor west build step 2022-11-10 22:12:01 -06:00
Peter Johanson
a9048956b5 feat(shields): Add splitkb.com Aurora Corne. 2022-11-10 21:05:26 -06:00
byran.tech
c7d83fb951
fix(docs): changed MacOS to macOS as per Apple styling 2022-11-09 20:38:08 -06:00
Terence Stenvold
9847a4c5d5
fix(docs): copy error not exclusive to Apple silicon 2022-11-09 14:56:22 -06:00
Peter Johanson
2364960f84 feat(shields): Add splitkb.com Aurora Sweep. 2022-11-04 12:13:16 -05:00
Okke Formsma
a61eac9139
fix(behaviors): make tap dances work on a combo
* Tap dance event handler goes after combos
* Add test
2022-11-01 15:13:19 -05:00
HookyQR
d393247e15
fix(display): Set bits per pixel and color depth on n!v 2022-10-30 19:50:21 -05:00
Albert Y
4e11913127
feat(docs): troubleshooting steps for macOS 13 Finder bug 2022-10-27 21:03:16 -05:00
Peter Johanson
3353712bc1 fix(docs): npm start to work from Docker.
* Listen on 0.0.0.0 so testing docs within our container works
  properly with port forwarding.
2022-10-26 23:02:54 -05:00
Peter Johanson
a02eb28271 fix(docs): Move to data-tooltip for profiler.
* Fix ESLint warning by using `data-` prefixed custom attr.
2022-10-26 23:02:54 -05:00
Peter Johanson
2d7c8f6073 chore(docs): Bump docusaurus and run audit fix. 2022-10-26 23:02:54 -05:00
Jay Greco
41fdd07315 feat(boards): Add nullbits SNAP shield 2022-10-25 07:50:56 -05:00
dependabot[bot]
f59da74a3e chore(deps): bump actions/checkout from 2 to 3.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 22:49:54 -05:00
1687 changed files with 64435 additions and 34671 deletions

View file

@ -6,3 +6,8 @@ fi
if [ -f "$WORKSPACE_DIR/zephyr/zephyr-env.sh" ]; then
source "$WORKSPACE_DIR/zephyr/zephyr-env.sh"
fi
if [ -d "$WORKSPACE_DIR/tools/bsim" ]; then
export BSIM_OUT_PATH="$WORKSPACE_DIR/tools/bsim/"
export BSIM_COMPONENTS_PATH="$WORKSPACE_DIR/tools/bsim/components/"
fi

View file

@ -1,4 +1,4 @@
FROM docker.io/zmkfirmware/zmk-dev-arm:3.0
FROM docker.io/zmkfirmware/zmk-dev-arm:3.5
COPY .bashrc tmp
RUN mv /tmp/.bashrc ~/.bashrc

View file

@ -13,9 +13,13 @@
"type=volume,source=zmk-zephyr-modules,target=${containerWorkspaceFolder}/modules",
"type=volume,source=zmk-zephyr-tools,target=${containerWorkspaceFolder}/tools"
],
"extensions": ["ms-vscode.cpptools"],
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"customizations": {
"vscode": {
"extensions": ["ms-vscode.cpptools"],
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
}
}
},
"forwardPorts": [3000]
}

View file

@ -1,13 +1,15 @@
<!-- 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
- [ ] Kconfig.defconfig file correctly wraps *all* configuration in conditional on the shield symbol
- [ ] `.conf` file has optional extra features commented out
- [ ] Keyboard/PCB is part of a shipped group buy or is generally available in stock to purchase (OSH/personal projects without general availability should create a zmk-config repo instead)
- [ ] 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
- [ ] Kconfig.defconfig file correctly wraps _all_ configuration in conditional on the shield symbol
- [ ] `.conf` file has optional extra features commented out
- [ ] Keyboard/PCB is part of a shipped group buy or is generally available in stock to purchase (OSH/personal projects without general availability should create a zmk-config repo instead)

78
.github/workflows/ble-test.yml vendored Normal file
View file

@ -0,0 +1,78 @@
name: BLE Tests
on:
push:
paths:
- ".github/workflows/ble-test.yml"
- "app/tests/ble/**"
- "app/src/**"
- "app/run-ble-test.sh"
pull_request:
paths:
- ".github/workflows/ble-test.yml"
- "app/tests/ble/**"
- "app/src/**"
- "app/run-ble-test.sh"
jobs:
collect-tests:
outputs:
test-dirs: ${{ steps.test-dirs.outputs.test-dirs }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Find test directories
id: test-dirs
run: |
cd app/tests/ble
export TESTS=$(ls -d * | grep -v central | jq -R -s -c 'split("\n")[:-1]')
echo "test-dirs=${TESTS}" > $GITHUB_OUTPUT
run-tests:
needs: collect-tests
strategy:
matrix:
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-build-arm:3.5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache west modules
uses: actions/cache@v4
env:
cache-name: cache-zephyr-modules
with:
path: |
modules/
tools/
zephyr/
bootloader/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
timeout-minutes: 2
continue-on-error: true
- name: Initialize workspace (west init)
run: west init -l app
- name: Enable babblesim group filter
run: west config manifest.group-filter -- +babblesim
- name: Update modules (west update)
run: west update
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Build BabbleSim components
working-directory: tools/bsim
run: make everything
- name: Test ${{ matrix.test }}
working-directory: app
run: BSIM_COMPONENTS_PATH="${GITHUB_WORKSPACE}/tools/bsim/components" BSIM_OUT_PATH="${GITHUB_WORKSPACE}/tools/bsim" ./run-ble-test.sh tests/ble/${{ matrix.test }}
- name: Archive artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: "${{ matrix.test }}-log-files"
path: app/build/**/*.log

View file

@ -19,8 +19,8 @@ on:
required: false
type: string
archive_name:
description: 'Archive output file name'
default: 'firmware'
description: "Archive output file name"
default: "firmware"
required: false
type: string
@ -32,15 +32,15 @@ jobs:
build_matrix: ${{ env.build_matrix }}
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4
- name: Install yaml2json
run: python3 -m pip install remarshal
- name: Fetch Build Matrix
run: |
echo "build_matrix=$(yaml2json ${{ inputs.build_matrix_path }} | jq -c .)" >> $GITHUB_ENV
yaml2json ${{ inputs.build_matrix_path }} | jq
echo "build_matrix=$(yaml2json '${{ inputs.build_matrix_path }}' | jq -c .)" >> $GITHUB_ENV
yaml2json "${{ inputs.build_matrix_path }}" | jq
build:
runs-on: ubuntu-latest
@ -52,36 +52,59 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.build_matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create build directory
run: |
echo "build_dir=$(mktemp -d)" >> $GITHUB_ENV
- name: Prepare variables
shell: sh -x {0}
env:
board: ${{ matrix.board }}
shield: ${{ matrix.shield }}
artifact_name: ${{ matrix.artifact-name }}
snippet: ${{ matrix.snippet }}
run: |
if [ -n "${{ matrix.shield }}" ]
then
echo "extra_cmake_args=-DSHIELD=\"${{ matrix.shield }}\"" >> $GITHUB_ENV
echo "artifact_name=${{ matrix.shield }}-${{ matrix.board }}-zmk" >> $GITHUB_ENV
echo "display_name=${{ matrix.shield }} - ${{ matrix.board }}" >> $GITHUB_ENV
if [ -e zephyr/module.yml ]; then
export zmk_load_arg=" -DZMK_EXTRA_MODULES='${GITHUB_WORKSPACE}'"
new_tmp_dir="${TMPDIR:-/tmp}/zmk-config"
mkdir -p "${new_tmp_dir}"
echo "base_dir=${new_tmp_dir}" >> $GITHUB_ENV
else
echo "extra_cmake_args=" >> $GITHUB_ENV
echo "artifact_name=${{ matrix.board }}-zmk" >> $GITHUB_ENV
echo "display_name=${{ matrix.board }}" >> $GITHUB_ENV
echo "base_dir=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
fi
echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3.1.0
if [ -n "${snippet}" ]; then
extra_west_args="-S \"${snippet}\""
fi
echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV
echo "extra_west_args=${extra_west_args}" >> $GITHUB_ENV
echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}${zmk_load_arg}" >> $GITHUB_ENV
echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV
echo "artifact_name=${artifact_name:-${shield:+$shield-}${board}-zmk}" >> $GITHUB_ENV
- name: Copy config files to isolated temporary directory
run: |
if [ "${{ env.base_dir }}" != "${GITHUB_WORKSPACE}" ]; then
mkdir "${{ env.base_dir }}/${{ inputs.config_path }}"
cp -R ${{ inputs.config_path }}/* "${{ env.base_dir }}/${{ inputs.config_path }}/"
fi
- name: Cache west modules
uses: actions/cache@v3.0.11
uses: actions/cache@v4
continue-on-error: true
env:
cache_name: cache-zephyr-${{ env.zephyr_version }}-modules
with:
path: |
modules/
tools/
zephyr/
bootloader/
zmk/
${{ env.base_dir }}/modules/
${{ env.base_dir }}/tools/
${{ env.base_dir }}/zephyr/
${{ env.base_dir }}/bootloader/
${{ env.base_dir }}/zmk/
key: ${{ runner.os }}-build-${{ env.cache_name }}-${{ hashFiles('**/west.yml', '**/build.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache_name }}-
@ -89,36 +112,71 @@ jobs:
${{ runner.os }}-
- name: West Init
run: west init -l ${{ inputs.config_path }}
working-directory: ${{ env.base_dir }}
run: west init -l "${{ env.base_dir }}/${{ inputs.config_path }}"
- name: West Update
working-directory: ${{ env.base_dir }}
run: west update
- name: West Zephyr export
working-directory: ${{ env.base_dir }}
run: west zephyr-export
- name: West Build (${{ env.display_name }})
working-directory: ${{ env.base_dir }}
shell: sh -x {0}
run: |
west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}
run: west build -s zmk/app -d "${{ env.build_dir }}" -b "${{ matrix.board }}" ${{ env.extra_west_args }} -- -DZMK_CONFIG=${{ env.base_dir }}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}
- name: ${{ env.display_name }} Kconfig file
run: grep -v -e "^#" -e "^$" build/zephyr/.config | sort
run: |
if [ -f "${{ env.build_dir }}/zephyr/.config" ]
then
grep -v -e "^#" -e "^$" "${{ env.build_dir }}/zephyr/.config" | sort
else
echo "No Kconfig output"
fi
if: ${{ !cancelled() }}
- name: ${{ env.display_name }} Devicetree file
run: |
if [ -f "${{ env.build_dir }}/zephyr/zephyr.dts" ]
then
cat "${{ env.build_dir }}/zephyr/zephyr.dts"
elif [ -f "${{ env.build_dir }}/zephyr/zephyr.dts.pre" ]
then
cat -s "${{ env.build_dir }}/zephyr/zephyr.dts.pre"
else
echo "No Devicetree output"
fi
if: ${{ !cancelled() }}
- name: Rename artifacts
shell: sh -x {0}
run: |
mkdir build/artifacts
if [ -f build/zephyr/zmk.uf2 ]
mkdir "${{ env.build_dir }}/artifacts"
if [ -f "${{ env.build_dir }}/zephyr/zmk.uf2" ]
then
cp build/zephyr/zmk.uf2 "build/artifacts/${{ env.artifact_name }}.uf2"
elif [ -f build/zephyr/zmk.${{ inputs.fallback_binary }} ]
cp "${{ env.build_dir }}/zephyr/zmk.uf2" "${{ env.build_dir }}/artifacts/${{ env.artifact_name }}.uf2"
elif [ -f "${{ env.build_dir }}/zephyr/zmk.${{ inputs.fallback_binary }}" ]
then
cp build/zephyr/zmk.${{ inputs.fallback_binary }} "build/artifacts/${{ env.artifact_name }}.${{ inputs.fallback_binary }}"
cp "${{ env.build_dir }}/zephyr/zmk.${{ inputs.fallback_binary }}" "${{ env.build_dir }}/artifacts/${{ env.artifact_name }}.${{ inputs.fallback_binary }}"
fi
- name: Archive (${{ env.display_name }})
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifact-${{ env.artifact_name }}
path: ${{ env.build_dir }}/artifacts
merge:
runs-on: ubuntu-latest
needs: build
name: Merge Output Artifacts
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: ${{ inputs.archive_name }}
path: build/artifacts
pattern: artifact-*
delete-merged: true

View file

@ -10,23 +10,31 @@ on:
- ".github/workflows/build.yml"
- "app/**"
schedule:
- cron: '22 4 * * *'
- cron: "22 4 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'schedule' }}
cancel-in-progress: true
permissions: {}
jobs:
build:
if: ${{ always() }}
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-build-arm:3.0
image: docker.io/zmkfirmware/zmk-build-arm:3.5
needs: compile-matrix
strategy:
matrix:
include: ${{ fromJSON(needs.compile-matrix.outputs.include-list) }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Cache west modules
uses: actions/cache@v3.0.2
uses: actions/cache@v4
env:
cache-name: cache-zephyr-modules
with:
@ -49,32 +57,59 @@ jobs:
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '14.x'
node-version: "14.x"
- name: Install @actions/artifact
run: npm install @actions/artifact
- name: Build and upload artifacts
uses: actions/github-script@v4
- name: Build
uses: actions/github-script@v7
id: boards-list
with:
script: |
const fs = require('fs');
const artifact = require('@actions/artifact');
const artifactClient = artifact.create();
const execSync = require('child_process').execSync;
const buildShieldArgs = JSON.parse(`${{ matrix.shieldArgs }}`);
let error = false;
for (const shieldArgs of buildShieldArgs) {
try {
const output = execSync(`west build -s app -p -b ${{ matrix.board }} -- ${shieldArgs.shield ? '-DSHIELD="' + shieldArgs.shield + '"' : ''} ${shieldArgs['cmake-args'] || ''}`);
console.log(`::group::${{ matrix.board}} ${shieldArgs.shield} Build`)
const output = execSync(`west build -s app -p -b ${{ matrix.board }} ${shieldArgs.snippet ? '-S ' + shieldArgs.snippet : ''} -- ${shieldArgs.shield ? '-DSHIELD="' + shieldArgs.shield + '"' : ''} ${shieldArgs['cmake-args'] || ''}`);
console.log(output.toString());
} catch (e) {
console.error(`::error::Failed to build ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
console.error(e);
error = true;
} finally {
console.log('::endgroup::');
}
}
if (error) {
throw new Error('Failed to build one or more configurations');
}
- name: Upload artifacts
uses: actions/github-script@v7
continue-on-error: ${{ github.event_name == 'pull_request' }}
id: boards-upload
with:
script: |
const fs = require('fs');
const {default: artifact} = require('@actions/artifact');
const buildShieldArgs = JSON.parse(`${{ matrix.shieldArgs }}`);
let error = false;
for (const shieldArgs of buildShieldArgs) {
try {
console.log(`::group::${{ matrix.board}} ${shieldArgs.shield} Upload`)
const fileExtensions = ["hex", "uf2"];
@ -90,9 +125,9 @@ jobs:
const cmakeName = shieldArgs['cmake-args'] ? '-' + (shieldArgs.nickname || shieldArgs['cmake-args'].split(' ').join('')) : '';
const artifactName = `${{ matrix.board }}${shieldArgs.shield ? '-' + shieldArgs.shield : ''}${cmakeName}-zmk`;
await artifactClient.uploadArtifact(artifactName, files, rootDirectory, options);
await artifact.uploadArtifact(artifactName, files, rootDirectory, options);
} catch (e) {
console.error(`::error::Failed to build or upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
console.error(`::error::Failed to upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
console.error(e);
error = true;
} finally {
@ -104,21 +139,21 @@ jobs:
throw new Error('Failed to build one or more configurations');
}
compile-matrix:
if: ${{ always() }}
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
needs: [core-coverage, board-changes, nightly]
outputs:
include-list: ${{ steps.compile-list.outputs.result }}
steps:
- name: Join build lists
uses: actions/github-script@v4
uses: actions/github-script@v7
id: compile-list
with:
script: |
const coreCoverage = `${{ needs.core-coverage.outputs.core-include }}` || "[]";
const boardChanges = `${{ needs.board-changes.outputs.boards-include }}` || "[]";
const nightly = `${{ needs.nightly.outputs.nightly-include }}` || "[]";
const combined = [
...JSON.parse(coreCoverage),
...JSON.parse(boardChanges),
@ -131,10 +166,11 @@ jobs:
for (const configuration of combinedUnique) {
if (!perBoard[configuration.board])
perBoard[configuration.board] = [];
perBoard[configuration.board].push({
shield: configuration.shield,
'cmake-args': configuration['cmake-args'],
snippet: configuration.snippet,
nickname: configuration.nickname
})
}
@ -148,17 +184,19 @@ jobs:
runs-on: ubuntu-latest
needs: get-changed-files
outputs:
core-include: ${{ steps.core-list.outputs.result }}
core-include: ${{ steps.core-list.outputs.result }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/checkout@v4
with:
node-version: '14.x'
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "14.x"
- name: Install js-yaml
run: npm install js-yaml
- uses: actions/github-script@v4
- uses: actions/github-script@v7
id: core-list
with:
script: |
@ -166,7 +204,7 @@ jobs:
const yaml = require('js-yaml');
const coreCoverage = yaml.load(fs.readFileSync('app/core-coverage.yml', 'utf8'));
let include = coreCoverage.board.flatMap(board =>
coreCoverage.shield.map(shield => ({ board, shield }))
);
@ -180,14 +218,14 @@ jobs:
boards-include: ${{ steps.boards-list.outputs.result }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '14.x'
node-version: "14.x"
- name: Install js-yaml
run: npm install js-yaml
- uses: actions/github-script@v4
- uses: actions/github-script@v7
id: boards-list
with:
script: |
@ -234,7 +272,7 @@ jobs:
};
}
} else if (hm.exposes) {
return hm.exposes.flatMap(i =>
return hm.exposes.flatMap(i =>
metadata.interconnects[i].shields.flatMap(s => boardAndShield(hm, s))
);
} else {
@ -243,7 +281,7 @@ jobs:
break;
case "shield":
if (hm.features && hm.features.includes("keys")) {
return hm.requires.flatMap(i =>
return hm.requires.flatMap(i =>
metadata.interconnects[i].boards.flatMap(b => boardAndShield(b, hm))
);
} else {
@ -257,19 +295,19 @@ jobs:
});
}))).flat();
nightly:
if: ${{ github.event_name == 'schedule' }}
if: ${{ github.event_name == 'schedule' && github.repository_owner == 'zmkfirmware' }}
runs-on: ubuntu-latest
needs: get-grouped-hardware
outputs:
nightly-include: ${{ steps.nightly-list.outputs.result }}
steps:
- name: Create nightly list
uses: actions/github-script@v4
uses: actions/github-script@v7
id: nightly-list
with:
script: |
const metadata = JSON.parse(`${{ needs.get-grouped-hardware.outputs.organized-metadata }}`);
let includeOnboard = metadata.onboard.flatMap(b => {
if (b.siblings) {
return b.siblings.map(board => ({
@ -307,15 +345,17 @@ jobs:
organized-metadata: ${{ steps.organize-metadata.outputs.result }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/checkout@v4
with:
node-version: '14.x'
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "14.x"
- name: Install js-yaml
run: npm install js-yaml
- name: Aggregate Metadata
uses: actions/github-script@v4
uses: actions/github-script@v7
id: aggregate-metadata
with:
script: |
@ -329,11 +369,11 @@ jobs:
yaml.loadAll(fs.readFileSync(f, "utf8"))
);
return JSON.stringify(aggregated).replace(/\\/g,"\\\\");
return JSON.stringify(aggregated).replace(/\\/g,"\\\\").replace(/`/g,"\\`");
result-encoding: string
- name: Organize Metadata
uses: actions/github-script@v4
uses: actions/github-script@v7
id: organize-metadata
with:
script: |
@ -376,33 +416,38 @@ jobs:
},
{ onboard: [], interconnects: {} });
return JSON.stringify(grouped).replace(/\\/g,"\\\\");
return JSON.stringify(grouped).replace(/\\/g,"\\\\").replace(/`/g,"\\`");
result-encoding: string
get-changed-files:
if: ${{ github.event_name != 'schedule' }}
runs-on: ubuntu-latest
outputs:
changed-files: ${{ steps.changed-files.outputs.all }}
changed-files: ${{ steps.changed-files.outputs.all_changed_files }}
board-changes: ${{ steps.board-changes.outputs.result }}
core-changes: ${{ steps.core-changes.outputs.result }}
steps:
- uses: Ana06/get-changed-files@v2.0.0
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- uses: tj-actions/changed-files@v45
id: changed-files
with:
format: 'json'
- uses: actions/github-script@v4
json: true
escape_json: false
- uses: actions/github-script@v7
id: board-changes
with:
script: |
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all }}`);
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all_changed_files }}`);
const boardChanges = changedFiles.filter(f => f.startsWith('app/boards'));
return boardChanges.length ? 'true' : 'false';
result-encoding: string
- uses: actions/github-script@v4
- uses: actions/github-script@v7
id: core-changes
with:
script: |
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all }}`);
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all_changed_files }}`);
const boardChanges = changedFiles.filter(f => f.startsWith('app/boards'));
const appChanges = changedFiles.filter(f => f.startsWith('app'));
const ymlChanges = changedFiles.includes('.github/workflows/build.yml');

View file

@ -1,29 +0,0 @@
name: Clang Format
on:
push:
paths:
- ".github/workflows/clang-format-lint.yml"
- "app/boards/**/*.c"
- "app/include/**/*.h"
- "app/src/**"
- "app/drivers/**/*.c"
- "app/drivers/**/*.h"
pull_request:
paths:
- ".github/workflows/clang-format-lint.yml"
- "app/boards/**/*.c"
- "app/include/**/*.h"
- "app/src/**"
- "app/drivers/**/*.c"
- "app/drivers/**/*.h"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.13
with:
source: "./app"
extensions: "h,c"

View file

@ -14,27 +14,17 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: bahmutov/npm-install@v1
with:
working-directory: docs
- name: ESLint
run: npm run lint
working-directory: docs
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: bahmutov/npm-install@v1
with:
working-directory: docs
- name: Prettier check
run: npm run prettier:check
working-directory: docs
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: bahmutov/npm-install@v1
with:
working-directory: docs

View file

@ -15,25 +15,14 @@ on:
- "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:3.0
image: docker.io/zmkfirmware/zmk-dev-arm:3.5
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install dependencies
run: pip install -r app/scripts/requirements.txt
run: pip install --break-system-packages -r app/scripts/requirements.txt
- name: West init
run: west init -l app
- name: Update modules (west update)

15
.github/workflows/pre-commit.yml vendored Normal file
View file

@ -0,0 +1,15 @@
name: pre-commit
on:
pull_request:
push:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: pre-commit/action@v3.0.1

View file

@ -6,11 +6,13 @@ on:
- ".github/workflows/test.yml"
- "app/tests/**"
- "app/src/**"
- "app/include/**"
pull_request:
paths:
- ".github/workflows/test.yml"
- "app/tests/**"
- "app/src/**"
- "app/include/**"
jobs:
collect-tests:
@ -19,13 +21,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Find test directories
id: test-dirs
run: |
cd app/tests/
export TESTS=$(ls -d * | jq -R -s -c 'split("\n")[:-1]')
echo "::set-output name=test-dirs::${TESTS}"
export TESTS=$(ls -d * | grep -v ble | jq -R -s -c 'split("\n")[:-1]')
echo "test-dirs=${TESTS}" >> $GITHUB_OUTPUT
run-tests:
needs: collect-tests
strategy:
@ -33,12 +35,12 @@ jobs:
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-build-arm:3.0
image: docker.io/zmkfirmware/zmk-build-arm:3.5
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Cache west modules
uses: actions/cache@v3.0.2
uses: actions/cache@v4
env:
cache-name: cache-zephyr-modules
with:
@ -65,7 +67,7 @@ jobs:
run: west test tests/${{ matrix.test }}
- name: Archive artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "log-files"
name: "${{ matrix.test }}-log-files"
path: app/build/**/*.log

11
.gitignore vendored
View file

@ -5,5 +5,14 @@
/zephyr
/zmk-config
/build
# macOS
*.DS_Store
__pycache__
# Python
__pycache__
.python-version
.venv
# clangd
app/.cache/

View file

@ -1,12 +1,28 @@
fail_fast: false
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.1
hooks:
- id: remove-tabs
exclude: "vendor-prefixes\\.txt$"
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.1.1
rev: v1.3.5
hooks:
- id: clang-format
args:
- -i
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.2.1
rev: v2.7.1
hooks:
- id: prettier
# Workaround for https://github.com/pre-commit/mirrors-prettier/issues/29
additional_dependencies:
- prettier@2.8.7
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: check-added-large-files
- id: check-shebang-scripts-are-executable
exclude: "\\.mustache$"

10
.vscode/extensions.json vendored Normal file
View file

@ -0,0 +1,10 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"ms-python.python",
"ms-vscode.cpptools",
"plorefice.devicetree",
"twxs.cmake",
"unifiedjs.vscode-mdx"
]
}

19
.vscode/settings.json vendored
View file

@ -3,5 +3,20 @@
"*.overlay": "dts",
"*.keymap": "dts"
},
"python.formatting.provider": "black"
}
"python.formatting.provider": "black",
"[c]": {
"editor.formatOnSave": true
},
"[javascript][javascriptreact][typescript][typescriptreact]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "ms-python.python"
},
"[css][json][jsonc][html][markdown][yaml]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}

View file

@ -86,6 +86,12 @@ documentation to areas not currently covered are greatly appreciated.
ZMK uses `prettier` to format documentation files. You can run prettier with `npm run prettier:format`.
You can setup git to run prettier automatically when you commit by installing the pre-commit hooks: `pip3 install pre-commit`, `pre-commit install`.
### Linting
This repository utilizes ESLint for code linting to ensure consistent code style and identify potential errors or bugs early in the development process.
You can run ESLint with `npm run lint` to verify your changes.
## Code Contributions
### Development Setup

View file

@ -4,10 +4,10 @@
[![Build](https://github.com/zmkfirmware/zmk/workflows/Build/badge.svg)](https://github.com/zmkfirmware/zmk/actions)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](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://zmk.dev/) is an open source ([MIT](LICENSE)) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues.
Check out the website to learn more: https://zmk.dev/
Check out the website to learn more: https://zmk.dev/.
You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite)
You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite).
To review features, check out the [feature overview](https://zmk.dev/docs/). ZMK is under active development, and new features are listed with the [enhancement label](https://github.com/zmkfirmware/zmk/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature.

View file

@ -1,3 +1,3 @@
module.exports = {
endOfLine: "auto",
endOfLine: "auto",
};

View file

@ -2,67 +2,80 @@ cmake_minimum_required(VERSION 3.13.1)
set(CONFIG_APPLICATION_DEFINED_SYSCALL true)
# Add our custom Zephyr module for drivers w/ syscalls, etc.
list(APPEND DTS_ROOT ${CMAKE_SOURCE_DIR}/drivers/zephyr)
set(ZephyrBuildConfiguration_ROOT ${CMAKE_SOURCE_DIR}/cmake)
list(APPEND ZEPHYR_EXTRA_MODULES
${CMAKE_CURRENT_SOURCE_DIR}/drivers
)
set(ZEPHYR_EXTRA_MODULES "${ZMK_EXTRA_MODULES};${CMAKE_CURRENT_SOURCE_DIR}/module;${CMAKE_CURRENT_SOURCE_DIR}/keymap-module")
# Find Zephyr. This also loads Zephyr's build system.
find_package(Zephyr REQUIRED HINTS ../zephyr)
project(zmk)
zephyr_linker_sources(SECTIONS include/linker/zmk-behaviors.ld)
zephyr_linker_sources(RODATA include/linker/zmk-events.ld)
if(CONFIG_ZMK_BEHAVIOR_LOCAL_IDS)
zephyr_linker_sources(DATA_SECTIONS include/linker/zmk-behavior-local-id-map.ld)
endif()
zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/behavior.h)
zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/ext_power.h)
# Add your source file to the "app" target. This must come after
# find_package(Zephyr) which defines the target.
target_include_directories(app PRIVATE include)
target_sources(app PRIVATE src/stdlib.c)
target_sources(app PRIVATE src/activity.c)
target_sources(app PRIVATE src/kscan.c)
target_sources(app PRIVATE src/behavior.c)
target_sources_ifdef(CONFIG_ZMK_KSCAN_SIDEBAND_BEHAVIORS app PRIVATE src/kscan_sideband_behaviors.c)
target_sources(app PRIVATE src/matrix_transform.c)
target_sources(app PRIVATE src/physical_layouts.c)
target_sources(app PRIVATE src/sensors.c)
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/wpm.c)
target_sources(app PRIVATE src/event_manager.c)
target_sources_ifdef(CONFIG_ZMK_PM app PRIVATE src/pm.c)
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/ext_power_generic.c)
target_sources_ifdef(CONFIG_ZMK_GPIO_KEY_WAKEUP_TRIGGER app PRIVATE src/gpio_key_wakeup_trigger.c)
target_sources(app PRIVATE src/events/activity_state_changed.c)
target_sources(app PRIVATE src/events/position_state_changed.c)
target_sources(app PRIVATE src/events/sensor_event.c)
target_sources(app PRIVATE src/events/mouse_button_state_changed.c)
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c)
target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/events/usb_conn_state_changed.c)
target_sources(app PRIVATE src/behaviors/behavior_reset.c)
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c)
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SOFT_OFF app PRIVATE src/behaviors/behavior_soft_off.c)
if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
target_sources(app PRIVATE src/hid.c)
target_sources_ifdef(CONFIG_ZMK_MOUSE app PRIVATE src/mouse.c)
target_sources(app PRIVATE src/behaviors/behavior_key_press.c)
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_KEY_TOGGLE app PRIVATE src/behaviors/behavior_key_toggle.c)
target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c)
target_sources(app PRIVATE src/behaviors/behavior_sticky_key.c)
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_HOLD_TAP app PRIVATE src/behaviors/behavior_hold_tap.c)
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_STICKY_KEY 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_key_repeat.c)
target_sources(app PRIVATE src/behaviors/behavior_macro.c)
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_MACRO app PRIVATE src/behaviors/behavior_macro.c)
target_sources(app PRIVATE src/behaviors/behavior_momentary_layer.c)
target_sources(app PRIVATE src/behaviors/behavior_mod_morph.c)
target_sources(app PRIVATE src/behaviors/behavior_outputs.c)
target_sources(app PRIVATE src/behaviors/behavior_tap_dance.c)
target_sources(app PRIVATE src/behaviors/behavior_toggle_layer.c)
target_sources(app PRIVATE src/behaviors/behavior_to_layer.c)
target_sources(app PRIVATE src/behaviors/behavior_transparent.c)
target_sources(app PRIVATE src/behaviors/behavior_none.c)
target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c)
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE app PRIVATE src/behaviors/behavior_sensor_rotate.c)
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_VAR app PRIVATE src/behaviors/behavior_sensor_rotate_var.c)
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON app PRIVATE src/behaviors/behavior_sensor_rotate_common.c)
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_MOUSE_KEY_PRESS app PRIVATE src/behaviors/behavior_mouse_key_press.c)
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_STUDIO_UNLOCK app PRIVATE src/behaviors/behavior_studio_unlock.c)
target_sources(app PRIVATE src/combo.c)
target_sources(app PRIVATE src/behaviors/behavior_tap_dance.c)
target_sources(app PRIVATE src/behavior_queue.c)
target_sources(app PRIVATE src/conditional_layer.c)
target_sources(app PRIVATE src/endpoints.c)
target_sources(app PRIVATE src/events/endpoint_selection_changed.c)
target_sources(app PRIVATE src/events/endpoint_changed.c)
target_sources(app PRIVATE src/hid_listener.c)
target_sources(app PRIVATE src/keymap.c)
target_sources(app PRIVATE src/events/layer_state_changed.c)
target_sources(app PRIVATE src/events/modifiers_state_changed.c)
target_sources(app PRIVATE src/events/keycode_state_changed.c)
target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE src/hid_indicators.c)
if (CONFIG_ZMK_BLE)
target_sources(app PRIVATE src/events/ble_active_profile_changed.c)
@ -75,8 +88,10 @@ endif()
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c)
target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/behaviors/behavior_backlight.c)
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/battery_state_changed.c)
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/battery.c)
target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/events/battery_state_changed.c)
target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/battery.c)
target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE src/events/hid_indicators_changed.c)
target_sources_ifdef(CONFIG_ZMK_SPLIT app PRIVATE src/events/split_peripheral_status_changed.c)
add_subdirectory(src/split)
@ -85,8 +100,33 @@ target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/usb.c)
target_sources_ifdef(CONFIG_ZMK_USB app PRIVATE src/usb_hid.c)
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/rgb_underglow.c)
target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/backlight.c)
target_sources_ifdef(CONFIG_ZMK_LOW_PRIORITY_WORK_QUEUE app PRIVATE src/workqueue.c)
target_sources(app PRIVATE src/main.c)
add_subdirectory(src/display/)
add_subdirectory_ifdef(CONFIG_SETTINGS src/settings/)
if (CONFIG_ZMK_STUDIO_RPC)
# For some reason this is failing if run from a different sub-file.
list(APPEND CMAKE_MODULE_PATH ${ZEPHYR_BASE}/modules/nanopb)
include(nanopb)
# Turn off the default nanopb behavior
set(NANOPB_GENERATE_CPP_STANDALONE OFF)
nanopb_generate_cpp(proto_srcs proto_hdrs RELPATH ${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}
${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}/proto/zmk/studio.proto
${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}/proto/zmk/meta.proto
${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}/proto/zmk/core.proto
${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}/proto/zmk/behaviors.proto
${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}/proto/zmk/keymap.proto
)
target_include_directories(app PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
target_sources(app PRIVATE ${proto_srcs} ${proto_hdrs})
add_subdirectory(src/studio)
endif()
zephyr_cc_option(-Wfatal-errors)

View file

@ -8,166 +8,241 @@ menu "ZMK"
menu "Basic Keyboard Setup"
config ZMK_KEYBOARD_NAME
string "Keyboard Name"
string "Keyboard Name"
config USB_DEVICE_PRODUCT
default ZMK_KEYBOARD_NAME
default ZMK_KEYBOARD_NAME
config BT_DEVICE_NAME
default ZMK_KEYBOARD_NAME
default ZMK_KEYBOARD_NAME
config USB_DEVICE_VID
default 0x1D50
default 0x1D50
config USB_DEVICE_PID
default 0x615E
default 0x615E
config USB_DEVICE_MANUFACTURER
default "ZMK Project"
default "ZMK Project"
config BT_DIS_PNP_VID
default 0x1D50
default 0x1D50
config BT_DIS_PNP_PID
default 0x615E
default 0x615E
config BT_DIS_MODEL
default ZMK_KEYBOARD_NAME
default ZMK_KEYBOARD_NAME
config BT_DIS_MANUF
default "ZMK Project"
default "ZMK Project"
# Hardware specific overrides
if SOC_SERIES_NRF52X
# Default on for our usage until boards implement retained bootmode.
config NRF_STORE_REBOOT_TYPE_GPREGRET
bool
default y
endif
menu "HID"
choice ZMK_HID_REPORT_TYPE
prompt "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 #.
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.
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 (notably F13-F24 and INTL1-9)
These usages can be re enabled with ZMK_HID_KEYBOARD_NKRO_EXTENDED_REPORT.
endchoice
config ZMK_HID_KEYBOARD_NKRO_EXTENDED_REPORT
bool "Enable extended NKRO reporting"
depends on ZMK_HID_REPORT_TYPE_NKRO
help
Enables higher usage range for NKRO (F13-F24 and INTL1-9).
Please note this is not compatible with Android currently and you will get no input
if ZMK_HID_REPORT_TYPE_HKRO
config ZMK_HID_KEYBOARD_REPORT_SIZE
int "# Keyboard Keys Reportable"
default 6
int "# Keyboard Keys Reportable"
default 6
endif
config ZMK_HID_CONSUMER_REPORT_SIZE
int "# Consumer Keys Reportable"
default 6
int "# Consumer Keys Reportable"
default 6
choice ZMK_HID_CONSUMER_REPORT_USAGES
prompt "HID Report Type"
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.
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.
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
config ZMK_HID_INDICATORS
bool "HID Indicators"
help
Enable HID indicators, used for detecting state of Caps/Scroll/Num Lock,
Kata, and Compose.
config ZMK_HID_SEPARATE_MOD_RELEASE_REPORT
bool "Release Modifiers Separately"
help
Send a separate release event for the modifiers, to make sure the release
of the modifier doesn't get recognized before the actual key's release event.
menu "Output Types"
config ZMK_USB
bool "USB"
select USB
select USB_DEVICE_STACK
select USB_DEVICE_HID
bool "USB"
depends on (!ZMK_SPLIT || (ZMK_SPLIT && ZMK_SPLIT_ROLE_CENTRAL))
select USB
select USB_DEVICE_STACK
select USB_DEVICE_HID
config ZMK_USB_BOOT
bool "USB Boot Protocol Support"
depends on ZMK_USB
select USB_HID_BOOT_PROTOCOL
select USB_DEVICE_SOF
if ZMK_USB
config USB_NUMOF_EP_WRITE_RETRIES
default 10
default 10
config USB_HID_POLL_INTERVAL_MS
default 1
default 1
#ZMK_USB
endif
menuconfig ZMK_BLE
bool "BLE (HID over GATT)"
select BT
select BT_SMP
select BT_SMP_SC_PAIR_ONLY
select BT_SMP_APP_PAIRING_ACCEPT
select BT_PERIPHERAL
select BT_DIS
select BT_BAS
select BT_SETTINGS
select SETTINGS
bool "BLE (HID over GATT)"
select BT
select BT_SMP
select BT_SMP_SC_PAIR_ONLY
select BT_SMP_APP_PAIRING_ACCEPT
select BT_PERIPHERAL
select BT_DIS
imply BT_SETTINGS if !ARCH_POSIX
imply SETTINGS if !ARCH_POSIX
imply ZMK_BATTERY_REPORTING if !ARCH_POSIX
if ZMK_BLE
config ZMK_BLE_EXPERIMENTAL_CONN
bool "Experimental BLE connection changes"
help
Enables a combination of settings that are planned to be default in future versions of ZMK
to improve connection stability. This includes changes to timing on BLE pairing initiation,
restores use of the updated/new LLCP implementation, and disables 2M PHY support.
config ZMK_BLE_EXPERIMENTAL_SEC
bool "Experimental BLE security changes"
imply BT_SMP_ALLOW_UNAUTH_OVERWRITE
help
Enables a combination of settings that are planned to be officially supported in the future.
This includes enabling BT Secure Connection passkey entry, and allows overwrite of keys from
previously paired hosts.
config ZMK_BLE_EXPERIMENTAL_FEATURES
bool "Experimental BLE connection and security settings/features"
select ZMK_BLE_EXPERIMENTAL_CONN
select ZMK_BLE_EXPERIMENTAL_SEC
help
Enables experimental connection changes and security features.
config ZMK_BLE_PASSKEY_ENTRY
bool "Require passkey entry on the keyboard to complete pairing"
select RING_BUFFER
config BT_SMP_ALLOW_UNAUTH_OVERWRITE
imply ZMK_BLE_PASSKEY_ENTRY
config BT_CTLR_PHY_2M
default n if ZMK_BLE_EXPERIMENTAL_CONN
# BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY when using HCI
config BT_TINYCRYPT_ECC
default y if BT_HCI && !BT_CTLR
config SYSTEM_WORKQUEUE_STACK_SIZE
default 2048
default 4096 if SOC_RP2040
default 2048
config ZMK_BLE_THREAD_STACK_SIZE
int "BLE notify thread stack size"
default 512
int "BLE notify thread stack size"
default 768
config ZMK_BLE_THREAD_PRIORITY
int "BLE notify thread priority"
default 5
int "BLE notify thread priority"
default 5
config ZMK_BLE_KEYBOARD_REPORT_QUEUE_SIZE
int "Max number of keyboard HID reports to queue for sending over BLE"
default 20
int "Max number of keyboard HID reports to queue for sending over BLE"
default 20
config ZMK_BLE_CONSUMER_REPORT_QUEUE_SIZE
int "Max number of consumer HID reports to queue for sending over BLE"
default 5
int "Max number of consumer HID reports to queue for sending over BLE"
default 5
config ZMK_BLE_MOUSE_REPORT_QUEUE_SIZE
int "Max number of mouse HID reports to queue for sending over BLE"
default 20
config ZMK_BLE_CLEAR_BONDS_ON_START
bool "Configuration that clears all bond information from the keyboard on startup."
default n
bool "Configuration that clears all bond information from the keyboard on startup."
# HID GATT notifications sent this way are *not* picked up by Linux, and possibly others.
config BT_GATT_NOTIFY_MULTIPLE
default n
default n
config BT_GATT_AUTO_SEC_REQ
default n
default (ZMK_SPLIT_BLE && !ZMK_SPLIT_ROLE_CENTRAL)
config BT_DEVICE_APPEARANCE
default 961
config ZMK_BLE_PASSKEY_ENTRY
bool "Experimental: Requiring typing passkey from host to pair BLE connection"
default n
default 961
config BT_PERIPHERAL_PREF_MIN_INT
default 6
default 6
config BT_PERIPHERAL_PREF_MAX_INT
default 12
default 12
config BT_PERIPHERAL_PREF_LATENCY
default 30
default 30
config BT_PERIPHERAL_PREF_TIMEOUT
default 400
default 400
#ZMK_BLE
endif
@ -183,113 +258,136 @@ rsource "src/split/Kconfig"
#Basic Keyboard Setup
endmenu
menu "Keymaps"
config ZMK_KEYMAP_LAYER_REORDERING
bool "Layer Reordering Support"
config ZMK_KEYMAP_SETTINGS_STORAGE
bool "Settings Save/Load"
depends on SETTINGS
depends on ZMK_BEHAVIOR_LOCAL_IDS
if ZMK_KEYMAP_SETTINGS_STORAGE
config ZMK_KEYMAP_LAYER_NAME_MAX_LEN
int "Max Layer Name Length"
default 20
endif
endmenu # Keymaps
rsource "src/studio/Kconfig"
menu "Display/LED Options"
rsource "src/display/Kconfig"
menuconfig ZMK_RGB_UNDERGLOW
bool "RGB Adressable LED Underglow"
select LED_STRIP
bool "RGB Addressable LED Underglow"
select LED_STRIP
select ZMK_LOW_PRIORITY_WORK_QUEUE
if ZMK_RGB_UNDERGLOW
# This default value cuts down on tons of excess .conf files, if you're using GPIO, manually disable this
config SPI
default y
default y
config ZMK_RGB_UNDERGLOW_EXT_POWER
bool "RGB underglow toggling also controls external power"
default y
bool "RGB underglow toggling also controls external power"
default y
config ZMK_RGB_UNDERGLOW_BRT_MIN
int "RGB underglow minimum brightness in percent"
range 0 100
default 0
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
int "RGB underglow maximum brightness in percent"
range ZMK_RGB_UNDERGLOW_BRT_MIN 100
default 100
config ZMK_RGB_UNDERGLOW_HUE_STEP
int "RGB underglow hue step in degrees"
range 0 359
default 10
int "RGB underglow hue step in degrees"
range 0 359
default 10
config ZMK_RGB_UNDERGLOW_SAT_STEP
int "RGB underglow saturation step in percent"
range 0 100
default 10
int "RGB underglow saturation step in percent"
range 0 100
default 10
config ZMK_RGB_UNDERGLOW_BRT_STEP
int "RGB underglow brightness step in percent"
range 0 100
default 10
int "RGB underglow brightness step in percent"
range 0 100
default 10
config ZMK_RGB_UNDERGLOW_HUE_START
int "RGB underglow start hue value in degrees"
range 0 359
default 0
int "RGB underglow start hue value in degrees"
range 0 359
default 0
config ZMK_RGB_UNDERGLOW_SAT_START
int "RGB underglow start saturations value in percent"
range 0 100
default 100
int "RGB underglow start saturations value in percent"
range 0 100
default 100
config ZMK_RGB_UNDERGLOW_BRT_START
int "RGB underglow start brightness value in percent"
range ZMK_RGB_UNDERGLOW_BRT_MIN ZMK_RGB_UNDERGLOW_BRT_MAX
default ZMK_RGB_UNDERGLOW_BRT_MAX
int "RGB underglow start brightness value in percent"
range ZMK_RGB_UNDERGLOW_BRT_MIN ZMK_RGB_UNDERGLOW_BRT_MAX
default ZMK_RGB_UNDERGLOW_BRT_MAX
config ZMK_RGB_UNDERGLOW_SPD_START
int "RGB underglow start animation speed value"
range 1 5
default 3
int "RGB underglow start animation speed value"
range 1 5
default 3
config ZMK_RGB_UNDERGLOW_EFF_START
int "RGB underglow start effect int value related to the effect enum list"
range 0 3
default 0
int "RGB underglow start effect int value related to the effect enum list"
range 0 3
default 0
config ZMK_RGB_UNDERGLOW_ON_START
bool "RGB underglow starts on by default"
default y
bool "RGB underglow starts on by default"
default y
config ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE
bool "Turn off RGB underglow when keyboard goes into idle state"
bool "Turn off RGB underglow when keyboard goes into idle state"
config ZMK_RGB_UNDERGLOW_AUTO_OFF_USB
bool "Turn off RGB underglow when USB is disconnected"
depends on USB_DEVICE_STACK
bool "Turn off RGB underglow when USB is disconnected"
depends on USB_DEVICE_STACK
#ZMK_RGB_UNDERGLOW
endif
menuconfig ZMK_BACKLIGHT
bool "LED backlight"
select LED
bool "LED backlight"
select LED
if ZMK_BACKLIGHT
config ZMK_BACKLIGHT_BRT_STEP
int "Brightness step in percent"
range 1 100
default 20
int "Brightness step in percent"
range 1 100
default 20
config ZMK_BACKLIGHT_BRT_START
int "Default brightness in percent"
range 1 100
default 40
int "Default brightness in percent"
range 1 100
default 40
config ZMK_BACKLIGHT_ON_START
bool "Default backlight state"
default y
bool "Default backlight state"
default y
config ZMK_BACKLIGHT_AUTO_OFF_IDLE
bool "Turn off backlight when keyboard goes into idle state"
bool "Turn off backlight when keyboard goes into idle state"
config ZMK_BACKLIGHT_AUTO_OFF_USB
bool "Turn off backlight when USB is disconnected"
bool "Turn off backlight when USB is disconnected"
#ZMK_BACKLIGHT
endif
@ -297,31 +395,82 @@ endif
#Display/LED Options
endmenu
menu "Mouse Options"
config ZMK_MOUSE
bool "Enable ZMK mouse emulation"
#Mouse Options
endmenu
menu "Power Management"
config ZMK_BATTERY_REPORTING
bool "Battery level detection/reporting"
select SENSOR
select ZMK_LOW_PRIORITY_WORK_QUEUE
imply BT_BAS if ZMK_BLE
if ZMK_BATTERY_REPORTING
choice ZMK_BATTERY_REPORTING_FETCH_MODE
prompt "Battery Reporting Fetch Mode"
config ZMK_BATTERY_REPORTING_FETCH_MODE_STATE_OF_CHARGE
bool "State of charge"
config ZMK_BATTERY_REPORTING_FETCH_MODE_LITHIUM_VOLTAGE
bool "Lithium Voltage"
endchoice
endif
config ZMK_IDLE_TIMEOUT
int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)"
default 30000
int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)"
default 30000
config ZMK_SLEEP
bool "Enable deep sleep support"
imply USB
bool "Enable deep sleep support"
depends on HAS_POWEROFF
select POWEROFF
select ZMK_PM_DEVICE_SUSPEND_RESUME
imply USB
if ZMK_SLEEP
config PM_DEVICE
default y
default y
config ZMK_IDLE_SLEEP_TIMEOUT
int "Milliseconds of inactivity before entering deep sleep"
default 900000
int "Milliseconds of inactivity before entering deep sleep"
default 900000
#ZMK_SLEEP
endif
config ZMK_EXT_POWER
bool "Enable support to control external power output"
default y
bool "Enable support to control external power output"
default y
config ZMK_PM
bool
config ZMK_PM_DEVICE_SUSPEND_RESUME
bool
select ZMK_PM
config ZMK_PM_SOFT_OFF
bool "Soft-off support"
depends on HAS_POWEROFF
select ZMK_PM
select PM_DEVICE
select ZMK_PM_DEVICE_SUSPEND_RESUME
select POWEROFF
config ZMK_GPIO_KEY_WAKEUP_TRIGGER
bool "Hardware supported wakeup (GPIO)"
default y
depends on DT_HAS_ZMK_GPIO_KEY_WAKEUP_TRIGGER_ENABLED && ZMK_PM_SOFT_OFF
#Power Management
endmenu
@ -329,16 +478,16 @@ endmenu
menu "Combo options"
config ZMK_COMBO_MAX_PRESSED_COMBOS
int "Maximum number of currently pressed combos"
default 4
int "Maximum number of currently pressed combos"
default 4
config ZMK_COMBO_MAX_COMBOS_PER_KEY
int "Maximum number of combos per key"
default 5
int "Maximum number of combos per key"
default 5
config ZMK_COMBO_MAX_KEYS_PER_COMBO
int "Maximum number of keys per combo"
default 4
int "Maximum number of keys per combo"
default 4
#Combo options
endmenu
@ -346,14 +495,18 @@ endmenu
menu "Behavior Options"
config ZMK_BEHAVIORS_QUEUE_SIZE
int "Maximum number of behaviors to allow queueing from a macro or other complex behavior"
default 64
int "Maximum number of behaviors to allow queueing from a macro or other complex behavior"
default 64
DT_COMPAT_ZMK_BEHAVIOR_KEY_TOGGLE := zmk,behavior-key-toggle
rsource "Kconfig.behaviors"
config ZMK_BEHAVIOR_KEY_TOGGLE
bool
default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BEHAVIOR_KEY_TOGGLE))
config ZMK_MACRO_DEFAULT_WAIT_MS
int "Default time to wait (in milliseconds) before triggering the next behavior in macros"
default 15
config ZMK_MACRO_DEFAULT_TAP_MS
int "Default time to wait (in milliseconds) between the press and release events of a tapped behavior in macros"
default 30
endmenu
@ -364,8 +517,12 @@ menu "Initialization Priorities"
if USB_DEVICE_STACK
config ZMK_USB_INIT_PRIORITY
int "USB Init Priority"
default 50
int "USB Init Priority"
default 94
config ZMK_USB_HID_INIT_PRIORITY
int "USB HID Init Priority"
default 95
#USB
endif
@ -373,8 +530,8 @@ endif
if ZMK_BLE || ZMK_SPLIT_BLE
config ZMK_BLE_INIT_PRIORITY
int "BLE Init Priority"
default 50
int "BLE Init Priority"
default 50
#ZMK_BLE || ZMK_SPLIT_BLE
endif
@ -382,70 +539,156 @@ endif
#Initialization Priorities
endmenu
menu "KSCAN Settings"
menuconfig ZMK_KSCAN
bool "ZMK KScan Integration"
default y
select KSCAN
if ZMK_KSCAN
config ZMK_KSCAN_EVENT_QUEUE_SIZE
int "Size of the event queue for KSCAN events to buffer events"
default 4
int "Size of the event queue for KSCAN events to buffer events"
default 4
#KSCAN Settings
endmenu
endif # ZMK_KSCAN
menu "USB Logging"
config ZMK_KSCAN_SIDEBAND_BEHAVIORS
bool
default y
depends on DT_HAS_ZMK_KSCAN_SIDEBAND_BEHAVIORS_ENABLED
select KSCAN
if ZMK_KSCAN_SIDEBAND_BEHAVIORS
config ZMK_KSCAN_SIDEBAND_BEHAVIORS_INIT_PRIORITY
int "Keyboard scan sideband behaviors driver init priority"
# The default kscan init priority is 90, so be sure we are initialized later.
default 95
endif # ZMK_KSCAN_SIDEBAND_BEHAVIORS
menu "Logging"
config ZMK_LOGGING_MINIMAL
bool "Suppress all ZMK debug log messages"
default false
if !ZMK_LOGGING_MINIMAL
config ZMK_LOG_LEVEL
default 4
endif
config ZMK_USB_LOGGING
bool "Enable USB CDC ACM logging to help debug"
select LOG
select USB
select USB_DEVICE_STACK
select USB_CDC_ACM
select SERIAL
select CONSOLE
select UART_INTERRUPT_DRIVEN
select UART_LINE_CTRL
select UART_CONSOLE
select USB_UART_CONSOLE
bool "Enable USB CDC ACM logging to help debug"
select LOG
select USB
select USB_DEVICE_STACK
select USB_CDC_ACM
select SERIAL
select CONSOLE
select UART_INTERRUPT_DRIVEN
select UART_LINE_CTRL
select UART_CONSOLE
select USB_UART_CONSOLE
if ZMK_USB_LOGGING
config ZMK_LOG_LEVEL
default 4
choice USB_CDC_ACM_LOG_LEVEL_CHOICE
default USB_CDC_ACM_LOG_LEVEL_OFF
endchoice
choice USB_DRIVER_LOG_LEVEL_CHOICE
default USB_DRIVER_LOG_LEVEL_OFF
endchoice
# We do this to avoid log loop where logging to USB generates more log messages.
config USB_CDC_ACM_LOG_LEVEL
default 1
config USB_CDC_ACM_RINGBUF_SIZE
default 1024
config LOG_BUFFER_SIZE
default 8192
config LOG_STRDUP_BUF_COUNT
default 16
default 1024
config LOG_PROCESS_THREAD_STARTUP_DELAY_MS
default 1000
default 1000
#ZMK_USB_LOGGING
endif
#USB Logging
config ZMK_RTT_LOGGING
bool "Enable RTT logging to help debug"
select LOG
select DEBUG
select ASSERT
select USE_SEGGER_RTT
select CONSOLE
select RTT_CONSOLE
if ZMK_RTT_LOGGING
config SEGGER_RTT_BUFFER_SIZE_UP
default 8192
#ZMK_RTT_LOGGING
endif
if ZMK_USB_LOGGING || ZMK_RTT_LOGGING
config LOG_BUFFER_SIZE
default 8192
config LOG_PROCESS_THREAD_SLEEP_MS
default 100
#ZMK_USB_LOGGING || ZMK_RTT_LOGGING
endif
#Logging
endmenu
if SETTINGS
config ZMK_SETTINGS_RESET_ON_START
bool "Delete all persistent settings when the keyboard boots"
if ZMK_SETTINGS_RESET_ON_START
config ZMK_SETTINGS_RESET_ON_START_INIT_PRIORITY
int "Settings Reset ON Start Initialization Priority"
default 60
help
Initialization priority for the settings reset on start. Must be lower priority/
higher value than FLASH_INIT_PRIORITY if using the NVS/Flash settings backend.
endif
config ZMK_SETTINGS_SAVE_DEBOUNCE
int "Milliseconds to debounce settings saves"
default 60000
int "Milliseconds to debounce settings saves"
default 60000
#SETTINGS
endif
config ZMK_BATTERY_REPORT_INTERVAL
depends on ZMK_BLE
int "Battery level report interval in seconds"
default 60
depends on ZMK_BATTERY_REPORTING
int "Battery level report interval in seconds"
default 60
config ZMK_LOW_PRIORITY_WORK_QUEUE
bool "Work queue for low priority items"
if ZMK_LOW_PRIORITY_WORK_QUEUE
config ZMK_LOW_PRIORITY_THREAD_STACK_SIZE
int "Low priority thread stack size"
default 768
config ZMK_LOW_PRIORITY_THREAD_PRIORITY
int "Low priority thread priority"
default 10
endif
#Advanced
endmenu
@ -453,27 +696,42 @@ endmenu
#ZMK
endmenu
config HEAP_MEM_POOL_SIZE
default 8192
config KERNEL_BIN_NAME
default "zmk"
default "zmk"
config REBOOT
default y
default y
config USB_DEVICE_STACK
default y if HAS_HW_NRF_USBD
default y if HAS_HW_NRF_USBD
config FPU
default CPU_HAS_FPU
config ZMK_WPM
bool "Calculate WPM"
default n
bool "Calculate WPM"
config SENSOR
default y
config ZMK_KEYMAP_SENSORS
bool "Enable Keymap Sensors support"
default y
depends on DT_HAS_ZMK_KEYMAP_SENSORS_ENABLED
select SENSOR
if ZMK_KEYMAP_SENSORS
config ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION
int "Default triggers per rotation"
help
Unless overridden for a sensor in the board/shield/devicetree, this value
determines how many times to trigger the bound behavior per full rotation.
For tactile encoders with detents, this usually should match the number of
detents per rotation of the encoder.
default 20
endif # ZMK_KEYMAP_SENSORS
choice CBPRINTF_IMPLEMENTATION
default CBPRINTF_NANO
default CBPRINTF_NANO
endchoice
@ -490,4 +748,3 @@ osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.shield"
source "Kconfig.zephyr"

120
app/Kconfig.behaviors Normal file
View file

@ -0,0 +1,120 @@
# Copyright (c) 2023 The ZMK Contributors
# SPDX-License-Identifier: MIT
config ZMK_BEHAVIOR_METADATA
bool "Metadata"
help
Enabling this option adds APIs for documenting and fetching
metadata describing a behaviors name, and supported parameters.
config ZMK_BEHAVIOR_LOCAL_IDS
bool "Local IDs"
if ZMK_BEHAVIOR_LOCAL_IDS
config ZMK_BEHAVIOR_LOCAL_IDS_IN_BINDINGS
bool "Track in behavior bindings"
choice ZMK_BEHAVIOR_LOCAL_ID_TYPE
prompt "Local ID Type"
config ZMK_BEHAVIOR_LOCAL_ID_TYPE_SETTINGS_TABLE
bool "Settings Table"
depends on SETTINGS
select ZMK_BEHAVIOR_LOCAL_IDS_IN_BINDINGS
help
Use persistent entries in the settings subsystem to identify
behaviors by local ID, which uses the device name to generate
a new settings entry tying a presistant local ID to that name.
This guarantees stable, colllision-free local IDs at the expense
of settings storage used.
config ZMK_BEHAVIOR_LOCAL_ID_TYPE_CRC16
bool "CRC16 Hash"
select CRC
help
Use the CRC16-ANSI hash of behavior device names to generate
stable behavior local IDs. This saves on settings storage at
the expense of (highly unlikely) risk of collisions.
endchoice
endif
config ZMK_BEHAVIOR_HOLD_TAP
bool
default y
depends on DT_HAS_ZMK_BEHAVIOR_HOLD_TAP_ENABLED
if ZMK_BEHAVIOR_HOLD_TAP
config ZMK_BEHAVIOR_HOLD_TAP_MAX_HELD
int "Hold Tap Max Held"
default 10
help
Max number of simultaneously held hold-taps
config ZMK_BEHAVIOR_HOLD_TAP_MAX_CAPTURED_EVENTS
int "Hold Tap Max Captured Events"
default 40
help
Max number of captured system events while waiting to resolve hold taps
endif
config ZMK_BEHAVIOR_KEY_TOGGLE
bool
default y
depends on DT_HAS_ZMK_BEHAVIOR_KEY_TOGGLE_ENABLED
config ZMK_BEHAVIOR_MOUSE_KEY_PRESS
bool
default y
depends on DT_HAS_ZMK_BEHAVIOR_MOUSE_KEY_PRESS_ENABLED
imply ZMK_MOUSE
config ZMK_BEHAVIOR_STICKY_KEY
bool
default y
depends on DT_HAS_ZMK_BEHAVIOR_STICKY_KEY_ENABLED
if ZMK_BEHAVIOR_STICKY_KEY
config ZMK_BEHAVIOR_STICKY_KEY_MAX_HELD
int "Sticky Key Max Held"
default 10
help
Max number of simultaneously held sticky keys
endif
config ZMK_BEHAVIOR_SOFT_OFF
bool
default y
depends on DT_HAS_ZMK_BEHAVIOR_SOFT_OFF_ENABLED && ZMK_PM_SOFT_OFF
config ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
bool
config ZMK_BEHAVIOR_SENSOR_ROTATE
bool
default y
depends on DT_HAS_ZMK_BEHAVIOR_SENSOR_ROTATE_ENABLED
select ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
config ZMK_BEHAVIOR_SENSOR_ROTATE_VAR
bool
default y
depends on DT_HAS_ZMK_BEHAVIOR_SENSOR_ROTATE_VAR_ENABLED
select ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
config ZMK_BEHAVIOR_STUDIO_UNLOCK
bool
default y
depends on DT_HAS_ZMK_BEHAVIOR_STUDIO_UNLOCK_ENABLED && ZMK_STUDIO
config ZMK_BEHAVIOR_MACRO
bool
default y
depends on DT_HAS_ZMK_BEHAVIOR_MACRO_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_ONE_PARAM_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_TWO_PARAM_ENABLED

View file

@ -0,0 +1,6 @@
CONFIG_ZMK_DISPLAY=y
CONFIG_LV_FONT_UNSCII_8=n
CONFIG_ZMK_USB=y
CONFIG_I2C=y
CONFIG_I2C_DW=y
CONFIG_LV_Z_VDB_SIZE=50

View file

@ -0,0 +1,7 @@
/*
* Copyright (c) 2023 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
&xiao_serial { status = "disabled"; };

View file

@ -0,0 +1,4 @@
CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_ZMK_USB=y

View file

@ -0,0 +1,7 @@
/*
* Copyright (c) 2023 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
&pro_micro_serial { status = "disabled"; };

View file

@ -0,0 +1,4 @@
CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_ZMK_USB=y

View file

@ -0,0 +1,7 @@
/*
* Copyright (c) 2023 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
&xiao_serial { status = "disabled"; };

View file

@ -0,0 +1,9 @@
file_format: "1"
id: adafruit_kb2040
name: Adafruit KB2040
type: board
arch: arm
outputs:
- usb
url: https://www.adafruit.com/product/5302
exposes: [pro_micro]

View file

@ -0,0 +1,9 @@
file_format: "1"
id: adafruit_qt_py_rp2040
name: Adafruit QT Py RP2040
type: board
arch: arm
outputs:
- usb
url: https://www.adafruit.com/product/4900
exposes: [seeed_xiao]

View file

@ -0,0 +1,7 @@
# SPDX-License-Identifier: MIT
config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT

View file

@ -0,0 +1,12 @@
#
# Copyright (c) 2023 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
config BOARD_ADV360PRO_LEFT
bool "adv360pro_left"
depends on SOC_NRF52840_QIAA
config BOARD_ADV360PRO_RIGHT
bool "adv360pro_right"
depends on SOC_NRF52840_QIAA

View file

@ -0,0 +1,55 @@
#
# Copyright (c) 2023 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
if BOARD_ADV360PRO_LEFT
config ZMK_KEYBOARD_NAME
default "Adv360 Pro"
config ZMK_SPLIT_ROLE_CENTRAL
default y
endif # BOARD_ADV360PRO_LEFT
if BOARD_ADV360PRO_RIGHT
config ZMK_KEYBOARD_NAME
default "Adv360 Pro rt"
endif # BOARD_ADV360PRO_RIGHT
if BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT
config BOARD
default "adv360pro"
config ZMK_SPLIT
default y
config SPI
bool
default y
config BT_CTLR
default BT
if USB
config USB_NRFX
default y
config USB_DEVICE_STACK
default y
endif # USB
config ZMK_BATTERY_VOLTAGE_DIVIDER
default y
config SPI
default y
endif # BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT

View file

@ -0,0 +1,7 @@
# Kinesis Advantage 360 Professional
This board definition provides upstream support for the [Kinesis Advantage 360 Professional](https://kinesis-ergo.com/keyboards/advantage360/)
Kinesis offer a specific [custom configuration](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/) for the 360 Pro that references [a customised version of ZMK](https://github.com/ReFil/zmk/tree/adv360-z3.2-2) with Advantage 360 Pro specific functionality and changes over base ZMK. The Kinesis fork is regularly updated to bring the latest updates and changes from base ZMK however will not always be completely up to date, some features such as new keycodes will not be immediately available on the 360 Pro after they are implemented in base ZMK.
When using this board definition some of the more advanced features (the indicator RGB leds) will not work, and Kinesis cannot provide customer service for usage of base ZMK. Likewise the ZMK community cannot provide support for either the Kinesis keymap editor, nor any usage of the Kinesis custom fork.

View file

@ -0,0 +1,30 @@
/*
* Copyright (c) 2023 The ZMK Contributors
* SPDX-License-Identifier: MIT
*/
&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>;
};
};
spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>;
low-power-enable;
};
};
pwm0_default: pwm0_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>;
};
};
pwm0_sleep: pwm0_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>;
low-power-enable;
};
};
};

View file

@ -0,0 +1,155 @@
/*
*
* Copyright (c) 2023 The ZMK Contributors
* SPDX-License-Identifier: MIT
*
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include <dt-bindings/led/led.h>
#include <dt-bindings/zmk/matrix_transform.h>
#include "adv360pro-pinctrl.dtsi"
/ {
model = "Adv360 Pro";
compatible = "kinesis,adv360pro";
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zmk,kscan = &kscan0;
zmk,backlight = &backlight;
zmk,battery = &vbatt;
zmk,matrix-transform = &default_transform;
zmk,underglow = &led_strip;
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <20>;
rows = <5>;
map = <
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,13) RC(4,14) RC(4,15) RC(4,16) RC(4,17) RC(4,18) RC(4,19)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,13) RC(3,14) RC(3,15) RC(3,16) RC(3,17) RC(3,18) RC(3,19)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) RC(2,14) RC(2,15) RC(2,16) RC(2,17) RC(2,18) RC(2,19)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,9) RC(1,10) RC(1,14) RC(1,15) RC(1,16) RC(1,17) RC(1,18) RC(1,19)
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,15) RC(0,16) RC(0,17) RC(0,18) RC(0,19)
>;
};
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
};
vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
io-channels = <&adc 2>;
output-ohms = <100000>;
full-ohms = <(100000 + 100000)>;
};
backlight: pwmleds {
compatible = "pwm-leds";
pwm_led_0 {
pwms = <&pwm0 0 10000 PWM_POLARITY_NORMAL>;
};
};
};
&pwm0 {
status = "okay";
pinctrl-0 = <&pwm0_default>;
pinctrl-1 = <&pwm0_sleep>;
pinctrl-names = "default", "sleep";
};
&adc {
status = "okay";
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
zephyr_udc0: &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 {
reg = <0x00000000 0x00026000>;
};
code_partition: partition@26000 {
reg = <0x00026000 0x000c6000>;
};
/*
* The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application.
*/
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@ec000 {
reg = <0x000ec000 0x00008000>;
};
boot_partition: partition@f4000 {
reg = <0x000f4000 0x0000c000>;
};
};
};
&spi3 {
compatible = "nordic,nrf-spim";
status = "okay";
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
/* SPI */
reg = <0>;
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <3>; /* number of LEDs */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;
};
};

View file

@ -0,0 +1,48 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/rgb.h>
#include <dt-bindings/zmk/backlight.h>
/ {
keymap {
compatible = "zmk,keymap";
default_layer {
bindings = <
&kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &tog 1 &mo 3 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
&kp TAB &kp Q &kp W &kp E &kp R &kp T &none &none &kp Y &kp U &kp I &kp O &kp P &kp BSLH
&kp ESC &kp A &kp S &kp D &kp F &kp G &none &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &none &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp HOME &kp PG_UP &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&mo 2 &kp GRAVE &kp CAPS &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp END &kp PG_DN &kp ENTER &kp SPACE &kp UP &kp DOWN &kp LBKT &kp RBKT &mo 2
>;
};
keypad {
bindings = <
&kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &mo 3 &kp N6 &kp KP_NUM &kp KP_EQUAL &kp KP_DIVIDE &kp KP_MULTIPLY &kp MINUS
&kp TAB &kp Q &kp W &kp E &kp R &kp T &none &none &kp Y &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp BSLH
&kp ESC &kp A &kp S &kp D &kp F &kp G &none &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &none &kp H &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp HOME &kp PG_UP &kp N &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER &kp RSHFT
&mo 2 &kp GRAVE &kp CAPS &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp END &kp PG_DN &kp ENTER &kp KP_N0 &kp UP &kp DOWN &kp KP_DOT &kp RBKT &mo 2
>;
};
fn {
bindings = <
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &tog 1 &mo 3 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12
&trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &none &trans &trans &trans &trans &none &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
};
mod {
bindings = <
&none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &trans &none &none &none &none &none &none
&none &none &none &none &none &none &bootloader &bootloader &none &none &none &none &none &none
&none &none &none &none &none &none &none &none &none &bt BT_CLR &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &none &none &none &bl BL_TOG &rgb_ug RGB_TOG &bl BL_INC &bl BL_DEC &none &none &none
>;
};
};
};

View file

@ -0,0 +1,19 @@
identifier: adv360pro
name: Advantage 360 Pro
type: keyboard
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- gpio
- i2c
- counter
- spi
- usb_device
- nvs
- can
- kscan
- ble
- pwm

View file

@ -0,0 +1,16 @@
file_format: "1"
id: adv360pro
name: Advantage 360 Pro
type: board
url: https://kinesis-ergo.com/keyboards/advantage360
arch: arm
features:
- keys
- underglow
- backlight
outputs:
- usb
- ble
siblings:
- adv360pro_left
- adv360pro_right

View file

@ -0,0 +1,37 @@
/*
*
* Copyright (c) 2023 The ZMK Contributors
* SPDX-License-Identifier: MIT
*
*/
#include "adv360pro.dtsi"
/{
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
wakeup-source;
diode-direction = "col2row";
row-gpios
= <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
col-gpios
= <&gpio0 25 GPIO_ACTIVE_HIGH>
, <&gpio0 11 GPIO_ACTIVE_HIGH>
, <&gpio0 2 GPIO_ACTIVE_HIGH>
, <&gpio0 28 GPIO_ACTIVE_HIGH>
, <&gpio0 29 GPIO_ACTIVE_HIGH>
, <&gpio0 30 GPIO_ACTIVE_HIGH>
, <&gpio0 31 GPIO_ACTIVE_HIGH>
, <&gpio1 9 GPIO_ACTIVE_HIGH>
, <&gpio0 12 GPIO_ACTIVE_HIGH>
, <&gpio0 7 GPIO_ACTIVE_HIGH>
;
};
};

View file

@ -0,0 +1,55 @@
#
# Copyright (c) 2023 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_ADV360PRO_LEFT=y
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
# Enable SPI for LEDS
CONFIG_PINCTRL=y
CONFIG_SPI=y
CONFIG_SPI_NRFX=y
# Enable writing to flash
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
# Enable 32kHz crystal
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y
#RGB leds config
CONFIG_WS2812_STRIP=y
CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=0
CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
#Backlighting configuration
CONFIG_PWM=y
CONFIG_LED_PWM=y
CONFIG_ZMK_BACKLIGHT=y
CONFIG_ZMK_BACKLIGHT_BRT_START=20
CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y
#Misc configuration
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_ZMK_USB=y
CONFIG_ZMK_BLE=y

View file

@ -0,0 +1,41 @@
/*
*
* Copyright (c) 2023 The ZMK Contributors
* SPDX-License-Identifier: MIT
*
*/
#include "adv360pro.dtsi"
/{
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
wakeup-source;
diode-direction = "col2row";
row-gpios
= <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
col-gpios
= <&gpio0 12 GPIO_ACTIVE_HIGH>
, <&gpio1 9 GPIO_ACTIVE_HIGH>
, <&gpio0 7 GPIO_ACTIVE_HIGH>
, <&gpio1 11 GPIO_ACTIVE_HIGH>
, <&gpio1 10 GPIO_ACTIVE_HIGH>
, <&gpio1 13 GPIO_ACTIVE_HIGH>
, <&gpio1 15 GPIO_ACTIVE_HIGH>
, <&gpio0 3 GPIO_ACTIVE_HIGH>
, <&gpio0 2 GPIO_ACTIVE_HIGH>
, <&gpio0 28 GPIO_ACTIVE_HIGH>
;
};
};
&default_transform {
col-offset = <10>;
};

View file

@ -0,0 +1,54 @@
#
# Copyright (c) 2023 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_ADV360PRO_RIGHT=y
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
# Enable SPI for LEDS
CONFIG_PINCTRL=y
CONFIG_SPI=y
CONFIG_SPI_NRFX=y
# Enable writing to flash
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
# Enable 32kHz crystal
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y
#RGB leds config
CONFIG_WS2812_STRIP=y
CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=0
CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
#Backlighting configuration
CONFIG_PWM=y
CONFIG_LED_PWM=y
CONFIG_ZMK_BACKLIGHT=y
CONFIG_ZMK_BACKLIGHT_BRT_START=20
CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y
#Misc configuration
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_ZMK_BLE=y

View file

@ -0,0 +1,9 @@
#
# Copyright (c) 2023 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)

View file

@ -0,0 +1,9 @@
#
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")

View file

@ -4,5 +4,5 @@
# SPDX-License-Identifier: MIT
config BOARD_BDN9
bool "BDN9 rev2"
depends on SOC_STM32F072XB
bool "BDN9 rev2"
depends on SOC_STM32F072XB

View file

@ -6,16 +6,13 @@
if BOARD_BDN9
config BOARD
default "bdn9_rev2"
default "bdn9_rev2"
config ZMK_KEYBOARD_NAME
default "BDN9 Rev2"
config ZMK_USB
default y
default "BDN9 Rev2"
config ZMK_RGB_UNDERGLOW
select SPI
select WS2812_STRIP
select SPI
select WS2812_STRIP
endif # BOARD_BDN9

View file

@ -1,5 +1,9 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
# Uncomment these lines below to enable encoders.
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
# Uncomment the line below to enable RGB.
# CONFIG_ZMK_RGB_UNDERGLOW=y

View file

@ -10,134 +10,127 @@
#include <dt-bindings/led/led.h>
/ {
model = "Keeb.io BDN9 rev2";
compatible = "keebio,bdn9", "st,stm32f072";
model = "Keeb.io BDN9 rev2";
compatible = "keebio,bdn9", "st,stm32f072";
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart;
zmk,kscan = &kscan;
zmk,underglow = &led_strip;
};
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zmk,kscan = &kscan;
zmk,underglow = &led_strip;
};
kscan: kscan {
compatible = "zmk,kscan-gpio-direct";
label = "KSCAN";
kscan: kscan {
compatible = "zmk,kscan-gpio-direct";
input-gpios
= <&gpiob 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiob 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiob 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiob 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpioa 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiof 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiof 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
};
input-gpios
= <&gpiob 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiob 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiob 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiob 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpioa 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiof 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpiof 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
};
left_encoder: encoder_left {
compatible = "alps,ec11";
label = "LEFT_ENCODER";
a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>;
status = "disabled";
};
mid_encoder: encoder_mid {
compatible = "alps,ec11";
label = "MID_ENCODER";
a-gpios = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>;
status = "disabled";
};
right_encoder: encoder_right {
compatible = "alps,ec11";
label = "RIGHT_ENCODER";
a-gpios = <&gpioa 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>;
status = "disabled";
};
left_encoder: encoder_left {
compatible = "alps,ec11";
a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
steps = <80>;
status = "disabled";
};
mid_encoder: encoder_mid {
compatible = "alps,ec11";
a-gpios = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
steps = <80>;
status = "disabled";
};
right_encoder: encoder_right {
compatible = "alps,ec11";
a-gpios = <&gpioa 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
steps = <80>;
status = "disabled";
};
sensors: sensors {
compatible = "zmk,keymap-sensors";
status = "disabled";
sensors = <>;
};
sensors: sensors {
compatible = "zmk,keymap-sensors";
status = "disabled";
sensors = <>;
triggers-per-rotation = <20>;
};
};
&spi2 {
status = "okay";
pinctrl-0 = <&spi2_sck_pb13 &spi2_mosi_pb15>;
pinctrl-names = "default";
status = "okay";
pinctrl-0 = <&spi2_sck_pb13 &spi2_mosi_pb15>;
pinctrl-names = "default";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <9>;
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
/* WS2812 */
chain-length = <9>;
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
};
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
};
};
&clk_hsi {
status = "okay";
status = "okay";
};
&pll {
status = "okay";
prediv = <1>;
mul = <6>;
clocks = <&clk_hsi>;
status = "okay";
prediv = <1>;
mul = <6>;
clocks = <&clk_hsi>;
};
&rcc {
clocks = <&pll>;
clock-frequency = <DT_FREQ_M(48)>;
ahb-prescaler = <1>;
apb1-prescaler = <1>;
clocks = <&pll>;
clock-frequency = <DT_FREQ_M(48)>;
ahb-prescaler = <1>;
apb1-prescaler = <1>;
};
&usb {
status = "okay";
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
pinctrl-names = "default";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
zephyr_udc0: &usb {
status = "okay";
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
pinctrl-names = "default";
// Overridden to lower RAM usage.
num-bidir-endpoints = <4>;
};
&rtc {
status = "okay";
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>;
/*
* 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@1e800 {
label = "storage";
reg = <0x0001e800 0x00001800>;
};
};
/* Set 6Kb of storage at the end of the 128Kb of flash */
storage_partition: partition@1e800 {
reg = <0x0001e800 0x00001800>;
};
};
};

View file

@ -4,13 +4,15 @@
* SPDX-License-Identifier: MIT
*/
#undef ZMK_BEHAVIORS_KEEP_ALL
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
/* Uncomment and keep whatever encoders are on your BDN9
&sensors {
status = "okay";
sensors = <&left_encoder &mid_encoder &right_encoder>;
status = "okay";
sensors = <&left_encoder &mid_encoder &right_encoder>;
};
*/
@ -20,19 +22,19 @@
// &right_encoder { status = "okay"; };
/ {
keymap {
compatible = "zmk,keymap";
keymap {
compatible = "zmk,keymap";
default_layer {
bindings = <
&kp HOME &kp K_PP &kp END
&kp PG_UP &kp UP &kp PG_DN
&kp LEFT &kp DOWN &kp RIGHT
>;
/* Uncomment and add necessary bindings. This examples is for one encoder
sensor-bindings = <&inc_dec_kp PG_UP PG_DN>;
*/
};
};
default_layer {
bindings = <
&kp HOME &kp K_PP &kp END
&kp PG_UP &kp UP &kp PG_DN
&kp LEFT &kp DOWN &kp RIGHT
>;
/* Uncomment and add necessary bindings. This examples is for one encoder
sensor-bindings = <&inc_dec_kp PG_UP PG_DN>;
*/
};
};
};

View file

@ -5,9 +5,6 @@ CONFIG_SOC_STM32F072XB=y
# 72MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
# Floating Point Options
CONFIG_FPU=y
# enable GPIO
CONFIG_GPIO=y
@ -17,9 +14,9 @@ CONFIG_PINCTRL=y
# Poll to avoid interrupt overlap issues
CONFIG_ZMK_KSCAN_DIRECT_POLLING=y
# Needed to reduce this to size that will fit on F072
CONFIG_HEAP_MEM_POOL_SIZE=1024
CONFIG_ISR_STACK_SIZE=1024
# clock configuration
CONFIG_CLOCK_CONTROL=y
CONFIG_ZMK_USB=y

View file

@ -0,0 +1,9 @@
file_format: "1"
id: blackpill_f401cc
name: BlackPill F401CC
type: board
arch: arm
outputs:
- usb
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
exposes: [blackpill]

View file

@ -0,0 +1,9 @@
file_format: "1"
id: blackpill_f401ce
name: BlackPill F401CE
type: board
arch: arm
outputs:
- usb
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
exposes: [blackpill]

View file

@ -0,0 +1,9 @@
file_format: "1"
id: blackpill_f411ce
name: BlackPill F411CE
type: board
arch: arm
outputs:
- usb
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
exposes: [blackpill]

View file

@ -1,8 +1,8 @@
# SPDX-License-Identifier: MIT
config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on BOARD_BLUEMICRO840_V1
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on BOARD_BLUEMICRO840_V1

View file

@ -4,5 +4,5 @@
# SPDX-License-Identifier: MIT
config BOARD_BLUEMICRO840_V1
bool "BlueMicro840_V1"
depends on SOC_NRF52840_QIAA
bool "BlueMicro840_V1"
depends on SOC_NRF52840_QIAA

View file

@ -6,22 +6,16 @@
if BOARD_BLUEMICRO840_V1
config BOARD
default "bluemicro840_v1"
default "bluemicro840_v1"
if USB_DEVICE_STACK
config USB_NRFX
default y
default y
endif # USB_DEVICE_STACK
config BT_CTLR
default BT
config ZMK_BLE
default y
config ZMK_USB
default y
default BT
endif # BOARD_BLUEMICRO840_V1

View file

@ -5,53 +5,53 @@
*/
/ {
pro_micro: connector {
compatible = "arduino-pro-micro";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <0 0 &gpio0 8 0> /* D0 D2 */
, <1 0 &gpio0 6 0> /* D1 D3*/
, <2 0 &gpio0 15 0> /* D2 D1*/
, <3 0 &gpio0 17 0> /* D3 D0*/
, <4 0 &gpio0 20 0> /* D4/A6 D4*/
, <5 0 &gpio0 13 0> /* D5 C6*/
, <6 0 &gpio0 24 0> /* D6/A7 D7*/
, <7 0 &gpio0 9 0> /* D7 E6*/
, <8 0 &gpio0 10 0> /* D8/A8 B4*/
, <9 0 &gpio1 6 0> /* D9/A9 B5*/
, <10 0 &gpio1 11 0> /* D10/A10 B6*/
, <16 0 &gpio0 28 0> /* D16 B2*/
, <14 0 &gpio0 3 0> /* D14 B3*/
, <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*/
;
};
pro_micro: connector {
compatible = "arduino-pro-micro";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <0 0 &gpio0 8 0> /* D0 D2 */
, <1 0 &gpio0 6 0> /* D1 D3*/
, <2 0 &gpio0 15 0> /* D2 D1*/
, <3 0 &gpio0 17 0> /* D3 D0*/
, <4 0 &gpio0 20 0> /* D4/A6 D4*/
, <5 0 &gpio0 13 0> /* D5 C6*/
, <6 0 &gpio0 24 0> /* D6/A7 D7*/
, <7 0 &gpio0 9 0> /* D7 E6*/
, <8 0 &gpio0 10 0> /* D8/A8 B4*/
, <9 0 &gpio1 6 0> /* D9/A9 B5*/
, <10 0 &gpio1 11 0> /* D10/A10 B6*/
, <16 0 &gpio0 28 0> /* D16 B2*/
, <14 0 &gpio0 3 0> /* D14 B3*/
, <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*/
;
};
pro_micro_a: connector_a {
compatible = "arduino-pro-micro";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <0 0 &gpio0 2 0> /* D18/A0 F7*/
, <1 0 &gpio0 29 0> /* D19/A1 F6*/
, <2 0 &gpio0 26 0> /* D20/A2 F5*/
, <3 0 &gpio0 30 0> /* D21/A3 F4*/
, <6 0 &gpio0 20 0> /* D4/A6 D4*/
, <7 0 &gpio0 24 0> /* D6/A7 D7*/
, <8 0 &gpio0 10 0> /* D8/A8 B4*/
, <9 0 &gpio1 6 0> /* D9/A9 B5*/
, <10 0 &gpio1 11 0> /* D10/A10 B6*/
;
};
pro_micro_a: connector_a {
compatible = "arduino-pro-micro";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map
= <0 0 &gpio0 2 0> /* D18/A0 F7*/
, <1 0 &gpio0 29 0> /* D19/A1 F6*/
, <2 0 &gpio0 26 0> /* D20/A2 F5*/
, <3 0 &gpio0 30 0> /* D21/A3 F4*/
, <6 0 &gpio0 20 0> /* D4/A6 D4*/
, <7 0 &gpio0 24 0> /* D6/A7 D7*/
, <8 0 &gpio0 10 0> /* D8/A8 B4*/
, <9 0 &gpio1 6 0> /* D9/A9 B5*/
, <10 0 &gpio1 11 0> /* D10/A10 B6*/
;
};
};
pro_micro_d: &pro_micro {};
pro_micro_i2c: &i2c0 {};
pro_micro_spi: &spi0 {};
pro_micro_spi: &spi1 {};
pro_micro_serial: &uart0 {};

View file

@ -0,0 +1,56 @@
/*
* Copyright (c) 2022 The ZMK Contributors
* SPDX-License-Identifier: MIT
*/
&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>;
bias-pull-up;
};
group2 {
psels = <NRF_PSEL(UART_TX, 0, 6)>;
};
};
uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>,
<NRF_PSEL(UART_TX, 0, 6)>;
low-power-enable;
};
};
i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
<NRF_PSEL(TWIM_SCL, 0, 17)>;
};
};
i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
<NRF_PSEL(TWIM_SCL, 0, 17)>;
low-power-enable;
};
};
spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
<NRF_PSEL(SPIM_MOSI, 0, 28)>,
<NRF_PSEL(SPIM_MISO, 0, 3)>;
};
};
spi1_sleep: spi1_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
<NRF_PSEL(SPIM_MOSI, 0, 28)>,
<NRF_PSEL(SPIM_MISO, 0, 3)>;
low-power-enable;
};
};
};

View file

@ -7,117 +7,117 @@
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins.dtsi"
#include "bluemicro840_v1-pinctrl.dtsi"
/ {
model = "BlueMicro840_V1";
compatible = "bluemicro840,v1";
model = "BlueMicro840_V1";
compatible = "bluemicro840,v1";
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt;
};
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zmk,battery = &vbatt;
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
};
};
ext-power {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
init-delay-ms = <20>;
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
};
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
init-delay-ms = <20>;
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
};
vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
label = "BATTERY";
io-channels = <&adc 7>;
output-ohms = <2000000>;
full-ohms = <(2000000 + 806000)>;
};
vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
io-channels = <&adc 7>;
output-ohms = <2000000>;
full-ohms = <(2000000 + 806000)>;
};
};
&adc {
status = "okay";
status = "okay";
};
&gpiote {
status = "okay";
status = "okay";
};
&gpio0 {
status = "okay";
status = "okay";
};
&gpio1 {
status = "okay";
status = "okay";
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <15>;
scl-pin = <17>;
compatible = "nordic,nrf-twi";
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};
&spi1 {
compatible = "nordic,nrf-spim";
pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_sleep>;
pinctrl-names = "default", "sleep";
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
compatible = "nordic,nrf-uarte";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&usbd {
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
zephyr_udc0: &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>;
/*
* 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>;
};
sd_partition: partition@0 {
reg = <0x00000000 0x00026000>;
};
code_partition: partition@26000 {
reg = <0x00026000 0x000c6000>;
};
/*
* The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application.
*/
/*
* 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>;
};
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@ec000 {
reg = <0x000ec000 0x00008000>;
};
boot_partition: partition@f4000 {
label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>;
};
};
boot_partition: partition@f4000 {
reg = <0x000f4000 0x0000c000>;
};
};
};

View file

@ -7,6 +7,8 @@ CONFIG_BOARD_BLUEMICRO840_V1=y
# Enable MPU
CONFIG_ARM_MPU=y
CONFIG_PINCTRL=y
# enable GPIO
CONFIG_GPIO=y
@ -18,4 +20,7 @@ CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_FLASH_MAP=y
CONFIG_ZMK_USB=y
CONFIG_ZMK_BLE=y

View file

@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)

View file

@ -0,0 +1,9 @@
#
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")

View file

@ -0,0 +1,9 @@
file_format: "1"
id: boardsource_blok
name: BoardSource blok
type: board
arch: arm
outputs:
- usb
url: https://peg.software/docs/blok
exposes: [pro_micro]

View file

@ -1,7 +1,7 @@
# 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)
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on (BOARD_BT60_V1_HS || BOARD_BT60_V1)

View file

@ -4,9 +4,9 @@
# SPDX-License-Identifier: MIT
config BOARD_BT60_V1
bool "bt60"
depends on SOC_NRF52840_QIAA
bool "bt60"
depends on SOC_NRF52840_QIAA
config BOARD_BT60_V1_HS
bool "bt60 hotswap"
depends on SOC_NRF52840_QIAA
bool "bt60 hotswap"
depends on SOC_NRF52840_QIAA

View file

@ -4,28 +4,22 @@
if BOARD_BT60_V1_HS || BOARD_BT60_V1
config BOARD
default "bt60"
default "bt60"
if USB
config USB_NRFX
default y
default y
config USB_DEVICE_STACK
default y
default y
endif # USB
config BT_CTLR
default BT
config ZMK_BLE
default y
config ZMK_USB
default y
default BT
config ZMK_KEYBOARD_NAME
default "BT60"
default "BT60"
endif # BOARD_BT60

View file

@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)

View file

@ -9,126 +9,103 @@
#include <dt-bindings/zmk/matrix_transform.h>
/ {
model = "BT60";
compatible = "polarityworks,bt60";
model = "BT60";
compatible = "polarityworks,bt60";
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt;
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
};
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zmk,battery = &vbatt;
zmk,kscan = &kscan0;
zmk,matrix-transform = &default_transform;
};
sensors {
compatible = "zmk,keymap-sensors";
sensors = <&left_encoder>;
};
sensors: sensors {
compatible = "zmk,keymap-sensors";
sensors = <&left_encoder>;
triggers-per-rotation = <20>;
};
left_encoder: encoder_left {
compatible = "alps,ec11";
label = "LEFT_ENCODER";
a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
resolution = <4>;
status = "okay";
};
left_encoder: encoder_left {
compatible = "alps,ec11";
a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
steps = <80>;
status = "okay";
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
};
};
vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
label = "BATTERY";
io-channels = <&adc 2>;
output-ohms = <2000000>;
full-ohms = <(2000000 + 806000)>;
};
vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
io-channels = <&adc 2>;
output-ohms = <2000000>;
full-ohms = <(2000000 + 806000)>;
};
};
&adc {
status = "okay";
status = "okay";
};
&gpiote {
status = "okay";
status = "okay";
};
&gpio0 {
status = "okay";
status = "okay";
};
&gpio1 {
status = "okay";
status = "okay";
};
&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <17>;
scl-pin = <20>;
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
};
&usbd {
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
zephyr_udc0: &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>;
/*
* 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>;
};
sd_partition: partition@0 {
reg = <0x00000000 0x00026000>;
};
code_partition: partition@26000 {
reg = <0x00026000 0x000c6000>;
};
/*
* The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application.
*/
/*
* 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>;
};
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@ec000 {
reg = <0x000ec000 0x00008000>;
};
boot_partition: partition@f4000 {
label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>;
};
};
boot_partition: partition@f4000 {
reg = <0x000f4000 0x0000c000>;
};
};
};

View file

@ -9,105 +9,106 @@
/ {
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &ansi_transform;
};
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,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) RC(4,14)
>;
};
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,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) 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)
>;
};
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)
>;
};
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)
>;
};
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)
>;
};
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";
kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-matrix";
wakeup-source;
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>
;
diode-direction = "col2row";
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)>
;
};
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)>
;
};
};

View file

@ -11,170 +11,170 @@
/ {
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
};
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
};
keymap {
compatible = "zmk,keymap";
#ifdef ANSI
default_layer {
// ------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC |
// | 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 &sys_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 &sys_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 | - | = | BSPC |
// | 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
&sys_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 | - | = | BSPC |
// | 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 &sys_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 | - | = |BSPC| 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 &sys_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
};
};

View file

@ -23,3 +23,6 @@ CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_ZMK_USB=y
CONFIG_ZMK_BLE=y

View file

@ -9,53 +9,54 @@
/ {
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
};
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)
>;
};
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";
kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-matrix";
wakeup-source;
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>
;
diode-direction = "col2row";
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)>
;
};
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)>
;
};
};

View file

@ -3,35 +3,35 @@
#include <dt-bindings/zmk/bt.h>
/ {
keymap {
compatible = "zmk,keymap";
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>;
};
};
default_layer {
// ------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | 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 &sys_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>;
};
};
};

View file

@ -23,3 +23,6 @@ CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_ZMK_USB=y
CONFIG_ZMK_BLE=y

View file

@ -0,0 +1,9 @@
#
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")

View file

@ -0,0 +1,8 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1

View file

@ -0,0 +1,16 @@
# CKP boards configuration
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD_BT60_V2
bool "bt60_v2"
depends on SOC_NRF52840_QIAA
config BOARD_BT65_V1
bool "bt65_v1"
depends on SOC_NRF52840_QIAA
config BOARD_BT75_V1
bool "bt75_v1"
depends on SOC_NRF52840_QIAA

View file

@ -0,0 +1,28 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD
default "bt60_v2" if BOARD_BT60_V2
default "bt65_v1" if BOARD_BT65_V1
default "bt75_v1" if BOARD_BT75_V1
config ZMK_KEYBOARD_NAME
default "BT60 V2" if BOARD_BT60_V2
default "BT65" if BOARD_BT65_V1
default "BT75" if BOARD_BT75_V1
if BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1
if USB
config USB_NRFX
default y
config USB_DEVICE_STACK
default y
endif # USB
config BT_CTLR
default BT
endif # BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1

View file

@ -0,0 +1,5 @@
# SPDX-License-Identifier: MIT
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)

View file

@ -0,0 +1,71 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include "ckp.dtsi"
/ {
model = "BT60_V2";
compatible = "polarityworks,bt60_v2";
chosen {
zmk,matrix-transform = &ansi_transform;
};
ansi_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <15>;
rows = <5>;
map = <
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12)
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13)
>;
};
iso_transform: keymap_transform_1 {
compatible = "zmk,matrix-transform";
columns = <15>;
rows = <5>;
map = <
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13)
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12)
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13)
>;
};
all_1u_transform: keymap_transform_2 {
compatible = "zmk,matrix-transform";
columns = <15>;
rows = <5>;
map = <
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14)
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14)
>;
};
hhkb_transform: keymap_transform_3 {
compatible = "zmk,matrix-transform";
columns = <15>;
rows = <5>;
map = <
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12)
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,11) RC(5,12) RC(5,13)
>;
};
};

View file

@ -0,0 +1,177 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/rgb.h>
#include <dt-bindings/zmk/backlight.h>
#define ANSI
//#define ISO
//#define ALL_1U
//#define HHKB
/ {
chosen {
#ifdef ANSI
zmk,matrix-transform = &ansi_transform;
#elif defined(ISO)
zmk,matrix-transform = &iso_transform;
#elif defined(ALL_1U)
zmk,matrix-transform = &all_1u_transform;
#elif defined(HHKB)
zmk,matrix-transform = &hhkb_transform;
#else
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap"
#endif
};
keymap {
compatible = "zmk,keymap";
#ifdef ANSI
default_layer {
// ------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
// ------------------------------------------------------------------------------------------
bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
&kp CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
raise {
// ------------------------------------------------------------------------------------------
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
// | TAB | Q | UP | E | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | RGB_TOG|
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | HOME| PGUP| BOOT |
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | END | PGDN | BL_TOG |
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | RESET | BT_CLR |
// ------------------------------------------------------------------------------------------
bindings = <
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
&trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &rgb_ug RGB_TOG
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &kp END &kp PG_DN &bl BL_TOG
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &sys_reset &bt BT_CLR
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
#elif defined(ISO)
default_layer {
// ------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER |
// | SHIFT | \ | Z | X | C | V | B | N | M | , | . | / | SHIFT |
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
// ------------------------------------------------------------------------------------------
bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT
&kp CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp NON_US_HASH &kp RET
&kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
raise {
// ------------------------------------------------------------------------------------------
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
// | TAB | Q | UP | E | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | |
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | HOME| PGUP|RGB_TOG| BOOT |
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| B | N | M | , | END | PGDN | BL_TOG |
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | RESET |BT_CLR |
// ------------------------------------------------------------------------------------------
bindings = <
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
&trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &rgb_ug RGB_TOG &bootloader
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &kp END &kp PG_DN &bl BL_TOG
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &sys_reset &bt BT_CLR
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
#elif defined(ALL_1U)
default_layer {
// ------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BSPC | DEL |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
// | SHFT |NONE| Z | X | C | V | B | N | M | , | . | / | SHFT | UP | 1 |
// | CTL | WIN | ALT | SPACE | RALT| CTRL | LEFT | DOWN | RIGHT |
// ------------------------------------------------------------------------------------------
bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
&kp LSHFT &none &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &mo 1
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
raise {
// ------------------------------------------------------------------------------------------
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |BSPC | DEL |
// | TAB | Q | W | E | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | RGB_TOG |
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | HOME| PGUP| BOOT |
// | SHFT |NONE|VOLDN|VOLUP|MUTE|BLINC|BLDEC| N | M | , | END | PGDN | SHFT|BL_TOG| 1 |
// | BT_PRV| BT_NXT| ALT | SPACE | RALT| CTRL | LEFT |RESET| BT_CLR |
// ------------------------------------------------------------------------------------------
bindings = <
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &rgb_ug RGB_TOG
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
&trans &none &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &kp END &kp PG_DN &trans &bl BL_TOG &trans
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &sys_reset &bt BT_CLR
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
#elif defined(HHKB)
default_layer {
// ------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
// | CTL | WIN | ALT | SPACE | ALT | 1 | CTRL |
// ------------------------------------------------------------------------------------------
bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
&kp CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
raise {
// ------------------------------------------------------------------------------------------
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
// | TAB | Q | UP | E | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | RGB_TOG|
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | HOME| PGUP| BOOT |
// | SHFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | END | PGDN | BL_TOG |
// | BT_PRV | BT_NXT | ALT | SPACE | RESET | 1 | BT_CLR |
// ------------------------------------------------------------------------------------------
bindings = <
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
&trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &rgb_ug RGB_TOG
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &kp END &kp PG_DN &bl BL_TOG
&bt BT_PRV &bt BT_NXT &trans &trans &sys_reset &trans &bt BT_CLR
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
#else
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap"
#endif
};
};

View file

@ -0,0 +1,15 @@
identifier: bt60_v2
name: BT60 V2
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- usb_device
- ble
- ieee802154
- pwm
- watchdog

View file

@ -0,0 +1,14 @@
file_format: "1"
id: bt60_v2
name: BT60 V2
type: board
arch: arm
features:
- keys
- encoder
- underglow
- backlight
outputs:
- usb
- ble
url: https://polarityworks.com/btckp

View file

@ -0,0 +1,41 @@
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_BT60_V2=y
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
CONFIG_PINCTRL=y
# encoder
CONFIG_EC11=y
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_PWM=y
CONFIG_LED_PWM=y
CONFIG_ZMK_BACKLIGHT=y
CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262
CONFIG_WS2812_STRIP=y
CONFIG_SPI=y
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_USB=y
CONFIG_ZMK_BLE=y

View file

@ -0,0 +1,71 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include "ckp.dtsi"
/ {
model = "BT65_V1";
compatible = "polarityworks,bt65_v1";
chosen {
zmk,matrix-transform = &ansi_transform;
};
ansi_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <16>;
rows = <5>;
map = <
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15)
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
>;
};
iso_transform: keymap_transform_1 {
compatible = "zmk,matrix-transform";
columns = <16>;
rows = <5>;
map = <
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,15)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) RC(3,15)
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15)
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
>;
};
all_1u_transform: keymap_transform_2 {
compatible = "zmk,matrix-transform";
columns = <16>;
rows = <5>;
map = <
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14) RC(1,15)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) RC(4,15)
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
>;
};
hhkb_transform: keymap_transform_3 {
compatible = "zmk,matrix-transform";
columns = <16>;
rows = <5>;
map = <
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,15)
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,11) RC(5,12) RC(5,13) RC(5,15)
>;
};
};

View file

@ -0,0 +1,177 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/rgb.h>
#include <dt-bindings/zmk/backlight.h>
#define ANSI
//#define ISO
//#define ALL_1U
//#define HHKB
/ {
chosen {
#ifdef ANSI
zmk,matrix-transform = &ansi_transform;
#elif defined(ISO)
zmk,matrix-transform = &iso_transform;
#elif defined(ALL_1U)
zmk,matrix-transform = &all_1u_transform;
#elif defined(HHKB)
zmk,matrix-transform = &hhkb_transform;
#else
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65_v1.keymap"
#endif
};
keymap {
compatible = "zmk,keymap";
#ifdef ANSI
default_layer {
// ------------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | DEL |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | INS |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PGUP|
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PGDN|
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
// ------------------------------------------------------------------------------------------------
bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp 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 INS
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp PG_UP
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp PG_DN
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
raise {
// --------------------------------------------------------------------------------------------------
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | BL_TOG |RGB_TOG|
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | PSCRN|
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' | BOOT | P_BRK|
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / | SHIFT | HOME | END |
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL | LEFT | DOWN |BT_CLR|
// --------------------------------------------------------------------------------------------------
bindings = <
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PSCRN
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &kp PAUSE_BREAK
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &kp HOME &kp END
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
#elif defined(ISO)
default_layer {
// ------------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | DEL |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | INS |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER | PGUP|
// |SHIFT | \ | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PGDN|
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
// ------------------------------------------------------------------------------------------------
bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp 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 INS
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp NON_US_HASH &kp RET &kp PG_UP
&kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp PG_DN
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
raise {
// --------------------------------------------------------------------------------------------------
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | BL_TOG |RGB_TOG|
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | | PSCRN|
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' |RESET| BOOT | P_BRK|
// |SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| B | N | M | , | . | / | SHIFT | HOME | END |
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL | LEFT | DOWN |BT_CLR|
// --------------------------------------------------------------------------------------------------
bindings = <
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &kp PSCRN
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &sys_reset &bootloader &kp PAUSE_BREAK
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &kp HOME &kp END
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
#elif defined(ALL_1U)
default_layer {
// -------------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BSPC | DEL | HOME|
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | END |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PGUP|
// |SHIFT|NONE | Z | X | C | V | B | N | M | , | . | / |SHIFT|NONE | UP | PGDN|
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
// -------------------------------------------------------------------------------------------------
bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL &kp HOME
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp END
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp PG_UP
&kp LSHFT &none &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &none &kp UP &kp PG_DN
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp LALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
raise {
// --------------------------------------------------------------------------------------------------
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |BL_TOG|RGB_TOG|HOME|
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | PSCRN|
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' | BOOT | P_BRK|
// |SHIFT| NONE|VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / |SHIFT| NONE| UP | INS |
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL| LEFT| DOWN |BT_CLR|
// --------------------------------------------------------------------------------------------------
bindings = <
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG &trans
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PSCRN
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &kp PAUSE_BREAK
&trans &none &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans &kp INS
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
#elif defined(HHKB)
default_layer {
// ------------------------------------------------------------------------------------------------
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | DEL |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | HOME|
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | END |
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | PGUP|
// | CTL | WIN | ALT | SPACE | ALT | 1 | CTRL | PGDN|
// ------------------------------------------------------------------------------------------------
bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp 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 HOME
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp END
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp PG_UP
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp PG_DN
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
raise {
// --------------------------------------------------------------------------------------------------
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | BL_TOG |RGB_TOG|
// | TAB | Q | UP | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | PSCRN|
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | ; | ' | BOOT | P_BRK|
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / | SHIFT | INS |
// | BT_PRV | BT_NXT | ALT | SPACE | ALT | 1 | CTRL |BT_CLR|
// --------------------------------------------------------------------------------------------------
bindings = <
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG
&trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PSCRN
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &kp PAUSE_BREAK
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &kp INS
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
#else
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65_v1.keymap"
#endif
};
};

View file

@ -0,0 +1,15 @@
identifier: bt65_v1
name: BT65_V1
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- usb_device
- ble
- ieee802154
- pwm
- watchdog

View file

@ -0,0 +1,14 @@
file_format: "1"
id: bt65_v1
name: BT65
type: board
arch: arm
features:
- keys
- encoder
- underglow
- backlight
outputs:
- usb
- ble
url: https://polarityworks.com/btckp

View file

@ -0,0 +1,41 @@
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_BT65_V1=y
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
CONFIG_PINCTRL=y
# encoder
CONFIG_EC11=y
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_PWM=y
CONFIG_LED_PWM=y
CONFIG_ZMK_BACKLIGHT=y
CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262
CONFIG_WS2812_STRIP=y
CONFIG_SPI=y
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_USB=y
CONFIG_ZMK_BLE=y

View file

@ -0,0 +1,61 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include "ckp.dtsi"
/ {
model = "BT75_V1";
compatible = "polarityworks,bt75_v1";
chosen {
zmk,matrix-transform = &ansi_transform;
};
ansi_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <16>;
rows = <6>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15)
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
>;
};
iso_transform: keymap_transform_1 {
compatible = "zmk,matrix-transform";
columns = <16>;
rows = <6>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,15)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) RC(3,15)
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15)
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
>;
};
all_1u_transform: keymap_transform_2 {
compatible = "zmk,matrix-transform";
columns = <16>;
rows = <6>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14) RC(1,15)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) RC(4,15)
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
>;
};
};

View file

@ -0,0 +1,148 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/rgb.h>
#include <dt-bindings/zmk/backlight.h>
#define ANSI
//#define ISO
//#define ALL_1U
/ {
chosen {
#ifdef ANSI
zmk,matrix-transform = &ansi_transform;
#elif defined(ISO)
zmk,matrix-transform = &iso_transform;
#elif defined(ALL_1U)
zmk,matrix-transform = &all_1u_transform;
#else
#error "Layout not defined, please define a layout using by uncommenting the appropriate line in bt75_v1.keymap"
#endif
};
keymap {
compatible = "zmk,keymap";
#ifdef ANSI
default_layer {
// ------------------------------------------------------------------------------------------------
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN|HOME| END |
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | DEL |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | INS |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PGUP|
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PGDN|
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
// ------------------------------------------------------------------------------------------------
bindings = <
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp PSCRN &kp HOME &kp END
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp 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 INS
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp PG_UP
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp PG_DN
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
raise {
// --------------------------------------------------------------------------------------------------
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN| HOME| END |
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BL_TOG |RGB_TOG|
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | P_BRK|
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' | BOOT | PG_UP|
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / | SHIFT | UP | PG_DN|
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL | LEFT | DOWN |BT_CLR|
// --------------------------------------------------------------------------------------------------
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bl BL_TOG &rgb_ug RGB_TOG
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PAUSE_BREAK
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &trans
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
#elif defined(ISO)
default_layer {
// ------------------------------------------------------------------------------------------------
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN|HOME| END |
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | DEL |
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | INS |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER | PGUP|
// |SHIFT | \ | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PGDN|
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
// ------------------------------------------------------------------------------------------------
bindings = <
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp PSCRN &kp HOME &kp END
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp 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 INS
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp NON_US_HASH &kp RET &kp PG_UP
&kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp PG_DN
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
raise {
// --------------------------------------------------------------------------------------------------
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN|HOME| END |
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BL_TOG |RGB_TOG|
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | | P_BRK|
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' |RESET| BOOT | PG_UP|
// |SHIFT | \ |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / | SHIFT | UP | PG_DN|
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL | LEFT | DOWN |BT_CLR|
// --------------------------------------------------------------------------------------------------
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bl BL_TOG &rgb_ug RGB_TOG
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &kp PAUSE_BREAK
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &sys_reset &bootloader &trans
&trans &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
#elif defined(ALL_1U)
default_layer {
// -------------------------------------------------------------------------------------------------
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN| P_B | INS |
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BSPC | DEL | HOME|
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | END |
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PGUP|
// |SHIFT|NONE | Z | X | C | V | B | N | M | , | . | / |SHIFT|NONE | UP | PGDN|
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
// -------------------------------------------------------------------------------------------------
bindings = <
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp PSCRN &kp PAUSE_BREAK &kp INS
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL &kp HOME
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp END
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp PG_UP
&kp LSHFT &none &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &none &kp UP &kp PG_DN
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp LALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
raise {
// --------------------------------------------------------------------------------------------------
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN| P_B | INS |
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BL_TOG|RGB_TOG|HOME|
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | END |
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' | BOOT | PGUP |
// |SHIFT| NONE|VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / |SHIFT| NONE| UP | PGDN |
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL| LEFT| DOWN |BT_CLR|
// --------------------------------------------------------------------------------------------------
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bl BL_TOG &rgb_ug RGB_TOG &trans
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &trans
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &trans
&trans &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans &trans
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
#else
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt75.keymap"
#endif
};
};

View file

@ -0,0 +1,15 @@
identifier: bt75_v1
name: BT75_V1
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- usb_device
- ble
- ieee802154
- pwm
- watchdog

View file

@ -0,0 +1,14 @@
file_format: "1"
id: bt75_v1
name: BT75_V1
type: board
arch: arm
features:
- keys
- encoder
- underglow
- backlight
outputs:
- usb
- ble
url: https://polarityworks.com/btckp

View file

@ -0,0 +1,41 @@
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_BT75_V1=y
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
CONFIG_PINCTRL=y
# encoder
CONFIG_EC11=y
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_PWM=y
CONFIG_LED_PWM=y
CONFIG_ZMK_BACKLIGHT=y
CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262
CONFIG_WS2812_STRIP=y
CONFIG_SPI=y
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_USB=y
CONFIG_ZMK_BLE=y

View file

@ -0,0 +1,31 @@
/*
* Copyright (c) 2022 The ZMK Contributors
* SPDX-License-Identifier: MIT
*/
&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>;
};
};
spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>;
low-power-enable;
};
};
pwm0_default: pwm0_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>;
};
};
pwm0_sleep: pwm0_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>;
low-power-enable;
};
};
};

208
app/boards/arm/ckp/ckp.dtsi Normal file
View file

@ -0,0 +1,208 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include <dt-bindings/led/led.h>
#include <dt-bindings/zmk/matrix_transform.h>
#include "ckp-pinctrl.dtsi"
/ {
model = "CKP";
compatible = "polarityworks,ckp";
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zmk,kscan = &kscan0;
zmk,underglow = &led_strip;
zmk,backlight = &backlight;
zmk,battery = &vbatt;
};
sensors: sensors {
compatible = "zmk,keymap-sensors";
sensors = <&encoder_1>;
triggers-per-rotation = <20>;
};
kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-matrix";
wakeup-source;
diode-direction = "col2row";
col-gpios
= <&gpio1 11 GPIO_ACTIVE_HIGH>
, <&gpio1 10 GPIO_ACTIVE_HIGH>
, <&gpio1 13 GPIO_ACTIVE_HIGH>
, <&gpio1 15 GPIO_ACTIVE_HIGH>
, <&gpio0 3 GPIO_ACTIVE_HIGH>
, <&gpio0 2 GPIO_ACTIVE_HIGH>
, <&gpio0 28 GPIO_ACTIVE_HIGH>
, <&gpio0 29 GPIO_ACTIVE_HIGH>
, <&gpio0 30 GPIO_ACTIVE_HIGH>
, <&gpio0 31 GPIO_ACTIVE_HIGH>
, <&gpio0 5 GPIO_ACTIVE_HIGH>
, <&gpio0 7 GPIO_ACTIVE_HIGH>
, <&gpio1 9 GPIO_ACTIVE_HIGH>
, <&gpio0 12 GPIO_ACTIVE_HIGH>
, <&gpio0 23 GPIO_ACTIVE_HIGH>
, <&gpio1 6 GPIO_ACTIVE_HIGH>
;
row-gpios
= <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
};
encoder_1: encoder_1 {
compatible = "alps,ec11";
a-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
steps = <80>;
status = "okay";
};
encoder_2: encoder_2 {
compatible = "alps,ec11";
a-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
steps = <80>;
status = "okay";
};
encoder_3: encoder_3 {
compatible = "alps,ec11";
a-gpios = <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
steps = <80>;
status = "okay";
};
backlight: pwmleds {
compatible = "pwm-leds";
pwm_led_0 {
pwms = <&pwm0 0 10000 PWM_POLARITY_NORMAL>;
};
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
};
};
vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
io-channels = <&adc 2>;
output-ohms = <100000>;
full-ohms = <(100000 + 100000)>;
};
};
&adc {
status = "okay";
};
&pwm0 {
status = "okay";
pinctrl-0 = <&pwm0_default>;
pinctrl-1 = <&pwm0_sleep>;
pinctrl-names = "default", "sleep";
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
zephyr_udc0: &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 {
reg = <0x00000000 0x00026000>;
};
code_partition: partition@26000 {
reg = <0x00026000 0x000c6000>;
};
/*
* The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application.
*/
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@ec000 {
reg = <0x000ec000 0x00008000>;
};
boot_partition: partition@f4000 {
reg = <0x000f4000 0x0000c000>;
};
};
};
&spi3 {
compatible = "nordic,nrf-spim";
status = "okay";
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
/* SPI */
reg = <0>;
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <12>; /* number of LEDs */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;
};
};

View file

@ -0,0 +1,9 @@
#
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")

View file

@ -0,0 +1,60 @@
if(CONFIG_ZMK_DISPLAY)
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS app PRIVATE widgets/battery_status.c)
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS app PRIVATE widgets/output_status.c)
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_LAYER_STATUS app PRIVATE widgets/layer_status.c)
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS app PRIVATE widgets/peripheral_status.c)
add_subdirectory_ifdef(CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM widgets/icons)
endif()
zephyr_library()
if(CONFIG_ZMK_DISPLAY)
if(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS)
zephyr_library_sources(widgets/icons/batt_100.c)
zephyr_library_sources(widgets/icons/batt_100_chg.c)
zephyr_library_sources(widgets/icons/batt_75.c)
zephyr_library_sources(widgets/icons/batt_75_chg.c)
zephyr_library_sources(widgets/icons/batt_50.c)
zephyr_library_sources(widgets/icons/batt_50_chg.c)
zephyr_library_sources(widgets/icons/batt_25.c)
zephyr_library_sources(widgets/icons/batt_25_chg.c)
zephyr_library_sources(widgets/icons/batt_5.c)
zephyr_library_sources(widgets/icons/batt_5_chg.c)
zephyr_library_sources(widgets/icons/batt_0.c)
zephyr_library_sources(widgets/icons/batt_0_chg.c)
endif()
if(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS)
zephyr_library_sources(widgets/icons/bluetooth_advertising.c)
zephyr_library_sources(widgets/icons/bluetooth_connected_right.c)
zephyr_library_sources(widgets/icons/bluetooth_disconnected_right.c)
endif()
if(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS)
zephyr_library_sources(widgets/icons/USB_connected.c)
zephyr_library_sources(widgets/icons/bluetooth_connected_1.c)
zephyr_library_sources(widgets/icons/bluetooth_connected_2.c)
zephyr_library_sources(widgets/icons/bluetooth_connected_3.c)
zephyr_library_sources(widgets/icons/bluetooth_connected_4.c)
zephyr_library_sources(widgets/icons/bluetooth_connected_5.c)
zephyr_library_sources(widgets/icons/bluetooth_advertising_1.c)
zephyr_library_sources(widgets/icons/bluetooth_advertising_2.c)
zephyr_library_sources(widgets/icons/bluetooth_advertising_3.c)
zephyr_library_sources(widgets/icons/bluetooth_advertising_4.c)
zephyr_library_sources(widgets/icons/bluetooth_advertising_5.c)
zephyr_library_sources(widgets/icons/bluetooth_disconnected_right.c)
endif()
if(CONFIG_CUSTOM_WIDGET_LAYER_STATUS)
zephyr_library_sources(widgets/icons/layers.c)
zephyr_library_sources(widgets/icons/layers2.c)
endif()
if(NOT CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
zephyr_library_sources(widgets/icons/zenlogo.c)
endif()
endif()
zephyr_library_include_directories(${ZEPHYR_LVGL_MODULE_DIR})
zephyr_library_include_directories(${ZEPHYR_BASE}/lib/gui/lvgl/)
zephyr_library_sources_ifdef(CONFIG_ZMK_DISPLAY custom_status_screen.c)
zephyr_library_sources(${ZEPHYR_BASE}/misc/empty_file.c)
zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)

View file

@ -0,0 +1,10 @@
#
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
config BOARD_CORNEISH_ZEN_LEFT
bool
config BOARD_CORNEISH_ZEN_RIGHT
bool

Some files were not shown because too many files have changed in this diff Show more