diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2021-07-21 13:49:49 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-28 16:10:44 +0000 |
commit | f73fa8e9069e72848d977f5427afe8c30df4e77a (patch) | |
tree | f156e92b8071191e58e0da5e9757aae20a367b2f /include | |
parent | 10c0d38d267736abb60789dea4ff144847d2b4bb (diff) | |
download | chrome-ec-f73fa8e9069e72848d977f5427afe8c30df4e77a.tar.gz |
keyboard: Add strict debouncer
This CL adds CONFIG_KEYBOARD_STRICT_DEBOUNCE. It makes the keyboard
debouncer register a key stroke after deounce is done.
This CL also adds a unit test.
BUG=b:193505909
BRANCH=Dedede
TEST=make run-kb_scan_strict
TEST=Blipper
Change-Id: Ia380657021035930afab5cafffa8cc2edd7ff475
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044405
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index d16a4a0388..11733d38df 100644 --- a/include/config.h +++ b/include/config.h @@ -2801,6 +2801,21 @@ #undef CONFIG_KEYBOARD_KEYPAD /* + * Enable strict debouncer. A strict debouncer waits until debounce is done + * before registering key up/down while a non-strict debouncer registers a key + * up/down as soon as a key is pressed or released. + * + * A strict debouncer is robust against unintentional key presses, caused by a + * device drop, for example. However, its latency isn't as fast as a non-strict + * debouncer. + * + * If a strict debouncer is used, it's recommended to set debounce_down_us and + * debounce_up_us to an equal value. This guarantees key events are registered + * in the order the keys are pressed. + */ +#undef CONFIG_KEYBOARD_STRICT_DEBOUNCE + +/* * Enable the 8042 AUX port. This is typically used for PS/2 mouse devices. * You will need to implement send_aux_data_to_device and lpc_aux_put_char. */ |