aboutsummaryrefslogtreecommitdiff
path: root/quantum/matrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/matrix.c')
-rw-r--r--quantum/matrix.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/quantum/matrix.c b/quantum/matrix.c
index 6e9f92727..f5744658c 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -86,29 +86,29 @@ uint8_t matrix_cols(void) {
86 return MATRIX_COLS; 86 return MATRIX_COLS;
87} 87}
88 88
89void matrix_power_up(void) { 89// void matrix_power_up(void) {
90#if DIODE_DIRECTION == COL2ROW 90// #if DIODE_DIRECTION == COL2ROW
91 for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { 91// for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) {
92 /* DDRxn */ 92// /* DDRxn */
93 _SFR_IO8((row_pins[r] >> 4) + 1) |= _BV(row_pins[r] & 0xF); 93// _SFR_IO8((row_pins[r] >> 4) + 1) |= _BV(row_pins[r] & 0xF);
94 toggle_row(r); 94// toggle_row(r);
95 } 95// }
96 for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { 96// for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) {
97 /* PORTxn */ 97// /* PORTxn */
98 _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF); 98// _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF);
99 } 99// }
100#else 100// #else
101 for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { 101// for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) {
102 /* DDRxn */ 102// /* DDRxn */
103 _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF); 103// _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF);
104 toggle_col(c); 104// toggle_col(c);
105 } 105// }
106 for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { 106// for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) {
107 /* PORTxn */ 107// /* PORTxn */
108 _SFR_IO8((row_pins[r] >> 4) + 2) |= _BV(row_pins[r] & 0xF); 108// _SFR_IO8((row_pins[r] >> 4) + 2) |= _BV(row_pins[r] & 0xF);
109 } 109// }
110#endif 110// #endif
111} 111// }
112 112
113void matrix_init(void) { 113void matrix_init(void) {
114 /* frees PORTF by setting the JTD bit twice within four cycles */ 114 /* frees PORTF by setting the JTD bit twice within four cycles */