hack: don't exit from kscan-mock if there are no events

We should probably move this into .conf files, or wait for Zephyr 3.4
and its EXTRA_DTC_OVERLAY_FILE.
This commit is contained in:
Dylan MacKenzie 2023-11-13 21:20:19 -08:00
parent 87c6a32ef4
commit 6677117e6b

View file

@ -55,7 +55,7 @@ static int kscan_mock_configure(const struct device *dev, kscan_callback_t callb
uint32_t ev = cfg->events[data->event_index]; \
LOG_DBG("delaying next keypress: %d", ZMK_MOCK_MSEC(ev)); \
k_work_schedule(&data->work, K_MSEC(ZMK_MOCK_MSEC(ev))); \
} else if (cfg->exit_after) { \
} else if (cfg->exit_after && DT_INST_PROP_LEN(n, events) > 0) { \
LOG_DBG("Exiting"); \
exit(0); \
} \