summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPurdea Andrei <andrei@purdea.ro>2020-09-06 23:13:49 +0300
committerDrashna Jael're <drashna@live.com>2020-09-30 03:50:16 -0700
commitc2eaf9740bf650ac5f30a7ac318ed730a51fa5f7 (patch)
tree7602d0b5a0cb4546fd1f5ac03837ffc4b3a55d82
parent303fa4f58df29f74955166468cc4413d11a79d2e (diff)
quantum/debounce: rename debouncing algorithms (#9564)
* quantum/debounce: rename debouncing algorithms according to Issue 8763 This is the second attempt at implementation, with no ts_ and cy_ prefixes, since those will be implemented with macros. * Debouncing documentation: Refactor, add some generic info, and merge into a single document
-rw-r--r--common_features.mk13
-rw-r--r--quantum/debounce/readme.md28
-rw-r--r--quantum/debounce/sym_defer_g.c (renamed from quantum/debounce/sym_g.c)0
-rw-r--r--quantum/debounce/sym_defer_pk.c (renamed from quantum/debounce/sym_pk.c)0
-rw-r--r--quantum/debounce/sym_eager_pk.c (renamed from quantum/debounce/eager_pk.c)0
-rw-r--r--quantum/debounce/sym_eager_pr.c (renamed from quantum/debounce/eager_pr.c)0
6 files changed, 12 insertions, 29 deletions
diff --git a/common_features.mk b/common_features.mk
index 45415c269c..5f1090d7ec 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -406,9 +406,20 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes)
endif
endif
+# Support for translating old names to new names:
+ifeq ($(strip $(DEBOUNCE_TYPE)),sym_g)
+ DEBOUNCE_TYPE:=sym_defer_g
+else ifeq ($(strip $(DEBOUNCE_TYPE)),eager_pk)
+ DEBOUNCE_TYPE:=sym_eager_pk
+else ifeq ($(strip $(DEBOUNCE_TYPE)),sym_pk)
+ DEBOUNCE_TYPE:=sym_defer_pk
+else ifeq ($(strip $(DEBOUNCE_TYPE)),eager_pr)
+ DEBOUNCE_TYPE:=sym_eager_pr
+endif
+
DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce
# Debounce Modules. Set DEBOUNCE_TYPE=custom if including one manually.
-DEBOUNCE_TYPE?= sym_g
+DEBOUNCE_TYPE?= sym_defer_g
ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c
endif
diff --git a/quantum/debounce/readme.md b/quantum/debounce/readme.md
deleted file mode 100644
index f77f78c764..0000000000
--- a/quantum/debounce/readme.md
+++ /dev/null
@@ -1,28 +0,0 @@
-Debounce algorithms belong in this folder.
-Here are a few ideas
-
-1) Global vs Per-Key vs Per-Row
- * Global - one timer for all keys. Any key change state affects global timer
- * Per key - one timer per key
- * Per row - one timer per row
-
-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
- * 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
- * newer code stores the millisecond the change occurred, and does subraction to figure out time elapsed.
- * Timestamps are superior, i don't think cycles will ever be used again once upgraded.
-
-The default algorithm is symmetric and global.
-Here are a few that could be implemented:
-
-sym_g.c
-sym_pk.c
-sym_pr.c
-sym_pr_cycles.c
-eager_g.c
-eager_pk.c
-eager_pr.c //could be used in ergo-dox!
diff --git a/quantum/debounce/sym_g.c b/quantum/debounce/sym_defer_g.c
index 3ed9055d2a..3ed9055d2a 100644
--- a/quantum/debounce/sym_g.c
+++ b/quantum/debounce/sym_defer_g.c
diff --git a/quantum/debounce/sym_pk.c b/quantum/debounce/sym_defer_pk.c
index f404cf9c44..f404cf9c44 100644
--- a/quantum/debounce/sym_pk.c
+++ b/quantum/debounce/sym_defer_pk.c
diff --git a/quantum/debounce/eager_pk.c b/quantum/debounce/sym_eager_pk.c
index 93a40ad441..93a40ad441 100644
--- a/quantum/debounce/eager_pk.c
+++ b/quantum/debounce/sym_eager_pk.c
diff --git a/quantum/debounce/eager_pr.c b/quantum/debounce/sym_eager_pr.c
index d12931fddb..d12931fddb 100644
--- a/quantum/debounce/eager_pr.c
+++ b/quantum/debounce/sym_eager_pr.c