Go to file
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
.devcontainer chore: Ensure BSIM env. variables set in devcontainer. 2023-12-02 17:11:45 -08:00
.github feat(bluetooth): Initial nRF52 BSIM based test support. 2023-12-02 17:11:45 -08:00
.vscode fix: Don't specify default C formatter 2023-05-14 11:54:34 -06:00
app refactor(behaviors): Create a list to lookup behaviors 2023-12-04 20:06:54 -06:00
docs refactor(behaviors): Create a list to lookup behaviors 2023-12-04 20:06:54 -06:00
schema refactor: Add more checks to pre-commit 2023-04-24 16:07:04 -07:00
.clang-format feat(ci): Run clang-format to check files. 2020-09-14 00:08:13 -04:00
.gitattributes fix: check out Bash scripts with LF 2020-10-10 17:43:52 -05:00
.gitignore add __pycache__ to gitignore now zmk contains python files 2020-11-21 14:47:01 -05:00
.pre-commit-config.yaml chore: Update Prettier 2023-04-24 16:07:04 -07:00
AUTHORS Add KemoNine to authors per PeteJohnson 2020-12-07 07:07:45 -05:00
CODE_OF_CONDUCT.md refactor: Move to new zmk.dev domain name. 2021-06-10 09:27:57 -04:00
CODEOWNERS chore: Initial simple CODEOWNERS. 2021-01-13 20:59:11 -05:00
CONTRIBUTING.md fix: basic setup link 2021-08-12 19:12:30 -05:00
LICENSE Updated copyright line. 2020-06-22 05:47:20 -04:00
README.md fix(docs): Fix README punctuation and add license link 2023-07-17 15:23:22 -07:00

Zephyr™ Mechanical Keyboard (ZMK) Firmware

Discord Build Contributor Covenant

ZMK Firmware is an open source (MIT) keyboard firmware built on the Zephyr™ Project 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/.

You can also come join our ZMK Discord Server.

To review features, check out the feature overview. ZMK is under active development, and new features are listed with the enhancement label in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature.