forked from kofal.net/zmk
refactor(core): Use /omit-if-no-ref/ for behaviors.
* Use lesser-known DT features to skip behaviors not referenced in the user keymap * Update the behaviors to skip code if no nodes found. * Remove some empty config/data structs where unused in behaviors.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
#if DT_NODE_EXISTS(DT_DRV_INST(0))
|
||||
#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT)
|
||||
|
||||
#define ZMK_BHV_HOLD_TAP_MAX_HELD 10
|
||||
#define ZMK_BHV_HOLD_TAP_MAX_CAPTURED_EVENTS 40
|
||||
@@ -538,4 +538,4 @@ static struct behavior_hold_tap_data behavior_hold_tap_data;
|
||||
|
||||
DT_INST_FOREACH_STATUS_OKAY(KP_INST)
|
||||
|
||||
#endif
|
||||
#endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */
|
||||
Reference in New Issue
Block a user