From 3764b03734c707f278a6838f2721bfd7838ffb72 Mon Sep 17 00:00:00 2001 From: lisekt84 Date: Mon, 8 Nov 2021 20:29:13 +0100 Subject: [PATCH] freertos: Fix loss of precision in pdTICKS_TO_MS Closes https://github.com/espressif/esp-idf/pull/7856 Closes https://github.com/espressif/esp-idf/issues/7853 [darian@espressif.com: Updated commit message] Signed-off-by: Darian Leung --- components/freertos/include/freertos/projdefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/freertos/include/freertos/projdefs.h b/components/freertos/include/freertos/projdefs.h index ce647fb6fb..61cb7ebe54 100644 --- a/components/freertos/include/freertos/projdefs.h +++ b/components/freertos/include/freertos/projdefs.h @@ -42,7 +42,7 @@ definition here is not suitable for your application. */ #endif #ifndef pdTICKS_TO_MS - #define pdTICKS_TO_MS( xTicks ) ( ( uint32_t ) ( xTicks ) * 1000 / configTICK_RATE_HZ ) + #define pdTICKS_TO_MS( xTicks ) ( ( TickType_t ) ( ( uint64_t ) ( xTicks ) * 1000 / configTICK_RATE_HZ ) ) #endif