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:
parent
87c6a32ef4
commit
6677117e6b
1 changed files with 1 additions and 1 deletions
|
@ -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]; \
|
uint32_t ev = cfg->events[data->event_index]; \
|
||||||
LOG_DBG("delaying next keypress: %d", ZMK_MOCK_MSEC(ev)); \
|
LOG_DBG("delaying next keypress: %d", ZMK_MOCK_MSEC(ev)); \
|
||||||
k_work_schedule(&data->work, K_MSEC(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"); \
|
LOG_DBG("Exiting"); \
|
||||||
exit(0); \
|
exit(0); \
|
||||||
} \
|
} \
|
||||||
|
|
Loading…
Add table
Reference in a new issue