diff options
Diffstat (limited to 'keyboards/gergo/matrix.c')
| -rw-r--r-- | keyboards/gergo/matrix.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/keyboards/gergo/matrix.c b/keyboards/gergo/matrix.c index 9ef1f6b5c..f659ed52c 100644 --- a/keyboards/gergo/matrix.c +++ b/keyboards/gergo/matrix.c | |||
| @@ -27,9 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 27 | #include "util.h" | 27 | #include "util.h" |
| 28 | #include "debounce.h" | 28 | #include "debounce.h" |
| 29 | #include QMK_KEYBOARD_H | 29 | #include QMK_KEYBOARD_H |
| 30 | #ifdef DEBUG_MATRIX_SCAN_RATE | ||
| 31 | # include "timer.h" | ||
| 32 | #endif | ||
| 33 | 30 | ||
| 34 | #ifdef BALLER | 31 | #ifdef BALLER |
| 35 | #include <avr/interrupt.h> | 32 | #include <avr/interrupt.h> |
| @@ -124,12 +121,6 @@ static void enableInterrupts(void); | |||
| 124 | static uint8_t mcp23018_reset_loop; | 121 | static uint8_t mcp23018_reset_loop; |
| 125 | // static uint16_t mcp23018_reset_loop; | 122 | // static uint16_t mcp23018_reset_loop; |
| 126 | 123 | ||
| 127 | #ifdef DEBUG_MATRIX_SCAN_RATE | ||
| 128 | uint32_t matrix_timer; | ||
| 129 | uint32_t matrix_scan_count; | ||
| 130 | #endif | ||
| 131 | |||
| 132 | |||
| 133 | __attribute__ ((weak)) void matrix_init_user(void) {} | 124 | __attribute__ ((weak)) void matrix_init_user(void) {} |
| 134 | 125 | ||
| 135 | __attribute__ ((weak)) void matrix_scan_user(void) {} | 126 | __attribute__ ((weak)) void matrix_scan_user(void) {} |
| @@ -161,10 +152,6 @@ void matrix_init(void) { | |||
| 161 | raw_matrix[i] = 0; | 152 | raw_matrix[i] = 0; |
| 162 | } | 153 | } |
| 163 | 154 | ||
| 164 | #ifdef DEBUG_MATRIX_SCAN_RATE | ||
| 165 | matrix_timer = timer_read32(); | ||
| 166 | matrix_scan_count = 0; | ||
| 167 | #endif | ||
| 168 | debounce_init(MATRIX_ROWS); | 155 | debounce_init(MATRIX_ROWS); |
| 169 | matrix_init_quantum(); | 156 | matrix_init_quantum(); |
| 170 | } | 157 | } |
| @@ -179,12 +166,6 @@ void matrix_power_up(void) { | |||
| 179 | for (uint8_t i=0; i < MATRIX_ROWS; i++) { | 166 | for (uint8_t i=0; i < MATRIX_ROWS; i++) { |
| 180 | matrix[i] = 0; | 167 | matrix[i] = 0; |
| 181 | } | 168 | } |
| 182 | |||
| 183 | #ifdef DEBUG_MATRIX_SCAN_RATE | ||
| 184 | matrix_timer = timer_read32(); | ||
| 185 | matrix_scan_count = 0; | ||
| 186 | #endif | ||
| 187 | |||
| 188 | } | 169 | } |
| 189 | 170 | ||
| 190 | // Reads and stores a row, returning | 171 | // Reads and stores a row, returning |
| @@ -261,20 +242,6 @@ uint8_t matrix_scan(void) { | |||
| 261 | } | 242 | } |
| 262 | } | 243 | } |
| 263 | 244 | ||
| 264 | #ifdef DEBUG_MATRIX_SCAN_RATE | ||
| 265 | matrix_scan_count++; | ||
| 266 | |||
| 267 | uint32_t timer_now = timer_read32(); | ||
| 268 | if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) { | ||
| 269 | print("matrix scan frequency: "); | ||
| 270 | pdec(matrix_scan_count); | ||
| 271 | print("\n"); | ||
| 272 | |||
| 273 | matrix_timer = timer_now; | ||
| 274 | matrix_scan_count = 0; | ||
| 275 | } | ||
| 276 | #endif | ||
| 277 | |||
| 278 | bool changed = false; | 245 | bool changed = false; |
| 279 | for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { | 246 | for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { |
| 280 | // select rows from left and right hands | 247 | // select rows from left and right hands |
