From b3e0c9213ae95cb976268efffd7734ae4a2701e2 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/FreeRTOS-Kernel/include/freertos/projdefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/freertos/FreeRTOS-Kernel/include/freertos/projdefs.h b/components/freertos/FreeRTOS-Kernel/include/freertos/projdefs.h index ec8022ca0b..1949e6e30b 100644 --- a/components/freertos/FreeRTOS-Kernel/include/freertos/projdefs.h +++ b/components/freertos/FreeRTOS-Kernel/include/freertos/projdefs.h @@ -41,7 +41,7 @@ typedef void (* TaskFunction_t)( void * ); #endif #ifdef ESP_PLATFORM #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 #endif // ESP_PLATFORM