You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.1 KiB

  1. Debounce algorithms belong in this folder.
  2. Here are a few ideas
  3. 1) Global vs Per-Key vs Per-Row
  4. * Global - one timer for all keys. Any key change state affects global timer
  5. * Per key - one timer per key
  6. * Per row - one timer per row
  7. 2) Eager vs symmetric vs asymmetric
  8. * Eager - any key change is reported immediately. All further inputs for DEBOUNCE ms are ignored.
  9. * Symmetric - wait for no changes for DEBOUNCE ms before reporting change
  10. * Asymmetric - wait for different times depending on key-down/key-up. E.g. Eager key-down, DEBOUNCE ms key up.
  11. 3) Timestamp vs cycles
  12. * old old old code waits n cycles, decreasing count by one each matrix_scan
  13. * newer code stores the millisecond the change occurred, and does subraction to figure out time elapsed.
  14. * Timestamps are superior, i don't think cycles will ever be used again once upgraded.
  15. The default algorithm is symmetric and global.
  16. Here are a few that could be implemented:
  17. sym_g.c
  18. sym_pk.c
  19. sym_pr.c
  20. sym_pr_cycles.c //currently used in ergo-dox
  21. eager_g.c
  22. eager_pk.c
  23. eager_pr.c //could be used in ergo-dox!