From 17bf466ab5c3e3dbdf960e20a2793b12cdb3a7ce Mon Sep 17 00:00:00 2001 From: Kai Ryu Date: Mon, 2 Dec 2013 11:22:34 +0900 Subject: [PATCH] Change checksum algorism --- common/keymap_ex.c | 6 +++--- keyboard/gh60/keymap_poker2.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/keymap_ex.c b/common/keymap_ex.c index 3d55c08c..0c01f707 100644 --- a/common/keymap_ex.c +++ b/common/keymap_ex.c @@ -33,7 +33,7 @@ bool check_keymap_in_eeprom(void) { uint16_t checksum_in_eeprom = eeprom_read_word(&((keymap_ex_t*)EECONFIG_KEYMAP_EX)->checksum); uint16_t checksum = EECONFIG_MAGIC_NUMBER; for (uint16_t i = 0; i < KEYMAP_SIZE; i += 2) { - checksum ^= eeprom_read_word((void*)(EECONFIG_KEYMAP_FN_ACTIONS + i)); + checksum += eeprom_read_word((void*)(EECONFIG_KEYMAP_FN_ACTIONS + i)); } #ifdef DEBUG eeprom_write_word((void*)(EECONFIG_KEYMAP_DEBUG), checksum); @@ -54,7 +54,7 @@ void write_keymap_to_eeprom(void) { fn_action = pgm_read_word(fn_actions + i); } eeconfig_write_keymap_fn_action(i, fn_action); - checksum ^= fn_action; + checksum += fn_action; } } // write keymaps @@ -70,7 +70,7 @@ void write_keymap_to_eeprom(void) { if (i & 1) { keymap_word = keymap << 8; } - checksum ^= keymap_word; + checksum += keymap_word; } } // write checksum diff --git a/keyboard/gh60/keymap_poker2.h b/keyboard/gh60/keymap_poker2.h index 5d8b09a9..eba6799a 100644 --- a/keyboard/gh60/keymap_poker2.h +++ b/keyboard/gh60/keymap_poker2.h @@ -10,7 +10,7 @@ static const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { * |-----------------------------------------------------------| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| * |-----------------------------------------------------------| - * |Caps | A| S| D| F| G| H| J| K| L|Fn3| '|Return | + * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | * |-----------------------------------------------------------| * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | * |-----------------------------------------------------------|