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/avr/timer.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'platforms/avr/timer.c') diff --git a/platforms/avr/timer.c b/platforms/avr/timer.c index c2e6c6e081..9fb671ae8d 100644 --- a/platforms/avr/timer.c +++ b/platforms/avr/timer.c @@ -73,7 +73,9 @@ void timer_init(void) { * FIXME: needs doc */ inline void timer_clear(void) { - ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { timer_count = 0; } + ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { + timer_count = 0; + } } /** \brief timer read @@ -83,7 +85,9 @@ inline void timer_clear(void) { inline uint16_t timer_read(void) { uint32_t t; - ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { t = timer_count; } + ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { + t = timer_count; + } return (t & 0xFFFF); } @@ -95,7 +99,9 @@ inline uint16_t timer_read(void) { inline uint32_t timer_read32(void) { uint32_t t; - ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { t = timer_count; } + ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { + t = timer_count; + } return t; } @@ -107,7 +113,9 @@ inline uint32_t timer_read32(void) { inline uint16_t timer_elapsed(uint16_t last) { uint32_t t; - ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { t = timer_count; } + ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { + t = timer_count; + } return TIMER_DIFF_16((t & 0xFFFF), last); } @@ -119,7 +127,9 @@ inline uint16_t timer_elapsed(uint16_t last) { inline uint32_t timer_elapsed32(uint32_t last) { uint32_t t; - ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { t = timer_count; } + ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { + t = timer_count; + } return TIMER_DIFF_32(t, last); } @@ -130,4 +140,6 @@ inline uint32_t timer_elapsed32(uint32_t last) { #else # define TIMER_INTERRUPT_VECTOR TIMER0_COMP_vect #endif -ISR(TIMER_INTERRUPT_VECTOR, ISR_NOBLOCK) { timer_count++; } +ISR(TIMER_INTERRUPT_VECTOR, ISR_NOBLOCK) { + timer_count++; +} -- cgit v1.2.3