diff options
author | Drashna Jaelre <drashna@live.com> | 2020-10-14 08:23:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-14 16:23:08 +0100 |
commit | 6aae926b5f90f9e05e4dd022a5b94f0ab52c8614 (patch) | |
tree | e8f67b48f825f4393fe718489d8e36bc108d516f /keyboards/moonlander | |
parent | 49dd1edb6961db1d5dc3850b586545eee8a21fc5 (diff) | |
download | qmk_firmware-6aae926b5f90f9e05e4dd022a5b94f0ab52c8614.tar.gz qmk_firmware-6aae926b5f90f9e05e4dd022a5b94f0ab52c8614.zip |
Fix issues with suspend code for ZSA split boards (#10640)
Diffstat (limited to 'keyboards/moonlander')
-rw-r--r-- | keyboards/moonlander/matrix.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/keyboards/moonlander/matrix.c b/keyboards/moonlander/matrix.c index b90c1b59e6..df498bd6e3 100644 --- a/keyboards/moonlander/matrix.c +++ b/keyboards/moonlander/matrix.c @@ -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; + } + +} |