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

Add Bootmagic Lite to QMK #4215

Merged
merged 21 commits into from
Oct 27, 2018
Merged
Show file tree
Hide file tree
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
Cleanup code
  • Loading branch information
drashna committed Oct 22, 2018
commit 084a1e92b21720f3a5b64f6a16f2017aa00d7f3f
3 changes: 3 additions & 0 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ ifeq ($(strip $(LEADER_ENABLE)), yes)
endif

ifeq ($(strip $(BOOTMAGIC_LITE)), yes)
ifeq ($(strip $(BOOTMAGIC_ENABLE)), yes)
$(error Cannot enable BOOTMAGIC and BOOTMAGIC LITE at the same time)
endif
OPT_DEFS += -DBOOTMAGIC_LITE
endif

Expand Down
13 changes: 7 additions & 6 deletions quantum/quantum.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,12 +961,13 @@ void bootmagic_lite(void)
// Assumes Esc is at [0,0] and spacebar is at [4,7].
// This isn't very generalized, but we need something that doesn't
// rely on user's keymaps in firmware or EEPROM.
if ((matrix_get_row(BOOTMAGIC_LITE_KEY_ROW) & (1 << BOOTMAGIC_LITE_KEY_COLUMN)) && (matrix_get_row(BOOTMAGIC_LITE_SPACE_ROW) & (1 << BOOTMAGIC_LITE_SPACE_COLUMN))) {
// Set the TMK/QMK EEPROM state as invalid.
eeconfig_disable();
//eeprom_set_valid(false);
// Jump to bootloader.
bootloader_jump();
// if ((matrix_get_row(BOOTMAGIC_LITE_KEY_ROW) & (1 << BOOTMAGIC_LITE_KEY_COLUMN)) && (matrix_get_row(BOOTMAGIC_LITE_SPACE_ROW) & (1 << BOOTMAGIC_LITE_SPACE_COLUMN))) {
if ((matrix_get_row(0) & (1 << 0)) && (matrix_get_row(4) & (1 << 7))) {
// Set the TMK/QMK EEPROM state as invalid.
eeconfig_disable();
//eeprom_set_valid(false);
// Jump to bootloader.
bootloader_jump();
}
}

Expand Down