From 63646e8906e062d1c1de3925cba70c4e3426a855 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sat, 12 Feb 2022 10:29:31 -0800 Subject: Format code according to conventions (#16322) --- platforms/chibios/timer.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'platforms/chibios/timer.c') 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); +} -- cgit v1.2.3