From 1b6dc98703e04ee3b8cbbd596d4c5da709b9a689 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 17 Aug 2017 11:48:20 +0200 Subject: [PATCH] Use `Kaleidoscope.use` instead of `USE_PLUGINS` The latter is being obsoleted, so use the former, newer API. Signed-off-by: Gergely Nagy --- README.md | 16 ++++++++-------- examples/EEPROM-Settings/EEPROM-Settings.ino | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 617b3ddb..cff535be 100644 --- a/README.md +++ b/README.md @@ -37,23 +37,23 @@ static struct { } testSettings; void setup () { - USE_PLUGINS(&EEPROMSettings); + Kaleidoscope.use(&EEPROMSettings); /* Use other plugins that make use of the EEPROM */ - + Kaleidoscope.setup(); - + settingsBase = EEPROMSettings.requestSlice(sizeof(testSettings)); - + EEPROMSettings.seal(); - + if (!EEPROMSettings.isValid()) { // Handle the case where the settings are out of sync... // Flash LEDs, for example. - + return; } - + 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. [focus]: https://github.com/keyboardio/Kaleidoscope-Focus - + These provide the following `Focus` commands: ### `settings.crc` diff --git a/examples/EEPROM-Settings/EEPROM-Settings.ino b/examples/EEPROM-Settings/EEPROM-Settings.ino index 3e0fb16f..9c8db0b0 100644 --- a/examples/EEPROM-Settings/EEPROM-Settings.ino +++ b/examples/EEPROM-Settings/EEPROM-Settings.ino @@ -43,7 +43,7 @@ void setup() { Kaleidoscope.setup(); - USE_PLUGINS(&EEPROMSettings); + Kaleidoscope.use(&EEPROMSettings); while (!Serial) { }