Commit graph

6 commits

Author SHA1 Message Date
Joel Spadin
6d6efa32f5 refactor(kscan): Auto enable kscan drivers
The key scanning drivers are now automatically enabled when a DT node
with the matching "compatible" property is present and enabled, so they
no longer need to be manually set for each board.
2022-04-25 22:28:53 -04:00
Joel Spadin
f946dc6893 feat(kscan): Improve matrix debouncing
Switched the GPIO matrix driver to debouncing using a simple integrator
algorithm. Whenever a key is pressed, we now scan at a rate controlled
by debounce-scan-period-ms (default 1 ms) until all keys are released,
then return to either waiting for an interrupt or polling more slowly.

The timers for key press and release can now be controlled separately,
so debounce-period is deprecated in favor of debounce-press-ms and
debounce-release-ms. Global Kconfig options
ZMK_KSCAN_DEBOUNCE_PRESS_MS and ZMK_KSCAN_DEBOUNCE_RELEASE_MS are also
added to make these easier to set.

Added documentation for debouncing options.
2021-10-26 23:52:13 -04:00
Pete Johanson
0f9fff7554 Fix the label for the GPIO kscan driver. 2021-02-27 14:32:42 -05:00
Pete Johanson
2f352788c1 refactor(kscan): Remove explicit default n from kscan configs.
* Actually allow defaulting yes in other places.
2021-02-02 14:04:10 -05:00
Pete Johanson
e6a27b15c1 fix(kscan): Fix building kscan for tests. 2020-12-08 22:20:12 -05:00
innovaker
8d9ae1fdf3 refactor: Align drivers with Zephyr file system conventions
PR: #400
2020-12-03 21:06:01 -05:00