From d44290b91b96f89cfc2dfa85a59cc267ffd13fb4 Mon Sep 17 00:00:00 2001 From: tmk Date: Thu, 21 Mar 2013 14:42:40 +0900 Subject: Add NO_ACTION_ONESHOT config option --- common/action_oneshot.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 common/action_oneshot.c (limited to 'common/action_oneshot.c') diff --git a/common/action_oneshot.c b/common/action_oneshot.c new file mode 100644 index 0000000000..d34f44b5ab --- /dev/null +++ b/common/action_oneshot.c @@ -0,0 +1,21 @@ +#include "action_oneshot.h" + + +#ifndef NO_ACTION_ONESHOT +oneshot_state_t oneshot_state; + +void oneshot_start(uint8_t mods) +{ + oneshot_state.mods = mods; +} + +void oneshot_cancel(void) +{ + oneshot_state.mods = 0; +} + +void oneshot_toggle(void) +{ + oneshot_state.disabled = !oneshot_state.disabled; +} +#endif -- cgit v1.2.3