From 5529ea5c3cb9b08c07ffba09b160ac6acb5543c8 Mon Sep 17 00:00:00 2001 From: Alexander Bobkov Date: Tue, 5 Aug 2025 02:55:52 -0400 Subject: [PATCH] FreeRTOS --- .../I2C_MultiDevice/main/hello_world_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ESP32-IDF_FreeRTOS/I2C_MultiDevice/main/hello_world_main.c b/ESP32-IDF_FreeRTOS/I2C_MultiDevice/main/hello_world_main.c index 98f690ceb..3d76b890e 100644 --- a/ESP32-IDF_FreeRTOS/I2C_MultiDevice/main/hello_world_main.c +++ b/ESP32-IDF_FreeRTOS/I2C_MultiDevice/main/hello_world_main.c @@ -90,7 +90,7 @@ void app_main(void) void task1(void *pvParameters) { - int x = 0; + uint32_t x = 0; while (1) { if (xSemaphoreTake(xMutex, 1500)) { @@ -102,7 +102,7 @@ void task1(void *pvParameters) { .num3 = 0, }; xQueueSend(xQueue1, &data, 0); - printf("Task 1 sent data.\n"); + printf("Task 1 sent x=%" PRIu32 "\n"); x++; vTaskDelay((500)); // Delay for 1 second @@ -116,7 +116,7 @@ void task1(void *pvParameters) { } void task2(void *pvParameters) { - int y = 0; + uint32_t y = 0; while (1) { if (xSemaphoreTake(xMutex, 1500)) { @@ -128,7 +128,7 @@ void task2(void *pvParameters) { .num3 = 0, }; xQueueSend(xQueue2, &data, 0); - printf("Task 2 sent data.\n"); + printf("Task 2 sent y=%" PRIu32 "\n"); y++; vTaskDelay((2000)); // Delay for 2 seconds