Use `Kaleidoscope.use` instead of `USE_PLUGINS`

The latter is being obsoleted, so use the former, newer API.

Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
pull/365/head
Gergely Nagy 7 years ago
parent 30ebf9599f
commit 1b6dc98703

@ -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`

@ -43,7 +43,7 @@ void setup() {
Kaleidoscope.setup(); Kaleidoscope.setup();
USE_PLUGINS(&EEPROMSettings); Kaleidoscope.use(&EEPROMSettings);
while (!Serial) { while (!Serial) {
} }

Loading…
Cancel
Save