Co-authored-by: Alexander Krikun <krikun98@gmail.com>
Co-authored-by: Robert U <urob@users.noreply.github.com>
Co-authored-by: Shawn Meier <ftc@users.noreply.github.com>
* 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.
* 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.
* 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.
* 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.
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>
* 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>
* 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.
* 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
* 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.
* 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.
* 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.