feature(drivers): Option for read wait on matrix.
* Add a new Kconfig option, `ZMK_KSCAN_MATRIX_WAIT_BEFORE_INPUTS` to delay reading inputs after setting an output active.
This commit is contained in:
parent
0b39bf4336
commit
9782518397
2 changed files with 15 additions and 1 deletions
|
|
@ -235,6 +235,10 @@ static int kscan_matrix_read(const struct device *dev) {
|
|||
return err;
|
||||
}
|
||||
|
||||
#if CONFIG_ZMK_KSCAN_MATRIX_WAIT_BEFORE_INPUTS > 0
|
||||
k_busy_wait(CONFIG_ZMK_KSCAN_MATRIX_WAIT_BEFORE_INPUTS);
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < config->inputs.len; i++) {
|
||||
const struct gpio_dt_spec *in_gpio = &config->inputs.gpios[i];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue