|
|
@ -58,9 +58,13 @@ void set_oneshot_locked_mods(int8_t mods) { oneshot_locked_mods = mods; }
|
|
|
|
void clear_oneshot_locked_mods(void) { oneshot_locked_mods = 0; }
|
|
|
|
void clear_oneshot_locked_mods(void) { oneshot_locked_mods = 0; }
|
|
|
|
#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
|
|
|
|
#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
|
|
|
|
static int16_t oneshot_time = 0;
|
|
|
|
static int16_t oneshot_time = 0;
|
|
|
|
inline bool has_oneshot_mods_timed_out() {
|
|
|
|
bool has_oneshot_mods_timed_out(void) {
|
|
|
|
return TIMER_DIFF_16(timer_read(), oneshot_time) >= ONESHOT_TIMEOUT;
|
|
|
|
return TIMER_DIFF_16(timer_read(), oneshot_time) >= ONESHOT_TIMEOUT;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
bool has_oneshot_mods_timed_out(void) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|