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.
This commit is contained in:
parent
f7c34c70ba
commit
483a4930e9
6 changed files with 217 additions and 1 deletions
9
app/include/linker/zmk-behavior-local-id-map.ld
Normal file
9
app/include/linker/zmk-behavior-local-id-map.ld
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <zephyr/linker/linker-defs.h>
|
||||
|
||||
ITERABLE_SECTION_RAM(zmk_behavior_local_id_map, 4)
|
||||
Loading…
Add table
Add a link
Reference in a new issue