summaryrefslogtreecommitdiff
path: root/platforms/avr/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/avr/timer.c
parentafcdd7079c774dec2aa4b7f2d08adf8b7310919b (diff)
Format code according to conventions (#16322)
Diffstat (limited to 'platforms/avr/timer.c')
-rw-r--r--platforms/avr/timer.c24
1 files changed, 18 insertions, 6 deletions
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++;
+}