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