common/timer.c: Format with clang-format
BRANCH=none
TEST=none
#ifdef CONFIG_ZEPHYR
#include <zephyr/kernel.h> /* For k_usleep() */
#else
-extern __error("k_usleep() should only be called from Zephyr code")
-int32_t k_usleep(int32_t);
+extern __error("k_usleep() should only be called from Zephyr code") int32_t
+ k_usleep(int32_t);
#endif /* CONFIG_ZEPHYR */
#ifdef CONFIG_COMMON_RUNTIME
@@ -82,7 +82,6 @@ void process_timers(int overflow)
/* read atomically the current state of timer running */
check_timer = running_t0 = timer_running;
while (check_timer) {
-
int tskid = __fls(check_timer);
/* timer has expired ? */
if (timer_deadline[tskid].val <= now.val)
@@ -299,8 +298,7 @@ void __hw_clock_source_set(uint32_t ts)
void timer_print_info(void)
{
timestamp_t t = get_time();
- uint64_t deadline = (uint64_t)t.le.hi << 32 |
- __hw_clock_event_get();
+ uint64_t deadline = (uint64_t)t.le.hi << 32 | __hw_clock_event_get();
int tskid;
ccprintf("Time: 0x%016llx us, %11.6lld s\n"
@@ -384,8 +382,7 @@ static int command_wait(int argc, char **argv)
return EC_SUCCESS;
}
/* Typically a large delay (e.g. 3s) will cause a reset */
-DECLARE_CONSOLE_COMMAND(waitms, command_wait,
- "msec",
+DECLARE_CONSOLE_COMMAND(waitms, command_wait, "msec",
"Busy-wait for msec (large delays will reset)");
#endif
@@ -416,8 +413,7 @@ static int command_force_time(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(forcetime, command_force_time,
- "hi lo",
+DECLARE_CONSOLE_COMMAND(forcetime, command_force_time, "hi lo",
"Force current time");
#endif
@@ -429,8 +425,7 @@ static int command_get_time(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_SAFE_CONSOLE_COMMAND(gettime, command_get_time,
- NULL,
+DECLARE_SAFE_CONSOLE_COMMAND(gettime, command_get_time, NULL,
"Print current time");
#endif
@@ -441,7 +436,6 @@ static int command_timer_info(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_SAFE_CONSOLE_COMMAND(timerinfo, command_timer_info,
- NULL,
+DECLARE_SAFE_CONSOLE_COMMAND(timerinfo, command_timer_info, NULL,
"Print timer info");
#endif
