diff options
| author | Joel Challis <git@zvecr.com> | 2021-07-24 19:56:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-24 19:56:45 +0100 |
| commit | b5bcd5b0a18079df1252a718588255c62d24a054 (patch) | |
| tree | 886b84473e94718fed4de18a6d6c5b5b9e46eb89 /tmk_core/common/timer.h | |
| parent | 145d89ab9192d08b7e22a14105d27988944b7b0c (diff) | |
| download | qmk_firmware-b5bcd5b0a18079df1252a718588255c62d24a054.tar.gz qmk_firmware-b5bcd5b0a18079df1252a718588255c62d24a054.zip | |
Refactor some platform dependent logic (#13675)
Diffstat (limited to 'tmk_core/common/timer.h')
| -rw-r--r-- | tmk_core/common/timer.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/tmk_core/common/timer.h b/tmk_core/common/timer.h index 58f637dd9..abddcea85 100644 --- a/tmk_core/common/timer.h +++ b/tmk_core/common/timer.h | |||
| @@ -18,11 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 18 | #pragma once | 18 | #pragma once |
| 19 | 19 | ||
| 20 | #include <stdint.h> | 20 | #include <stdint.h> |
| 21 | #include <stdbool.h> | ||
| 22 | |||
| 23 | #if defined(__AVR__) | ||
| 24 | # include "avr/timer_avr.h" | ||
| 25 | #endif | ||
| 26 | 21 | ||
| 27 | #define TIMER_DIFF(a, b, max) ((max == UINT8_MAX) ? ((uint8_t)((a) - (b))) : ((max == UINT16_MAX) ? ((uint16_t)((a) - (b))) : ((max == UINT32_MAX) ? ((uint32_t)((a) - (b))) : ((a) >= (b) ? (a) - (b) : (max) + 1 - (b) + (a))))) | 22 | #define TIMER_DIFF(a, b, max) ((max == UINT8_MAX) ? ((uint8_t)((a) - (b))) : ((max == UINT16_MAX) ? ((uint16_t)((a) - (b))) : ((max == UINT32_MAX) ? ((uint32_t)((a) - (b))) : ((a) >= (b) ? (a) - (b) : (max) + 1 - (b) + (a))))) |
| 28 | #define TIMER_DIFF_8(a, b) TIMER_DIFF(a, b, UINT8_MAX) | 23 | #define TIMER_DIFF_8(a, b) TIMER_DIFF(a, b, UINT8_MAX) |
