aboutsummaryrefslogtreecommitdiff
path: root/keyboards/moonlander/matrix.c
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2020-10-14 08:23:08 -0700
committerGitHub <noreply@github.com>2020-10-14 16:23:08 +0100
commit6aae926b5f90f9e05e4dd022a5b94f0ab52c8614 (patch)
treee8f67b48f825f4393fe718489d8e36bc108d516f /keyboards/moonlander/matrix.c
parent49dd1edb6961db1d5dc3850b586545eee8a21fc5 (diff)
downloadqmk_firmware-6aae926b5f90f9e05e4dd022a5b94f0ab52c8614.tar.gz
qmk_firmware-6aae926b5f90f9e05e4dd022a5b94f0ab52c8614.zip
Fix issues with suspend code for ZSA split boards (#10640)
Diffstat (limited to 'keyboards/moonlander/matrix.c')
-rw-r--r--keyboards/moonlander/matrix.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/keyboards/moonlander/matrix.c b/keyboards/moonlander/matrix.c
index b90c1b59e..df498bd6e 100644
--- a/keyboards/moonlander/matrix.c
+++ b/keyboards/moonlander/matrix.c
@@ -268,3 +268,32 @@ void matrix_print(void) {
268 printf("\n"); 268 printf("\n");
269 } 269 }
270} 270}
271
272// DO NOT REMOVE
273// Needed for proper wake/sleep
274void matrix_power_up(void) {
275 mcp23018_init();
276
277 // outputs
278 setPinOutput(B10);
279 setPinOutput(B11);
280 setPinOutput(B12);
281 setPinOutput(B13);
282 setPinOutput(B14);
283 setPinOutput(B15);
284
285 // inputs
286 setPinInputLow(A0);
287 setPinInputLow(A1);
288 setPinInputLow(A2);
289 setPinInputLow(A3);
290 setPinInputLow(A6);
291 setPinInputLow(A7);
292 setPinInputLow(B0);
293
294 // initialize matrix state: all keys off
295 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
296 matrix[i] = 0;
297 }
298
299}