From 75308642f7ee408a5a864129de0729ecca6670d9 Mon Sep 17 00:00:00 2001 From: Alexander Bobkov Date: Tue, 5 Aug 2025 01:44:04 -0400 Subject: [PATCH] FreeRTOS --- ESP32-IDF_FreeRTOS/I2C_MultiDevice/main/hello_world_main.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 0aa3d4d64..a878be0ee 100644 --- a/ESP32-IDF_FreeRTOS/I2C_MultiDevice/main/hello_world_main.c +++ b/ESP32-IDF_FreeRTOS/I2C_MultiDevice/main/hello_world_main.c @@ -53,6 +53,13 @@ void app_main(void) printf("Minimum free heap size: %" PRIu32 " bytes\n", esp_get_minimum_free_heap_size()); + + xMutex = xSemaphoreCreateMutex(); + if (xMutex == NULL) { + printf("Failed to create mutex\n"); + return; + } + xTaskCreate(task1, "Task1", 2048, NULL, 5, NULL); xTaskCreate(task2, "Task2", 2048, NULL, 5, NULL);