feat(build): Explicit missing keymap node error

* Explicit error if zmk,keymap not set
* Document keymap error

---------

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
This commit is contained in:
ReFil
2024-03-18 16:54:47 +00:00
committed by GitHub
parent a77288f527
commit 388ad71385
2 changed files with 10 additions and 0 deletions

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) }