изменения для лучшей работы
This commit is contained in:
1 parent
a682dc80a9
commit
902d7b0932
4 files changed
+10
-9
No files matched your search
@@ -17,6 +17,8 @@
|
||||
SemaphoreHandle_t mutex;
|
||||
|
||||
int globalCount = 0;
|
||||
int task1Delay = 1250;
|
||||
int task2Delay = 1000;
|
||||
|
||||
void setup() {
|
||||
|
||||
@@ -37,11 +39,11 @@ void setup() {
|
||||
xTaskCreate(TaskMutex, // Task function
|
||||
"Task1", // Task name for humans
|
||||
128,
|
||||
1000, // Task parameter
|
||||
&task1Delay, // Task parameter
|
||||
1, // Task priority
|
||||
NULL);
|
||||
|
||||
xTaskCreate(TaskMutex, "Task2", 128, 1000, 1, NULL);
|
||||
xTaskCreate(TaskMutex, "Task2", 128, &task2Delay, 1, NULL);
|
||||
|
||||
}
|
||||
|
||||
@@ -50,7 +52,6 @@ void loop() {}
|
||||
void TaskMutex(void *pvParameters)
|
||||
{
|
||||
TickType_t delayTime = *((TickType_t*)pvParameters); // Use task parameters to define delay
|
||||
|
||||
for (;;)
|
||||
{
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user