diff options
author | Jay Greco <jayv.greco@gmail.com> | 2021-06-08 17:59:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-08 20:59:35 -0400 |
commit | f3bb90f9e101c2f6d35e6577a52d51b778727dfa (patch) | |
tree | 2cf9c90750b661afba9cd1332abe1140b72dc9fd /app/drivers/kscan/kscan_gpio_demux.c | |
parent | faa90be1bad3f9f2f58d9f00bb3b622e6447f3d6 (diff) |
fix(kscan): Fix nibble demux scan errors on encoder row
+ Add a 1us sleep to let the column selection settle in order to avoid spurious keypresses when row capacitance is high (like on the encoder row)
Diffstat (limited to 'app/drivers/kscan/kscan_gpio_demux.c')
-rw-r--r-- | app/drivers/kscan/kscan_gpio_demux.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/drivers/kscan/kscan_gpio_demux.c b/app/drivers/kscan/kscan_gpio_demux.c index 7e3515f..06a5d27 100644 --- a/app/drivers/kscan/kscan_gpio_demux.c +++ b/app/drivers/kscan/kscan_gpio_demux.c @@ -113,6 +113,8 @@ struct kscan_gpio_item_config { &kscan_gpio_output_configs_##n(dev)[bit]; \ gpio_pin_set(out_dev, out_cfg->pin, state); \ } \ + /* Let the col settle before reading the rows */ \ + k_usleep(1); \ \ for (int i = 0; i < INST_MATRIX_INPUTS(n); i++) { \ /* Get the input device (port) */ \ |