refactor: Move to LISTIFY/DT_FOREACH_PROP_ELEM macros.

This commit is contained in:
Peter Johanson 2022-09-20 21:35:40 -04:00 committed by Pete Johanson
parent 69a4c3200d
commit 243a227ff9
10 changed files with 33 additions and 31 deletions

View file

@ -237,10 +237,10 @@ static int behavior_tap_dance_init(const struct device *dev) {
return 0;
}
#define _TRANSFORM_ENTRY(idx, node) ZMK_KEYMAP_EXTRACT_BINDING(idx, node),
#define _TRANSFORM_ENTRY(idx, node) ZMK_KEYMAP_EXTRACT_BINDING(idx, node)
#define TRANSFORMED_BINDINGS(node) \
{ UTIL_LISTIFY(DT_INST_PROP_LEN(node, bindings), _TRANSFORM_ENTRY, DT_DRV_INST(node)) }
{ LISTIFY(DT_INST_PROP_LEN(node, bindings), _TRANSFORM_ENTRY, (,), DT_DRV_INST(node)) }
#define KP_INST(n) \
static struct zmk_behavior_binding \