mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-07 11:48:48 +00:00
FreeRTOS
This commit is contained in:
@@ -82,6 +82,9 @@ void task1(void *pvParameters) {
|
||||
vTaskDelay((500)); // Delay for 1 second
|
||||
xSemaphoreGive(xMutex);
|
||||
}
|
||||
else {
|
||||
printf("Task 1 timed out waiting for mutex\n");
|
||||
}
|
||||
vTaskDelay((100));
|
||||
}
|
||||
}
|
||||
@@ -94,6 +97,9 @@ void task2(void *pvParameters) {
|
||||
vTaskDelay((2000)); // Delay for 2 seconds
|
||||
xSemaphoreGive(xMutex);
|
||||
}
|
||||
else {
|
||||
printf("Task 2 timed out waiting for mutex\n");
|
||||
}
|
||||
vTaskDelay((100));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user