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

Added support for gmmk pro rev2 keyboard. #17655

Merged
merged 7 commits into from
Aug 14, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update iso.c
  • Loading branch information
Joy Lee committed Jul 13, 2022
commit 39ad6b361b6f7d8e55eb8b99f32048ae2111d096
24 changes: 0 additions & 24 deletions keyboards/gmmk/pro/rev2/iso/iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,27 +241,3 @@ const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
};
// clang-format on
#endif

#ifdef EEPROM_ENABLE

#include "spi_master.h"

void spi_init(void) {
static bool is_initialised = false;
if (!is_initialised) {
is_initialised = true;

// Try releasing special pins for a short time
setPinInput(SPI_SCK_PIN);
setPinInput(SPI_MOSI_PIN);
setPinInput(SPI_MISO_PIN);

chThdSleepMilliseconds(10);

palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST | PAL_WB32_CURRENT_LEVEL3);
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST);
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST);
}
}

#endif