Clean up debounce a bit (#5255)

This commit is contained in:
James Churchill 2019-03-05 01:44:46 +10:00 committed by MechMerlin
parent cdfcbfc92d
commit c7c4937eef
8 changed files with 29 additions and 44 deletions

View file

@ -6,10 +6,10 @@ Here are a few ideas
* Per key - one timer per key
* Per row - one timer per row
2) Eager vs symmetric vs assymetric
2) Eager vs symmetric vs asymmetric
* Eager - any key change is reported immediately. All further inputs for DEBOUNCE ms are ignored.
* Symmetric - wait for no changes for DEBOUNCE ms before reporting change
* Assymetric - wait for different times depending on key-down/key-up. E.g. Eager key-down, DEBOUNCE ms key up.
* Asymmetric - wait for different times depending on key-down/key-up. E.g. Eager key-down, DEBOUNCE ms key up.
3) Timestamp vs cycles
* old old old code waits n cycles, decreasing count by one each matrix_scan
@ -19,10 +19,10 @@ Here are a few ideas
The default algorithm is symmetric and global.
Here are a few that could be implemented:
debounce_sym_g.c
debounce_sym_pk.c
debounce_sym_pr.c
debounce_sym_pr_cycles.c //currently used in ergo-dox
debounce_eager_g.c
debounce_eager_pk.c
debounce_eager_pr.c //could be used in ergo-dox!
sym_g.c
sym_pk.c
sym_pr.c
sym_pr_cycles.c //currently used in ergo-dox
eager_g.c
eager_pk.c
eager_pr.c //could be used in ergo-dox!