From caad69a37d88118e5dff48d6cdf2f0ed19f9808a Mon Sep 17 00:00:00 2001 From: jding Date: Sat, 30 Oct 2021 15:46:54 +0000 Subject: [PATCH] build failures because enum starts at 1? --- app/src/behaviors/behavior_hold_tap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/behaviors/behavior_hold_tap.c b/app/src/behaviors/behavior_hold_tap.c index 814407ae..d36969f9 100644 --- a/app/src/behaviors/behavior_hold_tap.c +++ b/app/src/behaviors/behavior_hold_tap.c @@ -659,12 +659,12 @@ static struct behavior_hold_tap_data behavior_hold_tap_data; DEVICE_DT_INST_DEFINE(n, behavior_hold_tap_init, device_pm_control_nop, \ &behavior_hold_tap_data, &behavior_hold_tap_config_##n, APPLICATION, \ CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_hold_tap_driver_api); \ - BUILD_ASSERT((DT_ENUM_IDX(DT_DRV_INST(n), flavor) == 3 && \ + BUILD_ASSERT((DT_ENUM_IDX(DT_DRV_INST(n), flavor) == 4 && \ !(DT_INST_PROP_LEN(n, hold_trigger_key_positions) > 0)), \ "'hold-trigger-key-positions' must be non-empty if hold-tap flavor is " \ "'tap-positionally-preferred'"); \ BUILD_ASSERT((DT_INST_PROP_LEN(n, hold_trigger_key_positions) > 0) \ - && DT_ENUM_IDX(DT_DRV_INST(n), flavor) != 3 ), \ + && DT_ENUM_IDX(DT_DRV_INST(n), flavor) != 4 ), \ "hold-tap flavor must be 'tap-positionally-preferred' if 'hold-trigger-key-positions' is non-empty"); DT_INST_FOREACH_STATUS_OKAY(KP_INST)