* 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.
* 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>
* 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>
* 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`.
* 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.
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.
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.
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().
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.
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.
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".
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.
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
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>
* 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.
* 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.
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).