aboutsummaryrefslogtreecommitdiff
path: root/common/action_oneshot.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/action_oneshot.c')
-rw-r--r--common/action_oneshot.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/common/action_oneshot.c b/common/action_oneshot.c
new file mode 100644
index 000000000..d34f44b5a
--- /dev/null
+++ b/common/action_oneshot.c
@@ -0,0 +1,21 @@
1#include "action_oneshot.h"
2
3
4#ifndef NO_ACTION_ONESHOT
5oneshot_state_t oneshot_state;
6
7void oneshot_start(uint8_t mods)
8{
9 oneshot_state.mods = mods;
10}
11
12void oneshot_cancel(void)
13{
14 oneshot_state.mods = 0;
15}
16
17void oneshot_toggle(void)
18{
19 oneshot_state.disabled = !oneshot_state.disabled;
20}
21#endif