mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 04:55:20 -05:00
refactor(keymap): Reduce flash usage for studio builds (#2771)
When building for ZMK Studio, we can use the constant stock keymap for init of the in-memory keymap, to avoid duplicate flash usage for the keymap from the devicetree.
This commit is contained in:
@@ -10,7 +10,10 @@
|
||||
|
||||
#define ZMK_LAYER_CHILD_LEN_PLUS_ONE(node) 1 +
|
||||
#define ZMK_KEYMAP_LAYERS_LEN \
|
||||
(DT_FOREACH_CHILD(DT_INST(0, zmk_keymap), ZMK_LAYER_CHILD_LEN_PLUS_ONE) 0)
|
||||
(COND_CODE_1( \
|
||||
IS_ENABLED(CONFIG_ZMK_STUDIO), \
|
||||
(DT_FOREACH_CHILD(DT_INST(0, zmk_keymap), ZMK_LAYER_CHILD_LEN_PLUS_ONE)), \
|
||||
(DT_FOREACH_CHILD_STATUS_OKAY(DT_INST(0, zmk_keymap), ZMK_LAYER_CHILD_LEN_PLUS_ONE))) 0)
|
||||
|
||||
/**
|
||||
* @brief A layer ID is a stable identifier to refer to a layer, regardless of ordering.
|
||||
|
||||
Reference in New Issue
Block a user