forked from kofal.net/zmk
refactor: Move to LISTIFY/DT_FOREACH_PROP_ELEM macros.
This commit is contained in:
committed by
Pete Johanson
parent
69a4c3200d
commit
243a227ff9
@@ -168,7 +168,7 @@ static int behavior_caps_word_init(const struct device *dev) {
|
||||
#define PARSE_BREAK(i) \
|
||||
{.page = ZMK_HID_USAGE_PAGE(i), \
|
||||
.id = ZMK_HID_USAGE_ID(i), \
|
||||
.implicit_modifiers = SELECT_MODS(i)},
|
||||
.implicit_modifiers = SELECT_MODS(i)}
|
||||
|
||||
#define BREAK_ITEM(i, n) PARSE_BREAK(DT_INST_PROP_BY_IDX(n, continue_list, i))
|
||||
|
||||
@@ -177,7 +177,7 @@ static int behavior_caps_word_init(const struct device *dev) {
|
||||
static struct behavior_caps_word_config behavior_caps_word_config_##n = { \
|
||||
.index = n, \
|
||||
.mods = DT_INST_PROP_OR(n, mods, MOD_LSFT), \
|
||||
.continuations = {UTIL_LISTIFY(DT_INST_PROP_LEN(n, continue_list), BREAK_ITEM, n)}, \
|
||||
.continuations = {LISTIFY(DT_INST_PROP_LEN(n, continue_list), BREAK_ITEM, (,), n)}, \
|
||||
.continuations_count = DT_INST_PROP_LEN(n, continue_list), \
|
||||
}; \
|
||||
DEVICE_DT_INST_DEFINE(n, behavior_caps_word_init, NULL, &behavior_caps_word_data_##n, \
|
||||
|
||||
Reference in New Issue
Block a user