feat(keymap): Explicit error if zmk,keymap not set

This commit is contained in:
ReFil 2024-02-29 09:58:25 +00:00
parent db7b197790
commit 982864504f

View file

@ -31,6 +31,12 @@ static uint8_t _zmk_keymap_layer_default = 0;
#define DT_DRV_COMPAT zmk_keymap
#if !DT_NODE_EXISTS(DT_DRV_INST(0))
#error "Keymap node not found, check a keymap is available and is has compatible = "zmk,keymap" set"
#endif
#define TRANSFORMED_LAYER(node) \
{ LISTIFY(DT_PROP_LEN(node, bindings), ZMK_KEYMAP_EXTRACT_BINDING, (, ), node) }