aboutsummaryrefslogtreecommitdiff
path: root/tmk_core
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-02-05 13:28:01 +0000
committerQMK Bot <hello@qmk.fm>2021-02-05 13:28:01 +0000
commitb4e02f8ddfdd945ea33e2dac722c4ad21a147f5f (patch)
treebed080fcf3bf41731476795a113ef8c8dd5f8f80 /tmk_core
parent1816b163153b17b1ade22a905bf9509cc2f1b774 (diff)
parentb2d0e8a491f347d43b482808a744642fc975afab (diff)
downloadqmk_firmware-b4e02f8ddfdd945ea33e2dac722c4ad21a147f5f.tar.gz
qmk_firmware-b4e02f8ddfdd945ea33e2dac722c4ad21a147f5f.zip
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/keyboard.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 61b6674f9..40989ca4c 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -113,8 +113,8 @@ void last_encoder_activity_trigger(void) { last_encoder_modification_
113 113
114// Only enable this if console is enabled to print to 114// Only enable this if console is enabled to print to
115#if defined(DEBUG_MATRIX_SCAN_RATE) 115#if defined(DEBUG_MATRIX_SCAN_RATE)
116static uint32_t matrix_timer = 0; 116static uint32_t matrix_timer = 0;
117static uint32_t matrix_scan_count = 0; 117static uint32_t matrix_scan_count = 0;
118static uint32_t last_matrix_scan_count = 0; 118static uint32_t last_matrix_scan_count = 0;
119 119
120void matrix_scan_perf_task(void) { 120void matrix_scan_perf_task(void) {
@@ -126,14 +126,12 @@ void matrix_scan_perf_task(void) {
126 dprintf("matrix scan frequency: %lu\n", matrix_scan_count); 126 dprintf("matrix scan frequency: %lu\n", matrix_scan_count);
127# endif 127# endif
128 last_matrix_scan_count = matrix_scan_count; 128 last_matrix_scan_count = matrix_scan_count;
129 matrix_timer = timer_now; 129 matrix_timer = timer_now;
130 matrix_scan_count = 0; 130 matrix_scan_count = 0;
131 } 131 }
132} 132}
133 133
134uint32_t get_matrix_scan_rate(void) { 134uint32_t get_matrix_scan_rate(void) { return last_matrix_scan_count; }
135 return last_matrix_scan_count;
136}
137#else 135#else
138# define matrix_scan_perf_task() 136# define matrix_scan_perf_task()
139#endif 137#endif