From 89fecb94cfd7760001f99709b43dd1afb313916b Mon Sep 17 00:00:00 2001 From: Dimitris Mantzouranis Date: Mon, 22 May 2023 18:41:43 +0300 Subject: [PATCH] platfoms: chibios: wait: only define the frequency By default, the initialization is NULL for callbacks and 0 for the rest of the fields. Additionally, not all chips share the same gpt_cfg define only the fields needed --- platforms/chibios/wait.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/chibios/wait.c b/platforms/chibios/wait.c index 88cb5e6d549d..7fe6d477b8c9 100644 --- a/platforms/chibios/wait.c +++ b/platforms/chibios/wait.c @@ -21,7 +21,7 @@ #ifdef WAIT_US_TIMER void wait_us(uint16_t duration) { - static const GPTConfig gpt_cfg = {1000000, NULL, 0, 0}; /* 1MHz timer, no callback */ + static const GPTConfig gpt_cfg = {.frequency = 1000000}; /* 1MHz timer, no callback */ if (duration == 0) { duration = 1;