From 2c27bf8476de98bf2b0005508ab79cd3f3419ffa Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 17 Aug 2017 12:41:04 +0200 Subject: [PATCH] Stop using deprecated interfaces Use `Kaleidoscope.use`, `Kaleidoscope.useEventHandlerHook`, and `Kaleidoscope.useLoopHook` instead of the deprecated `USE_PLUGINS`, `event_handler_hook_use` and `loop_hook_use` interfaces. Signed-off-by: Gergely Nagy --- README.md | 6 +++--- examples/TapDance/TapDance.ino | 2 +- src/Kaleidoscope/TapDance.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6a5536db..1606d22b 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ time an action is to be performed. TD(0) // later in the Sketch: -void tapDanceAction(uint8_t tap_dance_index, uint8_t tap_count, +void tapDanceAction(uint8_t tap_dance_index, uint8_t tap_count, kaleidoscope::TapDance::ActionType tap_dance_action) { switch (tap_dance_index) { case 0: @@ -84,8 +84,8 @@ void tapDanceAction(uint8_t tap_dance_index, uint8_t tap_count, } void setup() { - USE_PLUGINS(&TapDance); - + Kaleidoscope.use(&TapDance); + Kaleidoscope.setup (); } ``` diff --git a/examples/TapDance/TapDance.ino b/examples/TapDance/TapDance.ino index 81402627..a484f240 100644 --- a/examples/TapDance/TapDance.ino +++ b/examples/TapDance/TapDance.ino @@ -53,7 +53,7 @@ void tapDanceAction(uint8_t tap_dance_index, byte row, byte col, uint8_t tap_cou } void setup() { - USE_PLUGINS(&TapDance); + Kaleidoscope.use(&TapDance); Kaleidoscope.setup(); } diff --git a/src/Kaleidoscope/TapDance.cpp b/src/Kaleidoscope/TapDance.cpp index 894555e4..8d55ce6c 100644 --- a/src/Kaleidoscope/TapDance.cpp +++ b/src/Kaleidoscope/TapDance.cpp @@ -100,8 +100,8 @@ TapDance::TapDance(void) { } void TapDance::begin(void) { - event_handler_hook_use(eventHandlerHook); - loop_hook_use(loopHook); + Kaleidoscope.useEventHandlerHook(eventHandlerHook); + Kaleidoscope.useLoopHook(loopHook); } void TapDance::actionKeys(uint8_t tap_count, ActionType tap_dance_action, uint8_t max_keys, const Key tap_keys[]) {