Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Keyboard] Update to ZSA Keyboards #15644

Merged
merged 12 commits into from
Dec 29, 2021
Prev Previous commit
Next Next commit
Fix/moonlander leds (zsa#318)
* Additionall fixes

* fix spelling errors

* Remove bad matrix wake code

Co-authored-by: Drashna Jael're <drashna@live.com>
  • Loading branch information
fdidron and drashna committed Dec 29, 2021
commit a7ebfa256c4b0a8847658b4218b652bb005c03e9
18 changes: 13 additions & 5 deletions keyboards/moonlander/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void matrix_power_up(void) {
// Needed for proper wake/sleep

void matrix_power_up(void) {
mcp23018_init();
bool temp_launching = is_launching;

// outputs
setPinOutput(B10);
Expand All @@ -242,6 +242,8 @@ void matrix_power_up(void) {
setPinOutput(B14);
setPinOutput(B15);

wait_us(30);

// inputs
setPinInputLow(A0);
setPinInputLow(A1);
Expand All @@ -251,10 +253,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++) {
Expand Down