From 45145c1f36527d57877cf636a1e1c5ba47461538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Sun, 10 Oct 2021 21:02:39 +0200 Subject: [PATCH] Clean up systick.c --- stm-firmware/include/reflow-controller/systick.h | 2 +- stm-firmware/systick.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stm-firmware/include/reflow-controller/systick.h b/stm-firmware/include/reflow-controller/systick.h index f69d2f8..604d633 100644 --- a/stm-firmware/include/reflow-controller/systick.h +++ b/stm-firmware/include/reflow-controller/systick.h @@ -74,7 +74,7 @@ void systick_wait_ms(uint32_t ms); * @warning Use this with care in interrupts. It may lead to race conditions. It is generally safe for use in standard program flow though. * @return Global millisecond tick. */ -uint64_t systick_get_global_tick(); +uint64_t systick_get_global_tick(void); /** * @brief Calculate the uptime from the current millisecond tick. diff --git a/stm-firmware/systick.c b/stm-firmware/systick.c index 317f964..18e458f 100644 --- a/stm-firmware/systick.c +++ b/stm-firmware/systick.c @@ -40,10 +40,11 @@ void systick_setup(void) void systick_wait_ms(uint32_t ms) { wait_tick_ms = 0UL; - while (wait_tick_ms < ms); + while (wait_tick_ms < ms) + ; } -uint64_t systick_get_global_tick() +uint64_t systick_get_global_tick(void) { uint64_t temp; @@ -62,7 +63,6 @@ void systick_get_uptime_from_tick(uint32_t *days, uint32_t *hours, uint32_t *min uint32_t hs; uint32_t ds; - tick_secs = systick_get_global_tick() / 1000; secs = tick_secs % 60; tick_secs /= 60; @@ -111,7 +111,7 @@ bool __attribute__((optimize("O3"))) systick_ticks_have_passed(uint64_t start_ti * * @warning For calling cyclic functions use separate timers/flags and don't spoil this function */ -void __attribute__((optimize("O3"))) SysTick_Handler() +void __attribute__((optimize("O3"))) SysTick_Handler(void) { static uint32_t IN_SECTION(.ccm.bss) pre_tick = 0UL;