Browse Source

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)
xmkb
Jay Greco 4 years ago committed by GitHub
parent
commit
f3bb90f9e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/drivers/kscan/kscan_gpio_demux.c

2
app/drivers/kscan/kscan_gpio_demux.c

@ -113,6 +113,8 @@ struct kscan_gpio_item_config {
&kscan_gpio_output_configs_##n(dev)[bit]; \ &kscan_gpio_output_configs_##n(dev)[bit]; \
gpio_pin_set(out_dev, out_cfg->pin, state); \ 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++) { \ for (int i = 0; i < INST_MATRIX_INPUTS(n); i++) { \
/* Get the input device (port) */ \ /* Get the input device (port) */ \

Loading…
Cancel
Save