Merge pull request #8 from keyboardio/f/header-cleanup

Clean up the EEPROM header
pull/365/head
Jesse Vincent 6 years ago committed by GitHub
commit 9a86deca51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -52,12 +52,11 @@ void EEPROMSettings::seal(void) {
CRC.finalize(); CRC.finalize();
if (settings_.magic[0] != 'K' || settings_.magic[1] != 'S') { /* Until we set a version, consider the EEPROM contents flexible, and always
settings_.magic[0] = 'K'; * update the CRC. This will always result in the settings being considered
settings_.magic[1] = 'S'; * valid.
settings_.version = 0; */
settings_.crc = CRC.crc; if (settings_.version == 0xff) {
return update(); return update();
} }

@ -45,7 +45,6 @@ class EEPROMSettings : public kaleidoscope::Plugin {
static bool sealed_; static bool sealed_;
static struct settings { static struct settings {
char magic[2];
uint8_t version; uint8_t version;
uint16_t crc; uint16_t crc;
} settings_; } settings_;

Loading…
Cancel
Save