aboutsummaryrefslogtreecommitdiff
path: root/keyboards/georgi
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2019-10-15 13:32:52 +0100
committerGitHub <noreply@github.com>2019-10-15 13:32:52 +0100
commitcc5edb9eeb2d30400dee278a6f20991389f68afe (patch)
tree4fb8bdd3ec143345a787474f46add0f53ce782f7 /keyboards/georgi
parente1de0d74a6f6c4bdc762b32fb78e449aed0fcecb (diff)
downloadqmk_firmware-cc5edb9eeb2d30400dee278a6f20991389f68afe.tar.gz
qmk_firmware-cc5edb9eeb2d30400dee278a6f20991389f68afe.zip
Port DEBUG_MATRIX_SCAN_RATE to core (#7029)
* Port DEBUG_MATRIX_SCAN_RATE to core * Remove duplicate DEBUG_MATRIX_SCAN_RATE implementations * Remove duplicate DEBUG_MATRIX_SCAN_RATE implementation from handwired/xealous * Add console logic from ergodox_ez
Diffstat (limited to 'keyboards/georgi')
-rw-r--r--keyboards/georgi/matrix.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/keyboards/georgi/matrix.c b/keyboards/georgi/matrix.c
index 58f0776c4..f0b69c841 100644
--- a/keyboards/georgi/matrix.c
+++ b/keyboards/georgi/matrix.c
@@ -27,10 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
27#include "util.h" 27#include "util.h"
28#include "keymap_steno.h" 28#include "keymap_steno.h"
29#include QMK_KEYBOARD_H 29#include QMK_KEYBOARD_H
30#ifdef DEBUG_MATRIX_SCAN_RATE
31#include "timer.h"
32#endif
33
34 30
35#ifndef DEBOUNCE 31#ifndef DEBOUNCE
36# define DEBOUNCE 5 32# define DEBOUNCE 5
@@ -92,12 +88,6 @@ static void select_row(uint8_t row);
92static uint8_t mcp23018_reset_loop; 88static uint8_t mcp23018_reset_loop;
93// static uint16_t mcp23018_reset_loop; 89// static uint16_t mcp23018_reset_loop;
94 90
95#ifdef DEBUG_MATRIX_SCAN_RATE
96uint32_t matrix_timer;
97uint32_t matrix_scan_count;
98#endif
99
100
101__attribute__ ((weak)) 91__attribute__ ((weak))
102void matrix_init_user(void) {} 92void matrix_init_user(void) {}
103 93
@@ -143,10 +133,6 @@ void matrix_init(void)
143 } 133 }
144 } 134 }
145 135
146#ifdef DEBUG_MATRIX_SCAN_RATE
147 matrix_timer = timer_read32();
148 matrix_scan_count = 0;
149#endif
150 matrix_init_quantum(); 136 matrix_init_quantum();
151} 137}
152 138
@@ -160,12 +146,6 @@ void matrix_power_up(void) {
160 for (uint8_t i=0; i < MATRIX_ROWS; i++) { 146 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
161 matrix[i] = 0; 147 matrix[i] = 0;
162 } 148 }
163
164#ifdef DEBUG_MATRIX_SCAN_RATE
165 matrix_timer = timer_read32();
166 matrix_scan_count = 0;
167#endif
168
169} 149}
170 150
171// Returns a matrix_row_t whose bits are set if the corresponding key should be 151// Returns a matrix_row_t whose bits are set if the corresponding key should be
@@ -214,18 +194,6 @@ uint8_t matrix_scan(void)
214 } 194 }
215 } 195 }
216 196
217#ifdef DEBUG_MATRIX_SCAN_RATE
218 matrix_scan_count++;
219 uint32_t timer_now = timer_read32();
220 if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) {
221 print("matrix scan frequency: ");
222 pdec(matrix_scan_count);
223 print("\n");
224
225 matrix_timer = timer_now;
226 matrix_scan_count = 0;
227 }
228#endif
229 for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { 197 for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
230 select_row(i); 198 select_row(i);
231 // and select on left hand 199 // and select on left hand