summaryrefslogtreecommitdiff
path: root/platforms/chibios/timer.c
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/chibios/timer.c
parentafcdd7079c774dec2aa4b7f2d08adf8b7310919b (diff)
Format code according to conventions (#16322)
Diffstat (limited to 'platforms/chibios/timer.c')
-rw-r--r--platforms/chibios/timer.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/platforms/chibios/timer.c b/platforms/chibios/timer.c
index 74fdd7a6fc..e3bdfdcc37 100644
--- a/platforms/chibios/timer.c
+++ b/platforms/chibios/timer.c
@@ -73,7 +73,9 @@ void timer_clear(void) {
chSysUnlock();
}
-uint16_t timer_read(void) { return (uint16_t)timer_read32(); }
+uint16_t timer_read(void) {
+ return (uint16_t)timer_read32();
+}
uint32_t timer_read32(void) {
chSysLock();
@@ -90,12 +92,16 @@ uint32_t timer_read32(void) {
ms_offset += OVERFLOW_ADJUST_MS;
}
last_ticks = ticks;
- uint32_t ms_offset_copy = ms_offset; // read while still holding the lock to ensure a consistent value
+ uint32_t ms_offset_copy = ms_offset; // read while still holding the lock to ensure a consistent value
chSysUnlock();
return (uint32_t)TIME_I2MS(ticks) + ms_offset_copy;
}
-uint16_t timer_elapsed(uint16_t last) { return TIMER_DIFF_16(timer_read(), last); }
+uint16_t timer_elapsed(uint16_t last) {
+ return TIMER_DIFF_16(timer_read(), last);
+}
-uint32_t timer_elapsed32(uint32_t last) { return TIMER_DIFF_32(timer_read32(), last); }
+uint32_t timer_elapsed32(uint32_t last) {
+ return TIMER_DIFF_32(timer_read32(), last);
+}