diff options
| author | Damien <Dbroqua@users.noreply.github.com> | 2017-04-13 13:26:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-13 13:26:02 +0200 |
| commit | a43cb6c0af3ac616903172c4b8932bfc5ee4939b (patch) | |
| tree | c3ca94b544ab832507b37b6268bb04f7f7eedb4a /tmk_core/common/action_util.c | |
| parent | 3e41cde9f99778ca30c03b97470c32780379db43 (diff) | |
| parent | d3301c0f8b0005738ab9aa2030d83739ffb5c4b6 (diff) | |
| download | qmk_firmware-a43cb6c0af3ac616903172c4b8932bfc5ee4939b.tar.gz qmk_firmware-a43cb6c0af3ac616903172c4b8932bfc5ee4939b.zip | |
Merge pull request #20 from qmk/master
Merge from QMK
Diffstat (limited to 'tmk_core/common/action_util.c')
| -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 | ||
