Clean up systick.c
This commit is contained in:
parent
1722ba7e5d
commit
45145c1f36
@ -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.
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user