|
|
@ -37,23 +37,23 @@ static struct {
|
|
|
|
} testSettings;
|
|
|
|
} testSettings;
|
|
|
|
|
|
|
|
|
|
|
|
void setup () {
|
|
|
|
void setup () {
|
|
|
|
USE_PLUGINS(&EEPROMSettings);
|
|
|
|
Kaleidoscope.use(&EEPROMSettings);
|
|
|
|
|
|
|
|
|
|
|
|
/* Use other plugins that make use of the EEPROM */
|
|
|
|
/* Use other plugins that make use of the EEPROM */
|
|
|
|
|
|
|
|
|
|
|
|
Kaleidoscope.setup();
|
|
|
|
Kaleidoscope.setup();
|
|
|
|
|
|
|
|
|
|
|
|
settingsBase = EEPROMSettings.requestSlice(sizeof(testSettings));
|
|
|
|
settingsBase = EEPROMSettings.requestSlice(sizeof(testSettings));
|
|
|
|
|
|
|
|
|
|
|
|
EEPROMSettings.seal();
|
|
|
|
EEPROMSettings.seal();
|
|
|
|
|
|
|
|
|
|
|
|
if (!EEPROMSettings.isValid()) {
|
|
|
|
if (!EEPROMSettings.isValid()) {
|
|
|
|
// Handle the case where the settings are out of sync...
|
|
|
|
// Handle the case where the settings are out of sync...
|
|
|
|
// Flash LEDs, for example.
|
|
|
|
// Flash LEDs, for example.
|
|
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
EEPROM.get(settingsBase, testSettings);
|
|
|
|
EEPROM.get(settingsBase, testSettings);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
```
|
|
|
@ -122,7 +122,7 @@ The plugin provides two [Focus][focus] hooks: `FOCUS_HOOK_SETTINGS`, and
|
|
|
|
settings, and with the contents of the `EEPROM` through Focus.
|
|
|
|
settings, and with the contents of the `EEPROM` through Focus.
|
|
|
|
|
|
|
|
|
|
|
|
[focus]: https://github.com/keyboardio/Kaleidoscope-Focus
|
|
|
|
[focus]: https://github.com/keyboardio/Kaleidoscope-Focus
|
|
|
|
|
|
|
|
|
|
|
|
These provide the following `Focus` commands:
|
|
|
|
These provide the following `Focus` commands:
|
|
|
|
|
|
|
|
|
|
|
|
### `settings.crc`
|
|
|
|
### `settings.crc`
|
|
|
|