diff options
Diffstat (limited to 'keyboards/moonlander/matrix.c')
| -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 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 | ||
| 274 | void 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 | } | ||
