From 7d6fc87e3418703592678e4616916fd832738f3f Mon Sep 17 00:00:00 2001 From: Craig Disselkoen Date: Sat, 7 Oct 2017 10:02:06 -0700 Subject: [PATCH] Add deprecation message for deprecated keyswitch_state functions NOTE: these have been deprecated since commit 3154f7c on Jul 24, 2017 --- src/keyswitch_state.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/keyswitch_state.h b/src/keyswitch_state.h index f98a1650..420b8775 100644 --- a/src/keyswitch_state.h +++ b/src/keyswitch_state.h @@ -38,7 +38,15 @@ // Deprecated - Remove once the core has transitioned -#define key_was_pressed(keyState) keyWasPressed(keyState) -#define key_is_pressed(keyState) keyIsPressed(keyState) -#define key_toggled_on(keyState) keyToggledOn(keyState) -#define key_toggled_off(keyState) keyToggledOff(keyState) +inline uint8_t __attribute__((deprecated("Use keyWasPressed instead"))) key_was_pressed(uint8_t keyState) { + return keyWasPressed(keyState); +} +inline uint8_t __attribute__((deprecated("Use keyIsPressed instead"))) key_is_pressed(uint8_t keyState) { + return keyIsPressed(keyState); +} +inline uint8_t __attribute__((deprecated("Use keyToggledOn instead"))) key_toggled_on(uint8_t keyState) { + return keyToggledOn(keyState); +} +inline uint8_t __attribute__((deprecated("Use keyToggledOff instead"))) key_toggled_off(uint8_t keyState) { + return keyToggledOff(keyState); +}