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();
if (settings_.magic[0] != 'K' || settings_.magic[1] != 'S') {
settings_.magic[0] = 'K';
settings_.magic[1] = 'S';
settings_.version = 0;
settings_.crc = CRC.crc;
/* Until we set a version, consider the EEPROM contents flexible, and always
* update the CRC. This will always result in the settings being considered
* valid.
*/
if (settings_.version == 0xff) {
return update();
}

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

Loading…
Cancel
Save