summaryrefslogtreecommitdiff
path: root/keyboards/moonlander
diff options
context:
space:
mode:
authorFlorian Didron <fdidron@users.noreply.github.com>2020-10-17 14:48:49 +0900
committerGitHub <noreply@github.com>2020-10-17 14:48:49 +0900
commitbc8438f739af6165656296c8cbacc108b1c20af1 (patch)
tree208df3131f693a49af335c85eddea4c9b10f8ab9 /keyboards/moonlander
parenta270d67f9f7a3d5ccbe354007775ac3f1033376f (diff)
Fix/moonlander leds (#318)
* Additionall fixes * fix spelling errors * Remove bad matrix wake code Co-authored-by: Drashna Jael're <drashna@live.com>
Diffstat (limited to 'keyboards/moonlander')
-rw-r--r--keyboards/moonlander/matrix.c18
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++) {