mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-18 01:46:09 +00:00
Empty implementation of has_onshot_mods_timed_out
When the timeout is zero or not defined, the function now returns false. Fixes a linker error when the visualizer is enabled
This commit is contained in:
parent
f5c8941652
commit
6039a4f6ed
1 changed files with 5 additions and 1 deletions
|
@ -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; }
|
||||
#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 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;
|
||||
}
|
||||
#else
|
||||
bool has_oneshot_mods_timed_out(void) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue