diff options
author | skullY <skullydazed@gmail.com> | 2019-08-30 11:19:03 -0700 |
---|---|---|
committer | skullydazed <skullydazed@users.noreply.github.com> | 2019-08-30 15:01:52 -0700 |
commit | b624f32f944acdc59dcb130674c09090c5c404cb (patch) | |
tree | bc13adbba137d122d9a2c2fb2fafcbb08ac10e25 /tmk_core/common/arm_atsam/timer.c | |
parent | 61af76a10d00aba185b8338604171de490a13e3b (diff) |
clang-format changes
Diffstat (limited to 'tmk_core/common/arm_atsam/timer.c')
-rw-r--r-- | tmk_core/common/arm_atsam/timer.c | 54 |
1 files changed, 15 insertions, 39 deletions
diff --git a/tmk_core/common/arm_atsam/timer.c b/tmk_core/common/arm_atsam/timer.c index 6c3905e308..b835dd5e75 100644 --- a/tmk_core/common/arm_atsam/timer.c +++ b/tmk_core/common/arm_atsam/timer.c @@ -2,42 +2,18 @@ #include "timer.h" #include "tmk_core/protocol/arm_atsam/clks.h" -void set_time(uint64_t tset) -{ - ms_clk = tset; -} - -void timer_init(void) -{ - timer_clear(); -} - -uint16_t timer_read(void) -{ - return (uint16_t)ms_clk; -} - -uint32_t timer_read32(void) -{ - return (uint32_t)ms_clk; -} - -uint64_t timer_read64(void) -{ - return ms_clk; -} - -uint16_t timer_elapsed(uint16_t tlast) -{ - return TIMER_DIFF_16(timer_read(), tlast); -} - -uint32_t timer_elapsed32(uint32_t tlast) -{ - return TIMER_DIFF_32(timer_read32(), tlast); -} - -void timer_clear(void) -{ - set_time(0); -} +void set_time(uint64_t tset) { ms_clk = tset; } + +void timer_init(void) { timer_clear(); } + +uint16_t timer_read(void) { return (uint16_t)ms_clk; } + +uint32_t timer_read32(void) { return (uint32_t)ms_clk; } + +uint64_t timer_read64(void) { return ms_clk; } + +uint16_t timer_elapsed(uint16_t tlast) { return TIMER_DIFF_16(timer_read(), tlast); } + +uint32_t timer_elapsed32(uint32_t tlast) { return TIMER_DIFF_32(timer_read32(), tlast); } + +void timer_clear(void) { set_time(0); } |