aboutsummaryrefslogtreecommitdiff
path: root/keyboards/ergotaco/matrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/ergotaco/matrix.c')
-rw-r--r--keyboards/ergotaco/matrix.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/keyboards/ergotaco/matrix.c b/keyboards/ergotaco/matrix.c
index f7ceb194a..e28f754e6 100644
--- a/keyboards/ergotaco/matrix.c
+++ b/keyboards/ergotaco/matrix.c
@@ -26,9 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
26#include "debug.h" 26#include "debug.h"
27#include "util.h" 27#include "util.h"
28#include QMK_KEYBOARD_H 28#include QMK_KEYBOARD_H
29#ifdef DEBUG_MATRIX_SCAN_RATE
30#include "timer.h"
31#endif
32 29
33#ifndef DEBOUNCE 30#ifndef DEBOUNCE
34# define DEBOUNCE 5 31# define DEBOUNCE 5
@@ -70,12 +67,6 @@ static void select_row(uint8_t row);
70static uint8_t mcp23018_reset_loop; 67static uint8_t mcp23018_reset_loop;
71// static uint16_t mcp23018_reset_loop; 68// static uint16_t mcp23018_reset_loop;
72 69
73#ifdef DEBUG_MATRIX_SCAN_RATE
74uint32_t matrix_timer;
75uint32_t matrix_scan_count;
76#endif
77
78
79__attribute__ ((weak)) 70__attribute__ ((weak))
80void matrix_init_user(void) {} 71void matrix_init_user(void) {}
81 72
@@ -121,10 +112,6 @@ void matrix_init(void)
121 } 112 }
122 } 113 }
123 114
124#ifdef DEBUG_MATRIX_SCAN_RATE
125 matrix_timer = timer_read32();
126 matrix_scan_count = 0;
127#endif
128 matrix_init_quantum(); 115 matrix_init_quantum();
129} 116}
130 117
@@ -138,12 +125,6 @@ void matrix_power_up(void) {
138 for (uint8_t i=0; i < MATRIX_ROWS; i++) { 125 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
139 matrix[i] = 0; 126 matrix[i] = 0;
140 } 127 }
141
142#ifdef DEBUG_MATRIX_SCAN_RATE
143 matrix_timer = timer_read32();
144 matrix_scan_count = 0;
145#endif
146
147} 128}
148 129
149// Returns a matrix_row_t whose bits are set if the corresponding key should be 130// Returns a matrix_row_t whose bits are set if the corresponding key should be
@@ -192,18 +173,6 @@ uint8_t matrix_scan(void)
192 } 173 }
193 } 174 }
194 175
195#ifdef DEBUG_MATRIX_SCAN_RATE
196 matrix_scan_count++;
197 uint32_t timer_now = timer_read32();
198 if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) {
199 print("matrix scan frequency: ");
200 pdec(matrix_scan_count);
201 print("\n");
202
203 matrix_timer = timer_now;
204 matrix_scan_count = 0;
205 }
206#endif
207 for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { 176 for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
208 select_row(i); 177 select_row(i);
209 // and select on left hand 178 // and select on left hand