Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

Commit

Permalink
Fix issues with suspend code for ZSA split boards (qmk#10640)
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna authored and Oscar Carlsson committed Nov 2, 2020
1 parent 7759721 commit 3b82fa6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
15 changes: 15 additions & 0 deletions keyboards/ergodox_ez/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,18 @@ static void select_row(uint8_t row) {
}
}
}

// DO NOT REMOVE
// Needed for proper wake/sleep
void matrix_power_up(void) {
mcp23018_status = init_mcp23018();

unselect_rows();
init_cols();

// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
matrix[i] = 0;
}

}
29 changes: 29 additions & 0 deletions keyboards/moonlander/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,3 +268,32 @@ void matrix_print(void) {
printf("\n");
}
}

// DO NOT REMOVE
// Needed for proper wake/sleep
void matrix_power_up(void) {
mcp23018_init();

// outputs
setPinOutput(B10);
setPinOutput(B11);
setPinOutput(B12);
setPinOutput(B13);
setPinOutput(B14);
setPinOutput(B15);

// inputs
setPinInputLow(A0);
setPinInputLow(A1);
setPinInputLow(A2);
setPinInputLow(A3);
setPinInputLow(A6);
setPinInputLow(A7);
setPinInputLow(B0);

// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
matrix[i] = 0;
}

}

0 comments on commit 3b82fa6

Please sign in to comment.