diff options
| -rw-r--r-- | keyboard/ergodox_ez/matrix.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/keyboard/ergodox_ez/matrix.c b/keyboard/ergodox_ez/matrix.c index 7266cca98..2a7dfba21 100644 --- a/keyboard/ergodox_ez/matrix.c +++ b/keyboard/ergodox_ez/matrix.c | |||
| @@ -106,6 +106,25 @@ void matrix_init(void) | |||
| 106 | 106 | ||
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | void matrix_power_up(void) { | ||
| 110 | mcp23018_status = init_mcp23018(); | ||
| 111 | |||
| 112 | unselect_rows(); | ||
| 113 | init_cols(); | ||
| 114 | |||
| 115 | // initialize matrix state: all keys off | ||
| 116 | for (uint8_t i=0; i < MATRIX_ROWS; i++) { | ||
| 117 | matrix[i] = 0; | ||
| 118 | matrix_debouncing[i] = 0; | ||
| 119 | } | ||
| 120 | |||
| 121 | #ifdef DEBUG_MATRIX_SCAN_RATE | ||
| 122 | matrix_timer = timer_read32(); | ||
| 123 | matrix_scan_count = 0; | ||
| 124 | #endif | ||
| 125 | |||
| 126 | } | ||
| 127 | |||
| 109 | uint8_t matrix_scan(void) | 128 | uint8_t matrix_scan(void) |
| 110 | { | 129 | { |
| 111 | if (mcp23018_status) { // if there was an error | 130 | if (mcp23018_status) { // if there was an error |
