diff options
Diffstat (limited to 'keyboards/moonlander')
-rw-r--r-- | keyboards/moonlander/matrix.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/keyboards/moonlander/matrix.c b/keyboards/moonlander/matrix.c index a67a091705..8daebd6973 100644 --- a/keyboards/moonlander/matrix.c +++ b/keyboards/moonlander/matrix.c @@ -264,7 +264,7 @@ void matrix_print(void) { // Needed for proper wake/sleep void matrix_power_up(void) { - mcp23018_init(); + bool temp_launching = is_launching; // outputs setPinOutput(B10); @@ -274,6 +274,8 @@ void matrix_power_up(void) { setPinOutput(B14); setPinOutput(B15); + wait_us(30); + // inputs setPinInputLow(A0); setPinInputLow(A1); @@ -283,10 +285,16 @@ void matrix_power_up(void) { setPinInputLow(A7); setPinInputLow(B0); - memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); - memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); - memset(matrix_debouncing_right, 0, MATRIX_COLS * sizeof(matrix_row_t)); - + mcp23018_init(); + is_launching = temp_launching; + if (!temp_launching) { + ML_LED_1(false); + ML_LED_2(false); + ML_LED_3(false); + ML_LED_4(false); + ML_LED_5(false); + ML_LED_6(false); + } // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { |