diff options
| author | Fred Sundvik <fsundvik@gmail.com> | 2017-03-28 09:59:29 +0300 |
|---|---|---|
| committer | Fred Sundvik <fsundvik@gmail.com> | 2017-04-09 18:34:59 +0300 |
| commit | 6039a4f6edefbad7604a9533d445091cd646f240 (patch) | |
| tree | 91f461fc148c491a7f04b07121cbd011d262b3ec /tmk_core | |
| parent | f5c89416527a3ec435ed49137fd2bf4af216024c (diff) | |
| download | qmk_firmware-6039a4f6edefbad7604a9533d445091cd646f240.tar.gz qmk_firmware-6039a4f6edefbad7604a9533d445091cd646f240.zip | |
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
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/common/action_util.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tmk_core/common/action_util.c b/tmk_core/common/action_util.c index cb4b25264..77848c092 100644 --- a/tmk_core/common/action_util.c +++ b/tmk_core/common/action_util.c | |||
| @@ -58,9 +58,13 @@ void set_oneshot_locked_mods(int8_t mods) { oneshot_locked_mods = mods; } | |||
| 58 | void clear_oneshot_locked_mods(void) { oneshot_locked_mods = 0; } | 58 | void clear_oneshot_locked_mods(void) { oneshot_locked_mods = 0; } |
| 59 | #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) | 59 | #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) |
| 60 | static int16_t oneshot_time = 0; | 60 | static int16_t oneshot_time = 0; |
| 61 | inline bool has_oneshot_mods_timed_out() { | 61 | bool has_oneshot_mods_timed_out(void) { |
| 62 | return TIMER_DIFF_16(timer_read(), oneshot_time) >= ONESHOT_TIMEOUT; | 62 | return TIMER_DIFF_16(timer_read(), oneshot_time) >= ONESHOT_TIMEOUT; |
| 63 | } | 63 | } |
| 64 | #else | ||
| 65 | bool has_oneshot_mods_timed_out(void) { | ||
| 66 | return false; | ||
| 67 | } | ||
| 64 | #endif | 68 | #endif |
| 65 | #endif | 69 | #endif |
| 66 | 70 | ||
