summaryrefslogtreecommitdiff
path: root/platforms/timer.h
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-02-12 10:29:31 -0800
committerGitHub <noreply@github.com>2022-02-12 18:29:31 +0000
commit63646e8906e062d1c1de3925cba70c4e3426a855 (patch)
tree4e91648b77b838e1125cf86331d7e84bde6d07a9 /platforms/timer.h
parentafcdd7079c774dec2aa4b7f2d08adf8b7310919b (diff)
Format code according to conventions (#16322)
Diffstat (limited to 'platforms/timer.h')
-rw-r--r--platforms/timer.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/platforms/timer.h b/platforms/timer.h
index 02e39e79e7..d55f40f0b0 100644
--- a/platforms/timer.h
+++ b/platforms/timer.h
@@ -52,14 +52,22 @@ uint32_t timer_elapsed32(uint32_t last);
52# define TIMER_DIFF_FAST(a, b) TIMER_DIFF_16(a, b) 52# define TIMER_DIFF_FAST(a, b) TIMER_DIFF_16(a, b)
53# define timer_expired_fast(current, future) timer_expired(current, future) 53# define timer_expired_fast(current, future) timer_expired(current, future)
54typedef uint16_t fast_timer_t; 54typedef uint16_t fast_timer_t;
55fast_timer_t inline timer_read_fast(void) { return timer_read(); } 55fast_timer_t inline timer_read_fast(void) {
56fast_timer_t inline timer_elapsed_fast(fast_timer_t last) { return timer_elapsed(last); } 56 return timer_read();
57}
58fast_timer_t inline timer_elapsed_fast(fast_timer_t last) {
59 return timer_elapsed(last);
60}
57#else 61#else
58# define TIMER_DIFF_FAST(a, b) TIMER_DIFF_32(a, b) 62# define TIMER_DIFF_FAST(a, b) TIMER_DIFF_32(a, b)
59# define timer_expired_fast(current, future) timer_expired32(current, future) 63# define timer_expired_fast(current, future) timer_expired32(current, future)
60typedef uint32_t fast_timer_t; 64typedef uint32_t fast_timer_t;
61fast_timer_t inline timer_read_fast(void) { return timer_read32(); } 65fast_timer_t inline timer_read_fast(void) {
62fast_timer_t inline timer_elapsed_fast(fast_timer_t last) { return timer_elapsed32(last); } 66 return timer_read32();
67}
68fast_timer_t inline timer_elapsed_fast(fast_timer_t last) {
69 return timer_elapsed32(last);
70}
63#endif 71#endif
64 72
65#ifdef __cplusplus 73#ifdef __cplusplus